/* Onday's website. Colours come from the app's design tokens (Shared/DesignTokens.swift): keep them in step.
   Small pages (link fallbacks, 404) follow the visitor's light/dark setting; the marketing pages (body.site) are
   always dark, using the tokens' dark values plus a few deeper site-only shades. */
:root {
  color-scheme: light dark;
  --background: #F7F3E9; --surface: #FFFFFF; --raised: #F1F5FA;
  --text: #0F2347; --text-secondary: #4B5B71; --separator: #D2DBE4;
  --primary: #1859B8; --secondary: #237B78; --on-primary: #FFFFFF;
  --logo-blue: #2F7EEA; --coral: #C96547;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #101A2A; --surface: #192638; --raised: #22334A;
    --text: #F7F3E9; --text-secondary: #B8C8DB; --separator: #40516A;
    --primary: #8AB9FF; --secondary: #80D2CA; --on-primary: #0D1E3A;
    --coral: #E99472;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, sans-serif;
  background: var(--background); color: var(--text); -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }

/* Small pages (link fallbacks, 404): one centred card. */
body.centered { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.card {
  background: var(--surface); border-radius: 24px; padding: 36px 28px; max-width: 460px; width: 100%; text-align: center;
  box-shadow: 0 10px 40px rgba(15, 35, 71, 0.08);
}
.card .mark { width: 64px; height: 64px; margin: 0 auto 20px; display: block; }
.card h1 { font-size: 26px; line-height: 1.2; margin: 0 0 10px; letter-spacing: -0.02em; }
.card p { color: var(--text-secondary); margin: 0 0 16px; }
.button {
  display: inline-block; margin-top: 8px; padding: 14px 28px; border-radius: 14px; color: var(--on-primary);
  font-weight: 600; text-decoration: none; background: var(--primary);
}
.card small { display: block; margin-top: 22px; color: var(--text-secondary); font-size: 13px; }

/* ---------- Marketing pages ---------- */
body.site {
  color-scheme: dark;
  /* Tokens (dark values) */
  --text: #F7F3E9; --text-2: #B8C8DB; --primary: #8AB9FF; --logo-blue: #2F7EEA; --coral: #E99472;
  --success: #82D6AA; --streak: #FFAD87; --separator: #40516A; --on-primary: #0D1E3A;
  /* Site-only deeper shades */
  --bg: #0B1320; --bg-alt: #0E1828; --card: #111C2E; --line: #1E2C40; --line-strong: #2A3D57; --text-3: #8FA3BC;
  --cta: #1F6AD6;
  background: var(--bg); color: var(--text); line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Helvetica Neue", Arial, sans-serif;
}
.site a { color: var(--primary); text-decoration: none; }
.site a:hover { color: var(--text); }
.site a:focus-visible, .site button:focus-visible, .site input:focus-visible, .site summary:focus-visible {
  outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px;
}
.site h1, .site h2, .site h3 { margin: 0; }
.site p { margin: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 20; background: var(--text); color: var(--bg) !important;
        padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { left: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 820px; }
.row { display: flex; gap: 56px; align-items: center; flex-wrap: wrap; }
.row.reverse { flex-direction: row-reverse; }
.row > .grow { flex: 1 1 460px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
       border-radius: 12px; font-weight: 600; font-size: 16px; border: 0; cursor: pointer; font-family: inherit; }
.site .btn-light { background: var(--text); color: var(--bg); }
.site .btn-light:hover { background: #FFFFFF; color: var(--bg); }
.site .btn-blue { background: var(--cta); color: #FFFFFF; }
.site .btn-blue:hover { background: var(--logo-blue); color: #FFFFFF; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(11, 19, 32, .88);
               -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.site .logo { color: var(--text); }
.logo span { font-weight: 700; font-size: 21px; letter-spacing: -.3px; }
.navlinks { display: flex; gap: 28px; align-items: center; }
.site .navlinks a:not(.btn) { color: var(--text-2); font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }
.site .navlinks a[aria-current="page"] { color: var(--text); }
.navlinks .btn { min-height: 44px; padding: 0 16px; font-size: 15px; }

/* Shared type */
.eyebrow { color: var(--coral); font-weight: 700; font-size: 14px; letter-spacing: .6px; text-transform: uppercase; }
.h-xl { font-size: clamp(40px, 6vw, 68px); line-height: 1.04; letter-spacing: -1.6px; font-weight: 800; }
.h-lg { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; letter-spacing: -1px; font-weight: 800; }
.h-md { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -1px; font-weight: 800; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--text-2); max-width: 600px; }
.body-lg { color: var(--text-2); font-size: 18px; }
.muted { color: var(--text-3); font-size: 14px; }
.ticks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px;
                    border-left: 2.5px solid var(--success); border-bottom: 2.5px solid var(--success); transform: rotate(-45deg); }

/* Sections */
.section { padding: 112px 0; }
.section.tight { padding: 64px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.page-hero { padding: 88px 0 48px; background: radial-gradient(1000px 500px at 80% 0%, #16294A 0%, var(--bg) 60%); }
.page-hero .stack { max-width: 760px; gap: 18px; }

/* Hero */
.hero { padding: 96px 0 72px; background: radial-gradient(1200px 600px at 75% 10%, #16294A 0%, var(--bg) 60%); }
.hero .grow:first-child { display: flex; flex-direction: column; gap: 24px; }
.pill { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
        border: 1px solid var(--line-strong); color: var(--text-2); font-size: 13px; font-weight: 600; letter-spacing: .3px; }
.hero-art { display: flex; justify-content: center; position: relative; }
.glow { position: absolute; width: 420px; max-width: 100%; aspect-ratio: 1; border-radius: 50%; top: 90px;
        background: radial-gradient(circle, rgba(47, 126, 234, .35), rgba(47, 126, 234, 0) 70%); pointer-events: none; }

/* Launch-list form */
.join { display: flex; gap: 10px; flex-wrap: wrap; max-width: 520px; }
.join input[type=email] { flex: 1 1 240px; min-height: 52px; padding: 0 16px; border-radius: 12px; border: 1px solid #64809F;
                          background: var(--card); color: var(--text); font-size: 16px; font-family: inherit; }
.join input::placeholder { color: var(--text-3); }
.join .btn { min-height: 52px; }
.join .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.join-status { max-width: 520px; padding: 14px 16px; border-radius: 12px; font-weight: 600; display: flex; gap: 12px; align-items: center; }
.join-status[hidden] { display: none; }
.join-status.ok { background: #12301F; color: var(--success); }
.join-status.err { background: #3A1A1E; color: #FFADB0; }
.fine { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--text-3); font-size: 14px; }

/* Phone frame around a screenshot */
.phone { position: relative; width: 300px; max-width: 80vw; border-radius: 52px; background: #05090F; padding: 11px;
         box-shadow: 0 40px 80px rgba(0, 0, 0, .55), inset 0 0 0 2px var(--line-strong); }
.phone img { display: block; width: 100%; height: auto; border-radius: 42px; aspect-ratio: 1320 / 2868; background: #101A2A; }
.phone.sm { width: 260px; }
.shot-panel { border: 1px solid var(--line); border-radius: 28px; min-height: 420px; padding: 40px 24px;
              display: flex; align-items: center; justify-content: center; }
.tint-blue { background: linear-gradient(160deg, #16294A, var(--card)); }
.tint-teal { background: linear-gradient(160deg, #173A3A, var(--card)); }
.tint-indigo { background: linear-gradient(160deg, #1D2253, var(--card)); }
.tint-rose { background: linear-gradient(160deg, #3A2A2A, var(--card)); }
.tint-amber { background: linear-gradient(160deg, #3A2D16, var(--card)); }

/* Trust strip */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 0; }
.strip .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; color: var(--text-3); font-size: 15px; }

/* Cards */
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: flex;
        flex-direction: column; gap: 12px; }
.tile h3 { font-size: 22px; }
.tile p { color: var(--text-2); }
.step-no { font-size: 15px; font-weight: 700; color: var(--primary); }
.features { display: flex; flex-direction: column; gap: 96px; }
.quote { margin: 0; border-style: dashed; border-color: var(--separator); gap: 16px; }
.quote blockquote { margin: 0; font-size: 18px; color: var(--text-2); }
.quote figcaption { color: var(--text-3); font-size: 14px; }

/* Pricing */
.center { text-align: center; align-items: center; }
.toggle { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.toggle button { background: transparent; color: var(--text-2); min-height: 44px; }
.toggle button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 32px; display: flex;
        flex-direction: column; gap: 18px; }
.plan.premium { background: linear-gradient(160deg, #1A3260, #13223A); border-color: var(--logo-blue); }
.plan h3 { font-size: 22px; }
.plan .price { font-size: 44px; font-weight: 800; letter-spacing: -1px; }
.plan .price small { font-size: 16px; font-weight: 500; color: var(--text-2); }
.plan .ticks { color: var(--text-2); }
.plan.premium .ticks { color: var(--text); }
.badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--text); color: var(--bg); }
.compare { width: 100%; border-collapse: collapse; font-size: 16px; }
.compare th, .compare td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { color: var(--text-3); font-size: 13px; letter-spacing: .4px; text-transform: uppercase; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; width: 120px; }
.compare tbody th { font-weight: 500; color: var(--text); }
.compare .yes { color: var(--success); font-weight: 700; }
.compare .no { color: var(--text-3); }
.table-scroll { overflow-x: auto; }

/* Learn (light section, the app's light tokens) */
.light { background: #F7F3E9; color: #0F2347; }
.light .eyebrow { color: #B74B27; }
.light .body-lg, .light .lead { color: #4B5B71; }
.site .light a { color: #1859B8; }
.guide-card { background: #FFFFFF; border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.site .light a.guide-card { color: #0F2347; }
.site .light a.guide-card:hover { box-shadow: 0 10px 30px rgba(15, 35, 71, .12); color: #0F2347; }
.guide-card h3 { font-size: 21px; }
.guide-card p { color: #4B5B71; }
.cat { font-size: 13px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
.cat-nutrition { color: #237B78; } .cat-training { color: #1859B8; } .cat-habits { color: #7652A1; }
.cat-recovery { color: #2E3A8C; } .cat-tracking { color: #8A5200; } .cat-supplements { color: #16744D; }
.all-link { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px;
               font-size: 18px; font-weight: 600; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 24px; font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 20px; color: var(--text-2); font-size: 16px; max-width: 680px; }

/* Final call to action */
.cta { border-radius: 32px; padding: 64px 40px; border: 1px solid var(--line-strong); display: flex; flex-direction: column;
       align-items: center; gap: 20px; text-align: center; background: radial-gradient(800px 400px at 80% 0%, #1F4A8A 0%, #13223A 60%); }
.cta h2 { font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -1.2px; font-weight: 800; max-width: 720px; line-height: 1.1; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 64px; color: var(--text-3); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.site-footer .about { display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.site-footer .logo span { font-size: 18px; }
.site-footer nav { display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: 0 40px; }
.site .site-footer nav a { color: var(--text-2); min-height: 44px; display: inline-flex; align-items: center; }

/* Long text: guides, legal, support */
.prose { max-width: 720px; font-size: 18px; color: var(--text-2); }
.prose h2 { color: var(--text); font-size: 26px; letter-spacing: -.4px; margin: 40px 0 12px; line-height: 1.2; }
.prose h3 { color: var(--text); font-size: 20px; margin: 28px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose .sources li { font-size: 15px; color: var(--text-3); }
.note { border: 1px solid var(--line-strong); border-radius: 14px; padding: 16px 18px; color: var(--text-2); font-size: 15px; }
.meta { color: var(--text-3); font-size: 15px; display: flex; gap: 12px; flex-wrap: wrap; }
.crumbs { font-size: 15px; }
.crumbs a { min-height: 44px; display: inline-flex; align-items: center; }
.learn-group { display: flex; flex-direction: column; gap: 20px; }
.learn-group + .learn-group { margin-top: 56px; }
.learn-group h2 { font-size: 26px; }
.press-shots { display: flex; gap: 24px; flex-wrap: wrap; }
.press-shots figure { margin: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.press-shots figcaption { color: var(--text-3); font-size: 14px; }

@media (max-width: 860px) {
  .grid3, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .site .navlinks a.hide-sm { display: none; }
  .fine span[aria-hidden] { display: none; }
  .fine { gap: 4px 16px; }
  .wrap { padding: 0 20px; }
  .section { padding: 80px 0; }
  .hero { padding: 56px 0 48px; }
  .row { gap: 40px; }
  .row.reverse { flex-direction: row; }
  .features { gap: 72px; }
  .shot-panel { min-height: 0; padding: 32px 16px; }
  .cta { padding: 48px 24px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
