/* =========================================================================
   SentinelX Licence Portal — design system
   Dark-first technical UI. Self-hosted variable fonts, inline SVG icons,
   no CSS framework, no emoji.
   ========================================================================= */

@font-face {
  font-family: "Inter var";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "JetBrains Mono var";
  src: url("/fonts/jetbrains-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
  font-style: normal;
}

/* ---------- tokens ---------- */
:root {
  --bg: #05070a;
  --bg-veil: #070a0f;
  --surface: #0a0e14;
  --surface-2: #0e141c;
  --surface-3: #121a24;

  --line: #17202b;
  --line-2: #1f2b38;
  --line-3: #2a3a4b;

  --text: #e6edf4;
  --text-2: #a8b8c8;
  --text-3: #6d7f92;
  --text-4: #4a5a6b;

  --accent: #00e5ff;
  --accent-2: #4df0ff;
  --accent-deep: #0891a8;
  --accent-ink: #012027;
  --violet: #8b7dff;

  --ok: #35e39b;
  --warn: #ffc043;
  --bad: #ff5470;

  --grad-accent: linear-gradient(135deg, #7ef6ff 0%, #00d2e8 45%, #0a8ea8 100%);
  --grad-text: linear-gradient(120deg, #ffffff 0%, #c9f6ff 45%, #6fd8ea 100%);

  --font: "Inter var", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono var", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 7px;
  --r: 11px;
  --r-lg: 16px;
  --r-xl: 22px;

  --shadow-1: 0 1px 2px rgb(0 0 0 / .4);
  --shadow-2: 0 8px 24px -12px rgb(0 0 0 / .7);
  --shadow-3: 0 30px 70px -30px rgb(0 240 255 / .22);

  --ring: 0 0 0 1px var(--line-2), 0 0 0 4px rgb(0 229 255 / .12);
  --ease: cubic-bezier(.32, .72, 0, 1);
  --dur: .22s;

  --wrap: 1160px;
  --wrap-narrow: 780px;
  --header-h: 66px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.65;
  font-feature-settings: "cv02" 1, "cv03" 1, "cv04" 1, "ss03" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 620px at 12% -12%, rgb(0 229 255 / .075), transparent 62%),
    radial-gradient(820px 520px at 92% 2%, rgb(139 125 255 / .055), transparent 60%),
    radial-gradient(600px 400px at 50% 110%, rgb(0 229 255 / .03), transparent 65%),
    linear-gradient(180deg, #070b11 0%, var(--bg) 42%, #04060a 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(900px 620px at 50% 0%, #000 0%, transparent 78%);
}

img, svg { display: block; max-width: 100%; }
svg.icon { flex: none; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

h1, h2, h3, h4, h5 { line-height: 1.14; font-weight: 620; letter-spacing: -.022em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); letter-spacing: -.028em; }
h3 { font-size: 1.14rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

::selection { background: rgb(0 229 255 / .26); color: #fff; }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
}

code, kbd, pre, samp { font-family: var(--mono); font-size: .875em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.icon { stroke: currentColor; }

/* ---------- primitives ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.wrap-narrow { max-width: var(--wrap-narrow); }

.mono { font-family: var(--mono); }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.faint { color: var(--text-4); }
.accent { color: var(--accent); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.balance { text-wrap: balance; }
.stack-sm > * + * { margin-top: .5rem; }
.lead { font-size: clamp(1.02rem, 1.6vw, 1.16rem); color: var(--text-2); line-height: 1.62; }
.mt-2 { margin-top: 1.25rem; }
.mt-3 { margin-top: 2rem; }
.mt-4 { margin-top: 3rem; }
.mb-2 { margin-bottom: 1.25rem; }
.mb-3 { margin-bottom: 2rem; }
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wrapflex { display: flex; flex-wrap: wrap; }
.centerflex { display: flex; align-items: center; gap: .5rem; }
.scroll-x { overflow-x: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- eyebrow / section label ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .34rem .8rem .34rem .6rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(0 229 255 / .09), rgb(0 229 255 / .03));
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.eyebrow .pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgb(53 227 155 / .6);
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgb(53 227 155 / .55); }
  70%  { box-shadow: 0 0 0 7px rgb(53 227 155 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(53 227 155 / 0); }
}

.sec-label {
  display: block;
  margin-bottom: .7rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.sec-label::before { content: "// "; color: var(--line-3); }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--surface-3);
  --btn-fg: var(--text);
  --btn-bd: var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .62rem 1.1rem;
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: .9rem;
  font-weight: 560;
  letter-spacing: -.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.btn:hover { border-color: var(--line-3); background: #16202b; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  --btn-bg: var(--grad-accent);
  --btn-fg: var(--accent-ink);
  --btn-bd: transparent;
  font-weight: 640;
  box-shadow: 0 1px 0 rgb(255 255 255 / .3) inset, 0 6px 20px -8px rgb(0 229 255 / .55);
}
.btn-primary:hover { filter: brightness(1.07); background: var(--grad-accent); }

.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text-2); }
.btn-ghost:hover { --btn-fg: var(--text); background: rgb(255 255 255 / .04); }

.btn-danger { --btn-bg: transparent; --btn-fg: var(--bad); --btn-bd: rgb(255 84 112 / .32); }
.btn-danger:hover { background: rgb(255 84 112 / .1); border-color: var(--bad); }

.btn-sm { padding: .36rem .68rem; font-size: .815rem; border-radius: 6px; }
.btn-lg { padding: .78rem 1.4rem; font-size: .96rem; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(5 7 10 / .72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.site-head[data-stuck="true"] { border-bottom-color: var(--line); background: rgb(5 7 10 / .9); }

.head-inner {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 600; letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.brand-mark { transition: transform .4s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.04); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: .96rem; font-weight: 640; }
.brand-sub { color: var(--text-4); font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; }

.head-nav { display: flex; align-items: center; gap: .15rem; margin-left: .5rem; }

.head-link {
  position: relative;
  padding: .45rem .7rem;
  border-radius: 6px;
  color: var(--text-2);
  font-size: .885rem;
  font-weight: 500;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.head-link:hover { color: var(--text); background: rgb(255 255 255 / .045); }
.head-link[aria-current="page"] { color: var(--accent); }
.head-link[aria-current="page"]::after {
  content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .18rem;
  height: 1.5px; border-radius: 2px; background: var(--accent);
}

.head-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }

.nav-toggle { display: none; }

/* mobile drawer */
.mobile-nav { display: none; border-top: 1px solid var(--line); padding: .7rem 0 1rem; background: var(--bg-veil); }
.mobile-nav[data-open="true"] { display: block; }
.mobile-nav a {
  display: flex; align-items: center; gap: .65rem;
  padding: .6rem .3rem; border-bottom: 1px solid var(--line);
  color: var(--text-2); font-size: .95rem;
}
.mobile-nav a:last-of-type { border-bottom: 0; }
.mobile-nav a:hover { color: var(--accent); }

@media (max-width: 880px) {
  .head-nav { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(3.4rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero h1 { margin: 1.3rem 0 1.1rem; }
.hero h1 .grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { max-width: 56ch; }

.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 1px;
  margin-top: 2.8rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--line);
  overflow: hidden;
}
.hero-fact { padding: .95rem 1rem; background: var(--surface); }
.hero-fact dt { color: var(--text-4); font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; }
.hero-fact dd { margin: .25rem 0 0; font-family: var(--mono); font-size: .96rem; font-weight: 500; color: var(--text); }

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
}

/* hero visual: live node map */
.node-map {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgb(10 14 20 / .96), rgb(7 11 16 / .96));
  box-shadow: var(--shadow-3), var(--shadow-2);
  overflow: hidden;
}
.node-map-head {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .7rem .95rem; border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / .018);
}
.node-map-title { display: flex; align-items: center; gap: .5rem; color: var(--text-2); font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.node-map-body { padding: 1rem; }
.node-map-rows { display: grid; gap: .45rem; }

.node-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: .65rem;
  padding: .62rem .75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgb(255 255 255 / .015);
  font-family: var(--mono);
  font-size: .8rem;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.node-row:hover { border-color: var(--line-3); background: rgb(0 229 255 / .04); }
.node-row .mod { color: var(--text); }
.node-row .metric { color: var(--text-3); }

.scanline {
  height: 1px;
  margin: .9rem 0 .2rem;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .5;
  animation: sweep 3.6s var(--ease) infinite;
}
@keyframes sweep {
  0%, 100% { transform: translateX(-100%); opacity: 0; }
  50%      { transform: translateX(100%); opacity: .55; }
}

/* ---------- sections ---------- */
.sec { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.sec-head { max-width: 680px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.sec-head h2 { margin-bottom: .7rem; }
.sec-head p { color: var(--text-2); }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 1rem; }
.g-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }
.g-4 { grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); }
.g-2-fix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 820px) { .g-2-fix { grid-template-columns: 1fr; } }

.card {
  position: relative;
  padding: 1.3rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgb(14 20 28 / .82), rgb(9 13 18 / .7));
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card-hover:hover { border-color: var(--line-3); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--text-2); font-size: .915rem; }

.card-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; margin-bottom: .9rem;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: linear-gradient(180deg, rgb(0 229 255 / .1), rgb(0 229 255 / .02));
  color: var(--accent);
}
.card-icon.violet { background: linear-gradient(180deg, rgb(139 125 255 / .12), rgb(139 125 255 / .02)); color: var(--violet); border-color: rgb(139 125 255 / .28); }

