/* Biscuit website. One stylesheet for every page. No external resources: the font is served
   from this site, so a visit sends nothing to Google or anyone else. Every text color below was
   measured against every background it sits on and passes WCAG 2.2 AA (4.5:1 or better). */

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/fonts/plus-jakarta-sans.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1C1C1E;        /* headings: 17:1 on white */
  --body: #4A4239;       /* body text: 9.9:1 */
  --muted: #6B6157;      /* small print: 6.0:1, 5.3:1 on the palest tile */
  --page: #FFFBF7;
  --white: #FFFFFF;
  --line: #EFE5DA;
  --orange: #EA6F3E;     /* Biscuit orange, for shapes only (3.1:1 is below the text rule) */
  --orange-t: #B0441B;   /* orange for text and links: 5.7:1 */
  --t-home: #FFF1EA;  --t-home-ink: #B0441B;
  --t-scan: #EAF7EE;  --t-scan-ink: #17784A;
  --t-health: #EAF4FF; --t-health-ink: #22609E;
  --t-learn: #F0EDFF; --t-learn-ink: #6A469C;
  --t-sun: #FFF4E0;   --t-sun-ink: #8A5A0E;
  --focus: #22609E;
  --radius: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0; font-weight: 800; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--orange-t); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
strong { color: var(--ink); font-weight: 700; }

/* Skip link: first thing a keyboard or screen reader user reaches. */
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: 12px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 16px; color: var(--white); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); background: var(--page); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand img { width: 36px; height: 36px; }
.brand:hover { color: var(--ink); }
.site-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.site-nav a { display: inline-block; padding: 10px 12px; color: var(--body); text-decoration: none; font-weight: 600; font-size: 0.95rem; border-radius: 10px; }
.site-nav a:hover { color: var(--ink); background: var(--t-home); }
.site-nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 560px) { .site-nav .opt { display: none; } }

/* Hero: the bear, one clear headline, the habits. */
.hero { text-align: center; padding: 64px 0 40px; }
.hero-bear { width: 220px; height: 220px; margin: 0 auto 26px; animation: hello 1.6s ease-out 0.3s 1 both; transform-origin: 50% 85%; }
@keyframes hello { 0% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 50% { transform: rotate(5deg); } 75% { transform: rotate(-2deg); } 100% { transform: rotate(0); } }
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 3.6rem); max-width: 15ch; margin: 0 auto; }
.hero .lede { font-size: 1.2rem; max-width: 36rem; margin: 20px auto 0; }
.hero .soon { margin-top: 18px; font-size: 0.95rem; font-weight: 700; color: var(--orange-t); }

/* A day of habits, drawn the way the app shows them. */
.day { max-width: 760px; margin: 44px auto 0; background: var(--white); border: 1px solid var(--line); border-radius: 26px; padding: 22px; text-align: left; }
.day-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 4px 14px; }
.day-top h2 { font-size: 1.15rem; letter-spacing: -0.01em; }
.day-top p { font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.habits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.habits li { border-radius: 16px; padding: 14px 12px 16px; font-size: 0.92rem; font-weight: 700; color: var(--ink); line-height: 1.35; min-height: 112px; display: flex; flex-direction: column; gap: 10px; }
.habits li:nth-child(1) { background: var(--t-home); }
.habits li:nth-child(2) { background: var(--t-scan); }
.habits li:nth-child(3) { background: var(--t-health); }
.habits li:nth-child(4) { background: var(--t-learn); }
.habits li:nth-child(5) { background: var(--t-sun); }
.tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--muted); flex-shrink: 0; }
.tick { position: relative; }
.done .tick { border-color: var(--orange); background: var(--orange); }
/* The check mark is drawn with borders, so the strict security policy needs no image exception. */
.done .tick::after { content: ''; position: absolute; left: 6px; top: 3px; width: 6px; height: 11px; border-right: 3px solid #FFFFFF; border-bottom: 3px solid #FFFFFF; transform: rotate(45deg); }
@media (max-width: 760px) {
  .habits { grid-template-columns: 1fr; }
  .habits li { min-height: 0; flex-direction: row; align-items: center; padding: 12px 14px; }
}

/* Sections */
.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 40rem; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.35rem); }
.section-head p { margin-top: 12px; font-size: 1.1rem; }

