/* Theme tokens (engivpn title page): dark by default, light ("day") from the system or the switch. */
:root {
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --display:'Unbounded',system-ui,sans-serif;
  --body:'Manrope',system-ui,sans-serif;
  --lab:'Unbounded',system-ui,sans-serif;
  --lab-case:uppercase;
  --lab-ls:.14em;
  --r:28px;
  --r2:14px;
  --pill:999px;
  --ease:cubic-bezier(.2,.7,.2,1);
  --bg:#15110B;
  --night:#0A0704;
  --surface:#211B12;
  --surface-2:#2B2318;
  --line:#3A2F20;
  --line-2:#4A3D2A;
  --card-line:transparent;
  --text:#FFF4E2;
  --text-2:#D9CBB4;
  --muted:#B8A88E;
  --accent:#FF8F1F;
  --accent-hover:#FFA03F;
  --accent-ink:#FF9F40;
  --accent-text:#15110B;
  --accent-soft:#3A2814;
  --yellow:#FFD23F;
  --yellow-ink:#FFD23F;
  --amber:#FFB020;
  --coral:#FF5E3A;
  --ok:#B9E07A;
  --warn:#FFB020;
  --danger:#FF7A5C;
  --focus:#FFD23F;
  color-scheme:dark;
}
:root[data-theme="light"] {
  --bg:#FBF4E8;
  --night:#F3E7D3;
  --surface:#FFFDF8;
  --surface-2:#F6ECDC;
  --line:#E6D6BC;
  --line-2:#D6C09C;
  --card-line:#EADBC2;
  --text:#1E160C;
  --text-2:#3D2F1D;
  --muted:#6B5A41;
  --accent:#FF8F1F;
  --accent-hover:#FF9F40;
  --accent-ink:#A84A00;
  --accent-text:#1E160C;
  --accent-soft:#FFE6CC;
  --yellow:#FFD23F;
  --yellow-ink:#8A6200;
  --amber:#FFB020;
  --coral:#FF5E3A;
  --ok:#3F7A1C;
  --warn:#9A5800;
  --danger:#B8321A;
  --focus:#A84A00;
  color-scheme:light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:#FBF4E8;
    --night:#F3E7D3;
    --surface:#FFFDF8;
    --surface-2:#F6ECDC;
    --line:#E6D6BC;
    --line-2:#D6C09C;
    --card-line:#EADBC2;
    --text:#1E160C;
    --text-2:#3D2F1D;
    --muted:#6B5A41;
    --accent:#FF8F1F;
    --accent-hover:#FF9F40;
    --accent-ink:#A84A00;
    --accent-text:#1E160C;
    --accent-soft:#FFE6CC;
    --yellow:#FFD23F;
    --yellow-ink:#8A6200;
    --amber:#FFB020;
    --coral:#FF5E3A;
    --ok:#3F7A1C;
    --warn:#9A5800;
    --danger:#B8321A;
    --focus:#A84A00;
    color-scheme:light;
  }
}

/* ---------- components (from the design mockups) ---------- */