/* feature cards */
.feature { display: flex; flex-direction: column; gap: .1rem; }
.feature-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; }
.feature h3 { margin: 0; font-size: 1.04rem; }
.feature-meta { margin: .5rem 0 .6rem; color: var(--text-4); font-family: var(--mono); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; }
.feature p { font-size: .9rem; }
.card[data-status="planned"] { opacity: .78; }
.card[data-status="partial"] { border-color: rgb(255 192 67 / .26); }
.card[data-status="partial"] .card-icon { background: linear-gradient(180deg, rgb(255 192 67 / .12), transparent); color: var(--warn); border-color: rgb(255 192 67 / .3); }
.card[data-status="planned"] .card-icon { background: linear-gradient(180deg, rgb(168 184 200 / .1), transparent); color: var(--text-3); border-color: var(--line-2); }

/* ---------- badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .18rem .5rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge .icon { width: 11px; height: 11px; }
.badge-ok { color: var(--ok); border-color: rgb(53 227 155 / .3); background: rgb(53 227 155 / .09); }
.badge-warn { color: var(--warn); border-color: rgb(255 192 67 / .3); background: rgb(255 192 67 / .09); }
.badge-bad { color: var(--bad); border-color: rgb(255 84 112 / .32); background: rgb(255 84 112 / .09); }
.badge-accent { color: var(--accent); border-color: rgb(0 229 255 / .3); background: rgb(0 229 255 / .08); }

/* ---------- notes / callouts ---------- */
.note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .85rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--accent);
  border-radius: var(--r-sm);
  background: rgb(0 229 255 / .035);
  color: var(--text-2);
  font-size: .9rem;
}
.note > .icon { margin-top: .18rem; color: var(--accent); }
.note strong { color: var(--text); font-weight: 600; }
.note-warn { border-left-color: var(--warn); background: rgb(255 192 67 / .04); }
.note-warn > .icon { color: var(--warn); }
.note-bad { border-left-color: var(--bad); background: rgb(255 84 112 / .05); }
.note-bad > .icon { color: var(--bad); }

