/* SolGridPlan design system. One stylesheet, no framework, no paid assets.
   Order: fonts, tokens, base, layout, header, buttons, cards, forms, feedback, data, pages, print.
   Brand guide: docs/BRAND.md. Colour contrast notes are next to each text token. */

@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('../fonts/manrope-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
/* Devanagari (Hindi). unicode-range means browsers only download it when a page shows Devanagari text. Noto Sans Devanagari, SIL OFL. */
@font-face { font-family: 'SolGridPlan Devanagari'; src: url('../fonts/noto-sans-devanagari-devanagari-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }

:root {
  /* Midnight surfaces */
  --bg-0: #060A16;          /* page */
  --bg-1: #0A1022;          /* bands, header */
  --bg-2: #0F1730;          /* cards */
  --bg-3: #16213F;          /* inputs, hover */
  --bg-4: #1E2A4E;          /* raised hover */
  --glass: rgba(20, 30, 62, .62);
  --line: rgba(140, 162, 224, .14);
  --line-2: rgba(140, 162, 224, .26);

  /* Text (contrast measured on --bg-1) */
  --text: #EEF2FD;          /* 16:1 */
  --text-2: #C5CDE6;        /* 11:1 */
  --muted: #94A0C0;         /* 6.9:1 */

  /* Energy accents */
  --sun: #FFC83D;           /* actions, highlights; 11:1 on --bg-1 */
  --sun-2: #FFB020;
  --flare: #FF8A3D;         /* gradients and warm accents */
  --cyan: #38D6F5;          /* data, links; 10:1 on --bg-1 */
  --cyan-2: #8BE6F8;
  --green: #3DDC97;         /* "healthy" status only */
  --red: #FF6B6B;
  --amber: #FFB547;
  --on-sun: #1A1204;        /* text on yellow buttons, 13:1 */

  --grad-sun: linear-gradient(135deg, #FFD65C 0%, #FFB020 55%, #FF8A3D 100%);
  --grad-energy: linear-gradient(90deg, var(--cyan) 0%, #9BE7C4 50%, var(--sun) 100%);
  --glow-sun: 0 0 0 1px rgba(255, 200, 61, .35), 0 10px 40px -10px rgba(255, 176, 32, .55);
  --glow-cyan: 0 0 0 1px rgba(56, 214, 245, .3), 0 10px 40px -12px rgba(56, 214, 245, .45);

  /* Status */
  --ok: var(--green); --ok-bg: rgba(61, 220, 151, .1);
  --warn: var(--amber); --warn-bg: rgba(255, 181, 71, .1);
  --bad: var(--red); --bad-bg: rgba(255, 107, 107, .1);
  --info: var(--cyan); --info-bg: rgba(56, 214, 245, .08);

  /* Compatibility aliases (older inline styles) */
  --surface: var(--bg-2); --surface-2: var(--bg-1); --surface-3: var(--bg-3);
  --emerald-500: var(--cyan); --emerald-600: var(--cyan); --emerald-50: rgba(56, 214, 245, .1);
  --lime-300: var(--sun); --lime-400: var(--sun); --sun-400: var(--sun);
  --ink: var(--text); --ink-2: var(--text-2);

  /* Type */
  --font-body: 'Inter', 'SolGridPlan Devanagari', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', Arial, sans-serif;
  --font-head: 'Manrope', 'Inter', 'SolGridPlan Devanagari', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', 'SolGridPlan Devanagari', monospace;
  --fs-xs: 0.8125rem; --fs-sm: 0.9375rem; --fs-md: 1.0625rem; --fs-lg: 1.25rem;
  --fs-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2.05rem);
  --fs-2xl: clamp(1.95rem, 1.4rem + 2.3vw, 3rem);
  --fs-3xl: clamp(2.4rem, 1.4rem + 4vw, 4.4rem);

  /* Space, radius, shadow */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 104px;
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 26px;
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 16px 40px -20px rgba(0, 0, 0, .7);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .85);
  --wrap: 1200px;
  --focus: 0 0 0 3px rgba(56, 214, 245, .45);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

/* ---------- Base ---------- */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg-0); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font-body); font-size: var(--fs-md); line-height: 1.6; color: var(--text-2); background: var(--bg-0); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 500px at 85% -10%, rgba(255, 176, 32, .08), transparent 60%), radial-gradient(800px 600px at -10% 30%, rgba(56, 214, 245, .06), transparent 60%); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 var(--s3); color: var(--text); font-weight: 760; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); letter-spacing: -0.015em; }
h4 { font-size: var(--fs-md); }
p { margin: 0 0 var(--s4); }
strong, b { color: var(--text); }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(56, 214, 245, .45); }
a:hover { color: var(--cyan-2); text-decoration-color: currentColor; }
img, svg, canvas { max-width: 100%; }
img { height: auto; }
small, .small { font-size: var(--fs-sm); }
code, kbd { font-family: var(--font-mono); font-size: .88em; background: var(--bg-3); color: var(--cyan-2); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s6) 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
::selection { background: rgba(255, 200, 61, .35); color: #fff; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--sun); color: var(--on-sun); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.tabnum, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.grad-text { background: var(--grad-sun); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s4); }
@media (min-width: 720px) { .wrap { padding: 0 var(--s5); } }
.section { padding: var(--s8) 0; position: relative; }
.section.tight { padding: var(--s6) 0; }
.section.alt { background: linear-gradient(180deg, rgba(15, 23, 48, .55), rgba(10, 16, 34, .2)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.dark { background: radial-gradient(700px 360px at 80% 0%, rgba(255, 176, 32, .1), transparent 70%), var(--bg-1); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 740px; margin-bottom: var(--s6); }
.section-head p { color: var(--muted); font-size: var(--fs-md); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sun); margin-bottom: var(--s3); }
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--grad-energy); border-radius: 2px; box-shadow: 0 0 10px rgba(56, 214, 245, .6); }
.grid { display: grid; gap: var(--s5); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.split { display: grid; gap: var(--s6); align-items: start; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1fr) 320px; } .split.wide-right { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.stack > * + * { margin-top: var(--s4); }
.row { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }

/* Solar-cell grid texture, used on heroes and page heads */
.cells { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(140, 162, 224, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(140, 162, 224, .07) 1px, transparent 1px);
  background-size: 28px 42px; mask-image: radial-gradient(ellipse 70% 80% at 70% 30%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 30%, #000 20%, transparent 75%); }

/* ---------- Header / navigation ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(6, 10, 22, .72); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.site-header::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(56, 214, 245, .45), rgba(255, 200, 61, .45), transparent); opacity: .6; }
.site-header .wrap { display: flex; align-items: center; gap: var(--s5); height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand .mark { width: 36px; height: 36px; flex: none; }
.brand .word { height: 22px; width: auto; flex: none; }
.brand:hover { color: #fff; }
.nav { display: none; gap: 2px; margin-left: auto; align-items: center; }
.nav a { color: var(--text-2); text-decoration: none; font-weight: 550; font-size: var(--fs-sm); padding: 8px 12px; border-radius: 999px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav a[aria-current="page"] { color: var(--text); background: rgba(56, 214, 245, .1); box-shadow: inset 0 0 0 1px rgba(56, 214, 245, .25); }
.nav .btn { margin-left: var(--s2); }
.menu-btn { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-2); color: var(--text); cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }
@media (min-width: 1040px) { .nav { display: flex; } .menu-btn { display: none; } }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--bg-1); padding: var(--s3) var(--s4) var(--s5); }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 13px 4px; color: var(--text); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.mobile-nav a[aria-current="page"] { color: var(--sun); }
.mobile-nav .btn { margin-top: var(--s4); width: 100%; border-bottom: 0; }
@media (min-width: 1040px) { .mobile-nav, .mobile-nav.open { display: none; } }

/* ---------- Language switcher and translation notice ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg-2); }
.nav .lang-switch { margin-left: var(--s2); }
.lang-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 34px; padding: 4px 10px; border-radius: 999px; font: 600 13px/1 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--text-2); text-decoration: none; }
.nav .lang-switch a { padding: 4px 10px; }
.lang-switch a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.lang-switch a[aria-current="true"] { color: #0A1022; background: var(--sun); box-shadow: none; }
.lang-switch a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.head-mobile { margin-left: auto; display: inline-flex; align-items: center; gap: var(--s2); }
.head-mobile .menu-btn { margin-left: 0; }
@media (min-width: 1040px) { .head-mobile { display: none; } }
.lang-review { margin-top: var(--s3); }
.lang-review p { margin: 0; padding: 10px 14px; border: 1px dashed var(--line-2); border-radius: 12px; font-size: var(--fs-sm); color: var(--text-2); background: rgba(255, 200, 61, .05); }

/* ---------- Hindi typography: taller lines for vowel signs, no letter-spacing (it breaks joined letters) ---------- */
html[lang="hi"] body { line-height: 1.75; }
html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3, html[lang="hi"] h4 { line-height: 1.4; letter-spacing: 0; }
html[lang="hi"] *, html[lang="hi"] *::before, html[lang="hi"] *::after { letter-spacing: 0 !important; }
html[lang="hi"] .eyebrow, html[lang="hi"] th, html[lang="hi"] .ad-label, html[lang="hi"] .k, html[lang="hi"] .preview-top, html[lang="hi"] .mono, html[lang="hi"] code:not([lang="en"]) { font-family: var(--font-body); }
html[lang="hi"] .compare-table tr.group th, html[lang="hi"] .table th, html[lang="hi"] .site-footer h4, html[lang="hi"] .step::before { font-family: var(--font-body); }

/* ---------- Buttons ---------- */
.btn { --bg: rgba(255, 255, 255, .04); --fg: var(--text); --bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--bd); background: var(--bg); color: var(--fg); font: 650 var(--fs-sm)/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background .18s var(--ease), border-color .18s, box-shadow .2s, transform .08s, color .15s; }
.btn:hover { --bg: rgba(255, 255, 255, .08); --bd: rgba(140, 162, 224, .4); color: var(--fg); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn.primary, .btn.lime { --fg: var(--on-sun); --bd: transparent; background: var(--grad-sun); box-shadow: var(--glow-sun); }
.btn.primary:hover, .btn.lime:hover { filter: brightness(1.06); box-shadow: 0 0 0 1px rgba(255, 200, 61, .55), 0 14px 46px -10px rgba(255, 176, 32, .75); color: var(--on-sun); }
.btn.cyan { --fg: #04202A; --bd: transparent; background: linear-gradient(135deg, #8BE6F8, #38D6F5); box-shadow: var(--glow-cyan); }
.btn.ghost { --bg: transparent; --bd: transparent; }
.btn.ghost:hover { --bg: rgba(255, 255, 255, .06); --bd: transparent; }
.btn.on-dark { --bg: rgba(255, 255, 255, .03); --fg: var(--text); --bd: var(--line-2); }
.btn.danger { --fg: var(--red); }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: var(--fs-xs); }
.btn.lg { min-height: 54px; padding: 14px 26px; font-size: var(--fs-md); }
.btn svg { width: 18px; height: 18px; }
.btn-row { display: flex; gap: var(--s3); flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card { position: relative; background: linear-gradient(180deg, rgba(22, 33, 63, .7), rgba(15, 23, 48, .7)); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--shadow); }
.card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 30%); }
.card.pad-lg { padding: var(--s6); }
.card h3 { margin-bottom: var(--s2); }
.card p:last-child { margin-bottom: 0; }
.card-link { display: block; text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.card-link:hover { border-color: rgba(56, 214, 245, .45); box-shadow: var(--glow-cyan); color: inherit; transform: translateY(-2px); }
.card-link .arrow { color: var(--sun); font-weight: 650; font-size: var(--fs-sm); }
.card .icon, .feature .icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, rgba(56, 214, 245, .25), rgba(56, 214, 245, .06)); color: var(--cyan); margin-bottom: var(--s3); border: 1px solid rgba(56, 214, 245, .25); }
.card .icon svg, .feature .icon svg { width: 22px; height: 22px; }
.feature { padding: var(--s5); border-radius: var(--r-lg); border: 1px solid var(--line); background: rgba(15, 23, 48, .45); }
.feature h3 { font-size: var(--fs-md); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 650; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--text-2); border: 1px solid var(--line); }
.tag.green { background: var(--ok-bg); color: var(--green); border-color: rgba(61, 220, 151, .3); }
.tag.lime, .tag.sun { background: rgba(255, 200, 61, .12); color: var(--sun); border-color: rgba(255, 200, 61, .3); }
.tag.cyan { background: var(--info-bg); color: var(--cyan); border-color: rgba(56, 214, 245, .3); }
.tag.warn { background: var(--warn-bg); color: var(--amber); border-color: rgba(255, 181, 71, .3); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: var(--s4); }
.field > label, .label { font-weight: 600; font-size: var(--fs-sm); color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.field .hint { font-size: var(--fs-xs); color: var(--muted); }
.field .err { font-size: var(--fs-xs); color: var(--red); font-weight: 600; }
.input, .select, textarea.input { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: rgba(6, 10, 22, .6); color: var(--text); font: 500 16px/1.3 var(--font-body); transition: border-color .15s, box-shadow .15s, background .15s; }
.input::placeholder { color: #6F7B9A; }
.input:hover, .select:hover { border-color: rgba(140, 162, 224, .4); }
.input:focus, .select:focus { outline: none; border-color: var(--cyan); box-shadow: var(--focus); background: rgba(6, 10, 22, .85); }
.input[aria-invalid="true"] { border-color: var(--red); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394A0C0'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.select option { background: var(--bg-2); color: var(--text); }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r); background: rgba(6, 10, 22, .6); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.input-group:focus-within { border-color: var(--cyan); box-shadow: var(--focus); }
.input-group .input { border: 0; box-shadow: none !important; border-radius: 0; min-width: 0; background: transparent; }
.input-group .unit { display: flex; align-items: center; padding: 0 12px; background: rgba(255, 255, 255, .04); color: var(--muted); font: 600 var(--fs-xs) var(--font-mono); border-left: 1px solid var(--line); white-space: nowrap; }
.input-group .unit.pre { border-left: 0; border-right: 1px solid var(--line); }
.form-grid { display: grid; gap: 0 var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.seg { display: inline-flex; padding: 4px; background: rgba(6, 10, 22, .6); border: 1px solid var(--line); border-radius: 999px; gap: 2px; flex-wrap: wrap; }
.seg button, .seg label { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font: 600 var(--fs-sm) var(--font-body); color: var(--muted); cursor: pointer; min-height: 38px; }
.seg [aria-pressed="true"], .seg input:checked + span { background: var(--bg-4); color: var(--text); box-shadow: inset 0 0 0 1px rgba(56, 214, 245, .35); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label span { display: inline-block; padding: 8px 14px; border-radius: 999px; margin: -8px -14px; }
input[type=range] { width: 100%; accent-color: var(--sun); min-height: 32px; }
input[type=checkbox], input[type=radio] { accent-color: var(--sun); width: 18px; height: 18px; }
input[type=file] { color: var(--muted); }
input[type=date] { color-scheme: dark; }
details.more { border-top: 1px dashed var(--line-2); margin-top: var(--s3); padding-top: var(--s3); }
details.more > summary { cursor: pointer; font-weight: 600; color: var(--cyan); font-size: var(--fs-sm); list-style: none; padding: 6px 0; }
details.more > summary::before { content: '+ '; }
details.more[open] > summary::before { content: '− '; }

/* ---------- Tooltip ---------- */
.tip { position: relative; display: inline-flex; }
.tip > button { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--muted); font: 700 12px/1 var(--font-body); cursor: help; padding: 0; }
.tip > [role="tooltip"] { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: 260px; background: #020409; color: var(--text); font-size: var(--fs-xs); font-weight: 500; line-height: 1.45; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2); opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 20; }
.tip:hover > [role="tooltip"], .tip:focus-within > [role="tooltip"] { opacity: 1; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--info-bg); color: var(--text-2); font-size: var(--fs-sm); border: 1px solid rgba(56, 214, 245, .25); margin: var(--s4) 0; }
.alert > svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--cyan); }
.alert p { margin: 0; }
.alert.ok { background: var(--ok-bg); border-color: rgba(61, 220, 151, .3); }
.alert.ok > svg { color: var(--green); }
.alert.warn { background: var(--warn-bg); border-color: rgba(255, 181, 71, .3); }
.alert.warn > svg { color: var(--amber); }
.alert.bad { background: var(--bad-bg); border-color: rgba(255, 107, 107, .35); }
.alert.bad > svg { color: var(--red); }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: rgba(6, 10, 22, .35); }
table.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: rgba(255, 255, 255, .03); font: 600 .75rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); white-space: nowrap; }
.table td { color: var(--text-2); }
.table tbody tr:hover td { background: rgba(56, 214, 245, .03); }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.num { color: var(--text); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: var(--s5); overflow-x: auto; scrollbar-width: none; }
.tabs [role="tab"] { border: 0; background: transparent; padding: 12px 14px; font: 600 var(--fs-sm) var(--font-body); color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--sun); }
[role="tabpanel"][hidden] { display: none; }

