/* clrd base styles — design tokens v0.2 (ink/accent-restrained) */

/* Self-hosted variable fonts (Latin + Latin-ext). Replaces Google Fonts to
   satisfy CSP src restrictions and remove the third-party dependency. */
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('/static/fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('/static/fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter Tight'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('/static/fonts/intertight-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Tight'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('/static/fonts/intertight-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('/static/fonts/jetbrainsmono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('/static/fonts/jetbrainsmono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-user-select: none; user-select: none; }
input, textarea { -webkit-user-select: text; user-select: text; }

:root {
  /* Core palette — ink scale */
  --bg-deep:       #0a0a0c;
  --bg-base:       #0a0a0c;
  --bg-input:      #101015;  /* slightly darker than cards so fields visibly recess */
  --bg-raised:     #16161b;
  --bg-surface:    #1c1c23;
  --bg-hover:      #1c1c23;

  /* Borders */
  --border-subtle: #26262f;
  --border-default:#26262f;
  --border-hover:  #34343f;
  --border-focus:  #b794f6;

  /* Text */
  --text-primary:  #f4f4f6;
  --text-secondary:#a8a8b2;
  --text-muted:    #6a6a74;
  --text-label:    #a8a8b2;
  --text-placeholder: #8a8a92;  /* between muted and secondary, for input::placeholder */

  /* Accent (purple — used sparingly per R03) */
  --accent:        #b794f6;
  --accent-hover:  #b794f6;
  --accent-deep:   #7c3aed;
  --accent-glow:   transparent;
  --accent-soft:   #b794f6;

  /* Semantic — match stylepack: --verified #22c55e, --warn #fbbf24, --error #f87171 */
  --danger:        #f87171;
  --success:       #22c55e;
  --warn:          #fbbf24;

  /* Radius — unified at 8px so fields, buttons, cards, alerts and popups
     all share the same corner softness. Keep the three token names so the
     boss can re-differentiate them later if desired. */
  --radius-sm:     6px;
  --radius-md:     6px;
  --radius-lg:     6px;
  --radius-xl:     6px;

  /* Shadows — anti-pattern on cards/buttons. Kept for dropdown panels. */
  --shadow-card:   none;
  --shadow-dropdown: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-glow:   none;

  /* Fonts */
  --font-serif:    "Fraunces", "Times New Roman", serif;
  --font-sans:     "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:     "JetBrains Mono", "Menlo", "Consolas", monospace;

  /* Page background — solid ink. No gradient (anti-pattern). */
  --page-gradient: var(--bg-base);
}

html { background: var(--bg-base); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Default link colour. Component-specific rules (.nav a, .login-link a,
   .error a, etc.) have higher specificity and still win. */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }

/* Dev / beta banner — only rendered server-side on the dev environment. */

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--page-gradient);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Logo */

.logo-link {
  position: absolute;
  top: 1.5rem;
  left: 2rem;
  z-index: 50;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
}
.logo {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  font-style: normal;
  /* Low optical size keeps Fraunces chunky / low-contrast, matching the brand logo. */
  font-variation-settings: 'opsz' 9, 'wght' 600;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  /* Brand wordmark: vertical purple gradient — light lavender top to deep violet bottom. */
  background: linear-gradient(180deg, #ddd2f9 0%, #6b3cc4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transition: opacity 0.2s ease;
}
.logo-link:hover .logo { opacity: 0.8; }

/* Beta pill — small marker beside the logo on dev (replaces the old centered banner). */

/* Nav */

.nav {
  position: absolute;
  top: 1.75rem;
  right: 2rem;
  display: flex;
  gap: 0.25rem;
  z-index: 50;
}
.nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav a:hover { color: var(--accent); border-color: var(--border-hover); }

/* Forms — Labels */

/* Field labels are UI text, not technical data — Inter Tight (sans), readable
   size, sentence case. JetBrains Mono is reserved for IDs / checksums / audit /
   system-generated technical text. Colour --text-label (#a8a8b2) for contrast. */
label {
  display: block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-label);
  letter-spacing: normal;
  margin-bottom: 0.5rem;
}
/* Inline "(optional)" marker inside a label — dimmed and lighter. */

/* Forms — Inputs */

input, textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  min-height: 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  color-scheme: dark;
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  margin-bottom: 1.2rem;
}

textarea { resize: vertical; }

/* Two inputs (e.g. first/last name) sharing one row. Children keep the global
   input margin-bottom, so the row spaces like a single field below it. */
.name-row { display: flex; gap: 0.75rem; }
.name-row input { flex: 1; min-width: 0; }

/* Two form fields sharing one row on wider screens; each cell holds a label +
   control. Collapses to a single column on narrow screens so mobile flows as a
   one-per-row stack. Cells keep the global input margin-bottom, so a row spaces
   like a single field below it (same trick as .name-row). */
.field-row { display: flex; gap: 0.75rem; }
.field-row > .field-cell { flex: 1; min-width: 0; }
@media (max-width: 640px) { .field-row { display: block; } }

/* Step-3 calculated totals (read-only): large, prominent, white numerals with
   no spinner arrows. These inputs are always disabled, so override the muted
   :disabled colour; light theme keeps its own readable colour below. */

/* Number field carrying a trailing unit (e.g. "3.68 kW"). The wrapper takes on
   the field's recessed box look; the input sits inside borderless and sized to
   its content (field-sizing) so the value and unit read as one. */
/* No value yet → hide the unit so the field reads blank, not a lone "kW". */

/* PV array expression: live-computed total shown under the input (math field). */
/* PV / math expression field: a contenteditable surface (.pv-edit) that paints
   operators smaller + muted, with the running total right-aligned inside it.
   The real value rides in a hidden <input> (see initPvField in widgets.js). */
/* Operators: smaller, muted, with breathing room either side. */
/* Placeholder for the empty editable (no native one on contenteditable). */
/* Running total, right-aligned inside the field, larger; solid bg masks any text scrolled under it. */   /* override display:flex so the [hidden] attr actually hides it */
/* Soft, non-blocking casing nudge under a field (amber, vs the red of a real
   validation error) — see initCaseWarn in widgets.js. */
