/* VoltProof AI page. Colours are tokens; dark mode redefines them (system setting, or the toggle via
   data-theme on <html>, set before paint by theme.js). Identity: solar amber for PV, battery green for
   charge, slate for the grid, a hatched band for outages, one blue accent for VoltProof. Text colours
   meet WCAG AA (4.5:1) on every surface in both themes. Chart series colours (charts.js) are the
   validated colour-blind-safe set. System fonts only, with Devanagari-capable fallbacks. */

:root {
  color-scheme: light;
  --page: #f7f4ed;
  --surface: #fffdf8;
  --surface-2: #efeadf;
  --ink: #1b1a17;
  --ink-2: #47443d;
  --muted: #67635a;
  --line: #e3ddcf;
  --axis: #bab3a3;
  --ring: rgba(27, 26, 23, 0.12);
  --accent: #1d4fb8;
  --accent-ink: #ffffff;
  --accent-soft: rgba(29, 79, 184, 0.1);
  --focus: #1d4fb8;
  --good: #1d6b3a;
  --bad: #a8251c;
  --solar: #9a5900;
  --solar-fill: #f2a516;
  --battery: #1d7048;
  --battery-fill: #39a96b;
  --battery-soft: rgba(57, 169, 107, 0.16);
  --grid: #475569;
  --grid-fill: #64748b;
  --outage: rgba(27, 26, 23, 0.5);
  --outage-bg: rgba(27, 26, 23, 0.06);
  --warn-bg: #fff2cf;
  --warn-ink: #4a3500;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --band: rgba(27, 26, 23, 0.07);
  --band-strong: rgba(27, 26, 23, 0.14);
  --bar: #c9c2b2;
  --shadow: 0 1px 2px rgba(27, 26, 23, 0.05), 0 16px 40px rgba(27, 26, 23, 0.08);
  --radius: 14px;
  --topbar-h: 104px;
  --font: system-ui, -apple-system, "Segoe UI", "Nirmala UI", "Noto Sans Devanagari", "Kohinoor Devanagari", "Devanagari Sangam MN", "Mangal", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-family: var(--font);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #141516;
  --surface: #1c1e20;
  --surface-2: #26292c;
  --ink: #efece5;
  --ink-2: #c9c4b8;
  --muted: #a19c90;
  --line: #303338;
  --axis: #50555c;
  --ring: rgba(255, 255, 255, 0.12);
  --accent: #8eb2ff;
  --accent-ink: #0f1115;
  --accent-soft: rgba(142, 178, 255, 0.14);
  --focus: #8eb2ff;
  --good: #5fd38d;
  --bad: #ff9a90;
  --solar: #f5b74c;
  --solar-fill: #e09a1e;
  --battery: #5fd38d;
  --battery-fill: #2f9c62;
  --battery-soft: rgba(95, 211, 141, 0.16);
  --grid: #a7b3c4;
  --grid-fill: #7d8ba0;
  --outage: rgba(255, 255, 255, 0.45);
  --outage-bg: rgba(255, 255, 255, 0.05);
  --warn-bg: #3a2d08;
  --warn-ink: #ffe3a3;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --band: rgba(255, 255, 255, 0.07);
  --band-strong: rgba(255, 255, 255, 0.15);
  --bar: #4a4e54;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #141516;
    --surface: #1c1e20;
    --surface-2: #26292c;
    --ink: #efece5;
    --ink-2: #c9c4b8;
    --muted: #a19c90;
    --line: #303338;
    --axis: #50555c;
    --ring: rgba(255, 255, 255, 0.12);
    --accent: #8eb2ff;
    --accent-ink: #0f1115;
    --accent-soft: rgba(142, 178, 255, 0.14);
    --focus: #8eb2ff;
    --good: #5fd38d;
    --bad: #ff9a90;
    --solar: #f5b74c;
    --solar-fill: #e09a1e;
    --battery: #5fd38d;
    --battery-fill: #2f9c62;
    --battery-soft: rgba(95, 211, 141, 0.16);
    --grid: #a7b3c4;
    --grid-fill: #7d8ba0;
    --outage: rgba(255, 255, 255, 0.45);
    --outage-bg: rgba(255, 255, 255, 0.05);
    --warn-bg: #3a2d08;
    --warn-ink: #ffe3a3;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --band: rgba(255, 255, 255, 0.07);
    --band-strong: rgba(255, 255, 255, 0.15);
    --bar: #4a4e54;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.35);
  }
}