/* ---------- Modal ---------- */
dialog.modal { border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 0; width: min(560px, calc(100% - 32px)); box-shadow: var(--shadow-lg); background: var(--bg-2); color: var(--text-2); }
dialog.modal::backdrop { background: rgba(2, 4, 10, .7); backdrop-filter: blur(4px); }
dialog.modal .modal-body { padding: var(--s5); }
dialog.modal .modal-foot { padding: var(--s4) var(--s5); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: var(--s3); }

/* ---------- Stats / results ---------- */
.stats { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.stat { position: relative; background: rgba(6, 10, 22, .45); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; overflow: hidden; }
.stat .k { display: block; font: 600 .72rem var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.stat .v { display: block; font-family: var(--font-head); font-weight: 800; font-size: 1.55rem; color: var(--text); letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .s { display: block; font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.stat.hero { background: radial-gradient(140% 120% at 0% 0%, rgba(255, 200, 61, .2), rgba(255, 138, 61, .06) 45%, rgba(6, 10, 22, .5) 80%); border-color: rgba(255, 200, 61, .35); }
.stat.hero::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--grad-sun); }
.stat.hero .v { color: var(--sun); text-shadow: 0 0 24px rgba(255, 176, 32, .35); }
.stat.hero .k, .stat.hero .s { color: var(--text-2); }
.result-panel { border-radius: var(--r-lg); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(22, 33, 63, .75), rgba(15, 23, 48, .75)); padding: var(--s5); box-shadow: var(--shadow); }
.result-panel[aria-busy="true"] { opacity: .6; }
.empty { text-align: center; padding: var(--s7) var(--s4); color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: rgba(6, 10, 22, .35); }
.empty svg { width: 40px; height: 40px; color: var(--muted); margin-bottom: var(--s2); }
.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; min-height: 16px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Chart (SVG) ---------- */
.chart { width: 100%; height: auto; display: block; font-family: var(--font-body); }
.chart .grid-line { stroke: rgba(140, 162, 224, .12); stroke-width: 1; }
.chart .axis-text { fill: var(--muted); font-size: 11px; font-family: var(--font-mono); }
.chart .bar { fill: var(--cyan); }
.chart .bar.alt, .chart .bar.hi { fill: var(--sun); }
.chart .bar.muted { fill: rgba(140, 162, 224, .22); }
.chart .line { fill: none; stroke: var(--text); stroke-width: 2; }
.chart .line.dash { stroke-dasharray: 5 4; stroke: var(--sun); }
.chart .area { fill: rgba(56, 214, 245, .12); }
.chart .zero { stroke: var(--text-2); stroke-width: 1; }
.chart text { fill: var(--muted); }
.legend { display: flex; gap: var(--s4); flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); margin-top: var(--s2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font: 500 var(--fs-xs) var(--font-body); color: var(--muted); padding-top: var(--s4); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: rgba(140, 162, 224, .4); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--cyan); }

