:root {
  --bg: #0b1114;
  --bg2: #0e171b;
  --card: #111a1e;
  --card2: #152126;
  --line: #1f2d33;
  --line2: #2b3e45;
  --text: #e5e7eb;
  --muted: #8b98a0;
  --em: #10b981;
  --em2: #34d399;
  --gold: #e8b84a;
  --on-em: #04120c;
  --danger: #f87171;
  --warn: #f59e0b;
  --glow: rgba(16, 185, 129, 0.14);
  --code: #0a1013;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --side: 264px;
  --top: 60px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f7f5; --bg2: #e8efec; --card: #ffffff; --card2: #f6faf8; --line: #d9e3de; --line2: #bccbc4;
    --text: #14201b; --muted: #55645d; --em: #0f8f6b; --em2: #0a7a5b; --gold: #9a6d08; --on-em: #ffffff;
    --danger: #b42318; --warn: #b45309; --glow: rgba(15, 143, 107, 0.12); --code: #eef3f0;
    --shadow: 0 10px 30px rgba(20, 40, 30, 0.12); color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f3f7f5; --bg2: #e8efec; --card: #ffffff; --card2: #f6faf8; --line: #d9e3de; --line2: #bccbc4;
  --text: #14201b; --muted: #55645d; --em: #0f8f6b; --em2: #0a7a5b; --gold: #9a6d08; --on-em: #ffffff;
  --danger: #b42318; --warn: #b45309; --glow: rgba(15, 143, 107, 0.12); --code: #eef3f0;
  --shadow: 0 10px 30px rgba(20, 40, 30, 0.12); color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}