/* The amber --warn (#fbbf24) is unreadable on the light theme's white surfaces —
   darken just the field warning text (route pills / stat tabs keep the amber). */
/* Field validity styling is driven entirely by the unified JS validator
   (validateField in widgets.js applies the red border inline, on submit/blur).
   We deliberately do NOT use :user-invalid: it reddens a field as soon as the
   form has been submitted once, which wrongly flags a "+ New …" fieldset's
   fields the moment they're revealed (they were hidden during that submit). */

input:hover, textarea:hover { border-color: var(--border-hover); }
/* Focus darkens the field (to --bg-base, below the resting --bg-input) rather
   than lightening it, so text contrast improves; the accent border delineates it.
   Light theme has its own focus rule below (--bg-deep). */
input:focus, textarea:focus { border-color: var(--accent); background-color: var(--bg-base); }
input:disabled { color: var(--text-muted); cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--text-placeholder); }

/* Forms — Select */

/* Buttons — primary: light fill, ink text; hover -> accent fill (R15) */

button {
  width: 100%;
  padding: 0.75rem 1.5rem;
  min-height: 42px;
  background: var(--text-primary);
  color: var(--bg-base);
  border: 1px solid var(--text-primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
button:hover { background: var(--accent); border-color: var(--accent); color: var(--bg-base); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
/* On secondary (transparent) buttons the dark primary spinner is invisible
   against the page — use the button's own text colour so it shows in both
   themes. */
@keyframes spin { to { transform: rotate(360deg); } }
a:has(> button) { text-decoration: none; }

/* Secondary button — transparent + border (R16) */

.btn-back, .btn-back:hover {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}
.btn-back:hover { border-color: var(--accent); color: var(--accent); }

/* Destructive secondary button — flat (no gradient/shadow), --danger token.
   Mirrors .btn-back: transparent + border, border intensifies on hover. */

.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; width: 100%; max-width: 480px; }
.button-row button { flex: 1; margin: 0; }
.button-row a { flex: 1; }
.button-row a button { width: 100%; }
/* A secondary inline action sharing the row (e.g. Save as Template) sizes to its
   label rather than taking an equal third of the width. */

/* Page layout */

.wrap { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 2rem; }
.wrap-page { padding: 5rem 2rem 2rem; gap: 1.25rem; }

/* Step indicator — mono eyebrow */

/* Section titles — mono uppercase per R07 */

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-default);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Field hints */

/* Cards — flat surface, no shadow, no gradient overlay */

.card {
  width: 100%;
  max-width: 480px;
  padding: 2rem 2.5rem;
  background: var(--bg-raised);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  position: relative;
}

.card:has(.ss-dropdown:not([hidden])) { z-index: 10; }

/* Summary rows */

/* Clickable list row linking to a related entity (e.g. a client's sites). */

/* Job-context panel (Support page): label/value pairs in a recessed box. */
.context { background: var(--bg-input); border: 1px solid var(--border-default); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 1.2rem; font-size: 0.9rem; color: var(--text-secondary); }
.context .label { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; margin-bottom: 0.25rem; }
.context .value { color: var(--text-primary); margin-bottom: 0.5rem; white-space: pre-line; }
.context .value:last-child { margin-bottom: 0; }

/* Spinner */

/* Fieldsets */

/* Toggle switch */

.toggle { display: flex; align-items: center; justify-content: space-between; cursor: pointer; margin-bottom: 1.2rem; }
.toggle input { display: none; }

/* Radio group (tab-style) */
/* Nav-link segments (e.g. Admin > ENA Devices phase switch): anchors that
   navigate, so the active state is explicit rather than :has(input:checked). */
/* Radio-group red is driven by the JS validator (it adds .radio-error); we
   avoid :user-invalid here for the same reason as inputs above. */

/* Image upload field */

/* Signature field (draw or upload) */
/* .sig-modify is always emitted as "btn-link sig-modify"; it inherits the
   .btn-link nav-style link styling (subtle border on hover, no filled pill). */
 button[hidden] { display: none; }

/* Alerts — tinted bg with matching border, no backdrop-filter */

.error {
  background: rgba(248, 113, 113, 0.06);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--danger);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
  text-align: center;
}