/* ---------- Page header ---------- */
.page-head { position: relative; padding-top: var(--s6); padding-bottom: var(--s5); }
.page-head h1 { max-width: 860px; }
.page-head .lead { font-size: var(--fs-lg); color: var(--text-2); max-width: 780px; }
.meta-line { display: flex; gap: var(--s2) var(--s4); flex-wrap: wrap; font: 500 var(--fs-xs) var(--font-mono); color: var(--muted); }
.meta-line span { display: inline-flex; align-items: center; gap: 6px; }
.meta-line > span:not(.tag)::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: var(--text-2); isolation: isolate;
  background: radial-gradient(800px 520px at 78% 18%, rgba(255, 176, 32, .18), transparent 62%), radial-gradient(700px 500px at 8% 90%, rgba(56, 214, 245, .12), transparent 60%), linear-gradient(180deg, #070C1C, var(--bg-0)); border-bottom: 1px solid var(--line); }
.hero .wrap { position: relative; display: grid; gap: var(--s7); padding-top: var(--s8); padding-bottom: var(--s8); align-items: center; }
@media (min-width: 1000px) { .hero .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); padding-top: var(--s9); padding-bottom: var(--s9); } }
.hero h1 { color: var(--text); font-size: var(--fs-3xl); letter-spacing: -0.04em; font-weight: 800; line-height: 1.03; }
.hero h1 em { font-style: normal; background: var(--grad-sun); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: var(--fs-lg); color: var(--text-2); max-width: 560px; }
.hero-points { display: flex; gap: var(--s3) var(--s5); flex-wrap: wrap; margin-top: var(--s5); font-size: var(--fs-sm); color: var(--muted); }
.hero-points span { display: inline-flex; gap: 8px; align-items: center; }
.hero-points svg { width: 18px; height: 18px; color: var(--cyan); }
.hero-orbit { position: absolute; z-index: -1; right: -180px; top: -120px; width: 820px; height: 820px; opacity: .55; pointer-events: none; }
.hero-orbit .o { fill: none; stroke: rgba(140, 162, 224, .16); stroke-width: 1; }
.hero-orbit .o.lit { stroke: rgba(255, 200, 61, .75); stroke-width: 2.4; stroke-linecap: round; }
.hero-orbit line.o { stroke-width: 1.6; stroke-linecap: round; stroke: rgba(255, 200, 61, .22); }
.hero-orbit .spin { transform-origin: 410px 410px; animation: orbit 60s linear infinite; }
.hero-orbit .spin.slow { animation-duration: 120s; animation-direction: reverse; }
@keyframes orbit { to { transform: rotate(360deg); } }
@media (max-width: 999px) { .hero-orbit { right: -380px; top: -260px; opacity: .35; } }
.ticks { display: flex; align-items: flex-end; gap: 4px; height: 28px; margin: var(--s5) 0 0; }
.ticks i { flex: 1; background: rgba(56, 214, 245, .35); border-radius: 2px 2px 0 0; }