@media (min-width: 900px) { :root { --topbar-h: 64px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-size: 16px; line-height: 1.5; overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.offscreen { position: fixed; left: -9999px; top: 0; }
.skip-link {
  position: absolute; left: 8px; top: -48px; background: var(--accent); color: var(--accent-ink);
  padding: 8px 12px; border-radius: 6px; z-index: 30;
}
.skip-link:focus { top: 8px; }

/* --- top bar ---------------------------------------------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--page) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1160px; margin: 0 auto; padding: 8px 16px;
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "brand actions" "menu menu";
  align-items: center; gap: 4px 12px;
}
.brand { grid-area: brand; display: inline-flex; align-items: center; gap: 6px; font-weight: 750; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.brand-mark { width: 20px; height: 20px; fill: var(--solar-fill); }
.actions { grid-area: actions; justify-self: end; display: flex; align-items: center; gap: 6px; }
.menu { grid-area: menu; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.menu::-webkit-scrollbar { display: none; }
.menu.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.menu ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; white-space: nowrap; }
.menu a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: 0.95rem; }
.menu a:hover { color: var(--ink); background: var(--surface-2); }
.menu a[aria-current="true"] { color: var(--accent); background: var(--accent-soft); }
@media (min-width: 900px) {
  .topbar-inner { grid-template-columns: auto 1fr auto; grid-template-areas: "brand menu actions"; padding: 10px 16px; }
  .menu { margin: 0; padding: 0; justify-self: center; }
}
.tool-button {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer;
  color: var(--ink); background: var(--surface); border: 1px solid var(--ring); border-radius: 999px; padding: 6px 12px;
}
.tool-button:hover { border-color: var(--accent); color: var(--accent); }
a.tool-button { text-decoration: none; }
.tool-svg { width: 16px; height: 16px; flex: none; }
.hero-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.hero-link:hover { text-decoration: underline; }
[hidden] { display: none !important; }
/* phones: the top-bar tools show icons only (each has an aria-label), as equal 36 px circles whatever the
   icon (the theme toggle's text glyph and the links' SVGs) */
@media (max-width: 720px) {
  .actions .tool-text { display: none; }
  .actions .tool-button { width: 36px; height: 36px; padding: 0; justify-content: center; line-height: 1; }
}

/* --- shared section rhythm ------------------------------------------------------------------- */

/* One token for the space between sections, the same for every pair (hero, the sections, the footer):
   each side gives half of it, and a section's first and last blocks bring no outer margin of their own.
   No lines between sections: the space separates them. */
:root { --section-gap: 88px; }
@media (min-width: 900px) { :root { --section-gap: 160px; } }
section[id] { scroll-margin-top: calc(var(--topbar-h) + 8px); }
.section { padding: calc(var(--section-gap) / 2) 0; }
.section-inner { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.section-inner > :first-child { margin-top: 0; }
.section-inner > :last-child, .hero > :last-child { margin-bottom: 0; }
h1, h2 { letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); max-width: 24ch; margin-bottom: 18px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); max-width: 62ch; margin: 0 0 28px; line-height: 1.55; }
.source { margin: 10px 0 0; font-size: 0.78rem; color: var(--muted); }
.source-inline { display: block; margin-top: 6px; }
.hint { margin: 4px 0 0; color: var(--ink-2); font-size: 0.9rem; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 650; text-decoration: none; border-radius: 999px; padding: 12px 22px; font-size: 1.02rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button.primary { background: var(--accent); color: var(--accent-ink); }
.button.secondary { color: var(--ink); border: 1px solid var(--axis); background: var(--surface); }
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

/* reveal on scroll: visible by default; hidden only once landing.js arms it (IntersectionObserver
   present, no reduced motion); see setupReveal for the safety net */
.reveal-armed .reveal:not(.in) { opacity: 0; transform: translateY(12px); }
.reveal { transition: opacity 0.35s ease-out, transform 0.35s ease-out; } /* the same for every block; transform only: no layout shift */

/* --- 1. hero ---------------------------------------------------------------------------------- */

.hero { max-width: 1160px; margin: 0 auto; padding: 40px 16px calc(var(--section-gap) / 2); }
@media (min-width: 900px) { .hero { padding-top: 36px; } }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.7rem); font-weight: 790; max-width: 16ch; }
.subtitle { font-size: clamp(1.05rem, 1.7vw, 1.2rem); color: var(--ink-2); max-width: 52ch; margin: 18px 0 22px; line-height: 1.55; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.built { font-size: 0.88rem; color: var(--muted); }
/* phones: one column, in reading order: headline, explanation, buttons, then "Built with" and the links
   (.hero-main dissolves so its two children can be ordered around .hero-side) */
.hero-head { display: flex; flex-direction: column; }
.hero-main { display: contents; }
.hero-head h1 { order: 1; }
.hero-side { order: 2; }
.hero-meta { order: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 0; }
/* wide screens: two columns aligned at the TOP. Left: the headline, then "Built with" and the links;
   right: the explanation, then the buttons. The h1's first line and the paragraph's first line share
   their cap-height line: text-box trims each first line to its cap height, so the grid's top edge is the
   cap line of both (measured in headless Chrome, see the Part D report). */
@media (min-width: 900px) {
  .hero-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: start; }
  .hero-main { display: block; }
  .hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.75rem); max-width: none; }
  .hero-meta { margin-top: 22px; }
  .hero-side .subtitle { margin: 0 0 22px; }
  .hero h1, .hero-side .subtitle { text-box: trim-start cap alphabetic; }
}
/* browsers without text-box: shift the h1 by the difference of the two first-line cap offsets, from the
   system font's measured metrics (cap offset = (line-height - ascent - descent) / 2 + ascent - cap
   height: 0.515em for the paragraph, 0.280em for the h1) */
@supports not (text-box: trim-start cap alphabetic) {
  @media (min-width: 900px) { .hero h1 { margin-top: calc(0.515 * clamp(1.05rem, 1.7vw, 1.2rem) - 0.28em); } }
}

