/* Runway — plain CSS recreating the IBM Carbon look (Gray 10 page, Gray 100 masthead and hero).
   Layout: full-bleed bands (masthead, hero, value strip, footer) around a 1312px content column;
   sections are white tiles on Gray 10, separated by the 2x-grid gutter. */

:root {
  --bg: #f4f4f4;
  --layer: #ffffff;
  --layer-2: #f4f4f4;
  --layer-hover: #e8e8e8;
  --ink: #161616;
  --ink-2: #525252;
  --ink-3: #6f6f6f;
  --line: #e0e0e0;
  --line-strong: #c6c6c6;
  --field-line: #8d8d8d;
  --blue: #0f62fe;
  --blue-hover: #0050e6;
  --blue-active: #002d9c;
  --blue-tint: #edf5ff;
  --blue-light: #78a9ff;
  --purple: #8a3ffc;
  --purple-ink: #6929c4;
  --purple-tint: #f6f2ff;
  --dark: #161616;
  --dark-2: #262626;
  --dark-3: #393939;
  --dark-line: #393939;
  --good: #24a148;
  --sans: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', Menlo, Consolas, monospace;
  --max: 1312px;
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(.2, 0, .38, .9);
  color-scheme: light;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.43; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--dark); }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 400; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
cite { font-style: normal; }
a { color: var(--blue); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 12px 16px; background: var(--blue); color: #fff; }
.skip-link:focus { left: 8px; }
.icon { display: inline-block; flex: none; vertical-align: middle; }

.col { max-width: calc(var(--max) + 64px); margin: 0 auto; padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
.eyebrow { display: block; color: var(--ink-2); font-size: 14px; line-height: 18px; letter-spacing: .16px; }
.kicker { display: block; color: var(--ink-2); font-size: 12px; line-height: 16px; letter-spacing: .32px; }
.fine { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.src { display: block; color: var(--ink-3); font-size: 12px; line-height: 18px; }
.src a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.src a:hover { color: var(--blue); text-decoration-color: currentColor; }
.src a .icon { margin-left: 2px; vertical-align: -1px; }
.src--block { margin-top: -8px; }

/* ------------------------------------------------------- Carbon-style controls */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 0 16px; border: 1px solid transparent; border-radius: 0; font-size: 14px; line-height: 18px; letter-spacing: .16px; text-align: left; text-decoration: none; white-space: nowrap; transition: background-color 70ms var(--ease), border-color 70ms var(--ease), color 70ms var(--ease); }
.btn--md { min-height: 40px; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-hover); }
.btn--primary:active { background: var(--blue-active); }
.btn--secondary { background: var(--dark-3); color: #fff; justify-content: center; }
.btn--secondary:hover { background: #474747; }
.btn--ghost { background: transparent; color: var(--blue); padding: 0 12px; }
.btn--ghost:hover { background: var(--layer-hover); color: var(--blue-hover); }
.btn--icon { width: 48px; padding: 0; justify-content: center; }
.btn:disabled { background: var(--line-strong); color: #8d8d8d; cursor: not-allowed; border-color: transparent; }
.btn--ghost:disabled { background: transparent; color: var(--line-strong); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; box-shadow: inset 0 0 0 3px #fff; }

.switcher { display: flex; max-width: 520px; flex: 1 1 320px; border: 1px solid var(--ink); }
.switcher button { flex: 1; min-height: 38px; padding: 0 16px; border: 0; border-left: 1px solid var(--line-strong); background: transparent; color: var(--ink-2); text-align: left; font-size: 14px; transition: background-color 70ms var(--ease); }
.switcher button:first-child { border-left: 0; }
.switcher button:hover { background: var(--layer-hover); color: var(--ink); }
.switcher button[aria-selected="true"] { background: var(--ink); color: #fff; border-left-color: var(--ink); }
.switcher button[aria-selected="true"] + button { border-left-color: var(--ink); }

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--field-line); border-radius: 16px; background: var(--layer); color: var(--ink); font-size: 14px; line-height: 18px; white-space: nowrap; transition: background-color 70ms var(--ease); }
.chip:hover { background: var(--layer-hover); }
.chip[aria-pressed="true"] { background: var(--dark-3); border-color: var(--dark-3); color: #fff; }
.chip[aria-pressed="true"]:hover { background: #474747; }
.chip:disabled { color: var(--line-strong); border-color: var(--line); background: var(--layer); cursor: not-allowed; }
.chip:disabled .swatch { opacity: .35; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: none; }

.tag { display: inline-flex; align-items: center; gap: 4px; min-height: 20px; padding: 0 8px; border-radius: 12px; font-size: 12px; line-height: 16px; letter-spacing: .32px; white-space: nowrap; background: #e0e0e0; color: #161616; }
.tag--green { background: #a7f0ba; color: #0e6027; }
.tag--cyan { background: #bae6ff; color: #00539a; }
.tag--warm { background: #e5e0df; color: #3c3838; }
.tag--purple { background: #e8daff; color: #6929c4; }
.tag--teal { background: #9ef0f0; color: #005d5d; }
.tag--outline { background: transparent; border: 1px solid var(--field-line); }
.tag--md { min-height: 24px; padding: 0 10px; font-size: 14px; }

.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box { flex: none; position: relative; width: 16px; height: 16px; margin-top: 3px; border: 1px solid var(--ink); background: var(--layer); }
.check input:checked + .check-box { background: var(--ink); }
.check input:checked + .check-box::after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.check input:focus-visible + .check-box { outline: 2px solid var(--blue); outline-offset: 1px; }

.field-wrap { display: grid; gap: 4px; }
.field { width: 100%; height: 40px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--field-line); background: var(--layer); color: var(--ink); font-size: 14px; border-radius: 0; }
.field::placeholder { color: #a8a8a8; }
.field:focus { outline: 2px solid var(--blue); outline-offset: -2px; }
.field[aria-invalid="true"] { outline: 2px solid #da1e28; outline-offset: -2px; }
.field-error { color: #da1e28; font-size: 12px; line-height: 16px; }

.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin 690ms linear infinite; vertical-align: -3px; }
.loading { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* AI label (Carbon "AI explained" pattern) */
.ai-wrap { position: relative; display: inline-flex; }
.ai-label { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid var(--ink); background: linear-gradient(135deg, #fff, #e8daff); color: var(--ink); font-size: 11px; font-weight: 600; font-family: var(--sans); }
.ai-label[aria-expanded="true"] { background: var(--ink); color: #fff; }
.ai-pop { position: absolute; top: calc(100% + 10px); left: -8px; z-index: 30; width: min(320px, calc(100vw - 32px)); padding: 16px 20px 24px; background: linear-gradient(180deg, #fff 60%, #edf5ff); border: 1px solid #a6c8ff; box-shadow: 0 8px 24px rgba(0, 0, 0, .14); display: grid; gap: 8px; font-size: 14px; line-height: 20px; }
.ai-pop .kicker { margin-bottom: 4px; }

/* ---------------------------------------------------------------- masthead */
.masthead { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--dark); border-bottom: 1px solid var(--dark-line); }
.masthead-inner { height: 48px; display: flex; align-items: stretch; }
.brand { display: flex; align-items: center; padding-right: 32px; color: #fff; text-decoration: none; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; }
.logo svg { display: block; flex: none; }
.logo-word { font-size: 15px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; line-height: 1; padding-top: 1px; }
.masthead-nav { display: flex; align-items: stretch; }
.masthead-nav a { display: flex; align-items: center; padding: 0 16px; color: #c6c6c6; font-size: 14px; text-decoration: none; }
.masthead-nav a:hover { color: #f4f4f4; background: var(--dark-2); }
.masthead-nav a:focus-visible, .zip-chip:focus-visible { outline-color: #fff; }
.masthead-right { margin-left: auto; display: flex; align-items: stretch; }
.zip-chip { display: flex; align-items: center; gap: 8px; padding: 0 16px; color: #f4f4f4; text-decoration: none; font-size: 14px; border-left: 1px solid var(--dark-line); }
.zip-chip:hover { background: var(--dark-2); }
.zip-chip-zip { font-family: var(--mono); }
.zip-chip-level { display: flex; align-items: center; gap: 6px; color: #c6c6c6; font-size: 12px; }
.zip-chip-level i { width: 8px; height: 8px; border-radius: 50%; }
.masthead .btn { min-height: 48px; }
.masthead-cta { padding-right: 16px; min-width: 160px; }
.masthead-cta-icon { display: none !important; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; background: var(--dark); color: #f4f4f4; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 64px 64px; -webkit-mask-image: linear-gradient(to left, #000, transparent 70%); mask-image: linear-gradient(to left, #000, transparent 70%); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; padding-block: 56px 64px; align-items: center; }
.hero-copy { display: grid; gap: 24px; min-width: 0; }
.hero-eyebrow { color: #a8a8a8; font-size: 14px; letter-spacing: .16px; }
.hero h1 { font-size: clamp(42px, 5.2vw, 76px); line-height: 1.08; font-weight: 300; letter-spacing: -.02em; color: #fff; max-width: 12ch; }
.hero-lead { font-size: 20px; line-height: 30px; font-weight: 300; color: #c6c6c6; max-width: 34em; }

.quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--dark-line); border: 1px solid var(--dark-line); margin-top: 8px; }
.quick { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: start; min-height: 76px; padding: 16px 40px 16px 16px; border: 0; background: var(--dark); color: #f4f4f4; text-align: left; transition: background-color 110ms var(--ease); }
.quick:hover { background: var(--dark-2); }
.quick:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.quick-icon { grid-row: span 2; color: var(--blue-light); margin-top: 1px; }
.quick-label { font-size: 16px; line-height: 22px; }
.quick-hint { font-size: 12px; line-height: 16px; color: #a8a8a8; }
.quick-arrow { position: absolute; right: 16px; top: 18px; color: var(--blue-light); transition: transform 110ms; }
.quick:hover .quick-arrow { transform: translateX(3px); }

.status-card { background: var(--dark-2); border-top: 4px solid var(--blue); min-width: 0; }
.status-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 0; font-size: 14px; color: #c6c6c6; }
.status-live { font-family: var(--mono); font-size: 12px; color: #a8a8a8; display: flex; align-items: center; gap: 6px; }
.status-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #42be65; }
.status-today { display: flex; gap: 12px; align-items: flex-start; padding: 16px; }
.status-dot { flex: none; width: 16px; height: 16px; border-radius: 50%; margin-top: 8px; box-shadow: 0 0 0 4px rgba(255,255,255,.08); }
.status-today strong { display: block; font-size: 28px; line-height: 36px; font-weight: 400; color: #fff; }
.status-today span.sub { display: block; font-size: 14px; line-height: 20px; color: #c6c6c6; margin-top: 4px; }
.status-rows { border-top: 1px solid var(--dark-line); }
.status-rows > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--dark-line); align-items: center; }
.status-rows > div:last-child { border-bottom: 0; }
.status-rows dt { font-size: 14px; color: #a8a8a8; }
.status-rows dd { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: #f4f4f4; min-width: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.status-sub { font-size: 12px; color: #a8a8a8; }
.status-link { display: inline-flex; align-items: center; gap: 6px; color: var(--blue-light); text-decoration: none; }
.status-link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- value strip */
.value-strip { background: var(--layer); border-bottom: 1px solid var(--line); }
.value-inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.value { display: grid; gap: 8px; align-content: start; padding: 32px 32px 32px 0; border-right: 1px solid var(--line); }
.value + .value { padding-left: 32px; }
.value:last-child { border-right: 0; }
.value .icon { color: var(--blue); margin-bottom: 8px; }
.value h2 { font-size: 20px; line-height: 28px; }
.value p { font-size: 14px; line-height: 20px; color: var(--ink-2); max-width: 36ch; }

/* ---------------------------------------------------------------- sections */
.page { padding-block: 32px 64px; display: grid; gap: 32px; }
.section { background: var(--layer); padding: 48px 32px 40px; display: grid; gap: 24px; min-width: 0; }
.section-head { display: grid; gap: 8px; }
.section-head--row { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; }
.section-head-text { display: grid; gap: 8px; min-width: 0; }
.section-title { font-size: 42px; line-height: 50px; font-weight: 300; letter-spacing: -.01em; }
.section-lead { font-size: 16px; line-height: 24px; color: var(--ink-2); max-width: 62ch; }
.subhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.subhead h3 { font-size: 20px; line-height: 28px; }
.subhead-note { color: var(--ink-3); font-size: 12px; font-family: var(--mono); }

/* location */
.location-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; padding: 16px; background: var(--layer-2); }
.location-current { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; align-items: baseline; min-width: 0; }
.location-current .kicker { grid-column: 1 / -1; }
.location-current strong { font-family: var(--mono); font-size: 32px; line-height: 40px; font-weight: 400; }
.location-name { color: var(--ink-2); font-size: 14px; }
.location-form { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 0; }
.location-form .field-wrap { width: 140px; }
.location-form .btn--secondary { min-width: 64px; }
.location-form .btn--ghost { margin-left: 8px; }

/* horizon + periods */
.horizon-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.period-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(88px, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.period-strip--hourly { grid-auto-columns: 80px; }
.period-strip--weekly { grid-auto-columns: minmax(150px, 1fr); }
.period-strip--monthly { grid-auto-columns: minmax(200px, 1fr); }
.period { scroll-snap-align: start; display: grid; justify-items: center; gap: 4px; padding: 14px 8px 12px; border: 0; background: var(--layer); color: var(--ink); text-align: center; box-shadow: inset 0 3px 0 transparent; transition: background-color 110ms var(--ease); }
.period:hover { background: var(--layer-hover); }
.period[aria-selected="true"] { background: var(--blue-tint); box-shadow: inset 0 3px 0 var(--blue); }
.period-label { font-size: 14px; font-weight: 600; white-space: nowrap; }
.period-sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.period-icon { color: var(--ink-2); height: 20px; }
.period-bar { display: flex; align-items: flex-end; width: 8px; height: 48px; background: var(--layer-2); }
.period-bar span { display: block; width: 100%; }
.period-pct { font-family: var(--mono); font-size: 16px; font-weight: 400; }
.period-level { font-size: 12px; color: var(--ink-2); }

.period-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; padding: 32px; background: var(--layer-2); }
.detail-main { display: grid; gap: 12px; align-content: start; }
.level-chip { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 8px; background: var(--layer); border: 1px solid var(--line-strong); font-size: 14px; font-weight: 600; }
.level-dot { width: 12px; height: 12px; border-radius: 50%; }
.detail-number { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.detail-number strong { font-size: 76px; line-height: 80px; font-weight: 300; letter-spacing: -.02em; }
.detail-number span { color: var(--ink-2); font-size: 14px; line-height: 20px; max-width: 220px; }
.detail-advice { font-size: 20px; line-height: 28px; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-why { display: grid; gap: 12px; align-content: start; min-width: 0; }
.detail-why ul { padding-left: 18px; display: grid; gap: 8px; font-size: 16px; line-height: 22px; }
.detail-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 1px; background: var(--line); margin-top: 8px; }
.detail-facts div { background: var(--layer); padding: 12px 16px; }
.detail-facts dt { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12px; }
.detail-facts dd { font-family: var(--mono); font-size: 18px; margin-top: 4px; }

/* notices */
.notices { list-style: none; padding: 0; display: grid; gap: 8px; }
.notices--empty { display: grid; gap: 4px; padding: 14px 16px; background: var(--layer-2); box-shadow: inset 3px 0 0 var(--good); }
.notice { display: flex; gap: 12px; padding: 14px 16px; background: #fcf4d6; box-shadow: inset 3px 0 0 #f1c21b; }
.notice--warning { background: #fff1f1; box-shadow: inset 3px 0 0 #da1e28; }
.notice--watch { background: #fff2e8; box-shadow: inset 3px 0 0 #ff832b; }
.notice--planned { background: var(--blue-tint); box-shadow: inset 3px 0 0 var(--blue); }
.notice > .icon { margin-top: 2px; }
.notice-body { display: grid; gap: 4px; min-width: 0; }
.notice-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.notice-time { color: var(--ink-2); font-size: 12px; font-family: var(--mono); }
.notice-body p { font-size: 14px; line-height: 20px; color: #393939; }

/* map */
.layer-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.offline-note { margin-top: -12px; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.map-frame { position: relative; border: 1px solid var(--line); }
.risk-map { height: 480px; width: 100%; background: #e8e8e8; z-index: 0; }
.map-frame.is-offline .risk-map { background-color: #f2f4f8; background-image: linear-gradient(to right, #e0e0e0 1px, transparent 1px), linear-gradient(to bottom, #e0e0e0 1px, transparent 1px); background-size: 48px 48px; }
.map-offline-badge { position: absolute; top: 12px; left: 12px; z-index: 500; max-width: calc(100% - 68px); padding: 6px 10px; background: rgba(255,255,255,.95); color: var(--ink-2); font-size: 12px; line-height: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.map-city span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font-size: 12px; font-weight: 600; color: #525252; letter-spacing: .32px; text-transform: uppercase; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; pointer-events: none; }
.map-legend { position: absolute; left: 12px; bottom: 28px; z-index: 500; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 8px 12px; background: rgba(255,255,255,.95); font-size: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.map-legend > span { display: flex; align-items: center; gap: 6px; }
.heat-ramp { display: block; width: 120px; height: 8px; background: linear-gradient(90deg, #24a148 0%, #24a148 20%, #f1c21b 35%, #ff832b 55%, #da1e28 75%, #a2191f 100%); }
.legend-outage { width: 10px; height: 10px; border-radius: 50%; background: #161616; box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px #8d8d8d; }
.map-dot-icon span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 600; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.leaflet-container { font-family: var(--sans); }
.leaflet-tooltip, .leaflet-popup-content { font-size: 13px; line-height: 18px; }
.leaflet-control-attribution { font-size: 10px; }
.leaflet-bar a { border-radius: 0 !important; }

/* actions */
.progress-tile { display: grid; gap: 4px; min-width: 180px; padding: 16px; background: var(--layer-2); }
.progress-num { font-family: var(--mono); font-size: 32px; line-height: 36px; }
.progress-num small { font-size: 16px; color: var(--ink-3); }
.progress-label { font-size: 12px; color: var(--ink-2); }
.progress-bar { display: block; height: 4px; background: var(--line); margin-top: 6px; }
.progress-bar i { display: block; height: 100%; background: var(--good); transition: width 240ms var(--ease); }
.home-chips { display: grid; gap: 12px; }
.home-chips-label { font-size: 14px; color: var(--ink-2); }
.home-chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.action-list { list-style: none; padding: 0; display: grid; border-top: 1px solid var(--line); }
.action { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px 16px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.action-icon { display: grid; place-items: center; width: 48px; height: 48px; background: var(--layer-2); color: var(--ink-2); }
.action.is-urgent .action-icon { background: var(--blue-tint); color: var(--blue); }
.action-body { display: grid; gap: 6px; min-width: 0; }
.action-title { font-size: 16px; line-height: 22px; font-weight: 600; }
.action-why { font-size: 14px; line-height: 20px; color: var(--ink-2); padding-left: 26px; max-width: 70ch; }
.action-when { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; color: var(--ink-2); font-size: 12px; font-family: var(--mono); text-align: right; white-space: nowrap; padding-top: 2px; }
.action-when .tag { font-family: var(--sans); }
.action.is-done .action-title { color: var(--ink-3); text-decoration: line-through; }
.action.is-done .action-why { display: none; }

/* Watson */
.watson-title { display: flex; align-items: center; gap: 12px; }
.chat-card { display: grid; border: 1px solid var(--line); background: var(--layer); min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, var(--purple-tint), var(--layer) 70%); }
.chat-head strong { display: block; font-size: 16px; }
.chat-head .sub { display: block; font-size: 12px; color: var(--ink-2); }
.watson-avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: none; color: #fff; background: linear-gradient(135deg, var(--blue), var(--purple)); }
.chat-feed { display: flex; flex-direction: column; gap: 16px; padding: 24px 20px; min-height: 200px; max-height: 460px; overflow-y: auto; }
.bubble { max-width: min(600px, 88%); padding: 12px 16px; font-size: 16px; line-height: 24px; }
.bubble p { white-space: pre-line; }
.bubble--assistant { align-self: flex-start; background: var(--layer-2); box-shadow: inset 3px 0 0 var(--purple); }
.bubble--user { align-self: flex-end; background: var(--blue); color: #fff; }
.bubble-who { display: flex; align-items: center; gap: 8px; color: var(--purple-ink); font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.bubble-mode { font-weight: 400; color: var(--ink-3); font-family: var(--mono); }
.bubble-mode--live { color: var(--purple-ink); }
.bubble-note { display: block; margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.chat-suggest { display: flex; gap: 8px; padding: 0 20px 16px; overflow-x: auto; scrollbar-width: none; }
.chat-suggest button { flex: none; min-height: 32px; padding: 6px 14px; border: 1px solid var(--purple); border-radius: 16px; background: var(--layer); color: var(--purple-ink); font-size: 14px; transition: background-color 110ms; }
.chat-suggest button:hover { background: var(--purple-tint); }
.chat-suggest button:disabled { opacity: .5; cursor: default; }
.chat-input { display: flex; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border: 0; border-bottom: 2px solid transparent; background: var(--layer-2); font-size: 16px; color: var(--ink); border-radius: 0; }
.chat-input input:focus { outline: none; border-bottom-color: var(--blue); }

/* how it works */
.how-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.how-stats div { background: var(--layer); padding: 20px; display: grid; gap: 4px; }
.how-stats dt { font-size: 12px; color: var(--ink-2); letter-spacing: .32px; }
.how-stats dd { font-size: 28px; line-height: 36px; font-weight: 300; }
.signal-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.signal { background: var(--layer); padding: 24px 20px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.signal > .icon { color: var(--blue); }
.signal h3 { font-size: 18px; line-height: 24px; font-weight: 600; }
.signal ul { list-style: none; padding: 0; display: grid; gap: 8px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.signal li { padding-left: 14px; position: relative; }
.signal li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; background: var(--line-strong); }
.signal--you { background: var(--blue-tint); }
.signal--you li::before { background: var(--blue); }
.how-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.how-steps li { display: grid; gap: 8px; align-content: start; padding: 24px 24px 8px 0; }
.how-steps li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.how-steps .icon { color: var(--ink-2); }
.how-num { font-family: var(--mono); font-size: 14px; color: var(--blue); }
.how-steps h3 { font-size: 20px; line-height: 28px; }
.how-steps p { font-size: 14px; line-height: 20px; color: var(--ink-2); }

/* footer */
.site-footer { background: var(--dark); color: #c6c6c6; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-block: 48px; }
.footer-brand { display: grid; gap: 16px; align-content: start; }
.footer-brand .brand { padding: 0; }
.footer-brand p, .footer-col p { font-size: 14px; line-height: 20px; max-width: 40ch; }
.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col h2 { font-size: 14px; font-weight: 600; color: #f4f4f4; margin-bottom: 4px; }
.footer-col a { color: #c6c6c6; font-size: 14px; text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--dark-line); font-size: 12px; color: #8d8d8d; }

/* ---------------------------------------------------------------- tablet */
@media (max-width: 1056px) {
  .masthead-nav { display: none; }
  .hero-inner { grid-template-columns: 1fr; align-items: start; padding-block: 48px 56px; }
  .status-card { max-width: 640px; }
  .period-detail { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .signal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .signal--you { grid-column: 1 / -1; }
  .how-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-steps li, .how-steps li + li { padding: 20px 20px 20px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .how-steps li:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
}

/* ---------------------------------------------------------------- phone */
@media (max-width: 672px) {
  html { scroll-padding-top: 48px; }
  .col { padding-left: var(--gl); padding-right: var(--gr); }
  .brand { padding-right: 12px; }
  .zip-chip { padding: 0 12px; }
  .zip-chip-level { display: none; }
  .masthead-cta { display: none !important; }
  .masthead-cta-icon { display: inline-flex !important; }

  .hero-inner { padding-block: 32px 40px; gap: 24px; }
  .hero h1 { font-size: 40px; line-height: 46px; }
  .hero-lead { font-size: 16px; line-height: 24px; }
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick { min-height: 84px; padding: 14px 12px; grid-template-columns: 1fr; row-gap: 4px; }
  .quick-icon { grid-row: auto; margin-bottom: 2px; }
  .quick-label { font-size: 14px; line-height: 18px; }
  .quick-arrow { display: none; }
  .status-today strong { font-size: 24px; line-height: 30px; }
  .status-rows > div { grid-template-columns: 112px minmax(0, 1fr); }

  .value-inner { grid-template-columns: 1fr; }
  .value, .value + .value { padding: 20px 0; border-right: 0; border-bottom: 1px solid var(--line); grid-template-columns: 24px minmax(0, 1fr); column-gap: 16px; }
  .value:last-child { border-bottom: 0; }
  .value .icon { grid-row: span 2; margin: 2px 0 0; }

  .page { padding-block: 16px 40px; gap: 16px; }
  .page > .section { margin-left: calc(-1 * var(--gl)); margin-right: calc(-1 * var(--gr)); padding: 32px var(--gr) 32px var(--gl); gap: 20px; }
  .section-title { font-size: 32px; line-height: 40px; }
  .section-lead { font-size: 14px; line-height: 20px; }
  .section-head--row { grid-template-columns: 1fr; }
  .progress-tile { min-width: 0; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 12px; }
  .progress-bar { grid-column: 1 / -1; }

  .location-bar { padding: 12px; }
  .location-form { width: 100%; }
  .location-form .field-wrap { flex: 1 1 100px; width: auto; }
  .location-form .btn--ghost { margin-left: 0; width: 100%; }
  .switcher { max-width: none; }

  .period-strip { margin: 0 calc(-1 * var(--gr)) 0 calc(-1 * var(--gl)); border-left: 0; border-right: 0; grid-auto-columns: 80px; }
  .period-strip--weekly { grid-auto-columns: 136px; }
  .period-strip--monthly { grid-auto-columns: 156px; }
  .period-detail { padding: 20px 16px; margin: 0 calc(-1 * var(--gr)) 0 calc(-1 * var(--gl)); }
  .detail-number strong { font-size: 56px; line-height: 60px; }
  .detail-advice { font-size: 18px; line-height: 26px; }
  .detail-facts div { padding: 10px 12px; }
  .detail-facts dd { font-size: 16px; }

  .map-frame { margin: 0 calc(-1 * var(--gr)) 0 calc(-1 * var(--gl)); border-left: 0; border-right: 0; }
  .risk-map { height: 360px; }
  .layer-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gr)) 0 calc(-1 * var(--gl)); padding: 0 var(--gr) 4px var(--gl); scrollbar-width: none; }
  .map-legend { left: 8px; bottom: 24px; gap: 8px; padding: 6px 8px; }

  .action { grid-template-columns: 40px minmax(0, 1fr); gap: 8px 12px; padding: 16px 0; }
  .action-icon { width: 40px; height: 40px; }
  .action-when { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; padding-left: 26px; white-space: normal; text-align: left; flex-wrap: wrap; }

  .chat-card { margin: 0 calc(-1 * var(--gr)) 0 calc(-1 * var(--gl)); border-left: 0; border-right: 0; }
  .chat-head { padding: 12px 16px; }
  .chat-feed { padding: 16px; max-height: 60vh; }
  .bubble { font-size: 15px; line-height: 22px; max-width: 92%; }
  .chat-suggest { padding: 0 16px 12px; }

  .signal-grid, .how-steps { grid-template-columns: 1fr; }
  .how-steps li, .how-steps li + li, .how-steps li:nth-child(even) { padding: 20px 0; border-left: 0; }
  .how-stats div { padding: 14px 16px; }
  .how-stats dd { font-size: 20px; line-height: 28px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; padding-block: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