/* ---------- steps ---------- */
.steps { counter-reset: s; display: grid; gap: .1rem; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}
.step:first-child { border-top: 0; padding-top: 0; }
.step-num {
  counter-increment: s;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--accent);
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 600;
}
.step-num::before { content: counter(s, decimal-leading-zero); }
.step h3 { margin-bottom: .25rem; font-size: 1.02rem; }
.step p { color: var(--text-2); font-size: .92rem; }

/* ---------- code ---------- */
.code {
  position: relative;
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #04070b;
  color: #c3d6e6;
  font-size: .82rem;
  line-height: 1.75;
  overflow-x: auto;
  tab-size: 2;
}
.code::before {
  content: "";
  position: absolute; inset: 0 auto 0 0; width: 2px;
  background: var(--grad-accent); opacity: .5; border-radius: var(--r) 0 0 var(--r);
}
.code-plain { border-left: 0; }
.code-plain::before { display: none; }

.tok-c { color: #4d6376; }
.tok-k { color: #4df0ff; }
.tok-s { color: #7ef0b4; }
.tok-n { color: #ffc043; }
.tok-f { color: #b9a8ff; }

code.inl {
  padding: .1rem .38rem;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--accent-2);
  font-size: .845em;
  white-space: nowrap;
}

/* endpoint chip */
.ep {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .22rem .55rem;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: .78rem;
}
.ep .verb { font-weight: 700; font-size: .68rem; letter-spacing: .06em; }
.ep .verb-post { color: var(--ok); }
.ep .verb-get { color: var(--accent); }

/* ---------- forms ---------- */
.field { margin-bottom: 1.05rem; }
.field > label {
  display: block; margin-bottom: .38rem;
  color: var(--text-2); font-size: .82rem; font-weight: 520;
}
.field .hint { margin-top: .38rem; color: var(--text-4); font-size: .78rem; }
.field-error { margin-top: .38rem; color: var(--bad); font-size: .8rem; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=url], input[type=date], input[type=search], select, textarea {
  width: 100%;
  padding: .62rem .8rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: #070b10;
  color: var(--text);
  font: inherit;
  font-size: .92rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--text-4); }
input:hover, select:hover, textarea:hover { border-color: var(--line-3); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent-deep);
  background: #060a0f;
  box-shadow: 0 0 0 3px rgb(0 229 255 / .13);
}
select {
  appearance: none;
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236d7f92' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.5 9.5 6.5 6.5 6.5-6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .7rem center;
}
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 .9rem; }
.input-affix { display: flex; gap: .5rem; }
.input-affix input { flex: 1; min-width: 0; }
.checkline { display: flex; align-items: center; gap: .55rem; color: var(--text-2); font-size: .89rem; }
.checkline input { width: auto; accent-color: var(--accent); }

/* ---------- flash / alerts ---------- */
.flash {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .85rem 1.05rem;
  margin-bottom: 1.4rem;
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--ok);
  border-radius: var(--r-sm);
  background: rgb(53 227 155 / .05);
  color: var(--text);
  font-size: .9rem;
}
.flash > .icon { margin-top: .2rem; color: var(--ok); }
.flash-bad { border-left-color: var(--bad); background: rgb(255 84 112 / .05); }
.flash-bad > .icon { color: var(--bad); }
.flash ul { margin: .4rem 0 0; padding-left: 1.1rem; color: var(--text-2); }