body { margin:0; min-height:100vh; background:var(--bg); color:var(--text); font:15px/1.55 var(--body); -webkit-font-smoothing:antialiased; }
a { color:var(--accent-ink); text-decoration:none; }
a:hover { text-decoration:underline; text-underline-offset:3px; }
:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.side { flex:1 1 240px; max-width:100%; background:var(--night); border-right:1px solid var(--line); display:flex; flex-direction:column; }
.brand { display:flex; align-items:center; gap:10px; padding:22px; font:700 20px/1 var(--display); color:var(--text)!important; text-decoration:none!important; }
.brand b { color:var(--accent-ink); font-weight:700; }
.nav { display:flex; flex-direction:column; gap:4px; padding:6px 14px; flex:1; }
.nav-t { padding:18px 12px 8px; font:500 11px/1.2 var(--display); text-transform:uppercase; letter-spacing:.16em; color:var(--muted); }
.nav-a { display:flex; align-items:center; gap:12px; min-height:44px; padding:0 16px; border-radius:var(--pill); color:var(--text-2)!important; font-weight:600; text-decoration:none!important; transition:background .2s; }
.nav-a:hover { background:var(--surface); }
.nav-a.on { background:var(--accent); color:var(--accent-text)!important; }
.nav-n { font:500 11px/1 var(--display); letter-spacing:.06em; opacity:.6; }
.who { padding:18px 22px; border-top:1px solid var(--line); display:flex; flex-direction:column; align-items:flex-start; gap:12px; font-size:13px; color:var(--muted); }
.who-row { display:flex; flex-wrap:wrap; gap:8px; }
.main { flex:999 1 560px; min-width:0; max-width:1140px; padding:44px clamp(16px,4vw,56px) 64px; display:flex; flex-direction:column; gap:28px; box-sizing:border-box; }
.ph { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:16px; }
.ph h1 { margin:0; font:600 clamp(28px,3vw,40px)/1.1 var(--display); letter-spacing:-.02em; }
.ph p { margin:8px 0 0; color:var(--muted); font-size:16px; }
.card { position:relative; background:var(--surface); border:1px solid var(--card-line); border-radius:var(--r); padding:28px; display:flex; flex-direction:column; gap:18px; min-width:0; overflow:hidden; }
.ray::before { content:""; position:absolute; top:0; left:0; right:0; height:4px; background:var(--c,var(--accent)); }
.card-h { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
.card h2,.lab { margin:0; font:500 12px/1.3 var(--lab); text-transform:var(--lab-case); letter-spacing:var(--lab-ls); color:var(--muted); }
.lab { font-size:11px; }
.num { font:600 30px/1.1 var(--display); letter-spacing:-.01em; }
.big { font:600 88px/.95 var(--display); letter-spacing:-.03em; }
.sub { font-size:13px; color:var(--muted); }
.muted { color:var(--muted); }
.mono { font-family:var(--mono); }
.grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr)); gap:16px; }
.g2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(400px,100%),1fr)); gap:24px; align-items:start; }
.stat { position:relative; padding:20px; border-radius:var(--r2); background:var(--surface-2); display:flex; flex-direction:column; gap:6px; min-width:0; overflow:hidden; }
.row { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.between { justify-content:space-between; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:48px; padding:0 24px; box-sizing:border-box; font:700 15px/1 var(--body); color:var(--accent-text)!important; background:var(--accent); border:1.5px solid var(--accent); border-radius:var(--pill); text-decoration:none!important; cursor:pointer; white-space:nowrap; transition:transform .2s var(--ease),background .2s,border-color .2s; }
.btn:hover { transform:translateY(-2px); background:var(--accent-hover); }
.btn.sec { background:transparent; color:var(--text)!important; border-color:var(--line-2); }
.btn.sec:hover { border-color:var(--accent); background:transparent; }
.btn.sm { min-height:38px; padding:0 16px; font-size:13px; }
.btn.dng { background:transparent; color:var(--danger)!important; border-color:var(--danger); }
.btn:disabled { background:transparent; border-color:var(--line); color:var(--muted)!important; cursor:default; transform:none; }
.badge { display:inline-flex; align-items:center; gap:8px; padding:6px 12px; border-radius:var(--pill); border:1px solid var(--line-2); font:700 11px/1 var(--body); letter-spacing:.12em; text-transform:uppercase; white-space:nowrap; }
.badge::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
.b-ok { color:var(--ok); }
.b-warn { color:var(--warn); }
.b-dng { color:var(--danger); }
.b-n { color:var(--muted); }
.b-ok::before { animation:blink 2.4s infinite; }
@keyframes blink { 50%{opacity:.25} }
@media (prefers-reduced-motion:reduce) { .b-ok::before{animation:none}.btn,.btn:hover{transition:none;transform:none} }
.alert { padding:16px 20px; border-radius:var(--r2); display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; border:1px solid currentColor; background:transparent; }
.a-ok { color:var(--ok); }
.a-warn { color:var(--warn); }
.a-dng { color:var(--danger); }
.a-n { color:var(--text-2); border-color:var(--line-2); }
.field { display:flex; flex-direction:column; gap:8px; min-width:0; }
.field label { font-size:13px; font-weight:600; color:var(--text-2); }
.hint { font-size:12px; color:var(--muted); }
.inp, input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { width:100%; min-width:0; min-height:48px; padding:0 16px; box-sizing:border-box; font:inherit; color:var(--text); background:var(--surface-2); border:1.5px solid var(--line); border-radius:var(--r2); }
.inp:focus, input:focus, select:focus, textarea:focus { border-color:var(--accent); outline:none; }
textarea.inp, textarea { min-height:120px; padding:14px 16px; resize:vertical; }
.tw { overflow-x:auto; border-radius:var(--r); background:var(--surface); border:1px solid var(--card-line); }
.t { width:100%; border-collapse:collapse; font-size:14px; }
.t th { padding:16px 18px; text-align:left; font:500 11px/1.3 var(--display); text-transform:uppercase; letter-spacing:.12em; color:var(--muted); border-bottom:1px solid var(--line); white-space:nowrap; }
.t td { padding:14px 18px; border-bottom:1px solid var(--line); white-space:nowrap; vertical-align:middle; }
.t tr:last-child td { border-bottom:0; }
.t tbody tr:hover td { background:var(--surface-2); }
.t .r { text-align:right; font-variant-numeric:tabular-nums; }
.img { display:flex; align-items:center; justify-content:center; aspect-ratio:16/9; width:100%; box-sizing:border-box; border-radius:var(--r2); background:repeating-linear-gradient(135deg,var(--surface-2) 0 10px,var(--surface) 10px 20px); color:var(--muted); font:12px/1.3 var(--mono); text-align:center; padding:8px; overflow:hidden; }
.ncard { display:flex; flex-direction:column; gap:12px; color:var(--text)!important; text-decoration:none!important; min-width:0; }
.ncard h3 { margin:0; font:600 18px/1.3 var(--display); letter-spacing:-.01em; transition:color .2s; }
.ncard:hover h3 { color:var(--accent-ink); }
.ncard p { margin:0; color:var(--muted); }
.meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px 14px; font-size:13px; color:var(--muted); }
.tag { display:inline-flex; align-items:center; font:500 11px/1.4 var(--display); text-transform:uppercase; letter-spacing:.14em; color:var(--yellow-ink); }
.prose { font-size:17px; line-height:1.7; max-width:680px; }
.prose p { margin:0 0 18px; }
.prose h2 { font:600 22px/1.3 var(--display); margin:32px 0 12px; text-transform:none; letter-spacing:-.01em; color:var(--text); }
.prose figure { margin:28px 0; }
.prose figcaption { margin-top:8px; font-size:13px; color:var(--muted); }
.drop { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-height:160px; padding:20px; border:2px dashed var(--line-2); border-radius:var(--r); text-align:center; color:var(--muted); }
.news { display:flex; flex-direction:column; gap:6px; padding:18px 0; border-top:1px solid var(--line); }
.news h3 { margin:0; font:600 18px/1.3 var(--display); }
.news p { margin:0; }
.sun-gap { fill:var(--surface); }
.gap-night { fill:var(--night); }
.horizon { fill:var(--line-2); }
.clock { font:600 34px/1 var(--display); font-variant-numeric:tabular-nums; }
.tier { position:relative; background:var(--surface); border:1px solid var(--card-line); border-radius:var(--r); padding:28px; display:flex; flex-direction:column; gap:8px; min-width:0; }
.tier .name { font:500 13px/1.3 var(--display); letter-spacing:.16em; color:var(--muted); }
.tier .term { font-size:18px; font-weight:600; color:var(--text-2); }
.tier .price { font:600 40px/1.1 var(--display); letter-spacing:-.02em; }
.tier .per { font-size:15px; color:var(--muted); }
.tier.zenith { background:var(--accent); border-color:var(--accent); color:#15110B; }
.tier.zenith .name,.tier.zenith .term,.tier.zenith .per,.tier.zenith s { color:#15110B; }
.tier.zenith .btn { background:#15110B; border-color:#15110B; color:#FFF4E2!important; }
.pill { padding:5px 12px; border-radius:999px; background:#15110B; color:#FFD23F; font:700 12px/1.2 var(--body); letter-spacing:0; }

/* ---------- product layer: shell, mobile, utilities (inline styles are forbidden by CSP) ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden], .hidden { display: none !important; }
h1, h2, h3, p { margin: 0; }

.shell { display: flex; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; flex: 0 0 240px; width: 240px; overflow-y: auto; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.side-head .brand { border-bottom: 0; }
.menu-btn { display: none; }
.main { flex: 1 1 auto; }
.who-email { overflow-wrap: anywhere; color: var(--muted) !important; }
.who-email:hover { color: var(--text) !important; }
body.guest .side { display: none; }
body.guest .main { max-width: none; padding: 0; }

/* Auth pages: a card on the night sky with the sun on the horizon. */
.auth { flex: 1 1 100%; min-height: 100vh; display: flex; flex-direction: column; align-items: center; background: var(--night); overflow: hidden; }
.auth-box { flex: 1; width: 100%; max-width: 420px; padding: 56px 16px 0; display: flex; flex-direction: column; gap: 28px; }
.auth-box.wide { max-width: 440px; }
.auth-box .brand { justify-content: center; padding: 0; font-size: 24px; }
.auth-card { padding: 36px 32px; gap: 20px; }
.auth-title { margin: 0; font: 600 30px/1.15 var(--display); letter-spacing: -.02em; }
.auth-sub { margin: 8px 0 0; }
.auth-card .btn[type=submit] { min-height: 56px; font-size: 16px; }
.auth-sun { width: 100%; max-width: 1200px; height: auto; margin-top: 40px; display: block; }
.center { text-align: center; justify-content: center; }

/* Utilities */
.btn.wide, .w100 { width: 100%; }
.m0 { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack-s { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stack-l { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.gap-s { gap: 6px; }
.end { align-items: flex-end; }
.base { align-items: baseline; }
.nowrap { flex-wrap: nowrap; white-space: nowrap; }
.self-start { align-self: flex-start; }
.grow { flex: 1 1 200px; min-width: 0; }
.grow-l { flex: 1 1 320px; min-width: 0; }
.cell-num { width: 96px; text-align: right; }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.accent { color: var(--accent-ink); }
.danger-text { color: var(--danger); }
.ok-text { color: var(--ok); }
.form-error { color: var(--danger); font-size: 13px; }
.form-error:empty { display: none; }
.empty { margin: 0; color: var(--muted); }
.sep { flex: 0 0 1px; align-self: stretch; background: var(--line); }
.code { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent-ink); }
input.num, .num-inp { width: 96px; }
.link { display: inline-flex; align-items: center; min-height: 28px; padding: 0; border: 0; background: none; font: inherit; color: var(--accent-ink); cursor: pointer; }
.link:hover { color: var(--text); }
.link.dng { color: var(--danger); }
.link:disabled { color: var(--muted); cursor: default; }
.g-form { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); align-items: end; }
.g-cards { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 24px; }
.kv { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .card-h { padding: 20px 24px 0; }
.card-flush > .tw { border: 0; border-radius: 0; }
.card-flush > .empty { padding: 0 24px 20px; }
.big-s { font-size: 36px; }
progress.bar { display: block; width: 100%; height: 8px; appearance: none; -webkit-appearance: none; border: 0; border-radius: var(--pill); background: var(--surface-2); overflow: hidden; color: var(--accent); }
progress.bar::-webkit-progress-bar { background: var(--surface-2); }
progress.bar::-webkit-progress-value { background: var(--accent); }
progress.bar::-moz-progress-bar { background: var(--accent); }
img.img { display: block; padding: 0; object-fit: cover; background: var(--surface-2); }
.qr { flex: 0 0 auto; width: 168px; height: 168px; border-radius: var(--r2); background: #fff; border: 1px solid var(--line); padding: 7px; }
.qr img { display: block; width: 100%; height: 100%; }

/* Cabinet pages */
.lead-s { font-size: 17px; }
.num-s { font-size: 20px; }
.g-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-plans { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 20px; }
.g-sections { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.g-wide { grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); }
.card-accent { border-color: var(--accent); }
.push { margin-top: auto; }
.qr-row { gap: 24px; align-items: center; }
.steps { flex: 1 1 200px; margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.url-inp { flex: 1 1 240px; width: auto; font-size: 13px; }
.code-cell { font-size: 14px; letter-spacing: .06em; }
.ref-link { font-size: 14px; word-break: break-all; }
.hero { padding: 36px clamp(20px, 4vw, 40px); gap: 18px; background: var(--accent-soft); border-color: transparent; }
.hero-title { margin: 0; font: 600 34px/1.15 var(--display); }
.narrow { max-width: 560px; }
.inp-hero { background: var(--surface) !important; min-height: 52px !important; font-size: 16px !important; }
.card-link { text-decoration: none; color: var(--text) !important; gap: 6px; }
.card-link:hover { border-color: var(--accent); }
.card-link-title { font: 600 18px/1.3 var(--display); }
.faq-list { display: flex; flex-direction: column; }
.faq { padding: 16px 0; border-bottom: 1px solid var(--line); }
.faq:last-of-type { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; min-height: 28px; }
.faq p { margin: 10px 0 0; }
.drop-s { min-height: 96px; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

/* v2: subscription hero with the sun, tiles, clock steps, tariff tiers */
.sub-hero { padding: 0; gap: 0; }
.sub-hero-row { align-items: stretch; gap: 0; }
.sub-hero-text { flex: 1 1 340px; padding: 36px; display: flex; flex-direction: column; gap: 14px; justify-content: center; min-width: 0; }
.sub-sun { flex: 1 1 360px; display: flex; align-items: flex-end; background: var(--night); min-height: 240px; }
.sub-sun svg { width: 100%; height: auto; display: block; }
.big-unit { font: 600 22px/1.2 var(--display); }
.gap-m { gap: 14px; }
.mt8 { margin-top: 8px; }
.g-tiles { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.tile { padding: 24px; gap: 8px; }
.c-yellow { --c: #FFD23F; } .c-amber { --c: #FFB020; } .c-accent { --c: #FF8F1F; }
.steps3 { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 24px; border-top: 1px solid var(--line); padding-top: 22px; }
.step3 { display: flex; flex-direction: column; gap: 8px; }
.step3 b { font-weight: 700; font-size: 17px; }
.clk-1 { color: #8A6A3D; } .clk-2 { color: #FFB020; } .clk-3 { color: #FF8F1F; }
.connect-row { gap: 28px; align-items: center; border-top: 1px solid var(--line); padding-top: 24px; }
.qr { background: #FFF4E2; border: 0; }
.tier-btn { margin-top: 32px; min-height: 56px; }
.tier .btn.sec { border-color: var(--accent); color: var(--accent-ink) !important; }
.tier .name-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.tier.zenith .term { font-weight: 700; }
.tier.zenith .per { font-weight: 600; }
.tier-props { margin-top: 4px; }
.tier.zenith .sub { color: #15110B; opacity: .8; }
.tier.zenith .btn:disabled { color: #15110B !important; border-color: #15110B; opacity: .5; }
.includes { gap: 12px 32px; font-size: 15px; }
.check-mark { color: var(--yellow-ink); }
.tier { transition: transform .3s var(--ease); }
.tier:hover { transform: translateY(-4px); }

/* Admin pages */
.span2 { grid-column: span 2; }
.form-actions { grid-column: 1 / -1; }
.grow-s { flex: 1 1 140px; min-width: 0; }
.filters .field { flex: 0 1 220px; }
.filters-wide { gap: 14px; }
.card-tight { padding: 18px 24px; }
.g-stats { grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); }
.g-panel { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.stat-accent { border: 1px solid var(--accent-ink); }
.stat-accent .num { color: var(--accent-ink); }
.addr { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.t input:not([type=checkbox]) { min-height: 36px; }
.t .r input { text-align: right; }
.w-name { min-width: 160px !important; }
.w-xs { width: 64px !important; }
.w-s { width: 80px !important; }
.w-m { width: 96px !important; }
input.box { width: 18px; height: 18px; accent-color: var(--accent-ink); }

/* News */
.g-news { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 32px 24px; }
.img-r { border-radius: var(--r); }
.stack-m { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.nhero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 28px; align-items: center; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.nhero .nhero-title { font-size: 34px; line-height: 1.15; }
.nhero-lead { font-size: 16px; }
.article { display: flex; flex-direction: column; gap: 20px; max-width: 760px; min-width: 0; }
.article-title { margin: 0; font: 600 40px/1.15 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.article-lead { margin: 0; font-size: 19px; line-height: 1.55; }
.article-cover { margin: 8px 0 0; }
.article-cover figcaption { margin-top: 8px; }
.prose ul { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose figure .img { border-radius: var(--r2); }
.prose > :last-child { margin-bottom: 0; }
.more-news { display: flex; flex-direction: column; gap: 16px; border-top: 1px solid var(--line); padding-top: 28px; margin-top: 12px; }
.more-news .lab { font-size: 13px; }
.flabel { font-size: 13px; color: var(--muted); }
.spacer { flex: 1; }
.g-editor { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; }
textarea.ta-s, .ta-s { min-height: 76px; }
textarea.ta-h2, .ta-h2 { min-height: 52px; font: 600 18px/1.3 var(--display); }
.inp-s { min-height: 36px !important; font-size: 13px; }
.editor { border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; }
.toolbar { gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.editor-body { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.blocks { display: flex; flex-direction: column; gap: 14px; }
.block { display: flex; flex-direction: column; gap: 6px; }
.block-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.block-img { margin: 0; max-width: 420px; display: flex; flex-direction: column; gap: 8px; }
.drop-on { border-color: var(--accent); color: var(--accent-ink); }
img.thumb { width: 96px; border-radius: var(--r2); }

/* Toast */
.toast { position: fixed; right: 16px; bottom: 16px; z-index: 100; max-width: min(420px, calc(100vw - 32px)); padding: 12px 18px; border-radius: var(--r2); background: var(--text); color: var(--bg); box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
.toast.error { background: var(--danger); color: #fff; }

/* ---------- motion ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.96); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* Page entrance: blocks rise one after another. */
.main.enter > * { animation: rise .32s cubic-bezier(.2, .7, .2, 1) both; }
.main.enter > :nth-child(2) { animation-delay: .04s; }
.main.enter > :nth-child(3) { animation-delay: .08s; }
.main.enter > :nth-child(4) { animation-delay: .12s; }
.main.enter > :nth-child(5) { animation-delay: .16s; }
.main.enter > :nth-child(n+6) { animation-delay: .2s; }
.main.enter .grid > .stat, .main.enter .g-plans > .card, .main.enter .g-news > .ncard, .main.enter .g-cards > .ncard {
  animation: rise .36s cubic-bezier(.2, .7, .2, 1) both;
}
.main.enter .grid > :nth-child(2) { animation-delay: .1s; }
.main.enter .grid > :nth-child(3) { animation-delay: .15s; }
.main.enter .grid > :nth-child(4) { animation-delay: .2s; }
.main.enter .grid > :nth-child(n+5) { animation-delay: .25s; }
.loading { animation: pulse 1.2s ease-in-out infinite; }

/* Controls */
.btn, .nav-a, .link, .tag, .badge { transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .12s ease, box-shadow .18s ease; }
.btn:not(:disabled):active { transform: translateY(0) scale(.97); }
.btn:not(.sec):not(.dng):not(:disabled):hover { box-shadow: 0 6px 18px -8px var(--accent); }
.nav-a:active { transform: scale(.98); }
input, select, textarea { transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Cards that are links lift on hover; covers zoom slightly. */
.ncard, .card-link, .card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.ncard:hover, .card-link:hover { transform: translateY(-3px); }
.card-link:hover { box-shadow: 0 12px 28px -18px rgba(0, 0, 0, .45); }
.ncard img.img, .nhero img.img { transition: transform .35s ease, filter .35s ease; }
.ncard:hover img.img { transform: scale(1.02); filter: saturate(1.08); }
.t tbody tr { transition: background-color .15s ease; }
.t tbody tr:hover { background: var(--surface-2); }

/* Disclosure, alerts, toast, progress */
.faq summary { transition: color .15s ease; }
.faq summary:hover { color: var(--accent-ink); }
.faq[open] > p { animation: drop-in .22s ease both; }
.alert { animation: fade .25s ease both; }
.toast-in { animation: toast-in .28s cubic-bezier(.2, .7, .2, 1) both; }
.drop { transition: border-color .2s ease, color .2s ease, background-color .2s ease; }
.drop:hover, .drop-on { background: var(--accent-soft); }
.block { animation: pop .2s ease both; }
progress.bar::-webkit-progress-value { transition: width .6s ease; }

/* Theme switch: colours cross-fade only while switching. */
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .btn:not(:disabled):hover, .ncard:hover, .card-link:hover { transform: none; }
}

/* Phones: the side menu becomes a top bar, the menu opens full screen. */
@media (max-width: 720px) {
  .shell { flex-direction: column; }
  .side { position: sticky; top: 0; z-index: 20; width: auto; height: auto; flex: none; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .side-head { padding: 10px 16px; border-bottom: 0; }
  .side-head .brand { padding: 0; }
  .menu-btn { display: inline-flex; min-height: 44px; }
  .side .nav, .side .who { display: none; }
  .side.open { position: fixed; inset: 0; z-index: 50; height: 100vh; height: 100dvh; overflow-y: auto; }
  .side.open .side-head { position: sticky; top: 0; z-index: 1; background: var(--surface); border-bottom: 1px solid var(--line); }
  .side.open .nav { display: flex; padding: 12px 16px; gap: 4px; }
  .side.open .who { display: flex; padding: 16px; }
  .side.open .nav, .side.open .who { animation: drop-in .25s ease both; }
  .side.open .who { animation-delay: .05s; }
  .side.open .nav-a { min-height: 48px; font-size: 16px; }
  .main { padding: 24px 16px 40px; gap: 16px; }
  .card { padding: 20px; }
  .card-flush { padding: 0; }
  .btn.sm { min-height: 44px; }
  .ph h1 { font-size: 26px; }
  .span2 { grid-column: auto; }
  .big { font-size: 64px; }
  .sub-hero-text { padding: 24px; }
  .article-title { font-size: 30px; }
  .nhero .nhero-title { font-size: 26px; }
  .prose { font-size: 16px; }
}

/* support tickets: message thread */
.msgs { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: min(640px, 92%); padding: 12px 16px; border-radius: var(--r2); background: var(--surface-2); border: 1px solid var(--line); align-self: flex-end; }
.msg.staff { align-self: flex-start; background: var(--accent-soft); border-color: var(--line-2); }
.msg-h { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 6px; font-size: 13px; }
.msg-b { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Admin: nodes */
.node { display: flex; flex-direction: column; gap: 14px; }
.meter { display: flex; flex-direction: column; gap: 6px; }
progress.bar-warm::-webkit-progress-value { background: var(--warn); }
progress.bar-warm::-moz-progress-bar { background: var(--warn); }
progress.bar-hot::-webkit-progress-value { background: var(--danger); }
progress.bar-hot::-moz-progress-bar { background: var(--danger); }

/* Off-screen buffer for copying without navigator.clipboard (plain HTTP). */
.copy-buf { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; font-size: 16px; }
/* A tap on a link selects all of it, for copying by hand. */
.ref-link { user-select: all; -webkit-user-select: all; }