/* Live console card on the hero */
.preview { position: relative; background: linear-gradient(180deg, rgba(22, 33, 63, .82), rgba(10, 16, 34, .88)); color: var(--text-2); border-radius: var(--r-xl); box-shadow: var(--shadow-lg), 0 0 0 1px rgba(140, 162, 224, .18); overflow: hidden; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.preview::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 200, 61, .8), rgba(56, 214, 245, .8), transparent); }
.preview-top { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); font: 600 .72rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.preview-top i { width: 9px; height: 9px; border-radius: 50%; background: rgba(140, 162, 224, .3); display: inline-block; }
.preview-top i:first-child { background: var(--green); box-shadow: 0 0 10px var(--green); }
.preview-body { padding: var(--s5); display: grid; gap: var(--s4); }
.preview-roof { background: radial-gradient(120% 100% at 50% 0%, rgba(56, 214, 245, .08), rgba(6, 10, 22, .6)); border-radius: var(--r); border: 1px solid var(--line); }
.preview .stats .v { font-size: 1.25rem; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(61, 220, 151, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(61, 220, 151, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); } }

/* Data-source band under the hero */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.facts > div { background: var(--bg-1); padding: var(--s4) var(--s5); }
.facts .n { display: block; font: 800 1.6rem/1.1 var(--font-head); color: var(--text); letter-spacing: -0.02em; }
.facts .n em { font-style: normal; color: var(--sun); }
.facts .l { display: block; font: 500 var(--fs-xs) var(--font-mono); color: var(--muted); margin-top: 4px; }