/* ---------- result panel ---------- */
.result {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  padding: 1.35rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
}
.result-icon {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: var(--surface-3);
  color: var(--text-3);
}
.result h3 { margin: 0 0 .3rem; font-size: 1.12rem; }
.result p { margin: 0; color: var(--text-2); font-size: .92rem; }
.result-meta { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--line); color: var(--text-4); font-family: var(--mono); font-size: .78rem; }
.result-ok { border-color: rgb(53 227 155 / .32); background: linear-gradient(180deg, rgb(53 227 155 / .07), transparent 70%); }
.result-ok .result-icon { color: var(--ok); border-color: rgb(53 227 155 / .3); background: rgb(53 227 155 / .08); }
.result-bad { border-color: rgb(255 84 112 / .32); background: linear-gradient(180deg, rgb(255 84 112 / .06), transparent 70%); }
.result-bad .result-icon { color: var(--bad); border-color: rgb(255 84 112 / .3); background: rgb(255 84 112 / .07); }

/* ---------- tables ---------- */
.table-shell { border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .89rem; }
thead th {
  position: sticky; top: 0;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}
tbody td { padding: .72rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background var(--dur) var(--ease); }
tbody tr:hover { background: rgb(0 229 255 / .035); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty-row td { padding: 2.8rem 1rem; text-align: center; color: var(--text-4); }

.code-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .2rem .55rem;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: #060a0f;
  color: var(--accent);
  font-family: var(--mono);
  font-size: .8rem;
  white-space: nowrap;
  transition: border-color var(--dur) var(--ease);
}
a.code-pill:hover { border-color: var(--accent-deep); }

.copy-btn {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--text-4);
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent-deep); }