.day-panel {
  margin-top: 28px; background: var(--surface); border: 1px solid var(--ring);
  border-radius: 22px; box-shadow: var(--shadow); padding: 18px; min-width: 0;
}
@media (min-width: 900px) { .day-panel { padding: 20px 26px 24px; } }
.day-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.day-title { font-size: 1.15rem; margin: 0; letter-spacing: 0; }
.day-note { margin: 0; font-size: 0.88rem; color: var(--muted); }
.day-panel:has(.day-mount.paused) .day-note::after { content: " Paused."; }

/* the site switcher: three buttons; autoplay progress is a thin line along the bottom of the active one */
.site-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 16px; }
.site-btn {
  position: relative; overflow: hidden; text-align: left; cursor: pointer; min-width: 0;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  font: inherit; color: var(--ink); background: var(--surface-2); border: 1px solid var(--ring);
  border-radius: 12px; padding: 10px 12px 12px;
}
.site-btn:hover { border-color: var(--accent); }
.site-btn[aria-pressed="true"] { border: 2px solid var(--accent); padding: 9px 11px 11px; background: var(--surface); }
.site-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); transform-origin: left center; transform: scaleX(0); pointer-events: none; }
.site-icon { width: 24px; height: 24px; color: var(--ink-2); flex: none; }
.site-btn .site-name { font-weight: 650; font-size: 0.92rem; line-height: 1.25; min-width: 0; }
.name-short { display: none; }
.site-lang { font-size: 0.72rem; font-weight: 700; color: var(--ink-2); border: 1px solid var(--axis); border-radius: 6px; padding: 1px 5px; }
@media (max-width: 720px) {
  .site-btn { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon lang" "name name"; gap: 4px 6px; padding: 8px 8px 10px; }
  .site-btn[aria-pressed="true"] { padding: 7px 7px 9px; }
  .site-btn .site-icon { grid-area: icon; width: 20px; height: 20px; }
  .site-btn .site-lang { grid-area: lang; justify-self: end; }
  .site-btn .site-name { grid-area: name; font-size: 0.86rem; }
  .name-full { display: none; }
  .name-short { display: inline; }
}

.day-body { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .day-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; } }
.day-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* on desktop the right column sets the panel height, so only the active goal takes space */
@media (min-width: 1000px) { .day-goal .stack > :not(.active) { display: none; } }
.flow-svg.compact { max-height: none; }
.day-flow { margin: 0; }