.success {
  background: color-mix(in srgb, var(--success) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
  color: var(--success);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
  text-align: center;
}

.info {
  background: rgba(183, 148, 246, 0.06);
  border: 1px solid rgba(183, 148, 246, 0.3);
  color: var(--accent);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
  text-align: center;
}

.error a, .success a, .info a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

/* Inside a card, alerts use the smaller card-interior radius */
.card .error, .card .success, .card .info { border-radius: var(--radius-md); }

/* Larger info notice variant for top-of-page banners (dashboard welcome,
   unread-DNO-responses, in-progress jobs, wizard welcome). */

/* Top-of-dashboard alert banners (verification sent/notice, plan notice, join
   confirmation) share the welcome-banner width so the whole stack lines up
   instead of one full-width bar above narrower notices. */

/* Inline-sized button — auto width, no full-row growth, no wrap. Used for
   single-line action buttons sitting alongside other content (Invite, Save
   Template, Generate Pack, etc). Override margin inline only if needed. */

/* Block label used inside admin/team cards as a section header. */

/* Honeypot field for spam-bot detection — off-screen but still focusable
   by bots that fill every input. */
.honeypot { position: absolute; left: -9999px; }

/* Small utility classes — repeated common overrides. */

/* =============================================================
   Job info page — moved out of job_info.html for redesign work.
   Generic-element overrides (.heading, details) are scoped under
   .page-job-info; everything else uses page-unique class names.
   ============================================================= */
/* Keep the Job Info content compact and centred — the action cards only need so
   much width, so don't stretch them across the whole page. */
/* Two-column body: workflow/action cards fill the main column (~560px), a
   compact Summary pins to the aside. The header and the detail/audit
   collapsibles stay full-width above and below (siblings of .ji-cols). */
/* Workflow action buttons size to their label instead of spanning the card. */

/* Job timeline (experimental) — a vertical bar with a dot per milestone. */
/* Connector line running through the dots; hidden below the final dot. */
/* Last reached milestone = current standing: ringed in accent. */
/* Outcome dots (Complete / terminal) are larger badges with a centred glyph.
   Sized + offset to keep their centre on the same axis as the plain dots. */
/* Complete: green ✓ cap at Post-Install Submitted. */
/* Terminal outcome (cancelled / rejected / failed / blocked): red ✕. */
/* Forward 'Next: …' ghost: hollow dashed dot + muted label, reached via a dashed
   connector segment from the current dot. */
/* Hollow ring (solid outline — a dashed border on an ~11px circle reads as a
   broken/half-missing ring); only the connector INTO it is dashed. */
/* Link-style trigger at the foot of a card → opens an in-page modal (audit,
   all-details, …). Resets the global filled-button styling to a plain accent link. */
/* Collapse to a single column once the content area is too tight for both. */

/* Route badges (G98/G99/G100) — R21: accent fill, ink text, mono */
/* Generate-Pack requirements: a clicked Generate with something missing flags the
   offending control in red and shows a hint below the button (see job_info.html). */
/* SLD card: generation-meter question + Generate button, then the diagram. */
/* Modify toggle sits in the (uppercase, letter-spaced) card title — undo that. */
/* PV string editor + string → inverter connector. Each string carries inline P/W
   inputs (panels × watts) and +/− buttons, embedded in the SVG via foreignObject;
   the board scales down to fit on narrow screens. */
/* foreignObject editor clusters (real HTML elements inside the rotated SVG). One
   full-width ROW per string: number · panels×watts inputs · +/− buttons · kWp.
   The inputs/buttons reset the global input/button rules (min-height:42px, full
   width, margins, filled button background) so they stay compact. */
/* +/− are circular outline buttons. The .sld-connect prefix lifts specificity
   above `.sld-form button { width: auto }` (0,1,1), which would otherwise shrink
   them to their glyph width; width === height + min-height:0 keeps them circular. */
/* SVG glyphs (+/−) — stroke follows the button's currentColor; pixel-centred. */
/* The add-string control is a dashed pill (icon + label) under the last row. */
/* SLD form sub-tabs (PV Strings / SLD Options) — reuse the radio-group pill look. */
/* Locked-SLD thumbnail in the header card (opens the in-page lightbox). */
/* .jh-sld-thumb is a <button>, so the themed filled-button rules
   (html[data-theme="light"] button{...}) out-specify its background/border and
   paint it near-black — showing through at the rounded corners. Override in light
   mode (incl. hover); overflow:hidden above also clips the image to the radius. */

/* In-page modal holding a content card (audit details, all-details, …), opened
   from a card's foot link. Same overlay pattern as .sld-lightbox. The body is the
   scroll container so a multi-card stack scrolls together while the × stays put. */

/* SLD modal: wider, two columns — controls on the left, the diagram on the right
   (visible without scrolling). Stacks on narrow screens. */
/* Don't clip the fuse search-select dropdown at the panel edge — let it overflow;
   the outer .ji-modal still scrolls tall content. */
/* Text-link styled button — accent color by default. Reset baseline button
   styling (esp. the global button:hover accent fill), then style with a square
   --radius-sm corner: on hover it recesses to the near-black --bg-base with a
   subtle border. Use .danger for destructive actions (Remove etc.) — red text. */
/* Validation subtext under a date-row (e.g. the proposed install date window) —
   reuses .ss-error's red but without its field-gap negative top margin. */
/* Validation message sits below these flex rows (inputs have margin:0), so undo
   the default negative pull that assumes a field margin-bottom above it. */

.divider {
  border: none;
  border-top: 1px solid var(--border-default);
  margin: 1rem 0;
}

/* Footer */

.footer { text-align: center; color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; margin-top: auto; padding: 2rem 1rem 1.5rem; }
.footer p { margin: 0.2rem 0; }

/* Search-select combobox */

/* The wrap carries the form field's bottom spacing; the input inside has none, so
   the wrap height equals the input and the dropdown can anchor at the input's true
   bottom (top: 100% + 2px) in every context. Row layouts that don't want the
   spacing zero `.ss-wrap` margin (see below) — they no longer need a custom
   dropdown `top`. Previously the spacing lived on the input and the dropdown used
   `top: calc(100% - 1rem)` to compensate, which broke whenever a row zeroed the
   input margin. */
/* Rendered-view container (lazy dropdowns): layout-transparent, so the
   cloned rows flow as if they were direct children of the dropdown. */
/* Flex-row contexts: the wrap sits in a row, so drop the form spacing. */
/* A drilldown group is a clickable row, not a header — drop the static header's
   top border so the brand list shows a divider only at the section headers
   (.ss-section), matching the DNO list (a line between groups, not every item). */
/* Checkmark belongs only on a drilldown group ROW (collapsed view, where the
   group itself is the clickable selection). A plain static group header still
   gets .ss-selected from markSelected, but showing a tick there is a phantom —
   the selected item below already carries its own tick. */
/* Non-interactive section header inside a drilldown list (e.g. "Top 10").
   Reuses the standard static group-header look (same as the DNO list); it just
   can't carry the .ss-group class, which would make it a drillable group. */
/* Inverter picker rows: right-aligned RC value + CLS capability chips (see
   itemEl in widgets.js). Absolutely placed so they don't reflow the label/sub;
   .ss-item-has-meta reserves the room on the right. */
/* Non-blocking red notice under the export-limitation scheme selector when an
   Inverter Integrated scheme is paired with a non-CLS inverter (see job_step). */
/* Capacity quick-filter bar, pinned at the top of the picker popup. Rounded
   pills (the radio-control look, but spaced apart) sized to fit the dropdown;
   sticky so it stays put while the list scrolls beneath it. Equal padding all
   round, and the pills override the global button margin/min-height/fill. */
/* .ss-band is a <button>, so html[data-theme="light"] button{color:var(--bg-base)}
   out-specifies the base .ss-band colour — turning the unselected, non-hover label
   near-white on the white background. Restore the readable colour alongside the bg. */
/* The search-select error is appended INSIDE the wrap, under the input — which no
   longer carries a bottom margin (the wrap does), so it must not use the negative
   top margin that pulls a sibling field-error up into the field's margin gap. */
/* MPAN check-digit error: appended right after a plain text input, which keeps
   its own bottom margin — drop the select-tuned negative top margin so it sits
   neatly under the field instead of overlapping it. */

/* Popup prompt overlay */

/* Mobile */

@media (max-width: 480px) {
  .logo-link { top: 1rem; left: 1.2rem; }
  .logo { font-size: 1.5rem; }
  .nav { top: 1.25rem; right: 1.2rem; gap: 0.15rem; }
  .nav a { font-size: 0.8rem; padding: 0.3rem 0.5rem; }
  .wrap { padding: 1rem; padding-top: 4rem; }
  .wrap-page { padding: 4rem 1rem 1rem; }
  input, textarea { font-size: 16px; }
  .card { padding: 1.5rem; border-radius: var(--radius-md); }
}

/* Below-card links (login, signup, forgot password) */

/* =============================================================
   Light theme component overrides (lighter ink scale)
   ============================================================= */
/* Disabled / read-only fields (e.g. the from-select RC value) read muted in dark
   mode via input:disabled; the rule above forces --text-primary in light, so
   restore the muted tone. The calc-total totals keep their prominent colour
   (their own light :disabled override out-specifies this). */
/* Custom radio options recess like the form fields above — match their per-theme bg
   (fields are forced to --bg-raised in light by the rule above; mirror that here). */
/* .card-modal-link / .btn-link are <button>s styled as plain accent links; the
   generic light button rule above out-specifies their reset and would paint them
   as dark filled pills. Restore the link look (transparent, accent text). */

/* Integrity check rows (audit card) */

/* Audit log entries — system-generated/technical text in JetBrains Mono. */

/* Job info screen — light-theme text colour tweaks */

/* Route badges on light bg: softer tinted backgrounds + deeper text */

/* Light-theme destructive variant of .btn-link */

/* =============================================================
   Plans page — moved out of plans.html for redesign work. All
   classes are page-unique (.plans-*, .pilot-*, .tier-*, .tag-*,
   .pill*, .referral, etc); no scoping wrapper needed.
   ============================================================= */

  .wrap-plans .card { max-width: 1056px; }   /* ~20% wider than the old 880px (logged-out view) */

  /* Hero */
  .plans-hero {
    max-width: 980px; width: 100%;
    padding: 1.5rem 0 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
  }
  .plans-hero-top { margin-bottom: 1rem; display: flex; justify-content: center; }
  .plans-hero-headline {
    font-size: clamp(1.6rem, 4.5vw, 2.6rem);
    font-weight: 800; line-height: 1.05; letter-spacing: -0.03em;
    color: var(--text-primary);
    margin: 0 auto 0.85rem;
    max-width: 720px;
  }
  .plans-hero-sub {
    font-size: 0.95rem; color: var(--text-secondary);
    line-height: 1.6; margin: 0 auto 1.1rem;
    max-width: 680px;
  }
  .pilot-strip {
    max-width: 680px;
    background: rgba(139, 92, 246, 0.045);
    border: 1px solid rgba(139, 92, 246, 0.20);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1rem;
    margin: 0 auto 1.1rem;
  }
  .pilot-strip-label {
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--accent-soft); margin-bottom: 0.35rem;
  }
  .pilot-strip-text {
    font-size: 0.85rem; font-weight: 500; color: var(--text-primary);
    line-height: 1.45; margin-bottom: 0.4rem;
  }
  .pilot-strip-micro {
    font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.02em; line-height: 1.45;
  }
  .plans-hero .button-row { max-width: 520px; margin: 0 auto; }

  /* Founding-rate price cell: standard price strikethrough above current price. */
  .price-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; }
  .price-standard-old {
    font-size: 0.7rem; font-weight: 500; color: var(--text-muted);
    text-decoration: line-through; line-height: 1.2;
  }
  .price-pilot {
    font-size: 0.95rem; font-weight: 700; color: var(--text-primary); line-height: 1.2;
  }
  .price-pilot-note {
    font-size: 0.55rem; font-weight: 600; letter-spacing: 0.07em;
    text-transform: uppercase; color: var(--accent-soft); opacity: 0.85; margin-top: 1px;
  }
  .plans-table-transposed tbody tr td.plan-price-cell { white-space: normal; vertical-align: middle; }

  .plans-badge {
    display: inline-flex; align-items: center; width: fit-content;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase;
    color: var(--accent-soft);
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 999px;
    padding: 0.42rem 0.75rem;
  }

  .plans-label {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-muted); white-space: nowrap;
  }
  #billing-toggle-label { display: inline-block; min-width: 3rem; text-align: right; }
  .plans-card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.25rem; gap: 1rem;
  }
  .billing-toggle-wrap {
    display: flex; align-items: center; gap: 0.6rem;
    font-size: 0.8rem; font-weight: 600; color: var(--text-secondary);
  }
  .billing-hint {
    font-size: 0.7rem; font-weight: 500; color: var(--success); letter-spacing: 0.02em;
  }
  .billing-context-line {
    font-size: 0.7rem; color: var(--text-muted); margin-bottom: 1rem; line-height: 1.5;
  }
  .billing-context-line span { color: var(--success); }
  .founding-table-note {
    font-size: 0.7rem; color: var(--text-muted); line-height: 1.65;
    margin-top: 1rem; padding-top: 1rem;
    border-top: 1px solid var(--border-default);
  }
  .toggle-switch {
    position: relative; display: inline-block; width: 40px; height: 22px;
  }
  .toggle-switch input { opacity: 0; width: 0; height: 0; }
  .toggle-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-deep); border: 1px solid var(--border-default);
    border-radius: 22px; transition: 0.2s;
  }
  .toggle-slider::before {
    content: ''; position: absolute; height: 16px; width: 16px;
    left: 2px; bottom: 2px; background: var(--text-secondary);
    border-radius: 50%; transition: 0.2s;
  }
  .toggle-switch input:checked + .toggle-slider {
    background: rgba(139, 92, 246, 0.2); border-color: var(--accent);
  }
  .toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(18px); background: var(--accent);
  }

  .plans-table { width: 100%; border-collapse: collapse; }
  .plans-table thead tr { border-bottom: 1px solid var(--border-subtle); }
  .plans-table th {
    font-size: 0.65rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-muted); padding: 0.5rem 0.75rem; text-align: left;
  }
  .plans-table tbody tr { border-bottom: 1px solid var(--border-default); transition: background 0.15s; }
  .plans-table tbody tr:last-child { border-bottom: none; }
  .plans-table td { padding: 0.75rem 0.5rem; font-size: 0.85rem; font-weight: 500; color: var(--text-primary); }

  /* Transposed layout: plans as columns, attributes as rows. */
  .plans-table-scroll { overflow-x: auto; }
  .plans-table-transposed { table-layout: fixed; }
  /* On narrow viewports, keep the table at a readable minimum width and let
     the wrapper scroll horizontally. The feature-label column stays pinned —
     its opaque background hides the tier columns as they scroll past. */
  @media (max-width: 720px) {
    .plans-table-transposed { min-width: 640px; }
    .plans-table-transposed thead th:first-child,
    .plans-table-transposed tbody td:first-child {
      position: sticky; left: 0; background: var(--bg-raised); z-index: 1;
    }
    .plans-table-transposed thead th:first-child { z-index: 2; }
  }
  .plans-table-transposed thead tr > th:first-child,
  .plans-table-transposed tbody tr > td:first-child { width: 20%; }
  .plans-table-transposed thead tr > th:not(:first-child),
  .plans-table-transposed tbody tr > td:not(:first-child) { width: 16%; }
  .plans-table-transposed th.plan-header {
    text-align: center; vertical-align: top; padding: 0.75rem 0.5rem;
  }
  .plans-table-transposed th.plan-header .tier-name {
    justify-content: center; font-size: 0.78rem; text-transform: none; letter-spacing: 0;
    color: var(--text-primary); white-space: nowrap; flex-wrap: nowrap;
  }
  .plans-table-transposed th.plan-header .tier-sub { text-align: center; white-space: normal; line-height: 1.25; }
  .plans-table-transposed tbody td { text-align: center; white-space: nowrap; }
  .plans-table-transposed tbody td.feat-label {
    text-align: left; color: var(--text-secondary); font-size: 0.8rem; font-weight: 500;
    white-space: normal;
  }
  .plans-table-transposed .feat-sub {
    display: block; font-size: 0.65rem; color: var(--text-muted); font-weight: 400;
    text-transform: none; letter-spacing: 0; margin-top: 0.1rem;
  }
  .plans-table-transposed .plan-total-cell { min-width: 5rem; }
  .plans-table-transposed tbody tr:hover { background: rgba(255,255,255,0.02); }

  .tier-name { font-size: 0.95rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
  .tier-sub { font-size: 0.7rem; color: var(--text-muted); font-weight: 400; margin-top: 0.15rem; }

  .per-sub { color: var(--text-muted) !important; font-size: 0.75rem !important; }

  .plans-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; width: 100%; max-width: 1056px; }
  .plans-two-col > .card { display: flex; flex-direction: column; }
  .plans-two-col > .card > .plans-info-list { margin-bottom: 1.25rem; }
  .plans-two-col > .card > button { margin-top: auto; }

  .card.purple { border-color: rgba(139, 92, 246, 0.35); background: linear-gradient(135deg, var(--accent-glow) 0%, rgba(21, 29, 51, 0.55) 60%); }
  .card.green { border-color: color-mix(in srgb, var(--success) 25%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--success) 7%, transparent) 0%, rgba(21, 29, 51, 0.55) 60%); }
  .card.purple::after { background: linear-gradient(90deg, transparent, #7c3aed, transparent); }
  .card.green::after { background: linear-gradient(90deg, transparent, var(--success), transparent); }
  .plans-info-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 1rem; }
  .card.purple .plans-info-title { color: var(--accent-soft); }
  .card.green .plans-info-title { color: var(--success); }
  .plans-info-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; padding: 0; }
  .plans-info-list li {
    font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: flex-start; gap: 0.6rem; line-height: 1.5;
  }
  .plans-info-list li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
  .card.purple .plans-info-list li::before { background: var(--accent-soft); }
  .card.green .plans-info-list li::before { background: var(--success); }

  .card.referral {
    border-color: color-mix(in srgb, var(--success) 25%, transparent);
    background: linear-gradient(135deg, color-mix(in srgb, var(--success) 7%, transparent) 0%, rgba(21, 29, 51, 0.55) 50%);
    display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center;
  }
  .card.referral::after { background: linear-gradient(90deg, transparent, var(--success), transparent); }
  .referral-title { font-size: 1.1rem; font-weight: 800; color: var(--success); margin-bottom: 0.6rem; }
  .referral-desc { font-size: 0.75rem; color: var(--text-muted); line-height: 1.7; }
  .referral-pills { display: flex; flex-direction: column; gap: 0.75rem; }
  .pill {
    background: color-mix(in srgb, var(--success) 6%, transparent); border: 1px solid color-mix(in srgb, var(--success) 25%, transparent);
    border-radius: var(--radius-md); padding: 0.85rem 1.1rem;
  }
  .pill-label { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--success); margin-bottom: 0.2rem; }
  .pill-value { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }

  .plans-footer {
    display: flex; justify-content: space-between; align-items: center;
  }
  .plans-footer-note { font-size: 0.7rem; color: var(--text-muted); line-height: 1.7; }
  .plans-footer-logo { font-size: 1rem; font-weight: 800; color: var(--text-muted); }

  @media (max-width: 480px) {
    .plans-two-col { grid-template-columns: 1fr; }
    .card.referral { grid-template-columns: 1fr; }
    .plans-footer { flex-direction: column; gap: 0.5rem; text-align: center; }
  }

