/* The Time Ahead: look D, "Clear Day". Sizes and colors are copied from the D boards
   (design/D-Screen.dc.html and design/D-Parts.dc.html). Phone first. */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('fonts/space-grotesk-latin-wght-normal.woff2') format('woff2'); }

:root {
  --sky: #EEF3FF; --card: #FFFFFF; --ink: #111A3A; --quiet: #4A557A;
  --cobalt: #2747E8; --cobalt-dark: #1A2FA8; --sun: #FFC93C; --sun-soft: #FFE9A8; --sun-pale: #FFF1C7;
  --field: #7F8DB3; --line: #E3E8F5; --card-line: #D6DEF2; --menu-line: #C9D3EC;
  --lived: #9AA8D0; --beyond: #F0F3FB; --error: #B3261E;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--sky); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p { margin: 0; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 10px; z-index: 10; }
.skip:focus { top: 8px; }
.noscript { max-width: 440px; margin: 24px auto; padding: 0 20px; }

.page { max-width: 440px; margin: 0 auto; padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 28px max(16px, env(safe-area-inset-left)); display: flex; flex-direction: column; }
main { display: flex; flex-direction: column; }
.stack { display: flex; flex-direction: column; }
.stack > * { margin-top: 16px; }

/* Header */
.top { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.brand { display: flex; align-items: center; gap: 10px; }
.mark { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); display: flex; align-items: center; justify-content: center; gap: 2.5px; flex: none; }
.mark i { width: 4px; height: 4px; border-radius: 1px; background: var(--lived); }
.mark b { width: 9px; height: 9px; border-radius: 50%; background: var(--sun); }
.wordmark { font-weight: 700; font-size: 13px; letter-spacing: .14em; white-space: nowrap; }

.link { color: var(--cobalt); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 12px 0; min-height: 44px; display: inline-flex; align-items: center; }
.link:hover { color: var(--cobalt-dark); }
.link.small { font-size: 13px; padding: 0; min-height: 0; }

/* Hero */
.hero { padding: 20px 4px 12px; display: flex; flex-direction: column; gap: 14px; }
h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 33px; line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; }
h1 span { display: block; color: var(--cobalt); }
.hero p { font-size: 17px; color: var(--quiet); text-wrap: pretty; }

/* Cards */
.card { padding: 20px; display: flex; flex-direction: column; gap: 16px; background: var(--card); border: 1px solid var(--card-line); border-radius: 24px; box-shadow: 0 1px 2px rgba(17, 26, 58, .04), 0 12px 32px rgba(17, 26, 58, .06); }
.card.person { gap: 14px; }
main > .card { margin-top: 16px; }
h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
.help { font-size: 13px; color: var(--quiet); text-wrap: pretty; }
.help.center { text-align: center; }
.lead { font-size: 15px; color: var(--quiet); text-wrap: pretty; }