/* every variant (one per site) stacks in one cell; the tallest sets the height, so nothing jumps */
.stack { display: grid; }
.stack > * { grid-area: 1 / 1; visibility: hidden; opacity: 0; transition: opacity 0.3s ease; min-width: 0; }
.stack > .active { visibility: visible; opacity: 1; }
.goal-quote { margin: 0; padding: 2px 0 0 14px; border-left: 3px solid var(--solar-fill); }
.goal-text { margin: 0; font-size: 1.12rem; line-height: 1.45; }
.goal-english { margin: 6px 0 0; font-size: 0.9rem; color: var(--ink-2); }
.goal-english-label { font-weight: 650; }
.goal-site { margin: 6px 0 0; font-size: 0.82rem; color: var(--muted); }
.flow-caption { margin: 6px 0 0; font-size: 0.8rem; color: var(--muted); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 4px 0 6px; padding: 0; font-size: 0.8rem; color: var(--ink-2); }
.tl-legend li { display: inline-flex; align-items: center; gap: 6px; }
.tl-key { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.tl-key.charge { height: 3px; background: var(--battery-fill); }
.tl-key.floor { background: var(--accent-soft); border-top: 2px dashed var(--accent); }
.tl-key.outage { background: repeating-linear-gradient(135deg, var(--outage) 0 2px, transparent 2px 4px); }
.tl-key.import { background: var(--grid-fill); }
.tl-key.export { background: var(--solar-fill); }
.tl-key.cap { height: 0; border-top: 2px dashed var(--accent); }

.flow-svg, .timeline-svg { display: block; width: 100%; height: auto; overflow: visible; }
.flow-svg { max-height: 300px; }
.flow-node-bg { fill: var(--surface-2); stroke: var(--ring); stroke-width: 1; }
.flow-label { fill: var(--ink); font: 650 15px var(--font); }
.flow-value { fill: var(--ink-2); font: 500 13.5px var(--font); }
.flow-sub { fill: var(--muted); font: 500 12.5px var(--font); }
.flow-line { fill: none; stroke-linecap: round; transition: stroke-width 0.25s ease, opacity 0.25s ease; }
.flow-line.idle { opacity: 0.18; }
.flow-line.solar { stroke: var(--solar-fill); }
.flow-line.battery { stroke: var(--battery-fill); }
.flow-line.grid { stroke: var(--grid-fill); }
.flow-line.site { stroke: var(--ink-2); }
.flow-line.moving { stroke-dasharray: 9 9; animation: flow-dash 0.9s linear infinite; }
.arrow.solar { fill: var(--solar-fill); }
.arrow.grid { fill: var(--grid-fill); }
.arrow.battery { fill: var(--battery-fill); }
.arrow.site { fill: var(--ink-2); }
@keyframes flow-dash { to { stroke-dashoffset: -18; } }
.flow-kw { fill: var(--ink); font: 650 13px var(--font); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.flow-hub { fill: var(--surface); stroke: var(--axis); stroke-width: 2; }
.sun-core { fill: var(--solar-fill); }
.sun-ray { stroke: var(--solar-fill); stroke-width: 2.5; stroke-linecap: round; }
.grid-icon { fill: none; stroke: var(--grid); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.battery-shell { fill: none; stroke: var(--battery); stroke-width: 2.2; }
.battery-level { fill: var(--battery-fill); transition: height 0.25s ease, y 0.25s ease; }
.site-icon-path { fill: none; stroke: var(--ink-2); stroke-width: 2.2; stroke-linejoin: round; }
.critical-dot { fill: var(--bad); }
.flow-node.off .flow-node-bg { fill: var(--outage-bg); stroke-dasharray: 4 4; stroke: var(--outage); }
.flow-node.off .grid-icon { stroke: var(--muted); opacity: 0.5; }
.flow-off-label { fill: var(--bad); font: 700 13.5px var(--font); }
.flow-hour { fill: var(--ink); font: 750 24px var(--font); }
.flow-hour-sub { fill: var(--muted); font: 500 12.5px var(--font); }

.hatch-line { stroke: var(--outage); stroke-width: 1.5; }
.tl-outage { stroke: none; }
.tl-outage-label { fill: var(--ink-2); font: 650 12px var(--font); }
.tl-grid-line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.tl-axis { stroke: var(--axis); stroke-width: 1; }
.tl-text { fill: var(--muted); font: 500 12px var(--font); }
.tl-soc-area { fill: var(--battery-soft); }
.tl-soc-line { fill: none; stroke: var(--battery-fill); stroke-width: 2.5; stroke-linejoin: round; }
.tl-floor-zone { fill: var(--accent-soft); }
.tl-floor-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 4; }
.tl-rule-label { fill: var(--accent); font: 700 12px var(--font); }
.tl-import { fill: var(--grid-fill); }
.tl-export { fill: var(--solar-fill); opacity: 0.8; }
.tl-cap-line { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 3; }
.tl-playhead { stroke: var(--ink); stroke-width: 2; }
.tl-hour-band { fill: var(--accent-soft); }
.tl-strip-label { fill: var(--muted); font: 600 12px var(--font); }

.scrub { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; margin-top: 2px; }
.scrub label { font-size: 0.82rem; color: var(--ink-2); font-weight: 600; }
.scrub input[type="range"] { width: 100%; accent-color: var(--accent); margin: 0; }
.scrub-readout { grid-column: 1 / -1; font-size: 0.82rem; color: var(--muted); }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check-item { display: grid; grid-template-columns: 1.6em 1fr; align-items: start; font-size: 0.98rem; }
.check-mark { font-weight: 800; }
.check-item.pending .check-mark { color: var(--muted); }
.check-item.met .check-mark { color: var(--good); }
.check-item.missed .check-mark { color: var(--bad); }
.check-state { display: block; font-size: 0.8rem; color: var(--muted); }
.check-item.met .check-state { color: var(--good); font-weight: 650; }
.check-item.missed .check-state { color: var(--bad); font-weight: 650; }
.result-title { margin: 0 0 8px; font-size: 0.86rem; font-weight: 700; color: var(--ink-2); }
.cost-line { margin: 12px 0 0; font-size: 0.88rem; color: var(--ink-2); }
.assumptions { margin: 14px 0 0; }
.assumption-list { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; font-size: 0.92rem; color: var(--ink); overflow-wrap: anywhere; }
.cost-line strong { color: var(--ink); }
.cost-line.muted, .cost-line.muted .cost-value { color: var(--muted); font-weight: 400; }

/* --- 2. problem: dot grid --------------------------------------------------------------------- */

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }
.dots-figure { margin: 0; }
.dot-group { margin: 0 0 22px; }
.dot-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.dot-name { font-weight: 700; }
.dot-count { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.01em; }
.dot-count small { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.dot-svg { display: block; width: 100%; height: auto; }
.dot.pass { fill: var(--battery-fill); }
.dot.fail { fill: none; stroke: var(--bad); stroke-width: 2; }
.dot-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 0.86rem; color: var(--ink-2); }
.dot-key { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.dot-key.pass { background: var(--battery-fill); }
.dot-key.fail { border: 2px solid var(--bad); }
.dots-note { margin: 12px 0 0; font-size: 0.88rem; color: var(--ink-2); }

/* --- 3. how it works: the pipeline in its real order -------------------------------------------- */

.pipeline { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.pipe-node {
  position: relative; background: var(--surface); border: 1px solid var(--ring); border-radius: 12px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
/* AI steps: hatched, dashed accent border; tool steps: solid surface */
.pipe-node.ai {
  background: repeating-linear-gradient(135deg, var(--accent-soft) 0 8px, transparent 8px 16px), var(--surface);
  border: 1.5px dashed var(--accent);
}
.pipe-node.tool { background: var(--surface-2); }
.pipe-who { font-size: 0.72rem; font-weight: 750; letter-spacing: 0.02em; color: var(--muted); }
.pipe-node.ai .pipe-who { color: var(--accent); }
.pipe-name { font-weight: 700; line-height: 1.25; }
.pipe-line { font-size: 0.86rem; color: var(--ink-2); line-height: 1.4; }
/* arrows between steps (down on phones, right on wide screens) */
.pipe-node::after {
  content: "↓"; position: absolute; left: 50%; bottom: -21px; transform: translateX(-50%);
  color: var(--accent); font-weight: 800; font-size: 1.05rem; line-height: 1;
}
.pipe-node:last-child::after { content: none; }
.pipe-loop { margin: 18px 0 0; font-size: 0.92rem; color: var(--ink-2); }
.loop-mark { color: var(--bad); font-weight: 800; margin-right: 4px; }
.pipe-loop .source { display: block; margin-top: 2px; }
.pipe-loop .source:empty { display: none; }
.pipe-key { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding: 0; font-size: 0.84rem; color: var(--ink-2); }
.pipe-key li { display: inline-flex; align-items: center; gap: 6px; }
.pipe-swatch { display: inline-block; width: 18px; height: 12px; border-radius: 3px; }
.pipe-swatch.ai { background: repeating-linear-gradient(135deg, var(--accent-soft) 0 3px, transparent 3px 6px); border: 1.5px dashed var(--accent); }
.pipe-swatch.tool { background: var(--surface-2); border: 1px solid var(--ring); }
@media (min-width: 1100px) {
  .pipeline { flex-direction: row; align-items: stretch; gap: 22px; }
  .pipe-node { flex: 1 1 0; }
  .pipe-node::after { content: "→"; left: auto; right: -18px; bottom: auto; top: 50%; transform: translateY(-50%); }
}

/* --- 5. evidence ------------------------------------------------------------------------------ */

.big-numbers { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 4px 0 36px; }
@media (min-width: 820px) { .big-numbers { grid-template-columns: repeat(3, 1fr); } }
.big-number { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--ring); border-radius: var(--radius); padding: 22px; }
.big-value { margin: 0; font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.big-value.ours { color: var(--accent); }
.big-label { margin: 8px 0 0; color: var(--ink-2); }
.big-number .source { margin-top: auto; padding-top: 12px; }

.bar-figure { margin: 0; background: var(--surface); border: 1px solid var(--ring); border-radius: var(--radius); padding: 22px; }
.chart-heading { font-weight: 700; font-size: 1.05rem; margin: 0 0 14px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label value" "track track"; gap: 4px 12px; align-items: center; }
@media (min-width: 720px) { .bar-row { grid-template-columns: 14rem 1fr 7.5rem; grid-template-areas: "label track value"; } }
.bar-label { grid-area: label; font-size: 0.95rem; }
.bar-track { grid-area: track; height: 14px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; }
.bar-value { grid-area: value; font-weight: 650; text-align: right; }
.bar-value small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.bar-row.ours .bar-label { font-weight: 750; color: var(--accent); }
.bar-row.ours .bar-fill { background: var(--accent); }
.bar-row.ref .bar-label, .bar-row.ref .bar-value { color: var(--muted); }
.bar-row.ref .bar-fill { background: repeating-linear-gradient(135deg, var(--line) 0 4px, transparent 4px 8px); }
.bar-tag { font-size: 0.72rem; font-weight: 700; color: var(--muted); border: 1px solid var(--axis); border-radius: 5px; padding: 0 5px; margin-left: 8px; }
.bar-note { margin: 14px 0 0; font-size: 0.86rem; color: var(--ink-2); }
.links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 24px 0 0; font-weight: 600; }

/* --- 6. limits and footer --------------------------------------------------------------------- */

.limits { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; max-width: 78ch; }
.limits li { position: relative; padding-left: 28px; color: var(--ink-2); font-size: 1.02rem; }
.limits li::before { content: ""; position: absolute; left: 4px; top: 0.55em; width: 10px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(135deg, var(--outage) 0 2px, transparent 2px 4px); }
.limits strong { color: var(--ink); }
.site-footer { padding: calc(var(--section-gap) / 2) 0 40px; color: var(--ink-2); font-size: 0.9rem; }
.site-footer p { margin: 4px 0; }
.footer-built { font-weight: 600; color: var(--ink); }

/* --- 4. try it: the existing tool, restyled with the tokens only ------------------------------- */

.panel, .message { background: var(--surface); border: 1px solid var(--ring); border-radius: var(--radius); padding: 18px; }
.panel:focus { outline: none; }
fieldset { border: 0; margin: 0 0 16px; padding: 0; }
legend, label, .field-title { font-weight: 650; font-size: 1rem; margin: 0 0 6px; padding: 0; }
.field { margin: 0 0 16px; display: flex; flex-direction: column; }
.site-facts { display: block; color: var(--ink-2); font-size: 0.88rem; font-weight: 400; }
select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--axis); border-radius: 10px; padding: 9px 11px; max-width: 100%; }
select { max-width: 320px; }
textarea { width: 100%; resize: vertical; }
.chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 0.92rem; text-align: left; color: var(--ink); background: var(--surface-2); border: 1px solid var(--ring); border-radius: 999px; padding: 7px 14px; cursor: pointer; max-width: 100%; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { border: 2px solid var(--accent); padding: 6px 13px; background: var(--surface); }
.chip-tag { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--axis); color: var(--ink-2); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.goal-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.notice { margin: 6px 0 0; font-size: 0.88rem; color: var(--ink-2); }
.count { white-space: nowrap; }
button.primary, button.secondary { font: inherit; font-weight: 650; cursor: pointer; border-radius: 999px; padding: 10px 20px; margin-top: 10px; align-self: flex-start; }
button.primary { background: var(--accent); color: var(--accent-ink); border: 0; }
button.secondary { background: var(--surface); color: var(--accent); border: 2px solid var(--accent); }
button:disabled { opacity: 0.6; cursor: default; }
.status { margin: 0; min-height: 1.5em; color: var(--ink-2); }
.status.warn, .fallback { background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 8px 12px; }
.conversation { margin: 16px 0 0; display: flex; flex-direction: column; gap: 12px; }
.message.user { background: var(--surface-2); align-self: flex-end; max-width: 92%; }
.who { margin: 0 0 4px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em; color: var(--ink-2); }
.message .goal-text { margin: 0; font-size: 1.05rem; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.badge { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: 0.82rem; font-weight: 700; border: 1px solid var(--ink-2); color: var(--ink); }
.checked-against { margin: 0 0 6px; font-size: 0.9rem; color: var(--ink-2); }
.meta-line { margin: 0 0 12px; font-size: 0.85rem; color: var(--muted); }
.summary { background: var(--page); border: 1px solid var(--ring); border-radius: 10px; padding: 12px 14px; margin: 0 0 8px; }
.summary-title { margin: 0 0 6px; }
.summary-list { list-style: none; margin: 0; padding: 0; }
.summary-list li { margin: 0 0 8px; }
.summary-list li:last-child { margin-bottom: 0; }
.summary-label { font-weight: 600; }
.summary-explain { display: block; font-size: 0.85rem; color: var(--ink-2); }
.message h3 { font-size: 1.05rem; margin: 18px 0 8px; }
h4 { font-size: 0.95rem; margin: 12px 0 6px; }
.steps { margin: 0; padding-left: 1.3em; }
.steps > li { margin: 0 0 10px; }
.step-title { font-weight: 600; }
.list { margin: 4px 0 0; padding-left: 1.2em; }
pre.spec { margin: 6px 0 0; padding: 10px; overflow-x: auto; background: var(--page); border: 1px solid var(--ring); border-radius: 10px; font-size: 0.85rem; white-space: pre-wrap; word-break: break-word; }
.checks { list-style: none; margin: 4px 0 0; padding: 0; }
.checks li { margin: 2px 0; }
.ok { color: var(--good); font-weight: 600; }
.fail { color: var(--bad); font-weight: 600; }
.not-run { color: var(--muted); font-weight: 600; }
.neutral { color: var(--ink); font-weight: 600; }
.explanation { margin: 6px 0; font-size: 1rem; }
.chart-block { margin: 12px 0 4px; }
.chart-title { margin: 0; font-weight: 600; font-size: 0.95rem; }
.chart-caption { margin: 2px 0 6px; color: var(--ink-2); font-size: 0.86rem; }
.chart-box { position: relative; height: 220px; }
@media (min-width: 720px) { .chart-box { height: 260px; } }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 0.86rem; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 14px; height: 4px; border-radius: 2px; }
.key.box { height: 10px; width: 10px; border-radius: 2px; }
.key.band { height: 10px; width: 14px; border-radius: 2px; background: var(--band-strong); }
details { margin: 6px 0; }
summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; font-size: 0.82rem; margin-top: 6px; }
th, td { border-bottom: 1px solid var(--line); padding: 3px 8px; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
.stats { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 10px 0; }
@media (min-width: 560px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { background: var(--page); border: 1px solid var(--ring); border-radius: 10px; padding: 10px 12px; }
.stat-label { margin: 0; font-size: 0.85rem; color: var(--ink-2); font-weight: 600; }
.stat-value { margin: 2px 0; font-size: 1.35rem; font-weight: 650; }
.stat-explain { margin: 0; font-size: 0.82rem; color: var(--ink-2); }
.approve-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.approved { margin: 10px 0 0; font-weight: 600; color: var(--good); }

/* --- 4b. try it: one panel like the hero's; goal, recorded goals, one button, the pipeline, the day --- */

.try-panel { margin-top: 0; }
.try-top { display: grid; gap: 12px 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .try-top { grid-template-columns: minmax(0, 1fr) auto; } }
.try-top .site-switch { margin: 0; }
.try-label { margin: 0 0 6px; font-weight: 650; font-size: 0.95rem; }
.try-day { display: flex; flex-direction: column; }
.try-day select { max-width: none; }
#site-facts { margin: 6px 0 0; }
#day-hint { margin: 6px 0 18px; }
.goal-form { display: flex; flex-direction: column; }
.goal-box { position: relative; }
.goal-box textarea { min-height: 8.5em; padding-bottom: 30px; font-size: 1.05rem; border-radius: 14px; }
.goal-box .count { position: absolute; right: 12px; bottom: 9px; margin: 0; font-size: 0.8rem; color: var(--muted); pointer-events: none; }
.goal-form .notice { margin: 6px 0 0; }
.goal-form .try-label { margin-top: 16px; }
.run-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 18px; }
button.button { font: inherit; font-weight: 650; font-size: 1.02rem; border: 0; cursor: pointer; padding: 12px 22px; margin: 0; }
button.button.primary:disabled { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--axis); transform: none; cursor: default; }
.run-hint { margin: 0; flex: 1 1 220px; }

.try-pipeline { list-style: none; margin: 20px 0 4px; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.try-pipeline[hidden] { display: none; }
.stage { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "dot name" "dot state"; gap: 0 8px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--ring); background: var(--surface-2); }
.stage.ai { background: repeating-linear-gradient(135deg, var(--accent-soft) 0 8px, transparent 8px 16px), var(--surface); border: 1.5px dashed var(--accent); }
.stage-dot { grid-area: dot; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--axis); }
.stage-name { grid-area: name; font-weight: 650; font-size: 0.86rem; line-height: 1.25; }
.label-short { display: none; }
.stage-state { grid-area: state; font-size: 0.78rem; color: var(--muted); }
.stage.active .stage-dot { border-color: var(--accent); background: var(--accent-soft); animation: stage-pulse 1s ease-in-out infinite alternate; }
@keyframes stage-pulse { to { background: var(--accent); } }
.stage.done .stage-dot { border-color: var(--good); background: var(--good); }
.stage.done .stage-state { color: var(--good); font-weight: 650; }
.stage.fail .stage-dot { border-color: var(--bad); background: transparent; }
.stage.fail .stage-state { color: var(--bad); font-weight: 650; }
/* phones: three short columns in two rows, labels short, the state shown by the dot and the label */
@media (max-width: 720px) {
  .try-pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .stage { grid-template-areas: "dot name"; padding: 8px 9px; }
  .label-full, .stage-state { display: none; }
  .label-short { display: inline; }
  .stage-name { font-size: 0.82rem; }
}
.try-repairs { margin: 4px 0 0; }
.try-repairs:empty { display: none; }