/* ---------- Steps / checks ---------- */
.steps { counter-reset: step; display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.step { position: relative; padding: var(--s6) var(--s5) var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg); background: rgba(6, 10, 22, .4); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; top: 16px; left: 24px; font: 700 .8rem var(--font-mono); color: var(--sun); letter-spacing: .1em; }
.step::after { content: ''; position: absolute; top: 25px; left: 56px; right: 24px; height: 1px; background: linear-gradient(90deg, rgba(255, 200, 61, .5), transparent); }
.step h3 { font-size: var(--fs-md); margin-top: var(--s2); }
.step p { color: var(--muted); margin: 0; font-size: var(--fs-sm); }
.checks { list-style: none; padding: 0; margin: 0 0 var(--s5); display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before { content: ''; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(56, 214, 245, .1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2338D6F5' stroke-width='2.4'%3E%3Cpath d='m5.5 10.5 3 3 6-7'/%3E%3C/svg%3E") center/14px no-repeat; border: 1px solid rgba(56, 214, 245, .3); }

/* ---------- Tool cards / lists ---------- */
.tool-list { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.tool-item { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: inherit; background: rgba(15, 23, 48, .55); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease), background .2s; }
.tool-item:hover { border-color: rgba(56, 214, 245, .45); box-shadow: var(--glow-cyan); color: inherit; transform: translateY(-2px); background: rgba(22, 33, 63, .75); }
.tool-item .icon { flex: none; width: 40px; height: 40px; border-radius: 11px; background: radial-gradient(circle at 30% 25%, rgba(255, 200, 61, .28), rgba(255, 138, 61, .06)); color: var(--sun); display: grid; place-items: center; border: 1px solid rgba(255, 200, 61, .25); }
.tool-item .icon svg { width: 20px; height: 20px; }
.tool-item strong { display: block; color: var(--text); font-size: var(--fs-sm); }
.tool-item span { display: block; color: var(--muted); font-size: var(--fs-xs); line-height: 1.45; margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; color: var(--text-2); font-size: var(--fs-sm); font-weight: 550; background: rgba(15, 23, 48, .6); transition: border-color .15s, color .15s, box-shadow .2s; }
.chip:hover { border-color: rgba(255, 200, 61, .5); color: var(--text); box-shadow: 0 0 20px -6px rgba(255, 176, 32, .5); }
.chip svg { color: var(--sun); }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-weight: 650; position: relative; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 6px; top: 24px; width: 9px; height: 9px; border-right: 2px solid var(--sun); border-bottom: 2px solid var(--sun); transform: rotate(45deg); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg); top: 28px; }
.faq details > div { padding: 0 0 18px; color: var(--text-2); }

/* ---------- Article / prose ---------- */
.prose { max-width: 740px; font-size: 1.075rem; color: var(--text-2); }
.prose h2 { margin-top: var(--s7); }
.prose h3 { margin-top: var(--s6); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 var(--s4); }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--cyan); }
.prose blockquote { margin: var(--s5) 0; padding: var(--s3) var(--s5); border-left: 3px solid var(--sun); background: rgba(255, 200, 61, .05); border-radius: 0 var(--r) var(--r) 0; }
.prose .table-wrap { margin: var(--s5) 0; }
.formula { font-family: var(--font-mono); background: #03060F; color: var(--cyan-2); padding: 14px 18px; border-radius: var(--r); border: 1px solid rgba(56, 214, 245, .2); font-size: .92rem; overflow-x: auto; white-space: pre-wrap; margin: 0 0 var(--s4); box-shadow: inset 0 0 30px rgba(56, 214, 245, .05); }
.refs { font-size: var(--fs-sm); color: var(--text-2); }
.refs li { margin-bottom: 8px; word-break: break-word; }
.toc { border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4) var(--s5); background: rgba(15, 23, 48, .55); font-size: var(--fs-sm); }
.toc ol { margin: 0; padding-left: 1.2em; }
.aside-sticky { position: sticky; top: 86px; }

