/* Cadence static pages (privacy, terms, health, science, about, apple-health, calculators, 404).
   Same tokens, type scale and header/footer as the app. Light by default; dark follows the app setting
   (html.dark from /theme.js) or the OS when the app is on "System". */
@font-face { font-family: "Geist"; src: url("/fonts/geist-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/geist-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/geist-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --page: #F6F7F5; --card: #FFFFFF; --sunken: #EEF2F0; --hairline: #E3E8E6; --border-strong: #CFD8D4;
  --text-1: #12201C; --text-2: #4A5B55; --text-3: #5C6B66;
  --accent: #0F766E; --accent-press: #0D5F59; --accent-soft: #E6F4F1; --on-accent: #FFFFFF;
  --focus: #0F766E; --radius-md: 12px; --radius-lg: 16px;
  color-scheme: light;
}
html.dark {
  --page: #1A2422; --card: #222E2B; --sunken: #2A3734; --hairline: #344340; --border-strong: #4A5A55;
  --text-1: #E8F0EC; --text-2: #A7B8B1; --text-3: #93A69F;
  --accent: #2DD4BF; --accent-press: #14B8A6; --accent-soft: rgba(45,212,191,.12); --on-accent: #04201B; --focus: #2DD4BF;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html:not(.light) {
    --page: #1A2422; --card: #222E2B; --sunken: #2A3734; --hairline: #344340; --border-strong: #4A5A55;
    --text-1: #E8F0EC; --text-2: #A7B8B1; --text-3: #93A69F;
    --accent: #2DD4BF; --accent-press: #14B8A6; --accent-soft: rgba(45,212,191,.12); --on-accent: #04201B; --focus: #2DD4BF;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text-2); font: 400 16px/1.6 "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.s-skip { position: absolute; left: -999px; top: 8px; background: var(--card); color: var(--text-1); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.s-skip:focus { left: 8px; }
/* header */
.s-head { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--page) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--hairline); }
.s-head-in { max-width: 960px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 16px; }
.s-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text-1); font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: -0.01em; min-height: 44px; }
.s-logo i { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); display: inline-block; position: relative; }
.s-logo i::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--page); }
.s-nav { display: none; gap: 4px; margin-left: auto; }
.s-nav a { color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 600; padding: 0 10px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 8px; }
.s-nav a:hover, .s-nav a[aria-current="page"] { color: var(--text-1); background: var(--sunken); }
.s-cta { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 9999px; background: var(--accent); color: var(--on-accent) !important; font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.s-cta:hover { background: var(--accent-press); }
@media (min-width: 720px) { .s-nav { display: flex; } .s-nav + .s-cta { margin-left: 8px; } }
/* content */
.s-main { max-width: 680px; margin: 0 auto; padding: 32px 20px 48px; }
.s-main h1 { color: var(--text-1); font-size: 28px; line-height: 34px; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 8px; }
.s-main h2 { color: var(--text-1); font-size: 20px; line-height: 26px; font-weight: 700; margin: 32px 0 10px; }
.s-main h3 { color: var(--text-1); font-size: 17px; line-height: 24px; font-weight: 600; margin: 0 0 4px; }
.s-main p, .s-main li { font-size: 16px; line-height: 1.65; margin: 0 0 14px; }
.s-main b, .s-main strong { color: var(--text-1); font-weight: 600; }
.s-main ol, .s-main ul { padding-left: 22px; }
.s-meta { color: var(--text-3); font-size: 14px; margin: 0 0 24px; }
.s-lede { font-size: 17px; color: var(--text-2); margin: 0 0 24px; }
.s-main code { background: var(--sunken); color: var(--text-1); padding: 2px 6px; border-radius: 6px; font-size: 14px; overflow-wrap: anywhere; }
.s-card, .calc { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 20px; margin: 24px 0; }
.note { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: var(--radius-md); padding: 14px 16px; margin: 20px 0; font-size: 15px; color: var(--text-1); }
.shot { background: var(--sunken); border: 2px dashed var(--border-strong); border-radius: var(--radius-md); padding: 28px 16px; text-align: center; color: var(--text-3); font-size: 14px; margin: 16px 0; }
.rule { border-left: 3px solid var(--accent); padding-left: 16px; margin-bottom: 28px; }
.src { font-size: 14px; color: var(--text-3); }
/* calculators */
.calc label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--text-1); }
.calc input { font: inherit; font-size: 18px; padding: 12px; min-height: 48px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); width: 100%; margin-bottom: 16px; background: var(--page); color: var(--text-1); display: block; min-width: 0; -webkit-appearance: none; appearance: none; }
.calc input::-webkit-date-and-time-value { text-align: left; }
.calc button, .s-btn { font: inherit; background: var(--accent); color: var(--on-accent); border: 0; border-radius: var(--radius-md); min-height: 48px; padding: 0 24px; font-size: 16px; font-weight: 600; width: 100%; cursor: pointer; }
.calc button:hover, .s-btn:hover { background: var(--accent-press); }
.calc button:active { transform: scale(.98); }
.result { margin-top: 20px; display: none; }
.result.show { display: block; }
.time-row { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid var(--hairline); }
.time-row:last-child { border: none; }
.cycles, .explain { font-size: 14px; color: var(--text-3); }
.time { font-size: 20px; font-weight: 700; color: var(--text-1); }
.best { background: var(--accent-soft); border-radius: 8px; }
.cutoff { font-size: 36px; font-weight: 700; color: var(--text-1); margin: 8px 0; text-align: center; }
.result .explain, .result > div:first-child:not(.time-row) { text-align: center; }
.cta { margin-top: 32px; text-align: center; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 28px 20px; }
.cta h2 { margin: 0 0 8px !important; }
.cta p { margin: 0 0 16px !important; }
.cta a { display: inline-flex; align-items: center; min-height: 48px; background: var(--accent); color: var(--on-accent); text-decoration: none; padding: 0 28px; border-radius: var(--radius-md); font-weight: 600; }
/* footer */
.s-foot { border-top: 1px solid var(--hairline); background: var(--card); }
.s-foot-in { max-width: 960px; margin: 0 auto; padding: 32px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (min-width: 720px) { .s-foot-in { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.s-foot h2 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 0 0 8px; font-weight: 600; }
.s-foot ul { list-style: none; margin: 0; padding: 0; }
.s-foot li a { color: var(--text-2); text-decoration: none; font-size: 15px; display: inline-flex; min-height: 36px; align-items: center; }
.s-foot li a:hover { color: var(--text-1); text-decoration: underline; }
.s-copy { grid-column: 1 / -1; color: var(--text-3); font-size: 13px; margin: 0; }
/* 404 */
.s-404 { text-align: center; padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 719px) { .s-foot-in > div:nth-child(4) { grid-column: 1 / -1; } }
.s-foot li a { overflow-wrap: anywhere; }
.best .cycles { color: var(--text-2); }
/* Round 3: numbered step cards (apple-health) and action-chain diagrams in place of screenshot placeholders */
.s-main ol.s-steps { list-style: none; padding: 0; margin: 12px 0 16px; counter-reset: st; display: grid; gap: 8px; }
.s-main ol.s-steps > li { counter-increment: st; position: relative; background: var(--card); border: 1px solid var(--hairline); border-radius: 14px; padding: 12px 14px 12px 52px; color: var(--text-1); margin: 0; overflow-wrap: anywhere; }
.s-main ol.s-steps > li::before { content: counter(st); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 14px; line-height: 26px; text-align: center; }
.s-flow { margin: 8px 0 24px; padding: 14px; border-radius: 16px; background: var(--sunken); border: 1px dashed var(--hairline-strong, var(--hairline)); }
.s-flow figcaption { font-weight: 700; color: var(--text-1); font-size: 15px; margin-bottom: 10px; }
.s-flow ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.s-flow li { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 10px; padding: 8px 10px; font-size: 14px; line-height: 20px; color: var(--text-2); position: relative; overflow-wrap: anywhere; margin: 0; }
.s-flow li b { color: var(--text-1); }
.s-flow-ic { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft, var(--sunken)); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.s-flow-note { margin: 8px 0 0; font-size: 12px; color: var(--text-3, var(--text-2)); }
/* Round 3: header nav on every width (second row on phones) */
@media (max-width: 719px) {
  .s-head-in { height: auto; flex-wrap: wrap; row-gap: 0; padding-top: 8px; }
  .s-nav { display: flex; order: 3; width: calc(100% + 20px); margin: 0 -10px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .s-nav::-webkit-scrollbar { display: none; }
  .s-nav a { white-space: nowrap; font-size: 14px; min-height: 44px; }
}
/* Round 3: draft notice + founder placeholders */
.s-note { background: var(--warn-soft, #fff7e6); color: var(--text-1); border: 1px solid var(--warn-line, #f0c36d); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.s-ph { background: var(--warn-soft, #fff7e6); color: var(--text-1); border: 1px dashed var(--warn-line, #c98a1b); border-radius: 6px; padding: 0 4px; }
html.dark .s-note, html.dark .s-ph { background: #3a2f17; border-color: #8a6a2a; color: #f5e9cf; }
@media (prefers-color-scheme: dark) { html:not(.light) .s-note, html:not(.light) .s-ph { background: #3a2f17; border-color: #8a6a2a; color: #f5e9cf; } }
.s-founder { display: flex; gap: 16px; align-items: flex-start; padding: 16px; border: 2px dashed var(--warn-line, #c98a1b); border-radius: 16px; margin: 12px 0 24px; }
.s-founder-photo { flex: none; width: 72px; height: 72px; border-radius: 50%; background: var(--sunken); display: flex; align-items: center; justify-content: center; font-size: 11px; text-align: center; color: var(--text-2); border: 1px dashed var(--hairline); }
/* Round 6: visible keyboard focus on static pages */
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--focus, #0F766E); outline-offset: 2px; }