/* the bill reader (SPEC §6.12): read it, then confirm it */
.bill-chip-note { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--page); border: 1px solid var(--ring); color: var(--ink); font-size: 0.92rem; } /* neutral, like .summary: green is for success only */
button.link-button { font: inherit; font-weight: 650; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.tariff-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 18px; }
.tariff-row button.button { font-size: 0.95rem; padding: 9px 16px; }
.tariff-tag { display: inline-flex; align-items: center; font-size: 0.84rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; color: var(--battery); background: var(--battery-soft); border: 1px solid var(--battery-fill); }
.bill-panel { margin: 0 0 22px; padding: 18px; border-radius: 18px; border: 1px solid var(--ring); background: var(--surface); }
.bill-panel h3 { margin: 0; font-size: 1.08rem; }
.bill-privacy { margin: 6px 0 14px; padding: 8px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); font-size: 0.9rem; }
.bill-samples { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bill-sample { width: 100%; font: inherit; font-size: 0.84rem; text-align: left; color: var(--ink); background: var(--surface-2); border: 1px solid var(--ring); border-radius: 12px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.bill-sample:hover { border-color: var(--accent); }
.bill-sample[aria-pressed="true"] { border: 2px solid var(--accent); padding: 5px; background: var(--surface); }
.bill-sample img { display: block; width: 100%; height: 96px; object-fit: cover; object-position: top; border-radius: 8px; background: #fff; }
.bill-upload { margin: 14px 0 0; display: flex; flex-direction: column; gap: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.upload-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
label.upload-button { gap: 8px; cursor: pointer; font-size: 0.95rem; padding: 9px 16px; }
.visually-hidden:focus-visible + label.upload-button { outline: 3px solid var(--focus); outline-offset: 2px; }
.visually-hidden:disabled + label.upload-button { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.bill-file-name { font-size: 0.9rem; color: var(--ink-2); overflow-wrap: anywhere; min-width: 0; }
.bill-upload .hint { margin-top: 2px; }
.bill-upload .hint:empty { display: none; }
.bill-reading { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
@media (min-width: 900px) { .bill-reading { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); } }
.bill-preview { width: 100%; max-height: 360px; object-fit: contain; object-position: top; border-radius: 10px; border: 1px solid var(--ring); background: #fff; }
.bill-status { margin: 0; font-weight: 600; }
.bill-status:empty { display: none; }
.bill-status.warn { color: var(--bad); }
.bill-confirm .source { margin: 4px 0 10px; }
.bill-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 8px 0; }
.bill-field-label { font-weight: 600; }
.bill-readonly { font-weight: 700; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); }
.bill-input { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--axis); border-radius: 8px; padding: 6px 8px; width: 7.5em; max-width: 100%; }
.bill-input[aria-invalid="true"] { border: 2px solid var(--bad); padding: 5px 7px; }
.bill-table { border-collapse: collapse; margin: 6px 0 8px; width: 100%; max-width: 440px; table-layout: fixed; }
.bill-table col.bill-col-hour { width: 24%; }
.bill-table col.bill-col-rate { width: 34%; }
.bill-table col.bill-col-remove { width: 3.2em; }
.bill-table th, .bill-table td { padding: 4px 8px 4px 0; text-align: left; font-size: 0.9rem; }
.bill-table thead th { font-size: 0.82rem; color: var(--ink-2); }
.bill-table .bill-input { width: 100%; }
.bill-remove { font: inherit; font-size: 0.95rem; line-height: 1; color: var(--ink-2); background: none; border: 1px solid var(--ring); border-radius: 8px; padding: 7px 9px; cursor: pointer; }
.bill-remove:hover { border-color: var(--bad); color: var(--bad); }
button.button.small { font-size: 0.88rem; padding: 7px 14px; }
.bill-bar { margin: 12px 0 0; max-width: 520px; }
.bill-bar svg { display: block; width: 100%; height: auto; }
.bill-bar .bar-cheap { fill: var(--battery-fill); }
.bill-bar .bar-normal { fill: var(--grid-fill); }
.bill-bar .bar-peak { fill: var(--solar-fill); }
.bill-bar .bar-flat { fill: var(--grid-fill); }
.bill-bar .bar-missing { fill: none; stroke: var(--bad); stroke-dasharray: 2 2; }
.bill-bar text { fill: var(--muted); font-size: 6px; font-family: var(--font); }
.bill-example { margin: 6px 0 0; font-weight: 650; }
.bill-example:empty { display: none; }
.bill-messages { margin: 8px 0 0; padding-left: 1.2em; font-size: 0.92rem; }
.bill-messages:empty { display: none; }
.bill-errors { color: var(--bad); }
.bill-warnings { color: var(--warn-ink); background: var(--warn-bg); border-radius: 8px; padding: 6px 10px 6px 1.8em; }
.bill-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 16px; }
.bill-actions button.button { font-size: 0.98rem; padding: 10px 18px; }
@media (max-width: 720px) {
  .bill-panel { padding: 14px; }
  .bill-samples { gap: 6px; }
  .bill-sample img { height: 70px; }
  .bill-sample span { font-size: 0.76rem; }
}

/* the result: the same panel style and spacing as the hero's day panel */
.result { margin: 24px 0 0; display: flex; flex-direction: column; gap: 20px; }
.result-empty { margin: 0; padding: 28px; text-align: center; color: var(--muted); border: 2px dashed var(--line); border-radius: 22px; }
.result-head .badges { margin-bottom: 4px; }
.result-head .tariff-note { font-weight: 600; color: var(--battery); }
.result-head p { margin: 0 0 4px; }
.try-player { margin-top: 0; }
.live-log { margin: 0; padding-left: 1.3em; color: var(--ink-2); }
.result-block, .fold { background: var(--surface); border: 1px solid var(--ring); border-radius: 22px; box-shadow: var(--shadow); padding: 18px; }
@media (min-width: 900px) { .result-block, .fold { padding: 20px 26px 22px; } }
.result-block h4 { margin: 0 0 8px; font-size: 1.05rem; }
.fold { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.result-block .fold { padding: 10px 0 0; border: 0; background: none; box-shadow: none; }
.fold > summary { font-size: 0.98rem; }
.fold[open] > summary { margin-bottom: 10px; }
.compare-table { width: 100%; font-size: 0.92rem; margin-top: 8px; }
.compare-table th, .compare-table td { white-space: normal; padding: 8px 10px; text-align: left; vertical-align: top; }
.compare-table thead th { font-size: 0.82rem; color: var(--ink-2); }
.compare-table tbody th { font-weight: 500; color: var(--ink); }
.compare-cost { margin: 12px 0 0; font-size: 0.92rem; color: var(--ink-2); }
.cost-note { margin: 6px 0 0; font-size: 0.84rem; color: var(--muted); }
.rule-chips { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rule-chip { font-size: 0.88rem; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--ring); }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.result-actions button.secondary { margin-top: 0; }
.result-actions .hint { margin: 0; flex: 1 1 260px; }

/* the operator's approval */
.approval { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 16px 20px; border-radius: 22px; border: 2px solid var(--accent); background: var(--accent-soft); }
.approval-text { margin: 0; font-weight: 650; }
.approval-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.approval.rejected { border-color: var(--axis); background: var(--surface-2); }
.reject-panel { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.reject-panel label { font-weight: 650; }
.reject-box { position: relative; }
.reject-box textarea { width: 100%; min-height: 5.5em; padding-bottom: 28px; font-size: 1rem; border-radius: 12px; }
.reject-box .count { position: absolute; right: 12px; bottom: 8px; margin: 0; font-size: 0.8rem; color: var(--muted); pointer-events: none; }
.reject-panel .hint { margin: 0; }
.reject-panel .hint:empty { display: none; }
.approval-text:focus { outline: none; }
.approval.approved { border-color: var(--good); background: var(--battery-soft); }
.approval.approved .approval-text { color: var(--good); }
.approval.unverified { border-color: var(--bad); background: none; }
.approval.unverified .approval-text { color: var(--bad); }

.footnote { margin: -18px 0 32px; font-size: 0.84rem; color: var(--ink-2); max-width: 90ch; }

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