/* ---------- Ads (only rendered once AdSense is configured) ---------- */
.ad-slot { margin: var(--s6) auto; padding-top: 6px; border-top: 1px solid var(--line); }
.ad-slot .ad-box { min-height: 280px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ad-slot .ad-box > ins { width: 100%; }
@media (min-width: 768px) { .ad-slot .ad-box { min-height: 250px; } }
/* Live slots stay hidden until advertising is accepted; hidden again if the ad script is blocked or Google has no ad. */
.ad-live { display: none; }
html.ads-on .ad-live { display: block; }
html.ads-blocked .ad-live, .ad-live:has(ins[data-ad-status="unfilled"]) { display: none; }
.ad-preview .ad-box { border: 1px dashed var(--line-2); border-radius: var(--r-md, 10px); background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(255,255,255,.02) 10px 20px); text-align: center; }
.ad-preview .ad-box p { margin: 0; font: 500 13px var(--font-mono); color: var(--muted); }
.ad-preview .ad-box span { font-size: 12px; }
.ad-label { display: block; font: 500 11px var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: linear-gradient(180deg, var(--bg-1), #03060F); color: var(--muted); padding: var(--s8) 0 var(--s6); font-size: var(--fs-sm); margin-top: var(--s8); border-top: 1px solid var(--line); overflow: hidden; }
.site-footer::before { content: ''; position: absolute; left: 50%; top: -1px; width: min(900px, 90%); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(255, 200, 61, .6), rgba(56, 214, 245, .6), transparent); }
.site-footer h4 { color: var(--text); font: 600 .75rem var(--font-mono); text-transform: uppercase; letter-spacing: .12em; margin-bottom: var(--s3); }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--sun); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-grid { display: grid; gap: var(--s6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.foot-brand { grid-column: 1 / -1; max-width: 380px; }
@media (min-width: 1000px) { .foot-grid { grid-template-columns: 1.6fr repeat(4, 1fr); } .foot-brand { grid-column: auto; } }
.foot-bottom { border-top: 1px solid var(--line); margin-top: var(--s7); padding-top: var(--s5); display: flex; gap: var(--s4); flex-wrap: wrap; justify-content: space-between; align-items: center; font-size: var(--fs-xs); color: var(--muted); }
.main-after-hero { margin-top: 0; }

/* ---------- Consent banner ---------- */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 80; max-width: 580px; margin: 0 auto; background: rgba(15, 23, 48, .96); color: var(--text-2); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: var(--s5); font-size: var(--fs-sm); backdrop-filter: blur(12px); }
.consent[hidden] { display: none; }
.consent p { margin-bottom: var(--s3); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #020409; color: var(--text); border: 1px solid var(--line-2); padding: 12px 18px; border-radius: 12px; font-size: var(--fs-sm); opacity: 0; transition: opacity .2s, transform .2s var(--ease); z-index: 90; max-width: calc(100% - 32px); pointer-events: none; box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Calculator page ---------- */
.calc-layout { display: grid; gap: var(--s5); align-items: start; }
@media (min-width: 960px) { .calc-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } .calc-layout .result-col { position: sticky; top: 86px; } }
.calc-form .card { padding: var(--s5); }
.mode-switch { margin-bottom: var(--s4); }
.related { margin-top: var(--s7); }

/* ---------- Planner ---------- */
.planner { display: grid; gap: 0; }
@media (min-width: 1000px) { .planner { grid-template-columns: 410px minmax(0, 1fr); height: calc(100vh - 66px); min-height: 640px; } }
.planner-side { background: var(--bg-1); border-right: 1px solid var(--line); overflow-y: auto; padding: var(--s4); order: 2; scrollbar-color: var(--bg-4) transparent; }
.planner-map { position: relative; z-index: 0; isolation: isolate; min-height: 62vh; order: 1; background: #03060F; }
@media (min-width: 1000px) { .planner-side { order: 1; } .planner-map { order: 2; min-height: 0; } }
#map { position: absolute; inset: 0; }
.map-tools { position: absolute; left: 12px; right: 60px; top: 12px; z-index: 500; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.map-tools > * { pointer-events: auto; }
.map-tools .btn:not(.primary) { --bg: rgba(10, 16, 34, .85); backdrop-filter: blur(8px); box-shadow: var(--shadow); }
.map-hint { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 500; background: rgba(2, 4, 9, .9); color: var(--text); border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 12px; font-size: var(--fs-sm); max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); }
.map-hint[hidden] { display: none; }
.pstep { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4); margin-bottom: var(--s3); background: rgba(15, 23, 48, .6); }
.pstep > h2 { font-size: var(--fs-md); display: flex; gap: 10px; align-items: center; margin-bottom: var(--s3); }
.pstep > h2 .n { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-3); color: var(--text); border: 1px solid var(--line-2); display: grid; place-items: center; font: 700 12px var(--font-mono); flex: none; }
.pstep.done > h2 .n { background: var(--grad-sun); color: var(--on-sun); border-color: transparent; }
.face { border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3); margin-top: var(--s3); background: rgba(6, 10, 22, .5); }
.face.selected { border-color: rgba(56, 214, 245, .6); background: rgba(56, 214, 245, .05); box-shadow: var(--focus); }
.face-head { display: flex; gap: 8px; align-items: center; }
.face-head .input { min-height: 38px; font-weight: 650; }
.leaflet-container { font-family: var(--font-body); background: #03060F !important; }
.leaflet-container a.btn { color: inherit; }
.leaflet-bar a, .leaflet-control-layers { background: rgba(10, 16, 34, .92) !important; color: var(--text) !important; border-color: var(--line-2) !important; }
.leaflet-bar { border: 1px solid var(--line-2) !important; box-shadow: var(--shadow) !important; }
.leaflet-bar a:hover { background: var(--bg-4) !important; }
.leaflet-control-layers-expanded { color: var(--text-2) !important; padding: 8px 12px !important; }
.leaflet-control-attribution { background: rgba(2, 4, 9, .75) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--cyan) !important; }
.leaflet-control-scale-line { background: rgba(2, 4, 9, .7) !important; color: var(--text-2) !important; border-color: var(--text-2) !important; }
.leaflet-tooltip { background: #020409; color: var(--text); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.results-dash { padding-top: var(--s6); padding-bottom: var(--s6); } /* keeps the .wrap side gutter on phones */

/* ---------- Checker ---------- */
.health { display: flex; gap: var(--s4); align-items: center; }
.health .ring { width: 90px; height: 90px; flex: none; filter: drop-shadow(0 0 10px rgba(56, 214, 245, .25)); }
.status-good { color: var(--green); } .status-watch { color: var(--amber); } .status-low { color: var(--red); } .status-insufficient { color: var(--muted); }

/* ---------- Report (print) ---------- */
.report { max-width: 900px; margin: 0 auto; padding: var(--s6) var(--s4); }
.report header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--sun); padding-bottom: var(--s3); margin-bottom: var(--s5); }
.print-brand, .print-report { display: none; }

