/* Atlas Guide, Tailwater. Shared by the six prototype screens.
   Spacing scale: 4 8 12 16 24 32 48. Type scale: 13 16 20 32 72 (72 on the phone only).
   Phone edges: free text at 24, card edges at 16, card content at 32. */
:root {
  --paper: #F4F2F7;
  --surface: #FFFFFF;
  --rule: #DCD7E5;
  --grid: #EEEAF4;
  --ink: #1F1633;
  --ink-2: #5A5070;
  --plum: #4E2C82;
  --plum-press: #3E2269;
  --plum-line: #7B68B0;
  --water: #E6E0F3;
  --water-2: #CFC4EA;
  --ok: #1A7F37;
  --soon: #F4C430;
  --soon-ink: #2B2100;
  --late: #B42318;
  --late-press: #961D14;
  --stale: #5D6673;
  --stale-soft: #ECEEF1;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Instrument Sans", sans-serif; font-stretch: 100%; color: var(--ink); background: var(--paper); font-size: 16px; line-height: 24px; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
b { font-weight: 700; }
p { text-wrap: pretty; }
ul, ol { list-style: none; }
.s { font-size: 13px; line-height: 16px; }
.muted { color: var(--ink-2); }

/* Buttons, and links drawn as buttons */
button, .btn { font: inherit; font-weight: 700; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; transition: transform 140ms var(--ease), background-color 140ms ease; }
button:active, .btn:active { transform: scale(0.97); }
button:focus-visible, .btn:focus-visible, input:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { button, .btn { transition: none; } button:active, .btn:active { transform: none; } }

/* ---------- Phone ---------- */
.phone, .phone body { width: 390px; height: 844px; }
.screen { position: relative; width: 390px; height: 844px; overflow: hidden; }

.sys { height: 44px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
.sys .right { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 16px; color: var(--ink-2); }

.bar { height: 48px; padding: 0 16px 0 24px; display: flex; align-items: center; justify-content: space-between; }
.bar.back { padding: 0 24px 0 16px; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand b { font-size: 20px; line-height: 24px; font-weight: 700; font-stretch: 85%; letter-spacing: -0.01em; }
.sample { font-size: 13px; line-height: 16px; color: var(--ink-2); }
.brand .sample { margin-left: 8px; }

/* Outline button: trip controls (End trip) and the way back */
.outline { height: 48px; padding: 0 16px; border-radius: 24px; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.outline.nav { padding: 0 16px 0 12px; }
/* Navigation to another screen: water fill, plum text. Never a trip control. */
.go { height: 48px; padding: 0 16px 0 12px; border-radius: 24px; background: var(--water); color: var(--plum); flex: none; }
.primary { height: 56px; padding: 0 24px; border-radius: 28px; background: var(--plum); color: #fff; flex: none; }
.primary.wide { width: 100%; }
.sos { width: 100%; height: 56px; border-radius: 28px; background: var(--late); color: #fff; }
.sos .tag { background: #fff; color: var(--late); border-radius: 4px; padding: 0 8px; line-height: 24px; }
@media (hover: hover) and (pointer: fine) {
  .primary:hover { background: var(--plum-press); }
  .sos:hover { background: var(--late-press); }
  .outline:hover { background: var(--water); }
  .go:hover { background: var(--water-2); }
  .pick:hover { box-shadow: inset 0 0 0 2px var(--plum); }
  .pick[aria-pressed="true"]:hover { background: var(--plum-press); }
  .step:hover { background: var(--water); }
}

.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 8px; border-radius: 16px; font-weight: 700; color: #fff; white-space: nowrap; }
.chip.ok { background: var(--ok); }
.chip.soon { background: var(--soon); color: var(--soon-ink); }
.chip.late { background: var(--late); }
.chip.stale { background: var(--stale); }

.h1 { font-size: 32px; line-height: 40px; font-weight: 700; font-stretch: 75%; letter-spacing: -0.01em; }
.h2 { font-size: 20px; line-height: 28px; font-weight: 700; }
.card { margin: 0 16px; padding: 16px; background: var(--surface); border-radius: 16px; }
.advice { margin: 8px 16px 0; padding: 8px 16px; border-radius: 12px; background: var(--water); color: var(--ink); }
.rise { display: inline-flex; align-items: center; gap: 8px; background: var(--water); color: var(--plum); font-weight: 700; height: 32px; padding: 0 12px 0 8px; border-radius: 16px; }
.signal { display: flex; gap: 8px; align-items: center; color: var(--ink-2); }
.signal svg { flex: none; }

/* Selection buttons: one choice in a group */
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { height: 48px; padding: 0 12px; border-radius: 24px; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--plum-line); }
.pick[aria-pressed="true"] { background: var(--plum); color: #fff; box-shadow: none; padding-left: 12px; }
.seg { display: grid; gap: 8px; }
.seg .pick { height: 56px; border-radius: 28px; padding: 0; }
.seg .pick[aria-pressed="true"] { padding: 0; }

.field-label { font-weight: 700; }
.dock { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 16px 34px; /* 34 px: iOS home-bar safe area, not a layout space */ background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: 0 -1px 0 var(--rule); }
.home { position: absolute; bottom: 8px; left: 50%; width: 134px; height: 5px; transform: translateX(-50%); border-radius: 3px; background: var(--ink); }