a { color: var(--em2); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .9em; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { background: var(--card2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .88em; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* top bar */
.top { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand small { color: var(--muted); font-weight: 500; padding-inline-start: 10px; border-inline-start: 1px solid var(--line2); }
.top .grow { flex: 1; }
.tools { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; background: var(--card); border: 1px solid var(--line2); border-radius: 10px; cursor: pointer; transition: border-color .15s; }
.icon-btn:hover { border-color: var(--em); }
.menu-btn { display: none; }
.pill-btn { padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); cursor: pointer; text-decoration: none; color: var(--text); font-size: 14px; }
.pill-btn:hover { border-color: var(--em); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none; background: var(--em); color: var(--on-em); border: 0; border-radius: 10px; padding: 10px 18px; font-weight: 700; transition: filter .15s, transform .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line2); }
.btn.ghost:hover { border-color: var(--em); filter: none; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn.small { padding: 6px 12px; font-size: 14px; }

/* app layout */
.layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
.side { position: sticky; top: var(--top); align-self: start; height: calc(100vh - var(--top)); overflow-y: auto; padding: 16px 12px; background: var(--bg2); border-inline-end: 1px solid var(--line); }
.side h4 { margin: 14px 10px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 15px; transition: background .15s; }
.side a:hover { background: var(--card2); }
.side a[aria-current="page"] { background: var(--glow); color: var(--em2); font-weight: 600; }
.side .sub a { padding-inline-start: 38px; font-size: 14px; color: var(--muted); }
.side .sub a[aria-current="page"] { color: var(--em2); }
.side .sub { margin-bottom: 4px; }
.backdrop { display: none; }
.content { min-width: 0; padding: 28px clamp(16px, 4vw, 40px) 56px; max-width: 1040px; width: 100%; }
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.pagehead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.pagehead p { color: var(--muted); margin: 0; }

/* landing */
.landing { max-width: 1040px; margin: 0 auto; padding: 0 16px 56px; }
.hero { text-align: center; padding: 64px 16px 48px; border-radius: 22px; margin-top: 24px; border: 1px solid var(--line);
  background: radial-gradient(700px 260px at 50% -10%, var(--glow), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='48'%3E%3Cpath d='M14 2 28 10v16L14 34 0 26V10zM42 26l14 8v16L42 58 28 50V34z' fill='none' stroke='%2310b981' stroke-opacity='.07'/%3E%3C/svg%3E"), var(--card); }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto 22px; font-size: 1.08rem; }
.hero .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 22px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: border-color .15s, transform .15s; }
.feature:hover { border-color: var(--em); transform: translateY(-2px); }
.feature .ico { width: 26px; height: 26px; color: var(--gold); margin-bottom: 8px; }
.feature p { color: var(--muted); margin: 0; font-size: 15px; }

/* cards, pills */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.app { display: block; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.app:hover { border-color: var(--em); transform: translateY(-2px); box-shadow: var(--shadow); }
.app h3 { margin: 0 0 4px; overflow-wrap: anywhere; }
.app .meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.app-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--glow); color: var(--em2); font-weight: 800; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; border: 1px solid var(--line2); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.active { color: var(--em2); border-color: var(--em); }
.pill.pending { color: var(--warn); border-color: var(--warn); }
.pill.refused, .pill.revoked { color: var(--danger); border-color: var(--danger); }
.empty { text-align: center; padding: 44px 16px; background: var(--card); border: 1px dashed var(--line2); border-radius: var(--radius); }
.empty .ico { width: 34px; height: 34px; color: var(--muted); margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 440px; margin: 0 auto 16px; }
.note { background: var(--card2); border: 1px solid var(--line2); border-inline-start: 3px solid var(--gold); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 0 0 14px; color: var(--muted); }
.note.bad { border-inline-start-color: var(--danger); color: var(--text); }
.err { color: var(--danger); font-size: 14px; margin: 0 0 12px; }
.fine { color: var(--muted); font-size: 13px; }

/* detail page */
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.keyrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.keybox { display: flex; gap: 8px; align-items: center; background: var(--code); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; }
.keybox code { background: none; border: 0; padding: 0; word-break: break-all; user-select: all; flex: 1; }
.danger-zone { border-color: var(--danger); }
.danger-zone h2 { color: var(--danger); }
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--em); transition: opacity .15s; }
.chart .bar:hover { opacity: .75; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }

/* forms */
.field { margin: 0 0 16px; }
.field > label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input[type="text"], .field input[type="url"], .field select, .field textarea, .try input {
  width: 100%; background: var(--bg); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .try input:focus { border-color: var(--em); outline: none; box-shadow: 0 0 0 3px var(--glow); }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--danger); }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { margin-top: 5px; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* docs */
.endpoint-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.method { font-weight: 800; font-size: 12px; letter-spacing: .04em; color: var(--on-em); background: var(--em); padding: 3px 9px; border-radius: 7px; }
.path { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; max-width: 100%; margin: 0 0 1rem; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td code { white-space: nowrap; }
.codeblock { position: relative; margin: 0 0 1rem; }
.codeblock .lbl { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 6px 12px; background: var(--card2); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; }
.codeblock pre { margin: 0; max-width: 100%; overflow-x: auto; padding: 14px 16px; background: var(--code); border: 1px solid var(--line); border-radius: 0 0 12px 12px; font-size: 13.5px; line-height: 1.55; }
.codeblock pre code { background: none; border: 0; padding: 0; white-space: pre; font-size: inherit; }
.copy { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line2); color: var(--text); border-radius: 8px; padding: 2px 8px; font-size: 12px; text-transform: none; letter-spacing: 0; transition: border-color .15s; }
.copy:hover { border-color: var(--em); }
.try { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 10px; }
.try label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 3px; }
.try .f { flex: 1; min-width: 150px; }
.result-meta { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.result-meta b.ok { color: var(--em2); }
.result-meta b.ko { color: var(--danger); }
.doc h2 { margin-top: 1.6em; padding-top: .4em; border-top: 1px solid var(--line); }
.doc h2:first-child { border-top: 0; margin-top: 0; }

.foot { border-top: 1px solid var(--line); padding: 16px; color: var(--muted); font-size: 13px; display: flex; gap: 8px 20px; flex-wrap: wrap; justify-content: space-between; max-width: 1040px; margin: 0 auto; }
.foot a { color: var(--muted); }
.loading { color: var(--muted); padding: 40px 0; }

/* mobile: the sidebar is a drawer */
@media (max-width: 860px) {
  .menu-btn { display: inline-grid; }
  .brand small { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 40; top: var(--top); bottom: 0; inset-inline-start: 0; width: min(300px, 86vw); height: auto; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  [dir="rtl"] .side { transform: translateX(102%); }
  body.drawer .side { transform: none; }
  .backdrop { display: block; position: fixed; inset: var(--top) 0 0 0; z-index: 35; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.drawer .backdrop { opacity: 1; pointer-events: auto; }
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dt { margin-top: 10px; }
  .hero { padding: 40px 14px 32px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- fixes: card grids keep their gap; custom checkboxes ---- */
.grid > .card, .grid > .app, .livegrid > *, .epgrid > * { margin: 0; }
.card + .card { margin-top: 14px; }
.grid > .card + .card { margin-top: 0; }

input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 2px 0 0; cursor: pointer;
  display: inline-grid; place-content: center; background: var(--bg); border: 1.5px solid var(--line2); border-radius: 7px;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
input[type="checkbox"]::after {
  content: ""; width: 11px; height: 6px; border: solid var(--on-em); border-width: 0 0 2.5px 2.5px; border-radius: 1px;
  transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .14s ease-out;
}
input[type="checkbox"]:hover { border-color: var(--em); }
input[type="checkbox"]:checked { background: var(--em); border-color: var(--em); }
input[type="checkbox"]:checked::after { transform: rotate(-45deg) scale(1); }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; box-shadow: 0 0 0 4px var(--glow); }
input[type="checkbox"]:disabled { opacity: .5; cursor: not-allowed; }
.field.bad input[type="checkbox"] { border-color: var(--danger); }
@media (forced-colors: active) { input[type="checkbox"]:checked { background: Highlight; } input[type="checkbox"]::after { border-color: HighlightText; } }

/* ---- header wordmark (the real Territorium logo) ---- */
.brand .lw { height: 30px; width: auto; border-radius: 0; display: block; }
.brand .lw-light { display: none; }
:root[data-theme="light"] .brand .lw-dark { display: none; }
:root[data-theme="light"] .brand .lw-light { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .brand .lw-dark { display: none; }
  :root:not([data-theme="dark"]) .brand .lw-light { display: block; }
}
.foot { max-width: 1240px; }

/* ---- landing: wide, full-bleed sections ---- */
.wrapx { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.wrapx.narrow { max-width: 860px; }
.wrapx.center { text-align: center; }
.band { padding: clamp(48px, 7vw, 96px) 0; }
.band.alt { background: var(--bg2); border-block: 1px solid var(--line); }
.band.strip { padding: 0; background: var(--bg2); border-block: 1px solid var(--line); }
.sechead { max-width: 720px; margin: 0 auto clamp(28px, 4vw, 48px); text-align: center; }
.sechead h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.sechead p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.btn.lg { padding: 13px 24px; font-size: 1.02rem; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.center .row { justify-content: center; }

.hero2 { position: relative; overflow: hidden; padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(40px, 6vw, 88px);
  background: radial-gradient(900px 480px at 78% 18%, var(--glow), transparent 70%), radial-gradient(700px 420px at 8% 100%, rgba(232, 184, 74, .08), transparent 70%), var(--bg); }
.hero2::before { content: ""; position: absolute; inset: 0; opacity: .6; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='48'%3E%3Cpath d='M14 2 28 10v16L14 34 0 26V10zM42 26l14 8v16L42 58 28 50V34z' fill='none' stroke='%2310b981' stroke-opacity='.07'/%3E%3C/svg%3E");
  mask-image: linear-gradient(180deg, #000, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); }
.herogrid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--em2); background: var(--glow); border: 1px solid var(--em); border-radius: 999px; padding: 4px 12px; margin-bottom: 16px; }
.herotext h1 { font-size: clamp(2.1rem, 4.6vw, 3.8rem); line-height: 1.08; letter-spacing: -.01em; margin-bottom: .45em; }
.herotext .lead { color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.25rem); max-width: 560px; margin-bottom: 1.4em; }
.herotext .fine { margin-top: 14px; }
.heroart-wrap { position: relative; min-width: 0; }
.heroart { width: 100%; height: auto; display: block; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .35)); }
.heroart .hex { transform-box: fill-box; transform-origin: center; animation: pop 5s ease-in-out infinite; }
.heroart .flow { stroke-dasharray: 7 9; animation: flow 1.6s linear infinite; }
.heroart .pulse { transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-out infinite; }
.heroart .devcard { fill: var(--card); stroke: var(--em); stroke-width: 1.5; }
.heroart .devglyph { color: var(--em2); }
@keyframes flow { to { stroke-dashoffset: -32; } }
@keyframes pulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(.96); } }
.preview { position: relative; margin-top: -64px; width: min(430px, 86%); background: color-mix(in srgb, var(--code) 94%, transparent); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow); backdrop-filter: blur(6px); overflow: hidden; }
.preview .lbl { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.preview pre { margin: 0; padding: 10px 12px; font-size: 11.5px; line-height: 1.5; overflow-x: auto; }
.preview code { background: none; border: 0; padding: 0; white-space: pre; font-size: inherit; }
.dotlive { width: 8px; height: 8px; border-radius: 50%; background: var(--em); display: inline-block; animation: blink 1.8s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

.livegrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.livetile { display: flex; align-items: center; gap: 14px; padding: 22px 18px; }
.livetile + .livetile { border-inline-start: 1px solid var(--line); }
.livetile .ico { width: 26px; height: 26px; color: var(--gold); }
.livetile b { display: block; font-size: 1.7rem; line-height: 1.1; }
.livetile span { color: var(--muted); font-size: 13px; }

.uc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 72px); align-items: center; margin-bottom: clamp(40px, 6vw, 80px); }
.uc:last-child { margin-bottom: 0; }
.uc.flip .uc-text { order: 2; }
.uc-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--glow); color: var(--em2); display: grid; place-items: center; margin-bottom: 14px; }
.uc-ico .ico { width: 24px; height: 24px; }
.uc-text h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.uc-text p { color: var(--muted); font-size: 1.05rem; }
.uc-vis { min-width: 0; }