/* ---------- Products ---------- */
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.spec-grid > div { background: rgba(6, 10, 22, .7); padding: 10px 12px; }
.spec-grid .k { display: block; font: 500 .7rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.spec-grid .v { display: block; color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }

/* Inline icon sizes inside small components */
.chip svg, .tag svg, .label svg, .meta-line svg, .tool-item strong svg { width: 16px; height: 16px; flex: none; }
.field > label svg { width: 16px; height: 16px; }
.empty > svg { display: block; margin: 0 auto 8px; }
.alert svg { width: 20px; height: 20px; flex: none; }

/* Off-grid designer load table */
.input.sm { min-height: 36px; padding: 6px 10px; font-size: var(--fs-sm); }
.ds-loads td { padding-top: 6px; padding-bottom: 6px; vertical-align: middle; }
.ds-loads td:first-child { min-width: 150px; }
.ds-loads td.num .input { width: 88px; text-align: right; margin-left: auto; }
.ds-loads input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--sun); }
@media (max-width: 640px) {
  .ds-loads thead { display: none; }
  .ds-loads, .ds-loads tbody, .ds-loads tr, .ds-loads td { display: block; width: 100%; }
  .ds-loads tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px; border-bottom: 1px solid var(--line); }
  .ds-loads td, .ds-loads td.num { padding: 0; border: 0; text-align: left; }
  .ds-loads td:first-child { grid-column: 1 / -1; min-width: 0; }
  .ds-loads td[data-label]::before { content: attr(data-label); display: block; font-size: var(--fs-xs); color: var(--muted); margin-bottom: 2px; }
  .ds-loads td.num .input { width: 100%; text-align: left; margin: 0; }
  .ds-loads td:last-child { align-self: end; }
}