/* Fields */
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--quiet); }
.field:focus-within > label { color: var(--cobalt); }
.input, .field input, .field select, .field textarea { width: 100%; height: 52px; border: 1px solid var(--field); border-radius: 14px; background: #fff; padding: 0 14px; font-size: 17px; color: var(--ink); appearance: none; -webkit-appearance: none; }
.field textarea { height: auto; padding: 12px 14px; line-height: 1.4; resize: vertical; }
.field input::placeholder { color: #8A94B5; }
.field input:focus, .field select:focus, .field textarea:focus, .dd-btn:focus-visible, .dd-btn[aria-expanded="true"] { outline: none; border: 2px solid var(--cobalt); padding-left: 13px; padding-right: 13px; box-shadow: 0 0 0 4px rgba(39, 71, 232, .18); }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232747E8' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 44px; }
.field.bad input, .field.bad .dd-btn { border-color: var(--error); border-width: 2px; }
.err { font-size: 13px; font-weight: 600; color: var(--error); }
.split { padding-top: 16px; border-top: 1px solid var(--line); }

/* Drop-down */
.dd { position: relative; }
.dd-btn { width: 100%; height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--field); border-radius: 14px; background: #fff; padding: 0 14px; font-size: 17px; color: var(--ink); text-align: left; }
.dd-btn.empty span { color: var(--quiet); }
.dd-btn svg { flex: none; }
.dd-list { position: absolute; left: 0; right: 0; top: 58px; z-index: 5; margin: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; padding: 6px; background: #fff; border: 1px solid var(--menu-line); border-radius: 18px; box-shadow: 0 2px 6px rgba(17, 26, 58, .06), 0 18px 40px rgba(17, 26, 58, .14); outline: none; }
.dd-opt { min-height: 44px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-radius: 12px; font-size: 15px; cursor: pointer; }
.dd-opt.active { background: var(--sky); }
.dd-opt[aria-selected="true"] { background: var(--cobalt); color: #fff; font-weight: 600; }
.dd-opt svg { display: none; }
.dd-opt[aria-selected="true"] svg { display: block; }
.dd-opt[aria-selected="true"].active { box-shadow: inset 0 0 0 2px var(--ink); }

/* Three-way choice */
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 4px; background: var(--sky); border-radius: 14px; }
.seg button { height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; background: transparent; color: var(--quiet); font-size: 15px; font-weight: 500; }
.seg button svg { display: none; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(17, 26, 58, .18); }
.seg button[aria-pressed="true"] svg { display: block; }

/* Buttons */
.btn { height: 50px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; font-size: 15px; font-weight: 600; padding: 0 20px; text-decoration: none; }
.btn-primary { border: 0; background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-dark); }
.btn-outline { border: 1.5px solid var(--cobalt); background: #fff; color: var(--cobalt); }
.btn-outline:hover { background: var(--sky); }
.btn-big { height: 54px; font-size: 16px; }
.btn[disabled] { opacity: .45; cursor: default; }
button:focus-visible, a:focus-visible, .seg button:focus-visible { outline: 3px solid rgba(39, 71, 232, .55); outline-offset: 2px; }
.row-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; }

/* Person card */
.p-head { display: flex; justify-content: space-between; align-items: center; }
.p-name { font-family: var(--display); font-weight: 600; font-size: 18px; overflow-wrap: anywhere; }
.p-head .link { margin: -12px 0; }
.count-block { display: flex; flex-direction: column; gap: 4px; }
.count { font-family: var(--display); font-weight: 700; font-size: 112px; line-height: .9; letter-spacing: -.045em; color: var(--cobalt); }   /* the font's normal digits: evenly spaced ones give the "1" a wide foot (Ryan, 3 Dec) */
.count.len5 { font-size: 92px; }
.count.len6 { font-size: 76px; }
.count-label { font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; overflow-wrap: anywhere; }
.count-sub { font-size: 14px; color: var(--quiet); }

.stepper-wrap { display: flex; flex-direction: column; gap: 6px; }
.stepper { display: flex; align-items: center; justify-content: space-between; padding: 6px; background: var(--sky); border-radius: 18px; }
.step { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.step.minus { border: 1px solid var(--field); background: #fff; color: var(--ink); }
.step.plus { border: 0; background: var(--cobalt); color: #fff; }
.step[disabled] { opacity: .35; cursor: default; }
.step-mid { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.step-mid small { font-size: 12px; color: var(--quiet); overflow-wrap: anywhere; }
.step-mid strong { font-family: var(--display); font-weight: 600; font-size: 17px; line-height: 1.25; }

.rows { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.row-k { color: var(--quiet); overflow-wrap: anywhere; }
.row-k .link { font-size: 13px; padding: 0; min-height: 0; margin-left: 8px; display: inline; }
.row-v { font-family: var(--display); font-weight: 600; font-size: 17px; white-space: nowrap; }
.row-v.hl { padding: 1px 10px; border-radius: 999px; background: var(--sun-soft); font-weight: 700; }
.actions { display: flex; flex-direction: column; gap: 10px; }

/* And you */
.born { display: flex; align-items: center; flex-wrap: wrap; gap: 0 14px; font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { padding: 12px 10px; border-radius: 16px; background: var(--sky); display: flex; flex-direction: column; gap: 4px; }
.stat.sun { background: var(--sun-pale); }
.stat b { font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1; }
.stat span { font-size: 12.5px; line-height: 1.35; color: var(--quiet); }
.weeks { display: flex; flex-direction: column; gap: 8px; }
.weeks-row { display: flex; align-items: flex-start; }
.grid { display: block; flex: none; }
.side { position: relative; width: 54px; flex: none; font-size: 11px; line-height: 1.2; }
.side div { position: absolute; left: 0; display: flex; align-items: center; gap: 4px; transform: translateY(-50%); white-space: nowrap; }
.side .age { padding-left: 10px; font-size: 10.5px; color: var(--quiet); }
.side i { width: 6px; height: 2px; flex: none; background: var(--ink); }
.side .avg { color: var(--quiet); }
.side .avg i { background: var(--quiet); }
.side .today { font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--quiet); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend i.dot { width: 4px; height: 4px; margin: 0 3px; border-radius: 1px; }
.card > .link { align-self: flex-start; padding: 0; }

/* Do something with it */
.do { margin-top: 32px; padding: 0 4px; display: flex; flex-direction: column; gap: 6px; }
.do-list { margin: 10px -4px 0; display: flex; flex-direction: column; gap: 10px; }
.do-card { padding: 16px 18px; border-radius: 18px; background: #fff; border: 1px solid var(--card-line); display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; }
.do-card b { font-family: var(--display); font-weight: 600; font-size: 17px; }
.do-card span { font-size: 14px; color: var(--quiet); text-wrap: pretty; }
.do-link b { color: var(--cobalt); text-decoration: underline; text-underline-offset: 3px; }

/* Waitlist */
.wait { display: flex; flex-direction: column; gap: 12px; }
/* the lock-screen widget, as on the D Parts board, showing the visitor's own first count */
.widget { padding: 14px 18px; display: flex; align-items: center; gap: 14px; background: var(--ink); color: #fff; border-radius: 22px; }
.widget b { font-family: var(--display); font-weight: 700; font-size: 46px; line-height: 1; letter-spacing: -.03em; color: var(--sun); }
.widget div { display: flex; flex-direction: column; min-width: 0; }
.widget strong { font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.25; }
.widget span { font-size: 13px; color: #C9D2EE; overflow-wrap: anywhere; }

/* Method and footer */
.how { margin-top: 32px; padding: 0 4px; display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 16px; }
.how p { font-size: 14px; color: var(--quiet); text-wrap: pretty; }
.foot { margin-top: 28px; padding: 20px 4px 0; border-top: 1px solid var(--card-line); display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.5; color: var(--quiet); text-wrap: pretty; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.foot-links .link { font-size: 13px; }

/* Privacy policy page */
.brand { color: inherit; text-decoration: none; }
.policy { margin-top: 12px; }
.policy h1 { font-size: 28px; }
.policy h2 { font-size: 18px; margin-top: 14px; }
.policy ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--quiet); }
.policy strong { color: var(--ink); font-weight: 600; }
mark.todo { background: var(--sun-soft); color: var(--ink); padding: 0 4px; border-radius: 4px; }

/* Sheets (plan a visit, share, holiday) */
.sheet { width: 100%; max-width: 440px; max-height: 92vh; margin: auto auto 0; padding: 20px 20px max(20px, env(safe-area-inset-bottom)); border: 0; border-radius: 24px 24px 0 0; background: #fff; color: var(--ink); overflow-y: auto; box-shadow: 0 -8px 40px rgba(17, 26, 58, .25); }
.sheet::backdrop { background: rgba(17, 26, 58, .5); }
.sheet-in { display: flex; flex-direction: column; gap: 16px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet-head .link { margin: -10px 0; flex: none; }
.sheet h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 17px; line-height: 1.25; }
.block { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pair .btn { padding: 0 10px; font-size: 14px; }
.opt-list { display: flex; flex-direction: column; gap: 2px; }
.opt { min-height: 44px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 12px; background: transparent; font-size: 15px; text-align: left; }
.opt:hover { background: var(--sky); }
.opt svg { display: none; }
.opt[aria-pressed="true"] { background: var(--cobalt); color: #fff; font-weight: 600; }
.opt[aria-pressed="true"] svg { display: block; }
.share-img { width: 100%; max-width: 264px; height: auto; align-self: center; aspect-ratio: 4 / 5; border-radius: 22px; background: var(--ink); display: block; }
.share-img.day { border: 1px solid var(--card-line); background: #fff; }

@media (min-width: 480px) {
  .sheet { margin: auto; border-radius: 24px; }
  .top { height: 72px; }
}
@media (max-width: 359px) {
  .stat { padding: 10px 8px; }
  .stat b { font-size: 20px; }
  .count { font-size: 92px; }
  .count.len5 { font-size: 76px; }
  .count.len6 { font-size: 62px; }
  .wordmark { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.seg button svg { color: var(--cobalt); }
