/* Plotline — a field notebook with an instrument panel.
   Layout: phone-first app shell; bottom tabs on phones, a left rail on desktop.
   Color carries meaning: green = rain, blue = wind, yellow = sun, orange = heat units,
   violet = spray. Everything else stays in quiet field-stone neutrals. */
:root {
  --bg: #F1F3EE;
  --surface: #FFFFFF;
  --surface-2: #F6F7F3;
  --sunken: #E9EDE5;
  --ink: #17201B;
  --ink-2: #48544D;
  --ink-3: #65706A;
  --line: #DEE3D8;
  --line-strong: #C6CEC1;
  --track: #E7EBE3;
  --grid: #EDF0E9;
  --axis: #C6CEC1;
  --primary: #17201B;
  --primary-hover: #2B3731;
  --on-primary: #FFFFFF;
  --grow: #33403A;
  --rain: #1E9E6A;
  --wind: #2F6FDB;
  --sun: #D9A10E;
  --spray: #7B52D3;
  --heat: #D2522B;
  --caution: #B7780C;
  --stop: #C93A2E;
  --ok-text: #157049;
  --focus: #2F6FDB;
  --logo-bg: #17201B;
  --logo-track: rgba(255, 255, 255, .2);
  --logo-dot: #F1F3EE;
  --rain-wash: color-mix(in srgb, var(--rain) 12%, var(--surface));
  --wind-wash: color-mix(in srgb, var(--wind) 10%, var(--surface));
  --sun-wash: color-mix(in srgb, var(--sun) 14%, var(--surface));
  --spray-wash: color-mix(in srgb, var(--spray) 11%, var(--surface));
  --heat-wash: color-mix(in srgb, var(--heat) 11%, var(--surface));
  --caution-wash: color-mix(in srgb, var(--caution) 13%, var(--surface));
  --stop-wash: color-mix(in srgb, var(--stop) 10%, var(--surface));
  --shadow-1: 0 1px 2px rgba(23, 32, 27, .06);
  --shadow-float: 0 16px 36px -16px rgba(23, 32, 27, .42), 0 3px 8px -2px rgba(23, 32, 27, .10);
  --radius-l: 20px;
  --radius-m: 14px;
  --font-ui: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1412; --surface: #161D1A; --surface-2: #1B2420; --sunken: #222C27; --ink: #EDF2EE; --ink-2: #B6C1BA; --ink-3: #93A098;
    --line: #29332E; --line-strong: #3A4740; --track: #26302B; --grid: #212A26; --axis: #3A4740;
    --primary: #EDF2EE; --primary-hover: #D3DCD6; --on-primary: #0E1412; --grow: #D3DCD6;
    --rain: #1F9D6C; --wind: #3987E5; --sun: #C98500; --spray: #9085E9; --heat: #D95926;
    --caution: #D3922A; --stop: #E45D51; --ok-text: #43C98F; --focus: #5C9BF0;
    --logo-bg: #25322B; --logo-track: rgba(255, 255, 255, .16); --logo-dot: #EDF2EE;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-float: 0 18px 40px -16px rgba(0, 0, 0, .7), 0 3px 8px -2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1412; --surface: #161D1A; --surface-2: #1B2420; --sunken: #222C27; --ink: #EDF2EE; --ink-2: #B6C1BA; --ink-3: #93A098;
  --line: #29332E; --line-strong: #3A4740; --track: #26302B; --grid: #212A26; --axis: #3A4740;
  --primary: #EDF2EE; --primary-hover: #D3DCD6; --on-primary: #0E1412; --grow: #D3DCD6;
  --rain: #1F9D6C; --wind: #3987E5; --sun: #C98500; --spray: #9085E9; --heat: #D95926;
  --caution: #D3922A; --stop: #E45D51; --ok-text: #43C98F; --focus: #5C9BF0;
  --logo-bg: #25322B; --logo-track: rgba(255, 255, 255, .16); --logo-dot: #EDF2EE;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-float: 0 18px 40px -16px rgba(0, 0, 0, .7), 0 3px 8px -2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
h1, h2 { font-family: var(--font-display); text-wrap: balance; }
h2 { font-size: 22px; line-height: 1.2; font-weight: 680; letter-spacing: -0.01em; }
h3 { font-size: 17px; line-height: 1.3; font-weight: 700; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.ic { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.c-rain { color: var(--rain); } .c-wind { color: var(--wind); } .c-sun { color: var(--sun); } .c-heat { color: var(--heat); } .c-spray { color: var(--spray); }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.fine { font-size: 13.5px; line-height: 1.45; color: var(--ink-3); margin-top: 10px; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.strike { text-decoration: line-through; color: var(--ink-3); }
.ok-text { color: var(--ok-text); font-weight: 700; font-size: 13px; }

/* --------------------------------------------------------------- shell */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.top-brand { display: inline-flex; align-items: center; gap: 9px; font: 760 20px/1 var(--font-display); letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.logo-mark { width: 30px; height: 30px; flex: none; }
.farm-pill { margin-left: auto; appearance: none; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font: 600 13.5px/1.2 var(--font-ui); border-radius: 999px; padding: 7px 12px; cursor: pointer; max-width: 52vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-mic { width: 44px; min-height: 44px; }
.main-col { padding-bottom: calc(156px + env(safe-area-inset-bottom, 0px)); }
#main { max-width: 1120px; margin: 0 auto; padding: 6px 16px 24px; outline: none; }
#main > * + * { margin-top: 20px; }
@media (min-width: 560px) { #main { padding-inline: 24px; } }
@media (min-width: 900px) { #main { padding-inline: 32px; } }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); }
.tabbar a { display: grid; justify-items: center; gap: 2px; padding: 4px 0; color: var(--ink-3); text-decoration: none; font-size: 12.5px; font-weight: 600; border-radius: 12px; }
.tabbar a .ic { width: 52px; height: 30px; padding: 3px 14px; border-radius: 999px; transition: background .2s; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on .ic { background: var(--sunken); }
.fab { position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 31; width: 62px; height: 62px; border-radius: 20px; border: 0; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; box-shadow: var(--shadow-float); cursor: pointer; transition: transform .15s; }
.fab:active { transform: scale(.96); }
.fab .ic { width: 28px; height: 28px; stroke-width: 2.2; }
body[data-route="about"] .fab, body[data-route="setup"] .fab, body[data-route="report"] .fab { display: none; }

.side { display: none; }
@media (min-width: 1024px) {
  .side { display: flex; flex-direction: column; gap: 18px; position: fixed; inset: 0 auto 0 0; width: 252px; padding: 24px 16px 20px; border-right: 1px solid var(--line); background: var(--surface-2); overflow-y: auto; z-index: 20; }
  .main-col { margin-left: 252px; padding-bottom: 56px; }
  .topbar, .tabbar, .fab { display: none; }
  #main { padding-top: 28px; }
}
.side-brand { display: flex; align-items: center; gap: 10px; font: 760 23px/1 var(--font-display); letter-spacing: -0.015em; color: var(--ink); text-decoration: none; padding: 0 8px; }
.side-brand .logo-mark { width: 34px; height: 34px; }
.side .farm-pill { margin-left: 0; max-width: none; text-align: left; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.side-nav a:hover { background: var(--sunken); color: var(--ink); }
.side-nav a.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
.side-actions { display: grid; gap: 8px; }
.side-about { margin-top: auto; display: flex; gap: 10px; align-items: center; color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 600; padding: 9px 12px; border-radius: 10px; }
.side-about:hover, .side-about.on { color: var(--ink); background: var(--surface); }

/* -------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; font: 650 16px/1.1 var(--font-ui); border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 20px; height: 20px; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--sunken); color: var(--ink); }
.btn-danger { background: var(--stop); color: #fff; }
.btn.danger { color: var(--stop); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn-lg { min-height: 56px; padding: 0 24px; font-size: 17px; border-radius: 14px; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; justify-content: center; }
.icon-only { width: 48px; padding: 0; justify-content: center; }
.btn-sm.icon-only { width: 40px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.link { appearance: none; background: none; border: 0; color: var(--ink); font: 650 15px/1.2 var(--font-ui); display: inline-flex; align-items: center; gap: 4px; padding: 8px 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.link:hover { text-decoration-color: var(--ink); }
.link .ic { width: 18px; height: 18px; }

/* ----------------------------------------------------------- page head */
.page-head { padding-top: 10px; }
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--ink-2); font-weight: 600; font-size: 15px; text-decoration: none; margin: 0 0 6px -6px; padding: 6px; border-radius: 8px; }
.back:hover { color: var(--ink); }
.back .ic { width: 18px; height: 18px; }
.page-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; }
.page-head-text { min-width: 0; }
.page-head h1 { font-size: 32px; line-height: 1.08; font-weight: 740; letter-spacing: -0.025em; }
.page-head .sub { color: var(--ink-2); margin-top: 6px; font-size: 16px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 900px) { .page-head h1 { font-size: 40px; } }

/* -------------------------------------------------------------- panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px; min-width: 0; }
@media (min-width: 560px) { .panel { padding: 24px; } }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { font-size: 20px; }
.panel-head .muted { font-size: 14.5px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.group-title { font: 700 15px/1.3 var(--font-ui); color: var(--ink-2); margin-bottom: 10px; letter-spacing: .01em; }
.sub-h { font: 700 16px/1.3 var(--font-ui); margin: 18px 0 8px; }
.sub-h-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.sub-h-row .sub-h { margin: 0; }
.grid { display: grid; gap: 20px; }
.grid > * + * { margin-top: 0; }
.grid-2 { grid-template-columns: minmax(0, 1fr); }
.grid-today { grid-template-columns: minmax(0, 1fr); }
.align-start { align-items: start; }
.stack { display: grid; gap: 20px; align-content: start; min-width: 0; }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-today { grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); align-items: start; }
}

/* --------------------------------------------------------- today grid */
.today-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "win" "up" "fields" "season"; }
.today-grid > * { margin: 0; min-width: 0; }
.today-grid .panel-window { grid-area: win; }
.today-grid .panel-upcoming { grid-area: up; }
.today-grid .today-fields { grid-area: fields; }
.today-grid .season-strip { grid-area: season; }
@media (min-width: 1024px) {
  .today-grid { grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); grid-template-areas: "win up" "season up" "fields fields"; align-items: start; }
  .today-grid .season-figs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------ readings */
.readings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .readings { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.reading { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; min-width: 0; }
@media (min-width: 1100px) { .reading { flex-direction: row; align-items: center; gap: 12px; } }
.reading > div { min-width: 0; }
.reading-ic, .source-ic, .quick-ic, .menu-ic, .feature-ic, .empty-ic { display: grid; place-items: center; flex: none; }
.reading-ic { width: 40px; height: 40px; border-radius: 11px; }
.reading-ic .ic { width: 21px; height: 21px; }
.reading-label { display: block; font-size: 13.5px; color: var(--ink-2); }
.reading-value { display: block; font-size: 22px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.reading-sub { display: block; font-size: 13px; color: var(--ink-3); }
.tone-rain { background: var(--rain-wash); color: var(--rain); }
.tone-wind { background: var(--wind-wash); color: var(--wind); }
.tone-sun { background: var(--sun-wash); color: var(--sun); }
.tone-heat { background: var(--heat-wash); color: var(--heat); }
.tone-spray { background: var(--spray-wash); color: var(--spray); }
.tone-ink { background: var(--sunken); color: var(--ink); }

/* -------------------------------------------------------- spray window */
.panel-window h2, .conditions-main h2 { font: 650 15px/1.3 var(--font-ui); color: var(--ink-2); letter-spacing: .01em; }
.panel-window .window-title, .conditions-main .window-title { margin-top: 6px; }
.window-title { font: 680 21px/1.25 var(--font-display); letter-spacing: -0.01em; margin: 8px 0 4px; }
.state-ic { width: 28px; height: 28px; border-radius: 9px; display: inline-grid; place-items: center; vertical-align: -6px; margin-right: 8px; }
.state-ic .ic { width: 18px; height: 18px; stroke-width: 2.3; }
.state-ic.ok { background: var(--wind-wash); color: var(--wind); }
.state-ic.stop { background: var(--stop-wash); color: var(--stop); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--ink-2); }
.key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -1px; flex: none; }

/* ------------------------------------------------------------- charts */
svg.chart { width: 100%; height: auto; display: block; overflow: visible; margin-top: 4px; }
.ax { font: 600 11.5px var(--font-ui); fill: var(--ink-3); }
.ax.strong { fill: var(--ink-2); font-weight: 700; }
.hit { fill: transparent; }
.hit:hover { fill: var(--ink); fill-opacity: .045; }
.tip { position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 13.5px; font-weight: 600; line-height: 1.35; padding: 7px 10px; border-radius: 9px; max-width: 280px; box-shadow: var(--shadow-float); }

.ring { position: relative; width: var(--ring-size); height: var(--ring-size); max-width: 100%; flex: none; }
.ring svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tick-label { font: 700 11px var(--font-ui); fill: var(--ink-3); }
.tick-label.on { fill: var(--ink); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 19%; pointer-events: none; }
.ring-big { font: 700 calc(var(--ring-size, 120px) * 0.19)/1 var(--font-ui); letter-spacing: -0.03em; }
.ring-small { font-size: clamp(12px, calc(var(--ring-size, 120px) * 0.05 + 6px), 15px); color: var(--ink-2); margin-top: 6px; line-height: 1.25; }
.ring-cap { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.ring-cap .ic { width: 17px; height: 17px; }
main.animate .ring-anim .ring-arc { animation: ringFill 1.25s cubic-bezier(.22, .8, .25, 1) both; }
main.animate .ring-anim .ring-dot { animation: fadeIn .35s ease 1.05s both; }
@keyframes ringFill { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: var(--off); } }

.compass { position: relative; width: calc(var(--c-size) + 24px); height: calc(var(--c-size) + 24px); max-width: 100%; }
.compass svg { display: block; width: 100%; height: 100%; overflow: visible; }
.compass-center { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; --ring-size: calc(var(--c-size) * .78); pointer-events: none; }
.compass-center::before { content: ''; position: absolute; width: 44%; height: 44%; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); z-index: -1; }
.compass-center .ring-small { margin-top: 4px; max-width: 34%; }
svg.rose { max-width: 100%; height: auto; overflow: visible; }

.hbars { display: grid; gap: 12px; }
.hbar { display: grid; grid-template-columns: minmax(84px, 30%) minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.hbar-label { font-size: 15px; min-width: 0; }
.hbar-track { height: 12px; background: var(--track); border-radius: 6px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 6px; }
.hbar-value { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; font-size: 15px; }
.big-figure { display: grid; justify-items: end; text-align: right; }
.big-figure span:first-child { font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.big-figure .muted { font-size: 13.5px; }

/* ------------------------------------------------------------ upcoming */
.upcoming { list-style: none; padding: 0; display: grid; }
.up { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.up:first-child { border-top: 0; padding-top: 2px; }
.up-date { display: grid; justify-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 5px 0 6px; }
.up-mon { font-size: 11.5px; font-weight: 700; color: var(--ink-3); letter-spacing: .02em; line-height: 1.2; }
.up-day { font: 700 20px/1 var(--font-display); }
.up-estimate .up-date { border-style: dashed; border-color: var(--line-strong); background: transparent; }
.up-label .up-date { background: var(--spray-wash); border-color: color-mix(in srgb, var(--spray) 30%, var(--line)); }
.up-title { display: block; font-weight: 650; line-height: 1.3; }
.up-meta { display: block; font-size: 13.5px; color: var(--ink-2); line-height: 1.35; margin-top: 2px; }
.up-meta a { color: inherit; font-weight: 600; }
.check { width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: transparent; cursor: pointer; flex: none; }
.check:hover { color: var(--ink-3); border-color: var(--ink-3); }
.check .ic { stroke-width: 2.4; width: 20px; height: 20px; }
.check.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* --------------------------------------------------------- field cards */
.field-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.field-card { display: flex; gap: 16px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.field-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.field-card-body { min-width: 0; flex: 1; }
.field-card h3 { font: 700 21px/1.15 var(--font-display); letter-spacing: -0.01em; }
.field-card .muted { font-size: 14.5px; }
.field-card .ring-big { font-size: 24px; }
.field-facts { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; font-size: 14.5px; color: var(--ink-2); line-height: 1.35; }
.field-facts li { display: flex; gap: 7px; align-items: flex-start; }
.field-facts .ic { width: 17px; height: 17px; margin-top: 1px; }
.stage-counts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stage-counts li { display: flex; align-items: baseline; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 14.5px; color: var(--ink-2); }
.count-n { font-weight: 700; font-size: 18px; color: var(--ink); }

.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 2px 10px; border-radius: 999px; background: var(--sunken); color: var(--ink); font-size: 13.5px; font-weight: 650; line-height: 1.2; white-space: nowrap; }
.chip .ic { width: 15px; height: 15px; }
.chip-sm { min-height: 24px; font-size: 12.5px; padding: 1px 8px; }
.chip-stage { background: var(--surface-2); border: 1px solid var(--line-strong); margin-top: 8px; }
.chip-stage b { color: var(--ink-2); font-weight: 700; }
.chip-rain { background: var(--rain-wash); color: var(--ok-text); }
.chip-wind { background: var(--wind-wash); }
.chip-wind .ic { color: var(--wind); }
.chip-caution { background: var(--caution-wash); color: var(--caution); }
.chip-caution .ic { color: var(--caution); }
.chip-stop { background: var(--stop-wash); color: var(--stop); }
.chip-stop .ic { color: var(--stop); }
.wx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* -------------------------------------------------------- field detail */
.stage-track { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.stage-track li { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 13.5px; color: var(--ink-3); line-height: 1.25; padding: 0 2px; }
.stage-track li::before { content: ''; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: var(--line-strong); }
.stage-track li:first-child::before { display: none; }
.stage-track li.done::before, .stage-track li.now::before { background: var(--ink); }
.stage-track .dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); display: grid; place-items: center; }
.stage-track .dot .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.stage-track li.done, .stage-track li.now { color: var(--ink); }
.stage-track li.done .dot { background: var(--ink); border-color: var(--ink); color: var(--on-primary); }
.stage-track li.now .dot { border-color: var(--ink); box-shadow: 0 0 0 4px var(--sunken); }
.stage-track li.now .dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.stage-track li.now .lbl { font-weight: 700; }

.field-hero { display: grid; gap: 24px; align-items: center; }
@media (min-width: 760px) { .field-hero { grid-template-columns: auto minmax(0, 1fr); gap: 36px; padding: 28px 32px; } }
.field-hero-ring { display: grid; justify-items: center; gap: 10px; }
.field-hero-text { min-width: 0; display: grid; gap: 14px; align-content: start; }
.field-hero-text > .btn, .field-hero-text > .link { justify-self: start; }
.eyebrow-line { font-size: 14.5px; color: var(--ink-2); font-weight: 650; }
.stage-now { font-size: 30px; line-height: 1.1; font-weight: 740; letter-spacing: -0.02em; margin-top: -8px; }
.stage-now .muted { font-weight: 600; font-size: 22px; }
.kv { display: grid; gap: 10px; }
.kv > div { display: grid; grid-template-columns: minmax(130px, 40%) minmax(0, 1fr); gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--ink-2); font-size: 15px; }
.kv dd { font-weight: 650; }
.kv-row { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 6px 0; }
.kv-row > div { display: grid; grid-template-columns: none; gap: 2px; border: 0; padding: 0; }
.kv-row dt { font-size: 13.5px; }
.kv-row dd { font-size: 17px; }
.checklist { list-style: none; padding: 0; display: grid; }
.checklist li { display: flex; gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.checklist li > span { display: grid; }
.note-line { display: flex; gap: 8px; align-items: center; color: var(--ink-2); }
.note-line .ic { width: 18px; height: 18px; }

.score-rings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
@media (min-width: 900px) { .score-rings { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }
.score { display: grid; justify-items: center; text-align: center; gap: 10px; align-content: start; min-width: 0; }
.score .ring-big { font-size: 25px; }
.score-text { display: grid; gap: 1px; }
.score-label { font-weight: 700; display: flex; align-items: center; justify-content: center; }
.score-sub { display: block; font-size: 13.5px; line-height: 1.35; }
.source-line { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink-2); margin-top: 18px; padding: 10px 12px; background: var(--surface-2); border-radius: 12px; }
.source-line .ic { width: 18px; height: 18px; margin-top: 1px; }

.season-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
@media (min-width: 760px) { .season-figs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fig { display: grid; gap: 1px; padding-left: 14px; position: relative; min-width: 0; }
.fig .fig-key { position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 2px; }
.fig-key.tone-rain { background: var(--rain); } .fig-key.tone-heat { background: var(--heat); } .fig-key.tone-sun { background: var(--sun); } .fig-key.tone-wind { background: var(--wind); }
.fig-label { font-size: 14px; color: var(--ink-2); }
.fig-value { font-size: 26px; font-weight: 700; line-height: 1.12; letter-spacing: -0.015em; }
.fig-sub { font-size: 13px; color: var(--ink-3); }

.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-size: 13px; color: var(--ink-2); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl-tight td { padding: 8px; font-size: 14px; }
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }

.timeline { list-style: none; padding: 0; }
.tl { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; padding-bottom: 18px; position: relative; }
.tl::before { content: ''; position: absolute; left: 9px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; margin: 5px 0 0 4px; background: var(--ink-3); box-shadow: 0 0 0 3px var(--surface); position: relative; }
.tl-spray .tl-dot { background: var(--spray); }
.tl-meta { display: block; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.tl-text { display: block; }
.as-link { appearance: none; background: none; border: 0; padding: 0; font: inherit; text-align: left; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.as-link:hover { text-decoration-color: var(--ink); }
.tl-photo { margin-top: 8px; border-radius: 12px; max-width: 280px; width: 100%; }

/* ---------------------------------------------------------------- spray */
.seg { display: inline-flex; background: var(--sunken); border-radius: 12px; padding: 4px; gap: 4px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
#main > .seg { display: flex; width: 100%; }
#main > .seg .seg-btn { flex: 1 1 auto; justify-content: center; padding: 0 10px; }
@media (min-width: 720px) { #main > .seg { display: inline-flex; width: auto; } #main > .seg .seg-btn { flex: none; padding: 0 18px; } }
.seg::-webkit-scrollbar { display: none; }
.seg-btn { appearance: none; border: 0; background: transparent; color: var(--ink-2); font: 650 15px var(--font-ui); padding: 0 16px; min-height: 40px; border-radius: 9px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
.seg-sm .seg-btn { min-height: 34px; padding: 0 12px; font-size: 14px; }
.conditions-grid { display: grid; gap: 22px; }
@media (min-width: 900px) { .conditions-grid { grid-template-columns: 230px minmax(0, 1fr); align-items: start; } }
.conditions-compass { display: grid; justify-items: center; gap: 4px; }
.conditions-main { min-width: 0; }
.records-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.records { list-style: none; padding: 0; display: grid; gap: 10px; }
.record { width: 100%; display: grid; grid-template-columns: 48px minmax(0, 1fr) 20px; gap: 14px; align-items: start; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; cursor: pointer; color: inherit; transition: border-color .15s; }
.record:hover { border-color: var(--line-strong); }
.record-body { min-width: 0; }
.record-title { display: block; font-weight: 700; font-size: 17px; }
.record-products { display: grid; gap: 2px; margin-top: 4px; font-size: 15px; }
.record-chev { color: var(--ink-3); margin-top: 12px; }
.mix-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.mix { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px; display: grid; gap: 8px; align-content: start; }
.mix h3 { font: 700 19px var(--font-display); }
.mix ul { padding-left: 18px; font-size: 15px; }
.calc-figs { display: flex; flex-wrap: wrap; gap: 14px 32px; margin: 18px 0 14px; }
.calc-figs > div { display: grid; }
.calc-out { margin-top: 6px; }

/* -------------------------------------------------------------- weather */
.wind-row { display: grid; gap: 24px; align-items: center; justify-items: center; }
@media (min-width: 760px) { .wind-row { grid-template-columns: auto auto minmax(0, 1fr); justify-items: stretch; } .wind-col { justify-self: center; } }
.wind-col { display: grid; justify-items: center; gap: 6px; }
.wind-facts { width: 100%; }
.source-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.source { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px; display: grid; gap: 10px; align-content: start; justify-items: start; }
.source header { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; }
.source h3 { font: 700 18px var(--font-display); }
.source-ic { width: 44px; height: 44px; border-radius: 12px; }
.station-list { padding-left: 20px; display: grid; gap: 4px; font-size: 14.5px; width: 100%; }
.station-list li span:last-child { margin-left: 6px; }
.gauge-list { list-style: none; padding: 0; display: grid; font-size: 14.5px; width: 100%; }
.gauge-list li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 5px 0; }
.brand-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.brand { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; cursor: pointer; color: inherit; min-height: 128px; transition: border-color .15s; }
.brand:hover { border-color: var(--ink-3); }
.brand-name { font: 700 19px/1.2 var(--font-display); }
.brand-go { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 650; font-size: 14.5px; padding-top: 10px; }
.brand-go .ic { width: 18px; height: 18px; }
.connected h2 { display: flex; align-items: center; gap: 8px; }
.connect-ok { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 14px; border-radius: 14px; background: var(--rain-wash); margin-top: 12px; }
.testing { display: flex; align-items: center; gap: 10px; color: var(--ink-2); margin-top: 12px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line-strong); border-top-color: var(--ink); animation: spin .8s linear infinite; }

.steps { list-style: none; padding: 0; display: grid; gap: 18px; }
.steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start; }
.step-n { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--on-primary); display: grid; place-items: center; font-weight: 700; }
.steps h3 { margin-bottom: 4px; }
.steps p { color: var(--ink-2); }
.steps .ic { width: 18px; height: 18px; vertical-align: -4px; }
.steps.compact { gap: 10px; margin: 6px 0 4px; }
.steps.compact li { grid-template-columns: 28px minmax(0, 1fr); align-items: center; }
.steps.compact .step-n { width: 28px; height: 28px; font-size: 14px; }
.steps.compact p { color: var(--ink); }
.install-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.install-grid h2 { margin-bottom: 12px; font-size: 20px; }
.how h2 { margin-bottom: 12px; font-size: 20px; }

/* ---------------------------------------------------------------- more */
.menu h2 { font-size: 20px; margin-bottom: 4px; }
.menu-row { width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; color: inherit; cursor: pointer; }
.menu h2 + .menu-row { border-top: 0; }
.menu-row.static { cursor: default; grid-template-columns: 40px minmax(0, 1fr); }
.menu-row.static .seg { grid-column: 2; justify-self: start; }
@media (min-width: 560px) { .menu-row.static { grid-template-columns: 40px minmax(0, 1fr) auto; } .menu-row.static .seg { grid-column: auto; } }
.menu-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--sunken); }
.menu-ic .ic { width: 20px; height: 20px; }
.menu-text { min-width: 0; }
.menu-title { display: block; font-weight: 650; }
.menu-chev { color: var(--ink-3); }
.demo-banner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.demo-banner > div:first-child { max-width: 60ch; }
.demo-banner h2 { font-size: 20px; margin-bottom: 4px; }
.pick-list { display: grid; }

/* ---------------------------------------------------------------- forms */
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 14.5px; font-weight: 650; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.field small { font-size: 13px; color: var(--ink-3); line-height: 1.35; }
.field.inline { display: flex; align-items: center; gap: 10px; }
.field.inline > span { white-space: nowrap; }
input, select, textarea { font: 400 17px/1.3 var(--font-ui); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 12px; min-height: 52px; padding: 0 14px; width: 100%; min-width: 0; }
textarea { padding: 12px 14px; min-height: 84px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 21px) 52%, calc(100% - 16px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; text-overflow: ellipsis; }
input[type=date], input[type=time] { appearance: none; -webkit-appearance: none; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: 3px solid color-mix(in srgb, var(--focus) 24%, transparent); outline-offset: 0; }
.field.need select, .field.need input { border-color: var(--caution); background-color: var(--caution-wash); }
input[type=file] { padding: 12px; min-height: 0; font-size: 15px; }
.form-grid { display: grid; gap: 12px 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.form-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 620px) { .form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.form-msg { color: var(--stop); font-weight: 650; font-size: 15px; }
.form-msg:empty { display: none; }
.items { display: grid; gap: 10px; }
.item-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto 44px; gap: 8px; align-items: center; }
.item-row > :first-child { grid-column: 1 / -1; }
@media (min-width: 620px) { .item-row { grid-template-columns: minmax(0, 1fr) 96px 92px auto 44px; } .item-row > :first-child { grid-column: auto; } }
.item-row .btn.icon-only { width: 44px; min-height: 44px; }
.icon-spacer { width: 44px; }
.per { color: var(--ink-3); font-size: 14px; }
.wx-box { border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px 16px; background: var(--surface-2); min-width: 0; }
.wx-box legend { font-weight: 700; display: flex; align-items: center; gap: 6px; padding: 0 6px; }
.wx-box .fine { margin: 0 0 10px; }
.summary { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.summary .sub-h { margin-top: 0; }
.sum-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.sum-list li { display: flex; justify-content: space-between; gap: 12px; }
.sum-tot { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wx-state { display: flex; gap: 8px; align-items: center; font-weight: 650; font-size: 15px; margin-top: 8px; }
.wx-state .ic { width: 18px; height: 18px; stroke-width: 2.2; }
.wx-ok { color: var(--ok-text); } .wx-caution { color: var(--caution); } .wx-stop { color: var(--stop); }
.photo-preview img { margin-top: 8px; border-radius: 12px; max-height: 200px; }
.confirm-inline { margin-top: 16px; padding: 14px; border-radius: 14px; background: var(--stop-wash); display: grid; gap: 10px; }

/* -------------------------------------------------------------- sheets */
#sheet-root { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
#sheet-root.open { pointer-events: auto; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(9, 14, 11, .46); animation: fadeIn .2s ease both; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100% - 20px - env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-float); animation: sheetUp .3s cubic-bezier(.2, .8, .2, 1) both; outline: none; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 10px 10px 20px; border-bottom: 1px solid var(--line); flex: none; }
.sheet-head h2 { font-size: 21px; }
.sheet-body { padding: 18px 20px 22px; overflow-y: auto; overscroll-behavior: contain; flex: 1 1 auto; }
.sheet-body form > * + * { margin-top: 14px; }
.sheet-body > * + * { margin-top: 14px; }
.sheet-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); flex-wrap: wrap; flex: none; }
.sheet-foot .btn-primary { flex: 1 1 auto; justify-content: center; }
@media (min-width: 720px) {
  .sheet { left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); width: min(560px, calc(100% - 48px)); max-height: min(88vh, 900px); border-radius: 22px; animation: pop .22s ease both; }
  .sheet-wide { width: min(780px, calc(100% - 48px)); }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 12px; }
  .sheet-foot .btn-primary { flex: none; }
}
body.sheet-open { overflow: hidden; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.quick-tile { display: grid; justify-items: start; align-content: space-between; gap: 12px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font: 650 16px/1.25 var(--font-ui); color: var(--ink); text-align: left; cursor: pointer; min-height: 108px; transition: border-color .15s; }
.quick-tile:hover { border-color: var(--ink-3); }
.quick-ic { width: 44px; height: 44px; border-radius: 12px; }

.voice { display: grid; justify-items: center; gap: 12px; text-align: center; }
.mic { width: 96px; height: 96px; border-radius: 50%; border: 0; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-float); margin-top: 6px; }
.mic .ic { width: 38px; height: 38px; }
.mic.listening { background: var(--stop); color: #fff; animation: pulse 1.4s ease-out infinite; }
.mic.off { background: var(--sunken); color: var(--ink-3); box-shadow: none; cursor: not-allowed; }
.voice-status { font-size: 18px; font-weight: 650; min-height: 1.5em; max-width: 40ch; }
.voice-example { color: var(--ink-2); font-size: 15px; }
.voice-type { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; text-align: left; }
.voice-type .btn { min-height: 52px; }
#voice-result { width: 100%; text-align: left; }
.confirm-card { border: 1.5px solid var(--ink); border-radius: 18px; padding: 16px; display: grid; gap: 14px; }
.basis { display: grid; gap: 8px; }
.basis.ask { background: var(--caution-wash); border-radius: 12px; padding: 12px; }
.voice-preview { display: flex; gap: 8px; align-items: center; font-weight: 650; }
.voice-preview .ic { width: 18px; height: 18px; }

/* --------------------------------------------------------- toast/empty */
#toast-root { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(156px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: grid; gap: 8px; width: min(520px, calc(100% - 32px)); pointer-events: none; }
@media (min-width: 1024px) { #toast-root { bottom: 28px; left: calc(50% + 126px); } }
body.sheet-open #toast-root { bottom: auto; top: calc(14px + env(safe-area-inset-top, 0px)); }
.toast { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--ink); color: var(--bg); padding: 14px 16px; border-radius: 14px; box-shadow: var(--shadow-float); font-weight: 650; animation: toastIn .25s ease both; pointer-events: auto; }
.toast.out { animation: toastOut .3s ease both; }
.toast-btn { appearance: none; border: 0; background: transparent; color: inherit; font: 700 15px var(--font-ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; white-space: nowrap; }
.empty { text-align: center; display: grid; justify-items: center; gap: 10px; padding: 44px 18px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-l); }
.empty-ic { width: 56px; height: 56px; border-radius: 16px; background: var(--sunken); }
.empty p { color: var(--ink-2); max-width: 46ch; }

/* --------------------------------------------------------------- about */
.about { display: grid; gap: 64px; padding-bottom: 32px; }
.about > * + * { margin-top: 0; }
.about-hero { display: grid; gap: 32px; align-items: center; padding-top: 18px; }
@media (min-width: 900px) { .about-hero { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 48px; padding-top: 32px; } }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; font: 760 22px/1 var(--font-display); letter-spacing: -0.015em; }
.brand-lockup .logo-mark { width: 36px; height: 36px; }
.brand-lockup.small { font-size: 17px; gap: 8px; }
.brand-lockup.small .logo-mark { width: 26px; height: 26px; }
.about-hero h1 { font-size: clamp(40px, 7vw, 66px); line-height: 1.0; font-weight: 780; letter-spacing: -0.035em; margin: 22px 0 18px; max-width: 13ch; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 52ch; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.about-hero .fine { margin-top: 16px; }
.about-hero-art { position: relative; display: grid; place-items: center; padding: 36px 20px; border-radius: 28px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; isolation: isolate; }
.about-hero-art::before { content: ''; position: absolute; inset: -20%; z-index: -1; background: repeating-linear-gradient(104deg, transparent 0 21px, color-mix(in srgb, var(--ink) 6%, transparent) 21px 22.5px); -webkit-mask-image: radial-gradient(ellipse at 50% 55%, #000 30%, transparent 72%); mask-image: radial-gradient(ellipse at 50% 55%, #000 30%, transparent 72%); }
.hero-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 26px 22px 22px; display: grid; justify-items: center; gap: 14px; box-shadow: var(--shadow-float); width: min(100%, 340px); }
.hero-card-meta { display: grid; justify-items: center; gap: 2px; text-align: center; }
.hero-card-name { font: 720 23px/1.1 var(--font-display); }
.hero-card .chip-stage { margin-top: 8px; }
.hero-readings { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 14.5px; font-weight: 650; padding-top: 12px; border-top: 1px solid var(--line); width: 100%; }
.hero-readings span { display: inline-flex; gap: 5px; align-items: center; }
.hero-readings .ic { width: 18px; height: 18px; }
.about-section h2 { font-size: clamp(27px, 3.8vw, 36px); line-height: 1.08; font-weight: 740; letter-spacing: -0.025em; margin-bottom: 22px; }
.feature-grid { display: grid; column-gap: 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feature { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 16px; padding: 20px 0; border-top: 1px solid var(--line); align-content: start; }
.feature-ic { width: 44px; height: 44px; border-radius: 12px; grid-row: span 2; }
.feature h3 { font-size: 18px; }
.feature p { color: var(--ink-2); font-size: 16px; max-width: 46ch; }
.why-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.why-grid h3 { font: 720 21px/1.2 var(--font-display); letter-spacing: -0.01em; margin-bottom: 8px; }
.why-grid p { color: var(--ink-2); }
@media (min-width: 760px) { .about .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; } }
.about-cta { display: grid; gap: 22px; padding: 30px 26px; border-radius: 26px; background: var(--ink); color: var(--bg); }
.about-cta h2 { font-size: clamp(26px, 3.4vw, 32px); font-weight: 740; letter-spacing: -0.02em; margin-bottom: 8px; }
.about-cta p { color: color-mix(in srgb, var(--bg) 78%, var(--ink)); max-width: 60ch; }
.about-cta .hero-actions { margin-top: 0; }
.about-cta .btn-primary { background: var(--bg); color: var(--ink); }
.about-cta .btn-secondary { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, var(--ink)); }
@media (min-width: 900px) { .about-cta { grid-template-columns: minmax(0, 1.25fr) auto; align-items: center; padding: 36px 40px; } }
.about-foot { font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 18px; }

/* ------------------------------------------------------- setup/report */
.wizard { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.wizard li { display: flex; gap: 8px; align-items: center; color: var(--ink-3); font-weight: 650; }
.wizard .dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; font-size: 14px; }
.wizard .dot .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.wizard li.now { color: var(--ink); }
.wizard li.now .dot { border-color: var(--ink); }
.wizard li.done .dot { background: var(--ink); border-color: var(--ink); color: var(--on-primary); }
.wizard-form { max-width: 680px; display: grid; gap: 16px; }
.report-top { display: grid; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 6px; }
@media (min-width: 760px) { .report-top { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.report-top h2 { font-size: 26px; margin-top: 12px; }
.totals { list-style: none; padding: 0; display: grid; gap: 4px 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.totals li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 7px 0; }
.report-log { list-style: none; padding: 0; display: grid; }
.report-log li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }

/* ------------------------------------------------------------ motion */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -47%) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--stop) 45%, transparent); } 100% { box-shadow: 0 0 0 24px transparent; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ------------------------------------------------------------- print */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --ink-2: #333; --ink-3: #555; --line: #ccc; --line-strong: #999; }
  .side, .topbar, .tabbar, .fab, .print-hide, .back, #toast-root, #tip, #sheet-root { display: none !important; }
  body { background: #fff; }
  .main-col { margin: 0 !important; padding: 0 !important; }
  #main { max-width: none; padding: 0; }
  .report .page-head { display: none; }
  .panel { border: 0; padding: 0; }
  .tbl { font-size: 11px; }
}

.label-rows { list-style: none; padding: 0; display: grid; }
.label-rows li { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.label-rows li:first-child { border-top: 0; padding-top: 0; }
.label-rows .lr-name { font-weight: 700; }
.label-rows .lr-dates { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14.5px; color: var(--ink-2); }
.label-rows .lr-dates strong { color: var(--ink); font-weight: 650; }

.notice { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px 14px; align-items: start; }
.notice h2 { font-size: 18px; margin-bottom: 4px; }
.notice .btn { grid-column: 2; justify-self: start; }
@media (min-width: 760px) { .notice { grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; } .notice .btn { grid-column: auto; } }