/* ---------- pricing ---------- */
.price-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 1.75rem 1.6rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow-2);
}
.price-card[data-featured="true"] {
  border-color: rgb(0 229 255 / .34);
  box-shadow: var(--shadow-3), var(--shadow-2);
}
.price-tag {
  position: absolute; top: -.7rem; left: 1.6rem;
  padding: .2rem .65rem;
  border-radius: 999px;
  background: var(--grad-accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.price-card h3 { font-size: 1.3rem; }
.price-card .tagline { margin: .3rem 0 1.2rem; color: var(--text-3); font-size: .9rem; }

.price-row {
  display: flex; align-items: baseline; gap: .45rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.price-row + .price-row { padding-top: 1.1rem; }
.price-row .amount { font-family: var(--mono); font-size: 2rem; font-weight: 600; letter-spacing: -.03em; }
.price-row .amount.sm { font-size: 1.3rem; }
.price-row .period { color: var(--text-4); font-size: .84rem; }
.price-row .save { margin-left: auto; color: var(--ok); font-family: var(--mono); font-size: .74rem; }

.price-list { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; flex: 1; }
.price-list li {
  position: relative;
  display: grid; grid-template-columns: auto 1fr; gap: .6rem;
  padding: .38rem 0;
  color: var(--text-2);
  font-size: .91rem;
}
.price-list li .icon { margin-top: .26rem; color: var(--accent); }

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 0;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-weight: 540;
  font-size: 1rem;
  transition: color var(--dur) var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary .icon { color: var(--text-4); transition: transform var(--dur) var(--ease), color var(--dur) var(--ease); }
.faq details[open] summary .icon { transform: rotate(90deg); color: var(--accent); }
.faq details p { max-width: 66ch; padding-bottom: 1.15rem; color: var(--text-2); font-size: .93rem; }

/* ---------- docs layout ---------- */
.docs-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 900px) { .docs-layout { grid-template-columns: 1fr; } }

.docs-nav { position: sticky; top: calc(var(--header-h) + 24px); font-size: .88rem; }
@media (max-width: 900px) { .docs-nav { position: static; } }
.docs-nav-title { display: block; margin-bottom: .6rem; color: var(--text-4); font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.docs-nav a { display: block; padding: .32rem 0 .32rem .75rem; border-left: 1px solid var(--line-2); color: var(--text-3); }
.docs-nav a:hover, .docs-nav a.is-active { color: var(--accent); border-left-color: var(--accent); }

.prose { max-width: 74ch; }
.prose h2 { margin: 3rem 0 .9rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 1.5rem; }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { margin: 2rem 0 .7rem; font-size: 1.08rem; }
.prose p { color: var(--text-2); }
.prose ul, .prose ol { margin: 0 0 1.1rem; padding-left: 1.2rem; color: var(--text-2); }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--accent-deep); }
.prose strong { color: var(--text); font-weight: 600; }
.prose > :last-child { margin-bottom: 0; }

/* ---------- legal ---------- */
.legal-meta {
  display: flex; flex-wrap: wrap; gap: .4rem 1.2rem;
  margin-bottom: 2rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--text-4); font-family: var(--mono); font-size: .78rem;
}
.legal-index { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .9rem; margin-top: 1.5rem; }
.legal-link {
  display: grid; grid-template-columns: auto 1fr; gap: .85rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.legal-link:hover { border-color: var(--line-3); transform: translateY(-2px); }
.legal-link .card-icon { width: 34px; height: 34px; margin: 0; }
.legal-link h3 { margin: 0 0 .2rem; font-size: .98rem; }
.legal-link p { margin: 0; color: var(--text-3); font-size: .84rem; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); margin-top: clamp(3rem, 7vw, 5rem); background: var(--bg-veil); }
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding: 3rem 0 2.5rem;
}
@media (max-width: 860px) { .foot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .foot-grid { grid-template-columns: 1fr; } }

.foot-brand p { margin: .9rem 0 1.1rem; max-width: 34ch; color: var(--text-3); font-size: .88rem; }
.foot-col h4 { margin-bottom: .9rem; color: var(--text); font-family: var(--mono); font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.foot-col a { display: block; padding: .26rem 0; color: var(--text-3); font-size: .89rem; }
.foot-col a:hover { color: var(--accent); }
.foot-base {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
  color: var(--text-4);
  font-family: var(--mono);
  font-size: .76rem;
}
.foot-base-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.foot-base-links a { color: var(--text-4); }
.foot-base-links a:hover { color: var(--accent); }

/* ---------- cta band ---------- */
.cta-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding: clamp(2rem, 4vw, 3rem);
  border: 1px solid rgb(0 229 255 / .22);
  border-radius: var(--r-lg);
  background:
    radial-gradient(600px 240px at 15% 0%, rgb(0 229 255 / .1), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  overflow: hidden;
}
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }
.cta-band h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.cta-band p { margin: .5rem 0 0; color: var(--text-2); }