.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; }
.features li { padding: 24px 0; border-top: 1px solid var(--line); }
.features h3 { font-size: 1.2rem; display: flex; align-items: center; gap: 12px; }
.features h3::before { content: ''; width: 14px; height: 14px; border-radius: 5px; flex-shrink: 0; }
.f-home h3::before { background: var(--orange); }
.f-scan h3::before { background: #17A05D; }
.f-health h3::before { background: #2A6BAE; }
.f-learn h3::before { background: #7550A8; }
.features p { margin-top: 8px; }
.features .plan { margin-top: 10px; font-size: 0.92rem; font-weight: 700; color: var(--muted); }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }

.promises { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 40px; }
.promises li { position: relative; padding-left: 30px; }
.promises li::before { content: ''; position: absolute; left: 0; top: 0.45em; width: 16px; height: 9px; border-left: 3px solid var(--t-scan-ink); border-bottom: 3px solid var(--t-scan-ink); transform: rotate(-45deg); }
@media (max-width: 760px) { .promises { grid-template-columns: 1fr; } }

.note { background: var(--t-sun); border-radius: var(--radius); padding: 26px 28px; }
.note h2 { font-size: 1.25rem; margin-bottom: 10px; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 48px 0 56px; font-size: 0.95rem; }
.foot-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-brand p { margin-top: 10px; max-width: 26rem; color: var(--muted); }
.foot-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot-links a { display: inline-block; padding: 4px 0; color: var(--body); font-weight: 600; }
.foot-links a:hover { color: var(--orange-t); }
.foot-small { margin-top: 32px; color: var(--muted); font-size: 0.9rem; }

/* Legal and statement pages */
.doc { padding: 56px 0 24px; }
.doc h1 { font-size: clamp(2rem, 4.6vw, 2.8rem); }
.doc .updated { margin-top: 10px; color: var(--muted); font-size: 0.95rem; font-weight: 600; }
.doc .summary { margin-top: 26px; background: var(--t-scan); border-radius: var(--radius); padding: 22px 24px; color: #1E4D33; }
.doc .summary strong { color: #1E4D33; }
.doc h2 { font-size: 1.45rem; margin: 48px 0 12px; scroll-margin-top: 24px; }
.doc h3 { font-size: 1.1rem; margin: 28px 0 8px; }
.doc p, .doc li { max-width: 68ch; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; margin: 12px 0; }
.doc li { margin-bottom: 8px; }
.doc .callout { margin: 22px 0; background: var(--t-sun); border-radius: var(--radius); padding: 20px 24px; }
.doc .callout h3 { margin-top: 0; }
.toc { margin-top: 26px; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.toc h2 { font-size: 1rem; margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.toc li { margin: 0 0 4px; break-inside: avoid; }
@media (max-width: 600px) { .toc ol { columns: 1; } }
.table-wrap { overflow-x: auto; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
@media (max-width: 480px) { th, td { padding: 10px 8px; font-size: 0.92rem; } }
th, td { text-align: left; vertical-align: top; padding: 11px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--ink); font-weight: 800; background: var(--white); }
caption { text-align: left; font-weight: 700; color: var(--ink); padding-bottom: 8px; }

.center { text-align: center; }
.lost { padding: 96px 0; }
.lost img { width: 140px; height: 140px; margin: 0 auto 22px; }
.lost h1 { font-size: 2.2rem; }
.lost p { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .tick { border-color: CanvasText; }
  .done .tick { background: Highlight; }
}

/* Text read by screen readers but not shown. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.more { margin-top: 28px; font-weight: 700; }
.doc .callout h2 { margin-top: 0; }
