/* runwritten.com · D · Daystack on paper (docs/research/ui-ux-redesign.md §8; tokens match web/src/styles/tokens.css).
   Light and dark follow the system. Each colour has one job: blue = running, green = sleep and recovery,
   orange = now and the primary action, pink = something the runner reported. */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url(/assets/fonts/bricolage-grotesque-latin-standard-normal.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2');
}

:root {
  color-scheme: light dark;
  --bg: light-dark(#EEE9E2, #151311);
  --surface: light-dark(#FBF8F3, #201D1A);
  --sunken: light-dark(#E4DDD2, #2A2622);
  --line: light-dark(#D3C9BB, #3B352F);
  --ink: light-dark(#1D1B18, #F2EDE6);
  --ink-2: light-dark(#5B544B, #B8AEA2);
  --ink-3: light-dark(#8A8176, #857C71);
  --run: light-dark(#2346D8, #7E96FF);
  --run-soft: light-dark(#C7D0F5, #27305E);
  --on-run: light-dark(#FFFFFF, #151311);
  --sleep: light-dark(#3E7A4F, #6CBF86);
  --sleep-soft: light-dark(#D3E6D6, #1F3527);
  --now: light-dark(#E8541B, #FF7A3D);
  --on-now: light-dark(#1D1B18, #151311);
  --now-text: light-dark(#B8410F, #FF9A6B);
  --effort: light-dark(#B8306F, #F27CB4);
  --on-effort: light-dark(#FFFFFF, #151311);
  --link: light-dark(#2346D8, #9CB0FF);
  --danger: light-dark(#A3261C, #FF9B8A);
  --hatch: light-dark(#CFC5B6, #3B352F);
  --shadow: light-dark(0 10px 24px rgb(29 27 24 / .18), 0 12px 28px rgb(0 0 0 / .55));
  --font: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.5;
  font-optical-sizing: auto; font-variant-numeric: tabular-nums; font-synthesis: none; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
a { color: var(--link); text-underline-offset: .15em; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; left: 16px; top: -100px; padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: 12px; z-index: 10; }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); }

/* ---------- header, footer */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.wordmark { font-size: 22px; font-weight: 800; letter-spacing: -.4px; font-stretch: 90%; color: var(--ink); text-decoration: none; }
.pill { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--ink-3);
  font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; text-decoration: none; }
.pill.link { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.foot { margin-top: 72px; padding: 28px 0 44px; border-top: 1px solid var(--line); display: grid; gap: 14px; font-size: 14px; color: var(--ink-2); }
.foot-brand { font-weight: 800; color: var(--ink); font-stretch: 90%; font-size: 16px; }
.foot-brand span { font-weight: 500; color: var(--ink-2); font-stretch: 100%; font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; }
.foot-note { max-width: 62ch; }

/* ---------- hero */
.hero { display: grid; gap: 36px; padding-top: 28px; align-items: start; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--now-text); }
.eyebrow::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--now); }
.hero h1 { margin-top: 14px; font-size: clamp(42px, 9.5vw, 82px); font-weight: 800; line-height: .98; letter-spacing: -.035em; font-stretch: 88%;
  text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--run); }
.lead { margin-top: 20px; font-size: 20px; line-height: 1.45; font-weight: 500; max-width: 34ch; }
.lead b { font-weight: 800; }
.hero-status { margin-top: 14px; font-size: 15px; color: var(--ink-2); max-width: 44ch; }

/* the three highlights: the five-second read of what Runwritten is */
.highlights { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.highlights li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: 19px; line-height: 1.4; color: var(--ink-2); }
.highlights b { color: var(--ink); font-weight: 800; }
.highlights .dot { width: 14px; height: 14px; border-radius: 50%; transform: translateY(1px); }
.dot.run { background: var(--run); }
.dot.sleep { background: var(--sleep); }
.dot.now { background: var(--now); }
.hero-cta { margin-top: 28px; align-items: flex-start; }
.hero-cta .note { max-width: 36ch; }
.hero .lead { max-width: 38ch; }

/* ---------- the form */
.join-section { scroll-margin-top: 16px; }
.join { padding: 22px 18px; border-radius: 22px; background: var(--surface); border: 2px solid var(--now); }
.join .kicker { color: var(--now-text); }
.join h2 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-stretch: 92%; margin-top: 4px; }
.join-lead { margin-top: 10px; font-size: 17px; color: var(--ink-2); max-width: 52ch; }
.leave h2 { font-size: 20px; font-weight: 800; }
.join .field { margin-top: 12px; }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.field input, .field select { width: 100%; min-height: 50px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--ink-3);
  background: var(--bg); color: var(--ink); font-size: 17px; }
.field input:focus-visible, .field select:focus-visible { outline-offset: 0; }
.row { display: grid; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px; border-radius: 16px;
  border: 1px solid transparent; font-size: 16px; font-weight: 800; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--now); color: var(--on-now); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--ink-3); }
.btn[disabled] { opacity: .55; cursor: progress; }
.consent { margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.consent.above { font-size: 14px; color: var(--ink); margin-top: 12px; }
.join form .actions { margin-top: 12px; }
.join form .actions .btn { min-width: 220px; }
.consent a { color: var(--ink-2); }
/* the status line keeps its height so nothing below it moves when a message appears */
.status { min-height: 22px; margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.status[data-tone="bad"] { color: var(--danger); }
.status[data-tone="good"] { color: var(--sleep); }
.cf-turnstile { margin-top: 10px; }
.cf-turnstile:empty { margin-top: 0; }
.honey { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }

/* steps 2 and 3: on the list, the optional questions, done */
.kicker.done { color: var(--sleep); }
.done-title { font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-stretch: 92%; margin-top: 4px; outline: none; }
.join-lead b { color: var(--ink); font-weight: 700; }
.questions { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.questions .bonus { font-size: 16px; color: var(--ink-2); max-width: 60ch; }
.questions .bonus b { color: var(--ink); }
.questions .field p { margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.textlink { font-weight: 700; }
.cta.wrap-note, p.cta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chips label { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--ink-3);
  background: var(--bg); font-size: 14px; font-stretch: 90%; cursor: pointer; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips label:has(input:checked) { background: var(--effort); border-color: var(--effort); color: var(--on-effort); font-weight: 700; }
.chips label:has(input:focus-visible) { outline: 3px solid var(--link); outline-offset: 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- the product screen (synthetic data) */
.screen-wrap { display: grid; gap: 12px; justify-items: center; }
.device { width: min(100%, 380px); padding: 12px; border-radius: 36px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.screen { border-radius: 26px; background: var(--bg); padding: 16px 14px 18px; font-size: 14px; line-height: 1.4; overflow: hidden; }
.screen-top { display: flex; align-items: center; justify-content: space-between; }
.screen-top .wordmark { font-size: 17px; }
.synthetic { padding: 3px 9px; border-radius: 10px; background: var(--sunken); font-size: 11px; font-weight: 700; }
.day { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.day b { font-size: 40px; font-weight: 800; letter-spacing: -1.6px; line-height: 1; font-stretch: 88%; }
.day span { font-size: 14px; color: var(--ink-2); }
.sync { font-family: var(--mono); font-size: 11px; color: var(--ink-2); margin-top: 2px; }
.tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 12px; }
.tile { position: relative; height: 52px; padding: 5px; border-radius: 10px; border: 1px solid transparent; display: flex; flex-direction: column;
  justify-content: space-between; }
.tile i { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--ink-2); }
.tile b { font-size: 15px; font-weight: 800; letter-spacing: -.3px; }
.tile.rec { background: var(--run-soft); }
.tile.long { background: var(--run); color: var(--on-run); }
.tile.long i { color: var(--on-run); }
.tile.planned { border: 1.5px dashed var(--run); }
.tile.planned b { color: var(--ink-2); font-weight: 700; }
.tile.rest { border-color: var(--line); }
.tile.rest b { color: var(--ink-3); font-weight: 500; }
.tile.today { outline: 2.5px solid var(--now); outline-offset: 1px; }
.tile.today i { font-family: var(--font); font-weight: 800; color: inherit; }
.week-total { margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.week-total b { color: var(--ink); }
.brief { margin-top: 14px; font-size: 15px; line-height: 1.35; font-weight: 500; }
.brief b { font-weight: 800; }
.stack { list-style: none; padding: 0; margin: 14px 0 0; }
.moment { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 6px; padding-bottom: 12px; }
.moment::before { content: ''; position: absolute; left: 12px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.moment.sleep::before { background: var(--sleep); }
.moment.run::before { background: var(--run); }
.moment.end::before { display: none; }
.node { position: relative; z-index: 1; justify-self: center; width: 11px; height: 11px; margin-top: 4px; border-radius: 50%; box-shadow: 0 0 0 3px var(--bg); }
.sleep .node { background: var(--sleep); }
.run .node { background: var(--run); }
.now .node { width: 14px; height: 14px; margin-top: 2px; background: var(--now); }
.later .node { background: var(--bg); border: 2px solid var(--ink-3); }
.moment-head { display: flex; align-items: center; gap: 6px; min-height: 20px; }
.moment-head h3 { font-size: 13px; font-weight: 700; }
.moment-head .meta { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); }
.now-pill { height: 18px; padding: 0 7px; border-radius: 9px; background: var(--now); color: var(--on-now); font-size: 10.5px; font-weight: 800; line-height: 18px; }
.mcard { margin-top: 6px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.now .mcard { border: 2px solid var(--now); }
.mcard.quiet { background: transparent; border: 1.5px dashed var(--ink-3); color: var(--ink-2); font-size: 13px; }
.mcard h4 { font-size: 15px; font-weight: 700; }
.mcard .sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.mcard .big { display: block; font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1.05; margin-top: 4px; }
.mcard .big small { font-size: 13px; font-weight: 700; letter-spacing: 0; margin-left: 4px; }
.reps { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.reps span { padding: 3px 8px; border-radius: 9px; background: var(--run-soft); font-family: var(--mono); font-size: 11px; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.metrics dt { font-size: 11px; color: var(--ink-2); }
.metrics dd { font-size: 18px; font-weight: 800; }
.metrics dd small { font-size: 11px; font-weight: 600; margin-left: 2px; }
.range { position: relative; height: 6px; margin-top: 6px; border-radius: 3px; background: var(--sunken); }
.range i { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--sleep); border: 2px solid var(--surface); transform: translate(-50%, -50%); }
.range em { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--sleep-soft); }
.answers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.answers span { display: grid; place-items: center; min-height: 34px; border-radius: 10px; border: 1px solid var(--ink-3); font-size: 12px; font-stretch: 85%; }
.answers span.on { background: var(--effort); border-color: var(--effort); color: var(--on-effort); font-weight: 700; }
.proposal { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; }
.proposal b { display: block; font-size: 12px; margin-bottom: 2px; }
.proposal .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.proposal .pair span { padding: 6px 8px; border-radius: 10px; border: 1px solid var(--ink-3); text-align: center; font-weight: 700; font-size: 12px; }
.proposal .pair span.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.screen-caption { font-size: 13px; color: var(--ink-2); text-align: center; max-width: 40ch; }

/* ---------- sections */
.section { margin-top: 72px; }
.section-head { max-width: 62ch; }
.kicker { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.section h2 { margin-top: 6px; font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-stretch: 92%; text-wrap: balance; }
.section-head p { margin-top: 14px; font-size: 18px; color: var(--ink-2); }

/* how it thinks: the day spine carries the list */
.how { list-style: none; padding: 0; margin: 28px 0 0; counter-reset: how; }
.how li { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; padding-bottom: 26px; counter-increment: how; }
.how li::before { content: ''; position: absolute; left: 21px; top: 40px; bottom: 0; width: 2px; background: var(--line); }
.how li:last-child::before { display: none; }
.how .n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--bg);
  font-family: var(--mono); font-size: 13px; }
.how .n::after { content: counter(how, decimal-leading-zero); }
.how h3 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; padding-top: 8px; }
.how p { margin-top: 8px; font-size: 17px; color: var(--ink-2); max-width: 58ch; }
.how p b { color: var(--ink); font-weight: 700; }
.how .ex { margin-top: 8px; display: inline-flex; flex-wrap: wrap; gap: 6px; }
.how .ex span { padding: 4px 10px; border-radius: 10px; background: var(--run-soft); font-family: var(--mono); font-size: 12.5px; }

/* who, where we are */
.cols { display: grid; gap: 16px; margin-top: 26px; }
.col { padding: 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.col h3 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.col p { margin-top: 8px; color: var(--ink-2); font-size: 16px; }
.col .tag { display: inline-block; margin-bottom: 8px; padding: 2px 9px; border-radius: 9px; font-size: 12px; font-weight: 700; background: var(--sunken); }
.status-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; font-size: 16px; max-width: 72ch; }
.status-list li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: baseline; }
.status-list i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; transform: translateY(1px); }
.status-list .built i { background: var(--run); }
.status-list .next i { border: 2px dashed var(--ink-3); }
.status-list b { font-weight: 700; }
.cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta .note { font-size: 14px; color: var(--ink-2); }

/* ---------- plain pages (privacy, leave, 404) */
.page { max-width: 68ch; padding-top: 20px; }
.page h1 { font-size: clamp(34px, 6vw, 52px); font-weight: 800; letter-spacing: -.03em; line-height: 1.02; font-stretch: 90%; }
.page .lead { max-width: none; }
.prose { margin-top: 24px; display: grid; gap: 18px; }
.prose h2 { font-size: 22px; font-weight: 800; margin-top: 10px; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 1.2em; display: grid; gap: 6px; }
.prose .note { font-size: 14px; color: var(--ink-2); }
.leave { margin-top: 24px; padding: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.interim { display: inline-block; padding: 8px 12px; border-radius: 12px; border: 1.5px dashed var(--ink-3); font-size: 14px; color: var(--ink-2); }

/* ---------- wide screens */
@media (min-width: 880px) {
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; padding-top: 40px; }
  .screen-wrap { position: sticky; top: 24px; }
  .device { width: 380px; }
  .cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .how li { grid-template-columns: 44px minmax(0, 1fr); }
  .how h3 { font-size: 26px; }
  .row.wide { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .join { padding: 32px; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }
  .join [data-step="1"] { display: contents; }
  .join [data-step="1"] form { grid-column: 2; }
  .join [data-step="1"] > .kicker, .join [data-step="1"] > h2, .join [data-step="1"] > .join-lead { grid-column: 1; }
  .join [data-step="2"], .join [data-step="3"] { grid-column: 1 / -1; max-width: 70ch; }
  .how { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
  .how li::before { display: none; }
  .how li { padding-bottom: 32px; }
  .foot { grid-template-columns: 1fr auto; }
  .foot-note { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .pill, .chips label { transition: background-color .15s, border-color .15s, color .15s, filter .15s; }
}
@media (prefers-contrast: more) {
  .tile.planned { border-width: 2px; }
  .field input, .field select, .chips label { border-color: var(--ink); }
}