/* ---------- stats ---------- */
.stat { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.stat dt { color: var(--text-4); font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.stat dd { margin: .3rem 0 0; font-family: var(--mono); font-size: 1.7rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat dd small { color: var(--text-4); font-size: .8rem; font-weight: 400; }
.stat-ok dd { color: var(--ok); }
.stat-warn dd { color: var(--warn); }
.stat-bad dd { color: var(--bad); }
.stat-accent dd { color: var(--accent); }

/* ---------- pagination ---------- */
.pager { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; padding: 0; margin: 1.3rem 0 0; }
.pager a, .pager span {
  display: grid; place-items: center;
  min-width: 32px; height: 32px; padding: 0 .5rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .82rem;
}
.pager a:hover { border-color: var(--accent-deep); color: var(--accent); }
.pager .on { border-color: rgb(0 229 255 / .34); background: rgb(0 229 255 / .1); color: var(--accent); }
.pager .off { opacity: .35; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- admin shell ---------- */
.admin { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.admin-side {
  position: sticky; top: 0; align-self: start;
  height: 100vh; overflow-y: auto;
  padding: 1.15rem .8rem;
  border-right: 1px solid var(--line);
  background: var(--bg-veil);
  display: flex; flex-direction: column;
}
.admin-side::-webkit-scrollbar { width: 6px; }
.admin-side::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
@media (max-width: 900px) { .admin { grid-template-columns: 1fr; } .admin-side { position: static; height: auto; } }

.admin-brand { display: flex; align-items: center; gap: .6rem; padding: 0 .45rem 1.1rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.admin-brand .t { font-weight: 620; font-size: .92rem; letter-spacing: -.015em; }
.admin-brand .s { color: var(--text-4); font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; }

.admin-nav { display: grid; gap: .1rem; margin-bottom: 1.3rem; }
.admin-nav-label { padding: .3rem .5rem .45rem; color: var(--text-4); font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; }
.admin-link {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .65rem;
  padding: .48rem .5rem;
  border-radius: 7px;
  color: var(--text-2);
  font-size: .885rem;
  font-weight: 500;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.admin-link:hover { background: rgb(0 229 255 / .06); color: var(--text); }
.admin-link.on { background: rgb(0 229 255 / .1); color: var(--accent); }
.admin-link .icon { color: var(--text-4); }
.admin-link.on .icon { color: var(--accent); }
.admin-link .n { color: var(--text-4); font-family: var(--mono); font-size: .74rem; }

.admin-main { padding: 1.6rem clamp(1.1rem, 3vw, 2.2rem) 3.5rem; min-width: 0; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.page-head h1 { font-size: 1.6rem; letter-spacing: -.025em; }
.page-head p { margin: .25rem 0 0; color: var(--text-3); font-size: .9rem; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* admin detail rows */
.kv { display: grid; grid-template-columns: minmax(120px, 150px) 1fr; gap: .55rem 1.1rem; font-size: .89rem; margin: 0; }
.kv dt { color: var(--text-4); font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; padding-top: .12rem; }
.kv dd { margin: 0; min-width: 0; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; gap: .15rem 0; } .kv dd { margin-bottom: .6rem; } }

.spark { display: flex; align-items: flex-end; gap: 3px; height: 88px; }
.spark i { flex: 1; min-width: 3px; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, var(--accent), var(--accent-deep)); opacity: .85; }
.spark-x { display: flex; gap: 3px; margin-top: .35rem; }
.spark-x span { flex: 1; text-align: center; color: var(--text-4); font-family: var(--mono); font-size: .58rem; }

.login-box { width: 100%; max-width: 380px; margin: 11vh auto 0; }

/* inline form row */
.inline-form { display: inline; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.divider { height: 1px; background: var(--line); margin: 1.2rem 0; border: 0; }