/* =============================================================
   Landing page — moved out of landing.html for redesign work.
   .wrap override removed (landing.html has no .wrap element);
   body::before noise overlay rescoped to .landing::before so it
   only renders when the landing template is in view.
   ============================================================= */

  .landing { font-family: 'DM Sans', sans-serif; line-height: 1.6; }

  /* Noise overlay — scoped to .landing so it only renders on this page */
  .landing::before {
    content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
  }

  /* Typography */
  .landing h1, .landing h3, .landing h4 {
    font-family: 'Syne', 'Inter', sans-serif; font-weight: 800; letter-spacing: -0.02em;
  }

  /* HERO */
  .hero {
    position: relative; min-height: 100vh; display: flex; flex-direction: column;
    justify-content: center; padding: 8rem 2rem 6rem; overflow: hidden;
  }
  /* Hero background dot-grid and animated radial glow removed per request. */
  .hero-content {
    position: relative; z-index: 1;
    max-width: 1180px; margin: 0 auto; width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 420px;
    gap: 4rem;
    align-items: center;
  }
  .hero-copy { max-width: 680px; text-align: left; }
  .hero-intake {
    width: 100%; max-width: 420px; justify-self: end;
    opacity: 0; animation: fadeUp 0.8s 0.5s forwards;
  }
  .hero-card-label {
    font-family: 'IBM Plex Mono', monospace; font-size: 0.67rem;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--accent-soft); margin-bottom: 1.1rem;
    display: flex; align-items: center; gap: 0.5rem;
  }
  .hero-card-label::before { content: "//"; color: var(--text-muted); }
  .hero-card-heading {
    font-family: 'Syne', sans-serif; font-weight: 800;
    font-size: 1.1rem; color: var(--text-primary);
    margin-bottom: 0.5rem; letter-spacing: -0.01em;
  }
  .hero-card-sub {
    font-size: 0.82rem; color: var(--text-secondary);
    line-height: 1.65; font-weight: 300; margin-bottom: 1.5rem;
  }
  .hero-label {
    font-family: 'IBM Plex Mono', monospace; font-size: 0.63rem; font-weight: 500;
    color: var(--accent-soft); letter-spacing: 0.1em; text-transform: uppercase;
    margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem;
    flex-wrap: wrap;
    opacity: 0; animation: fadeUp 0.6s 0.1s forwards;
  }
  .hero-label::before {
    content: ""; display: inline-block; width: 16px; height: 1px; background: var(--accent-soft); flex-shrink: 0;
  }
  .hero-proof {
    font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem;
    color: var(--text-muted); letter-spacing: 0.03em; line-height: 1.5;
    margin-top: 0.5rem; margin-bottom: 1.4rem;
  }
  .hero-motto {
    font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem;
    color: var(--text-muted); margin-bottom: 2rem; max-width: 560px;
    font-style: italic; letter-spacing: 0.02em; line-height: 1.6;
    opacity: 0; animation: fadeUp 0.7s 0.45s forwards;
  }
  .hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.05; margin-bottom: 1.5rem;
    color: var(--text-primary); text-transform: none; font-style: normal;
    opacity: 0; animation: fadeUp 0.7s 0.2s forwards;
    background: none; -webkit-text-fill-color: initial;
  }
  .hero h1 .accent {
    background: linear-gradient(135deg, #c084fc 0%, #818cf8 60%, #60a5fa 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  .hero-sub {
    font-size: 1rem; color: var(--text-secondary); max-width: 520px; line-height: 1.7;
    margin-bottom: 0.6rem; font-weight: 300;
    opacity: 0; animation: fadeUp 0.7s 0.35s forwards;
  }
  .hero-ctas {
    display: flex; gap: 0.75rem; flex-wrap: wrap;
    opacity: 0; animation: fadeUp 0.7s 0.5s forwards;
  }
  .hero-stats {
    display: flex; gap: 2rem; margin-top: 3.5rem; flex-wrap: wrap;
    opacity: 0; animation: fadeUp 0.7s 0.65s forwards;
  }
  .hero-stat-label {
    font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; color: var(--text-muted);
    letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.2rem;
  }
  .hero-stat-val {
    font-family: 'Syne', sans-serif; font-size: 1.4rem; font-weight: 700;
    color: var(--text-primary); display: flex; align-items: center;
    min-height: 2rem;
  }
  .hero-stat-val span {
    font-size: 0.85rem; color: var(--text-muted); font-weight: 400;
    font-family: inherit; margin-left: 0.25rem;
  }

  /* Section common */
  .landing section { position: relative; z-index: 1; }
  .container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
  .section-tag {
    font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem;
    letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-soft);
    margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem;
  }
  .section-tag::before { content: "//"; color: var(--text-muted); }
  .landing .section-title {
    font-family: 'Syne', sans-serif; font-weight: 800;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.15;
    letter-spacing: -0.02em; margin-bottom: 1rem; color: var(--text-primary);
  }
  .section-sub {
    color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7;
    max-width: 500px; font-weight: 300;
  }

  /* Problem */
  .problem { padding: 6rem 0; border-top: 1px solid var(--border-default); }
  .problem-bridge {
    margin-top: 3rem; padding: 0.25rem 0 0.25rem 1.5rem;
    border-left: 2px solid rgba(139, 92, 246, 0.4);
  }
  .problem-bridge h4 {
    font-weight: 800; font-size: 1.1rem;
    color: var(--text-primary); margin-bottom: 0.4rem; letter-spacing: -0.02em;
    line-height: 1.3;
  }
  .problem-bridge p {
    font-size: 0.85rem; color: var(--text-muted);
    line-height: 1.7; font-weight: 300; margin: 0;
  }
  .problem-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem; margin-top: 3rem;
  }
  .problem-card.card { padding: 2rem; max-width: none; display: flex; flex-direction: column; }
  .problem-card.card p { flex: 1; }
  .problem-card h3 {
    font-size: 1.05rem; margin-bottom: 0.6rem; color: var(--text-primary); font-weight: 700;
  }
  .problem-card p {
    font-size: 0.88rem; color: var(--text-secondary); line-height: 1.65; font-weight: 300;
  }
  .how-step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.6rem; color: var(--text-primary); }
  .how-step p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.65; font-weight: 300; }
  .problem-tag {
    display: inline-block; margin-top: 1.2rem;
    font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem;
    color: var(--accent-soft); background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 4px; padding: 0.25rem 0.6rem; letter-spacing: 0.08em;
  }

  /* How it works */
  .how { padding: 6rem 0; border-top: 1px solid var(--border-default); }
  .how-flow {
    display: grid; grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 0; margin-top: 3rem; align-items: stretch;
  }
  .how-step.card { padding: 1.8rem; max-width: none; height: 100%; display: flex; flex-direction: column; }
  .how-step.card p { flex: 1; }
  .how-step-badge {
    display: inline-flex; font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem; font-weight: 600;
    padding: 0.25rem 0.6rem; border-radius: 4px; margin-bottom: 1rem;
  }
  .badge-in { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
  .badge-calc { background: rgba(139, 92, 246, 0.1); color: var(--accent-soft); border: 1px solid rgba(139, 92, 246, 0.2); }
  .badge-out { background: rgba(124, 58, 237, 0.1); color: var(--accent-soft); border: 1px solid rgba(124, 58, 237, 0.2); }
  .how-arrow {
    color: var(--border-default); font-size: 1.2rem;
    padding: 0 0.5rem; text-align: center; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .how-data-row { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.3rem; }
  .how-data-item {
    font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border-default);
    border-radius: 4px; padding: 0.25rem 0.6rem;
  }

  /* Product */
  .product { padding: 6rem 0; border-top: 1px solid var(--border-default); overflow: hidden; }
  .product-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; margin-top: 3rem; }
  .product-text .section-sub { max-width: 400px; }
  .product-features { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
  .product-feature { display: flex; align-items: flex-start; gap: 0.8rem; }
  .feature-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent); margin-top: 0.5rem; flex-shrink: 0;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
  }
  .product-feature h4 {
    font-family: 'Syne', sans-serif; font-size: 0.95rem;
    font-weight: 700; margin-bottom: 0.15rem; color: var(--text-primary);
  }
  .product-feature p {
    font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; font-weight: 300;
  }
  .phone-stack {
    position: relative; display: flex; justify-content: center;
    align-items: center; height: 580px;
  }
  .phone-frame {
    position: absolute; width: 220px; border-radius: 28px; overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  }
  .phone-frame img { width: 100%; display: block; }
  .phone-1 { left: 0; top: 20px; z-index: 2; transform: rotate(-4deg); }
  .phone-2 {
    right: 0; bottom: 20px; z-index: 3; transform: rotate(3deg);
    box-shadow: 0 30px 80px rgba(139, 92, 246, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.06);
  }

  /* Pillars */
  .pillars { padding: 6rem 0; border-top: 1px solid var(--border-default); }
  .pillars-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 3rem;
  }
  .pillar-card.card { padding: 2.5rem 2rem; max-width: none; }
  .pillar-word {
    font-family: 'Syne', sans-serif; font-weight: 800;
    font-size: 1.4rem; letter-spacing: -0.02em; margin-bottom: 0.8rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  .pillar-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; font-weight: 300; }

  /* ROI / commercial case */
  .roi { padding: 6rem 0; border-top: 1px solid var(--border-default); }
  .roi-inner {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 5rem; align-items: stretch;
  }
  .roi-intro {
    display: flex; flex-direction: column;
    justify-content: center; max-width: 480px;
  }
  .roi-intro .section-sub { margin-top: 1rem; max-width: none; }
  .roi-calc { display: flex; flex-direction: column; }
  .roi-calc .roi-ledger { flex: 1; }
  .roi-note {
    margin-top: 1.5rem; padding-left: 1.25rem;
    border-left: 2px solid rgba(139,92,246,0.3);
    font-size: 0.85rem; color: var(--text-muted);
    font-weight: 300; line-height: 1.65;
  }
  .roi-controls {
    margin-bottom: 1rem;
    padding: 0.8rem 1.25rem;
    border: 1px solid var(--border-default); border-radius: 8px;
    background: rgba(255,255,255,0.02);
  }
  .roi-controls-label {
    font-size: 0.75rem; color: var(--text-muted);
    letter-spacing: 0.06em; text-transform: uppercase;
    margin-bottom: 0.75rem; display: flex;
    justify-content: space-between; align-items: baseline;
  }
  .roi-jobs-display {
    color: var(--text-primary); font-weight: 600;
    font-size: 1.05rem; letter-spacing: 0;
    text-transform: none;
  }
  .roi-jobs-display span:first-child {
    color: var(--accent-soft); font-size: 1.35rem;
    margin-right: 0.25rem;
  }
  .roi-slider {
    width: 100%; -webkit-appearance: none; appearance: none;
    height: 24px; padding: 0; margin: 0;
    background: transparent; outline: none;
    border: none; box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    cursor: pointer; touch-action: pan-y;
  }
  .roi-slider::-webkit-slider-runnable-track {
    height: 4px; border-radius: 2px;
    background: rgba(139,92,246,0.18);
  }
  .roi-slider::-moz-range-track {
    height: 4px; border-radius: 2px;
    background: rgba(139,92,246,0.18);
    border: none;
  }
  .roi-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--accent-soft);
    box-shadow: 0 0 8px rgba(139,92,246,0.5);
    cursor: pointer; border: 2px solid #0b1120;
    margin-top: -7px;
  }
  .roi-slider::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--accent-soft);
    box-shadow: 0 0 8px rgba(139,92,246,0.5);
    cursor: pointer; border: 2px solid #0b1120;
  }
  .roi-slider:hover, .roi-slider:focus { background: transparent; border: none; box-shadow: none; }
  .roi-slider:hover::-webkit-slider-runnable-track,
  .roi-slider:focus::-webkit-slider-runnable-track { background: rgba(139,92,246,0.32); }
  .roi-slider:hover::-moz-range-track,
  .roi-slider:focus::-moz-range-track { background: rgba(139,92,246,0.32); }
  .roi-slider:hover::-webkit-slider-thumb,
  .roi-slider:focus::-webkit-slider-thumb { background: #c4b5fd; box-shadow: 0 0 14px rgba(139,92,246,0.7); }
  .roi-slider:hover::-moz-range-thumb,
  .roi-slider:focus::-moz-range-thumb { background: #c4b5fd; box-shadow: 0 0 14px rgba(139,92,246,0.7); }
  .roi-slider-ticks {
    display: flex; justify-content: space-between;
    margin-top: -0.1rem; font-size: 0.65rem;
    color: var(--text-muted); letter-spacing: 0.04em;
  }
  .roi-ledger {
    display: flex; flex-direction: column;
    border: 1px solid var(--border-default); border-radius: 8px;
    overflow: hidden;
  }
  .roi-row {
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem;
    padding: 0.65rem 1.25rem;
    border-bottom: 1px solid var(--border-default);
    background: transparent;
  }
  .roi-row:last-of-type { border-bottom: none; }
  .roi-row-label {
    font-size: 0.78rem;
    letter-spacing: 0.04em; color: var(--text-muted);
  }
  .roi-row-val { font-size: 0.9rem; color: var(--text-primary); font-weight: 500; }
  .roi-row-val.roi-val-accent { color: var(--accent-soft); }
  .roi-row-val.roi-val-deduct { color: var(--text-muted); }
  .roi-row-plan {
    background: rgba(139,92,246,0.04);
  }
  .roi-row-plan .roi-row-val { color: var(--accent-soft); }
  .roi-total {
    padding: 0.85rem 1.25rem;
    gap: 1rem;
    background: rgba(139, 92, 246, 0.09);
    border-top: 1px solid rgba(139, 92, 246, 0.3);
    display: flex; justify-content: space-between; align-items: center;
  }
  .roi-total-label {
    font-size: 0.78rem;
    letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-soft);
  }
  .roi-total-val {
    font-family: 'Syne', sans-serif; font-size: 1.35rem;
    font-weight: 800; color: var(--text-primary);
    white-space: nowrap;
  }
  .roi-footer {
    margin-top: 0.75rem;
    font-size: 0.72rem;
    color: var(--text-muted); line-height: 1.6;
  }

  /* Infrastructure (installer-led origin band) */
  .infrastructure { padding: 6rem 0; border-top: 1px solid var(--border-default); }
  .infrastructure-band { max-width: 720px; }
  .infrastructure-band .section-title { margin-top: 0.75rem; }
  .infrastructure-origin {
    margin-top: 1.5rem; font-size: 0.95rem;
    font-weight: 300; color: var(--text-secondary); line-height: 1.75;
  }
  .infrastructure-validation {
    margin-top: 1.25rem; padding-top: 1.25rem;
    border-top: 1px solid var(--border-default);
    font-size: 0.78rem; color: var(--text-muted);
    letter-spacing: 0.02em; line-height: 1.65;
  }
  .validation-rail {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 0; margin-top: 2.5rem;
    border-top: 1px solid var(--border-default);
    padding-top: 1.25rem;
  }
  .validation-rail-item {
    font-size: 0.7rem; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--text-muted);
    padding-right: 1.5rem;
  }
  .validation-rail-sep {
    color: var(--border-default); padding-right: 1.5rem;
    font-size: 0.7rem; line-height: 1;
  }

  /* Register / contact form */
  .register { padding: 6rem 0; border-top: 1px solid var(--border-default); }
  .register-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: start; }
  .register-text .section-title { margin-bottom: 1rem; }
  .register-bullets { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.8rem; }
  .register-bullet {
    display: flex; align-items: center; gap: 0.8rem;
    font-size: 0.88rem; color: var(--text-secondary);
  }
  .bullet-check {
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.25);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 0.55rem; color: #10b981;
  }
  .landing .card { max-width: none; padding: 2rem; }
  .form-note {
    font-size: 0.75rem; color: var(--text-muted); text-align: center;
    margin-top: 0.8rem; font-family: 'IBM Plex Mono', monospace;
  }
  .call-cta {
    font-size: 0.8rem; color: var(--text-secondary); text-align: center;
    margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--border-default);
    font-family: 'IBM Plex Mono', monospace;
  }
  .call-cta a { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
  .call-cta a:hover { text-decoration: underline; }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .reveal.visible { opacity: 1; transform: translateY(0); }

  /* Hero stacks at landscape-phone widths so the H1 column does not
     get squeezed by the fixed 420px intake card next to it. */
  @media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-intake { max-width: 480px; justify-self: start; }
  }

  @media (max-width: 800px) {
    .hero { padding: 7rem 1.2rem 4rem; }
    .hero-intake { max-width: none; justify-self: stretch; }
    .how-flow { grid-template-columns: 1fr; gap: 0; }
    .how-arrow { transform: rotate(90deg); padding: 0.5rem 0; text-align: center; }
    .problem-grid { grid-template-columns: 1fr; }
    .product-inner { grid-template-columns: 1fr; }
    .phone-stack { height: 420px; }
    .phone-frame { width: 170px; }
    .pillars-grid { grid-template-columns: 1fr; }
    .roi-inner { grid-template-columns: 1fr; gap: 2.5rem; }
    .register-inner { grid-template-columns: 1fr; gap: 2.5rem; }
    .container { padding: 0 1.2rem; }
  }