.mock { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.mock.chat { background: #1b2428; border-color: #2b3a40; color: #e5e7eb; }
.chat .cmd { margin-bottom: 14px; }
.chat .cmd code { background: #0f1619; border-color: #2b3a40; color: #34d399; }
.chat .msg { display: flex; gap: 12px; }
.chat .av { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.chat .body { min-width: 0; flex: 1; }
.chat .who { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.chat .tag { font-size: 10px; font-weight: 800; background: #10b981; color: #04120c; border-radius: 4px; padding: 1px 5px; }
.chat .embed { background: #141c20; border-inline-start: 4px solid #10b981; border-radius: 6px; padding: 12px 14px; }
.chat .et { font-weight: 800; font-size: 1.05rem; margin-bottom: 8px; color: #34d399; }
.chat .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.chat .f span { display: block; font-size: 11px; font-weight: 700; color: #8b98a0; text-transform: uppercase; letter-spacing: .04em; }
.chat .f b { font-size: .95rem; }
.chat .ef { margin-top: 10px; font-size: 11px; color: #8b98a0; }

.board .bh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pillx { font-size: 11px; font-weight: 700; text-transform: uppercase; border: 1px solid var(--em); color: var(--em2); border-radius: 999px; padding: 1px 9px; }
.board .th, .board .tr { display: grid; grid-template-columns: 34px minmax(0, 1fr) 150px; gap: 10px; align-items: center; padding: 9px 4px; }
.board .th { font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.board .tr + .tr { border-top: 1px solid var(--line); }
.board .rk { color: var(--muted); font-weight: 700; }
.board .tr:first-of-type .rk { color: var(--gold); }
.board .nm { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.tier { font-style: normal; font-size: 10px; font-weight: 800; text-transform: uppercase; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--line2); color: var(--muted); }
.tier.legend { color: var(--gold); border-color: var(--gold); }
.tier.gold { color: #d4a017; border-color: #d4a017; }
.tier.silver { color: #9aa7ad; border-color: #9aa7ad; }
.board .rt { display: flex; align-items: center; gap: 10px; }
.board .rt em { font-style: normal; font-weight: 700; min-width: 40px; }
.board .bar { flex: 1; height: 6px; border-radius: 99px; background: var(--card2); overflow: hidden; }
.board .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--em), var(--em2)); border-radius: 99px; }

.stream { position: relative; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; border-color: #2b3a40;
  background: radial-gradient(60% 80% at 30% 30%, rgba(16, 185, 129, .28), transparent 70%), radial-gradient(50% 60% at 80% 80%, rgba(232, 184, 74, .18), transparent 70%), #0a1013; }
.stream::before { content: ""; position: absolute; inset: 0; opacity: .8;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='48'%3E%3Cpath d='M14 2 28 10v16L14 34 0 26V10zM42 26l14 8v16L42 58 28 50V34z' fill='none' stroke='%2334d399' stroke-opacity='.14'/%3E%3C/svg%3E"); }
.stream .live { position: absolute; top: 14px; inset-inline-start: 14px; display: flex; align-items: center; gap: 7px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; border-radius: 6px; padding: 3px 9px; }
.stream .live .dotlive { background: #ef4444; }
.stream .chip { position: absolute; top: 14px; inset-inline-end: 14px; background: rgba(0, 0, 0, .55); color: #e5e7eb; font-size: 12px; border-radius: 6px; padding: 3px 9px; }
.stream .badge { position: absolute; bottom: 16px; inset-inline-start: 16px; display: flex; align-items: center; gap: 12px; background: rgba(11, 17, 20, .86); border: 1px solid #34d399; border-radius: 14px; padding: 8px 16px 8px 8px; color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.stream .badge img { width: 44px; height: 44px; border-radius: 10px; }
.stream .badge b { display: block; line-height: 1.2; }
.stream .badge span { font-size: 12px; color: #34d399; }
.stream .badge em { font-style: normal; font-weight: 800; color: #04120c; background: #34d399; border-radius: 8px; padding: 2px 8px; font-size: 13px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.step { display: flex; gap: 14px; min-width: 0; }
.step .num { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--em); color: var(--on-em); display: grid; place-items: center; font-weight: 800; }
.step h3 { margin-bottom: .3em; }
.step p { color: var(--muted); }
.step > div { min-width: 0; flex: 1; }
.tabs { display: flex; gap: 4px; }
.tabs button { background: transparent; border: 0; color: var(--muted); cursor: pointer; border-radius: 7px; padding: 3px 10px; font-size: 12px; transition: background .15s, color .15s; text-transform: none; letter-spacing: 0; }
.tabs button[aria-selected="true"] { background: var(--glow); color: var(--em2); font-weight: 700; }

.epgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.epcard { display: block; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.epcard:hover { border-color: var(--em); transform: translateY(-2px); box-shadow: var(--shadow); }
.epcard p { color: var(--muted); margin: 0; }
.epcard .endpoint-head { margin-bottom: 8px; }
.epcard .path { font-size: .95rem; }

.faq { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; transition: border-color .15s; }
.faq[open] { border-color: var(--line2); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 9px; height: 9px; flex: none; border-inline-end: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.faq[open] summary::after { transform: rotate(-135deg); }
.faq p { padding: 0 18px 16px; margin: 0; color: var(--muted); }

.ctaband { background: radial-gradient(700px 300px at 50% 0%, var(--glow), transparent 70%), var(--bg); text-align: center; }
.ctaband h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.ctaband p { color: var(--muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto 1.4em; }

@media (max-width: 980px) {
  .herogrid, .uc { grid-template-columns: minmax(0, 1fr); }
  .uc.flip .uc-text { order: 0; }
  .preview { margin-top: 14px; width: 100%; }
  .livegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .livetile:nth-child(3) { border-inline-start: 0; }
  .livetile:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .board .th, .board .tr { grid-template-columns: 26px minmax(0, 1fr) 96px; }
  .board .bar { display: none; }
  .brand .lw { height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .heroart .hex, .heroart .flow, .heroart .pulse, .dotlive { animation: none !important; }
}