/* Reveal-on-scroll (added by site.js only when motion is allowed) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Print: always light, ink-friendly ---------- */
@media print {
  :root { --text: #0A1022; --text-2: #222b45; --muted: #4a5470; --line: #d5dae6; --line-2: #c3cad9; --bg-0: #fff; --bg-1: #fff; --bg-2: #fff; --bg-3: #f3f5fa; --sun: #8a5a00; --cyan: #075e75; color-scheme: light; }
  html, body { background: #fff !important; color: #222b45; }
  body::before, .cells, .hero-orbit { display: none !important; }
  .site-header, .site-footer, .consent, .ad-slot, .no-print, .crumbs, .map-tools, .toast, .lang-review { display: none !important; }
  @page { size: A4; margin: 14mm 12mm 18mm; }
  .print-report { display: block !important; margin: 0 0 14pt; font-size: 9.5pt; color: #222b45; }
  .print-brand { display: flex !important; align-items: center; gap: 10px; }
  .pr-top { display: flex; align-items: center; justify-content: space-between; gap: 12pt; border-bottom: 2px solid #FFB020; padding-bottom: 6pt; }
  .pr-tag { font: 600 9pt var(--font-body); color: #4a5470; }
  .pr-meta { display: flex; flex-wrap: wrap; gap: 4pt 14pt; align-items: baseline; padding: 6pt 0; border-bottom: 1px solid #d5dae6; }
  .pr-meta strong { font: 800 13pt var(--font-head); color: #0A1022; margin-right: auto; }
  .pr-meta span { color: #4a5470; }
  .print-report h2 { font: 700 10pt var(--font-body); margin: 8pt 0 4pt; color: #0A1022; }
  .pr-inputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3pt 14pt; margin: 0; }
  .pr-inputs div { break-inside: avoid; } .pr-inputs dt { color: #4a5470; font-size: 8pt; } .pr-inputs dd { margin: 0; font-weight: 650; color: #0A1022; }
  .pr-src { margin: 6pt 0 0; font-size: 8.5pt; color: #4a5470; }
  .pr-hide { display: none !important; }
  body.pr-report form, body.pr-report .btn, body.pr-report .btn-row, body.pr-report [data-result-actions] { display: none !important; }
  body.pr-report .grid { display: block !important; } body.pr-report .grid > * + * { margin-top: 10pt; }
  body.pr-report .pr-hide { display: none !important; }
  body.pr-report .card, body.pr-report .result-panel { break-inside: auto !important; }
  body.pr-report .card:has(svg.chart):not(:has(table)) { break-inside: avoid !important; } body.pr-report h2, body.pr-report h3 { break-after: avoid; }
  main > .page-head, main .page-head { padding-top: 0 !important; }
  body { font-size: 11pt; }
  .card, .result-panel, .stat, .preview, .tool-item, .feature, .step, .table-wrap, .face, .pstep { box-shadow: none !important; background: #fff !important; border-color: #d5dae6 !important; break-inside: avoid; }
  .card::before { display: none; }
  .stat.hero .v { color: #0A1022; text-shadow: none; }
  .section { padding: 12pt 0; }
  a { color: inherit; text-decoration: none; }
  .planner { display: block; height: auto; }
  .planner-map { display: none; }
  .chart .bar { fill: #075e75; } .chart .bar.muted { fill: #c3cad9; }
}
.print-brand .mark { width: 30px; height: 30px; } .print-brand .word { height: 18px; color: #0A1022; } .print-brand .word .k { fill: #D97706; }
.page-head::before { content: ''; position: absolute; z-index: -1; left: 50%; top: -80px; width: 100vw; height: 360px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(600px 260px at 75% 10%, rgba(255, 176, 32, .1), transparent 70%), linear-gradient(rgba(140, 162, 224, .05) 1px, transparent 1px) 0 0 / 28px 42px, linear-gradient(90deg, rgba(140, 162, 224, .05) 1px, transparent 1px) 0 0 / 28px 42px;
  mask-image: linear-gradient(180deg, #000, transparent); -webkit-mask-image: linear-gradient(180deg, #000, transparent); }
.page-head { isolation: isolate; }
.nav a.btn.primary, .nav a.btn.primary:hover, .mobile-nav a.btn.primary { color: var(--on-sun); background: var(--grad-sun); }

/* Planner: handle for moving a single panel */
.move-handle{display:block;width:22px;height:22px;margin:-11px 0 0 -11px;border-radius:50%;background:var(--sun);border:3px solid var(--bg-1);box-shadow:0 0 0 2px var(--sun),0 4px 14px rgba(0,0,0,.5);cursor:grab}
.move-handle:active{cursor:grabbing}
/* Planner: layout comparison */
#pl-compare-table .good { color: var(--green); font-weight: 650; }
#pl-compare-table .bad { color: var(--red); font-weight: 650; }
#pl-compare-table td.num .tag { margin-left: 6px; }

/* Product comparison */
.compare-heads { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compare-heads.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.compare-head { padding: 14px; }
.compare-head .outline { margin: 4px 0 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 160px; justify-content: flex-end; }
.compare-wrap { margin-top: 10px; }
.compare-table th[scope=row] { text-align: left; font-weight: 600; min-width: 150px; }
.compare-table td { min-width: 120px; }
.compare-table tr.group th { background: var(--bg-3); color: var(--muted); font-family: var(--font-mono, ui-monospace, monospace); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.compare-table th[scope=row], .compare-table thead th:first-child { position: sticky; left: 0; background: var(--bg-2); z-index: 1; }
.compare-table td.best { color: var(--text); font-weight: 700; }
.compare-table .tag { margin-left: 4px; }
.bad-text { color: var(--red); }
@media (max-width: 640px) {
  .compare-heads, .compare-heads.cols-3 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .compare-head .outline { min-height: 0; }
  .compare-table th[scope=row] { min-width: 120px; max-width: 140px; white-space: normal; }
  .compare-table td { min-width: 110px; }
}
.compare-head { overflow-wrap: anywhere; }
.compare-table th[scope=row] { text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-size: .88rem; color: var(--text-2); }
.compare-table th[scope=row] .dir { display: block; font-size: .72rem; font-weight: 500; color: var(--muted); margin-top: 2px; }
@media (max-width: 640px) {
  .compare-table { font-size: .85rem; }
  .compare-table th[scope=row] { min-width: 104px; max-width: 120px; font-size: .8rem; }
  .compare-table td, .compare-table thead th { min-width: 96px; padding-left: 8px; padding-right: 8px; }
}
.compare-table thead th { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  #cmp-table { table-layout: fixed; }
  #cmp-table th[scope=row], #cmp-table thead th:first-child { width: 112px; min-width: 0; max-width: none; }
  #cmp-table td, #cmp-table thead th { min-width: 0; overflow-wrap: anywhere; }
  #cmp-table.cols-3 { min-width: 430px; }
}
