/* ─────────────────────────────────────────────────────────────────────────────
   OMNIS WIKI — the whole stylesheet for wiki.oneinch.it

   It used to live inline in fourteen HTML files (one per language), each with
   its own copy of a palette called "OLED Dark × Brand Orange": pure black,
   pure white, and orange at fifteen different alphas doing the work of every
   card fill, every border, every divider and every hover. That palette was
   nobody's — it predates the system the app and the status page run on, which
   is why the wiki looked like a different product.

   Nothing in this file holds a colour of its own. Every value below resolves
   through omnis-tokens.css, which is GENERATED from frontend/src/index.css by
   scripts/build-tokens.py. Change a colour there, run the script, and all
   three surfaces move together.

   The laws that reshaped it, from design-system/omnis-trust-suite/MASTER.md:
     · elevation is luminance — surfaces are the neutral ramp, never a tint
     · orange is the CTA, the active state, the key figure and the focus ring,
       and nothing else: not a border, not a card fill, not a hover, not a glow
     · shadows are black; a coloured halo is heat, not depth
     · prose is IBM Plex Sans. Mono is for code and figures — a documentation
       site set entirely in JetBrains Mono reads as a terminal dump
───────────────────────────────────────────────────────────────────────────── */

/* ── Self-hosted faces ────────────────────────────────────────────────────
   The wiki used to pull three families from fonts.googleapis.com, which the
   rest of the product stopped doing in "enforce CSP + self-host fonts". Every
   visitor to a privacy page was announcing themselves to a third party to
   read it. Same @fontsource files the app bundles, served from this origin.
   Scripts other than Latin and Cyrillic fall through to --font-intl, exactly
   as they do in the app. */

@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 600;
  font-display: swap; src: url('/fonts/chakra-petch-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 700;
  font-display: swap; src: url('/fonts/chakra-petch-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('/fonts/ibm-plex-sans-latin-ext-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('/fonts/ibm-plex-sans-cyrillic-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500;
  font-display: swap; src: url('/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500;
  font-display: swap; src: url('/fonts/ibm-plex-sans-latin-ext-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500;
  font-display: swap; src: url('/fonts/ibm-plex-sans-cyrillic-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600;
  font-display: swap; src: url('/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600;
  font-display: swap; src: url('/fonts/ibm-plex-sans-latin-ext-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600;
  font-display: swap; src: url('/fonts/ibm-plex-sans-cyrillic-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700;
  font-display: swap; src: url('/fonts/ibm-plex-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700;
  font-display: swap; src: url('/fonts/ibm-plex-sans-latin-ext-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700;
  font-display: swap; src: url('/fonts/ibm-plex-sans-cyrillic-700-normal.woff2') format('woff2'); }
/* Arabic is the one locale with its own cut of the prose face; it is reached
   through --font-intl in the family stack, exactly as in the app. CJK has no
   self-hosted cut there either and falls through to the platform face. */
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 700;
  font-display: swap; src: url('/fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500;
  font-display: swap; src: url('/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 700;
  font-display: swap; src: url('/fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2'); }

/* ── The names this stylesheet was written against ────────────────────────
   Aliases, not values: each one points at the token that owns the decision.
   --bg and --accent are deliberately absent — they already mean the right
   thing in omnis-tokens.css, and redefining a name as itself is a circular
   reference that renders as nothing. */
:root {
  /* surfaces — elevation is luminance; the orange-tinted "glass" is gone */
  --bg1:         var(--surface-1);
  --bg2:         var(--surface-2);
  --bg3:         var(--surface-3);
  --glass-bg:    var(--surface-2);
  --glass-bg2:   var(--surface-hover);
  --glass-bd:    var(--border);
  --glass-bd-hi: var(--border-strong);
  /* text ladder */
  --text: var(--text-primary);
  --t1:   var(--text-secondary);
  --t2:   var(--text-muted);
  --t3:   var(--text-disabled);
  /* accent + the four signals */
  --accent2: var(--accent-hover);
  --green:   var(--positive);
  --red:     var(--negative);
  --amber:   var(--warning);
  --blue:    var(--info);
  /* radius — the closed scale of four, leaf boxes and containers */
  --r:  var(--radius-md);
  --r2: var(--radius-lg);
  /* families: display · prose · data */
  --fh: var(--font-h);
  --fs: var(--font-sans);
  --fm: var(--font-m);
  /* the three measurements that belong to this page and nothing else */
  /* The decorative lattice is a workspace texture and this is a reading
     surface, exactly like the pricing and legal pages. Same switch they use. */
  --grid-bg: none;
  --hh: 60px;
  --sw: 260px;
  --tw: 214px;
}


/* ─────────────────────────────────────────────────────────────────────────────
   RESET
───────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--fs);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: .8; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent-subtle-bg); border-radius: 3px; }
::selection { background: var(--accent-subtle-bg); color: var(--accent); }
img { max-width: 100%; }

/* ─────────────────────────────────────────────────────────────────────────────
   BACKGROUND LAYER
───────────────────────────────────────────────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: var(--grid-bg);
  background-size: var(--grid-size) var(--grid-size);
}

/* ─────────────────────────────────────────────────────────────────────────────
   READING PROGRESS
───────────────────────────────────────────────────────────────────────────── */
#progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9999;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  width: 0%; transition: width .08s linear;
}

/* ─────────────────────────────────────────────────────────────────────────────
   HEADER
───────────────────────────────────────────────────────────────────────────── */
header {
  position: fixed; top: 10px; left: 12px; right: 12px; z-index: 200;
  height: var(--hh);
  background: var(--surface-1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-bd);
  border-radius: 14px;
  display: flex; align-items: center; gap: 10px; padding: 0 18px;
}
.h-logo {
  font-family: var(--fh); font-size: 16px; font-weight: 700;
  color: var(--text); display: flex; align-items: center; gap: 6px;
  white-space: nowrap; text-decoration: none;
  transition: opacity .15s;
}
.h-logo:hover { opacity: .85; }
.h-logo-dot { color: var(--accent); }
.h-badge {
  font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: var(--accent-subtle-bg); color: var(--accent);
  border: 1px solid var(--border-strong); border-radius: 4px;
  padding: 2px 7px; white-space: nowrap;
}
.h-sep { width: 1px; height: 20px; background: var(--glass-bd); margin: 0 4px; }
.h-nav { display: flex; align-items: center; gap: 1px; }
.h-nav a {
  font-size: 12px; color: var(--t2); padding: 5px 10px; border-radius: 6px;
  transition: color .15s, background .15s; white-space: nowrap; cursor: pointer;
}
.h-nav a:hover { color: var(--text); background: var(--border); }
.h-nav a.active { color: var(--accent); }
.h-flex { flex: 1; }
.h-search {
  position: relative; display: flex; align-items: center;
}
.h-search svg { position: absolute; left: 10px; color: var(--t3); pointer-events: none; flex-shrink: 0; }
#search-input {
  background: var(--surface-hover); border: 1px solid var(--glass-bd);
  color: var(--text); font-family: var(--fs); font-size: 12px;
  padding: 6px 12px 6px 32px; border-radius: var(--r);
  width: 200px; outline: none; transition: border-color .15s, width .2s, background .15s;
  cursor: pointer;
}
#search-input:focus { border-color: var(--accent-border); background: var(--accent-bg-hover); width: 260px; cursor: text; }
#search-input::placeholder { color: var(--t3); }
.h-cta {
  font-family: var(--fh); font-size: 11px; font-weight: 700; letter-spacing: .05em;
  background: var(--accent); color: var(--bg); border: none; border-radius: var(--r);
  padding: 7px 16px; cursor: pointer; white-space: nowrap;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.h-cta:hover { background: var(--accent-hover); transform: translateY(-1px); }
.h-lang { position: relative; }
.h-lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: var(--r);
  background: transparent; border: 1px solid var(--glass-bd);
  color: var(--t1); font-family: var(--fh); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.h-lang-btn:hover { color: var(--accent); border-color: var(--accent-border); background: var(--accent-bg-hover); }
.h-lang-btn[aria-expanded="true"] { color: var(--accent); border-color: var(--border-strong); background: var(--surface-2); }
.h-lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 168px; max-height: min(400px, calc(100vh - 80px)); overflow-y: auto;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px;
  list-style: none; margin: 0; padding: 4px;
  box-shadow: var(--shadow-3); z-index: 200;
}
.h-lang-menu li {
  padding: 8px 12px; border-radius: 6px; cursor: pointer;
  font-family: var(--fs); font-size: 12px; color: var(--t1);
  transition: background .12s, color .12s;
}
.h-lang-menu li:hover { background: var(--accent-bg-hover); color: var(--accent); }
.h-lang-menu li[aria-selected="true"] { background: var(--accent-bg-hover); color: var(--accent); font-weight: 700; }
[dir="rtl"] .h-lang-menu { right: auto; left: 0; }
.hamburger {
  display: none; background: none; border: 1px solid var(--glass-bd);
  color: var(--t1); border-radius: var(--r); padding: 7px 9px; cursor: pointer;
  transition: border-color .15s, background .15s; align-items: center; justify-content: center;
}
.hamburger:hover { border-color: var(--glass-bd-hi); background: var(--glass-bg); }

/* Search dropdown */
#search-drop {
  display: none; position: fixed; top: 80px; right: 12px; width: 400px;
  max-height: 360px; overflow-y: auto;
  background: var(--surface-2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-bd-hi); border-radius: var(--r2); z-index: 300;
  box-shadow: var(--shadow-3);
}
#search-drop.open { display: block; animation: fadedown .15s ease-out; }
@keyframes fadedown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.sd-item {
  padding: 10px 16px; cursor: pointer; border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.sd-item:last-child { border-bottom: none; }
.sd-item:hover { background: var(--accent-bg-hover); }
.sd-section { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 2px; }
.sd-title { font-size: 13px; font-weight: 600; color: var(--text); }
.sd-empty { padding: 20px; text-align: center; color: var(--t2); font-size: 12px; }

/* ─────────────────────────────────────────────────────────────────────────────
   LAYOUT GRID
───────────────────────────────────────────────────────────────────────────── */
.layout {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: var(--sw) 1fr var(--tw);
  min-height: 100vh;
  padding-top: calc(var(--hh) + 20px);
}

/* ─────────────────────────────────────────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────────────────────────────────────────── */
aside {
  position: sticky; top: calc(var(--hh) + 20px);
  height: calc(100vh - var(--hh) - 20px);
  overflow-y: auto; overflow-x: hidden;
  padding: 20px 0 40px;
  border-right: 1px solid var(--border);
}
.sg-label {
  font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--t3); padding: 16px 18px 6px;
}
.sl {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 18px; font-size: 12.5px; color: var(--t2);
  border-radius: 0; border: none; background: none;
  width: 100%; text-align: left; font-family: var(--fs);
  cursor: pointer; transition: color .12s, background .12s;
  position: relative;
}
.sl::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 2px; height: 0; background: var(--accent);
  transition: height .2s ease-out; border-radius: 0 2px 2px 0;
}
.sl:hover { color: var(--text); background: var(--surface-2); }
.sl.active { color: var(--accent); background: var(--accent-subtle-bg); }
.sl.active::before { height: 60%; }
.sl-num {
  display: flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-subtle-bg); color: var(--accent);
  font-size: 9px; font-weight: 700; flex-shrink: 0;
  transition: background .12s;
}
.sl.active .sl-num { background: var(--accent); color: var(--bg); }
.sl-icon { flex-shrink: 0; opacity: .55; width: 14px; height: 14px; transition: opacity .12s; }
.sl:hover .sl-icon, .sl.active .sl-icon { opacity: 1; }
.sd { height: 1px; background: var(--border); margin: 8px 18px; }

/* ─────────────────────────────────────────────────────────────────────────────
   MAIN CONTENT
───────────────────────────────────────────────────────────────────────────── */
main {
  min-width: 0;
  padding: 40px 52px 100px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   HERO
───────────────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; border-radius: 16px; overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--glass-bd-hi);
  padding: 44px 44px 36px;
  margin-bottom: 56px;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: var(--glow-hero);
  pointer-events: none;
}
.hero-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.hero-eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--accent); }
.hero h1 {
  font-family: var(--fh); font-size: 32px; font-weight: 700; line-height: 1.15;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-hover) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub { font-size: 13.5px; color: var(--t1); max-width: 540px; line-height: 1.7; margin-bottom: 32px; }
.hero-cards {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 10px;
}
.hc {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 14px 16px; cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.hc:hover {
  border-color: var(--glass-bd-hi); background: var(--accent-bg-hover);
  transform: translateY(-2px);
}
.hc-icon { margin-bottom: 10px; color: var(--accent); }
.hc-icon svg { width: 20px; height: 20px; }
.hc-title { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.hc-desc { font-size: 11px; color: var(--t2); line-height: 1.45; }

/* ─────────────────────────────────────────────────────────────────────────────
   SECTION WRAPPERS
───────────────────────────────────────────────────────────────────────────── */
.sec { margin-bottom: 72px; scroll-margin-top: calc(var(--hh) + 30px); }
.sec-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.sec-label::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }
.sec-head {
  display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px; margin-bottom: 26px;
}
.sec-icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  background: var(--accent-subtle-bg); border: 1px solid var(--border-strong);
  color: var(--accent);
}
.sec-icon svg { width: 22px; height: 22px; }
.sec-head h2 {
  font-family: var(--fh); font-size: 22px; font-weight: 700; line-height: 1.2; margin: 0 0 3px;
}
.sec-head p { margin: 0; font-size: 12.5px; color: var(--t2); }

/* ─────────────────────────────────────────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────────────────────────────────────────── */
h3 { font-family: var(--fh); font-size: 14px; font-weight: 600; color: var(--text); margin: 28px 0 12px; }
h4 { font-size: 12px; font-weight: 600; color: var(--t1); margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .06em; }
.lead { font-size: 13.5px; color: var(--t1); margin-bottom: 24px; line-height: 1.75; max-width: 680px; }
p { font-size: 13.5px; color: var(--t1); margin-bottom: 14px; line-height: 1.75; }
p:last-child { margin-bottom: 0; }
strong { color: var(--text); font-weight: 600; }
ul, ol { padding-left: 20px; color: var(--t1); font-size: 13.5px; margin-bottom: 14px; }
li { margin-bottom: 5px; line-height: 1.7; }
code {
  font-family: var(--fm); font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  color: var(--accent); padding: 1px 6px; border-radius: 4px;
}
pre {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--r);
  padding: 18px 20px; overflow-x: auto; margin: 16px 0;
  font-family: var(--fm); font-size: 12.5px; line-height: 1.65;
  color: var(--text-secondary);
}
pre code { background: none; border: none; padding: 0; color: inherit; }
.tag {
  display: inline-flex; align-items: center;
  font-size: 9.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 4px; vertical-align: middle;
}
.tag-new { background: var(--positive-bg); color: var(--green); border: 1px solid var(--positive-border); }
.tag-pro { background: var(--accent-subtle-bg); color: var(--accent); border: 1px solid var(--border-strong); }

/* ─────────────────────────────────────────────────────────────────────────────
   CALLOUTS
───────────────────────────────────────────────────────────────────────────── */
.callout {
  display: flex; gap: 14px; padding: 14px 18px; border-radius: var(--r);
  margin: 20px 0; font-size: 13px; line-height: 1.6; align-items: flex-start;
}
.callout-icon { flex-shrink: 0; margin-top: 1px; }
.callout-icon svg { width: 18px; height: 18px; }
.callout-body strong { display: block; font-size: 12px; margin-bottom: 4px; }
.callout.warn { background: var(--warning-bg); border: 1px solid var(--warning-border); color: var(--text-secondary); }
.callout.info { background: var(--info-bg); border: 1px solid var(--info-border); color: var(--text-secondary); }
.callout.success { background: var(--positive-bg); border: 1px solid var(--positive-border); color: var(--text-secondary); }
.callout.danger { background: var(--negative-bg); border: 1px solid var(--negative-border); color: var(--text-secondary); }

/* ─────────────────────────────────────────────────────────────────────────────
   TABLES
───────────────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 16px 0; border-radius: var(--r2); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; background: var(--surface-1); font-size: 12.5px; }
thead th {
  padding: 10px 16px; text-align: left; font-weight: 700;
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--t2);
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--accent-bg-hover); }
tbody tr + tr { border-top: 1px solid var(--border); }
td { padding: 10px 16px; color: var(--t1); vertical-align: middle; }
td:first-child { color: var(--text); font-weight: 600; }
.b { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 20px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.b-green { background: var(--positive-bg); color: var(--green); border: 1px solid var(--positive-bg-hover); }
.b-amber { background: var(--warning-bg); color: var(--amber); border: 1px solid var(--warning-bg-hover); }
.b-gray  { background: var(--border); color: var(--t2); border: 1px solid var(--border); }
.b-orange { background: var(--accent-subtle-bg); color: var(--accent); border: 1px solid var(--border-strong); }

/* ─────────────────────────────────────────────────────────────────────────────
   STEP CARDS
───────────────────────────────────────────────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.step {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--neutral-wash); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 16px 20px;
  transition: border-color .2s, background .2s, transform .2s;
  cursor: default;
}
.step:hover { border-color: var(--accent-border); background: var(--accent-bg-hover); transform: translateX(3px); }
.step-n {
  display: flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-subtle-bg); border: 1px solid var(--border-strong);
  color: var(--accent); font-size: 12px; font-weight: 700; font-family: var(--fh);
}
.step-body h4 { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--text); text-transform: none; letter-spacing: 0; }
.step-body p { margin: 0; font-size: 12.5px; color: var(--t1); }

/* ─────────────────────────────────────────────────────────────────────────────
   FEATURE GRID
───────────────────────────────────────────────────────────────────────────── */
.fg { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin: 20px 0; }
.fc {
  background: var(--neutral-wash); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 18px 20px;
  transition: border-color .2s, background .2s;
}
.fc:hover { border-color: var(--accent-border); background: var(--accent-bg-hover); }
.fc-icon { color: var(--accent); margin-bottom: 10px; }
.fc-icon svg { width: 22px; height: 22px; }
.fc h4 { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--text); text-transform: none; letter-spacing: 0; }
.fc p { margin: 0; font-size: 12px; color: var(--t2); line-height: 1.55; }
.fc.danger { border-color: var(--negative-border); }
.fc.danger:hover { background: var(--negative-wash); }

/* ─────────────────────────────────────────────────────────────────────────────
   STATUS LIST
───────────────────────────────────────────────────────────────────────────── */
.sl-list { display: flex; flex-direction: column; gap: 7px; margin: 16px 0; }
.si {
  display: flex; align-items: center; gap: 12px;
  background: var(--neutral-wash); border: 1px solid var(--border);
  border-radius: var(--r); padding: 10px 16px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-gray  { background: var(--border-strong); }
.dot-red   { background: var(--red); }
.si-label { font-weight: 700; font-size: 12.5px; color: var(--text); min-width: 88px; }
.si-desc  { font-size: 12.5px; color: var(--t1); }

/* ─────────────────────────────────────────────────────────────────────────────
   METRIC CARDS
───────────────────────────────────────────────────────────────────────────── */
.mg { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 16px 0; }
.mc {
  background: var(--neutral-wash); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 14px 16px;
  transition: border-color .2s;
}
.mc:hover { border-color: var(--accent-border); }
.mc-label { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--t2); margin-bottom: 8px; }
.mc-val { font-family: var(--fh); font-size: 20px; font-weight: 700; line-height: 1; }
.mc-val.g { color: var(--green); text-shadow: 0 0 20px var(--positive-border); }
.mc-val.a { color: var(--amber); }
.mc-val.r { color: var(--red); }
.mc-sub { font-size: 11px; color: var(--t2); margin-top: 5px; }

/* ─────────────────────────────────────────────────────────────────────────────
   PLANS GRID
───────────────────────────────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 20px 0; }
.plan {
  --plan-color: var(--accent);
  background: var(--neutral-wash); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 20px 18px;
  position: relative; transition: border-color .2s;
}
.plan:hover { border-color: color-mix(in srgb, var(--plan-color) 22%, transparent); }
.plan.hi {
  border-color: color-mix(in srgb, var(--plan-color) 28%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--plan-color) 7%, transparent) 0%, var(--surface-2) 100%);
}
.plan-best {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--plan-color); color: var(--bg); font-size: 9px; font-weight: 700;
  letter-spacing: .08em; padding: 3px 12px; border-radius: 20px; text-transform: uppercase;
  white-space: nowrap;
}
.plan-name { font-family: var(--fh); font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.plan-price { font-family: var(--fh); font-size: 26px; font-weight: 700; color: var(--plan-color); }
.plan-price span { font-size: 12px; color: var(--t2); font-family: var(--fm); }
.plans-skeleton { display: flex; gap: 10px; }
.plans-skeleton-card { flex: 1; height: 680px; border-radius: var(--r2); background: var(--surface-2); animation: shimmer 1.4s infinite; }
@keyframes shimmer { 0%,100%{opacity:.4} 50%{opacity:.8} }
.plan-div { height: 1px; background: var(--border); margin: 14px 0; }
/* ── Limits pills ── */
.plan-limits { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin: 10px 0; }
.pl-pill {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 4px;
}
.pl-val { font-family: var(--fh); font-size: 14px; font-weight: 700; color: var(--plan-color); line-height: 1; }
.pl-key { font-size: 8.5px; color: var(--t3); text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }
/* ── Feature group header ── */
.plan-group {
  font-size: 8.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--t3); margin: 12px 0 5px; border-bottom: 1px solid var(--border); padding-bottom: 4px;
}
/* ── Feature rows ── */
.pf {
  font-size: 11px; color: var(--t1); margin-bottom: 5px;
  display: flex; gap: 6px; align-items: flex-start;
}
.pf::before {
  content: ''; flex-shrink: 0; width: 13px; height: 13px; margin-top: 1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
}
.pf-off { color: var(--t3) !important; }
.pf-off::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E") !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   INDICATOR PILLS
───────────────────────────────────────────────────────────────────────────── */
.ip-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.ip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 13px; font-size: 11.5px; color: var(--t1);
  transition: border-color .15s; cursor: default;
}
.ip:hover { border-color: var(--accent-border); color: var(--text); }
.ip-name { font-weight: 700; color: var(--accent); }

/* ─────────────────────────────────────────────────────────────────────────────
   FAQ ACCORDION
───────────────────────────────────────────────────────────────────────────── */
.faq { display: flex; flex-direction: column; gap: 7px; margin: 20px 0; }
.faq-item {
  background: var(--neutral-wash); border: 1px solid var(--border);
  border-radius: var(--r2); overflow: hidden; transition: border-color .2s;
}
.faq-item.open { border-color: var(--accent-border); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px; cursor: pointer; gap: 16px;
  font-size: 13.5px; font-weight: 600; color: var(--text);
  user-select: none; transition: background .12s;
}
.faq-q:hover { background: var(--accent-bg-hover); }
.faq-ch { flex-shrink: 0; color: var(--t2); transition: transform .25s ease-out; }
.faq-ch svg { width: 14px; height: 14px; }
.faq-item.open .faq-ch { transform: rotate(180deg); }
.faq-a {
  display: none; padding: 0 20px 18px;
  font-size: 13px; color: var(--t1); line-height: 1.75;
  border-top: 1px solid var(--border);
}
.faq-item.open .faq-a { display: block; padding-top: 16px; }

/* ─────────────────────────────────────────────────────────────────────────────
   RIGHT TOC
───────────────────────────────────────────────────────────────────────────── */
.toc {
  position: sticky; top: calc(var(--hh) + 20px);
  height: calc(100vh - var(--hh) - 20px);
  overflow-y: auto; padding: 28px 20px 40px;
  border-left: 1px solid var(--border);
}
.toc-title { font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--t3); margin-bottom: 14px; }
.toc-link {
  display: block; font-size: 11.5px; color: var(--t2); padding: 4px 0 4px 12px;
  border-left: 2px solid transparent; transition: color .12s, border-color .12s;
  text-decoration: none; line-height: 1.4;
}
.toc-link:hover { color: var(--text); }
.toc-link.active { color: var(--accent); border-left-color: var(--accent); }

/* ─────────────────────────────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────────────────────────────── */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  background: var(--surface-1);
  padding: 28px 52px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; font-size: 11.5px; color: var(--t2);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--t2); transition: color .12s; }
.footer-links a:hover { color: var(--accent); }

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────────────────────── */

/* ── Tablet landscape ──────────────────────────────────────────── 1140px */
@media (max-width: 1140px) {
  .layout { grid-template-columns: var(--sw) 1fr; }
  .toc { display: none; }
  .plans { grid-template-columns: repeat(2,1fr); }
  .hero-cards { grid-template-columns: repeat(2,1fr); }
}

/* ── Tablet portrait / large phone ─────────────────────────────── 860px */
@media (max-width: 860px) {
  :root { --sw: 260px; }

  /* Sidebar becomes an off-canvas drawer */
  .layout { grid-template-columns: 1fr; }
  aside {
    position: fixed; left: -280px; top: calc(var(--hh) + 14px); z-index: 150;
    width: var(--sw);
    height: calc(100vh - var(--hh) - 14px);
    background: var(--surface-1); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-bd);
    transition: left .25s cubic-bezier(.4,0,.2,1);
    box-shadow: var(--shadow-2);
    overflow-y: auto;
  }
  aside.open { left: 0; }
  .hamburger { display: flex; }
  .h-nav    { display: none; }

  main { padding: 28px 20px 60px; }

  .mg { grid-template-columns: repeat(2,1fr); }
  .fg { grid-template-columns: 1fr; }
  .hero-cards { grid-template-columns: repeat(2,1fr); }
  .plans { grid-template-columns: repeat(2,1fr); }
}

/* ── Phone ──────────────────────────────────────────────────────── 560px */
@media (max-width: 560px) {
  :root { --hh: 56px; }

  header { left: 6px; right: 6px; padding: 0 14px; gap: 8px; }
  /* Declutter header: hide badge, sep, and CTA on narrow screens */
  .h-badge  { display: none; }
  .h-sep    { display: none; }
  .h-cta    { display: none; }
  .h-search { display: none; }

  main { padding: 20px 16px 60px; }

  .hero { padding: 24px 18px 20px; }
  .hero h1 { font-size: 22px; }
  .hero-sub { font-size: 12.5px; }
  .hero-cards { grid-template-columns: 1fr; }

  .plans { grid-template-columns: 1fr; }
  /* Limit pills: 2 cols on narrow phones instead of 3 */
  .plan-limits { grid-template-columns: repeat(2,1fr); }

  .mg { grid-template-columns: 1fr; }
  .mc-grid { grid-template-columns: repeat(2,1fr); }

  .sec-head h2 { font-size: 18px; }

  footer { padding: 20px 16px; flex-direction: column; gap: 10px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 12px; }
}

/* ── Small phone ────────────────────────────────────────────────── 390px */
@media (max-width: 390px) {
  header { padding: 0 10px; gap: 6px; }
  .h-logo { font-size: 14px; }
  main { padding: 16px 12px 60px; }
  .plan-limits { grid-template-columns: repeat(2,1fr); }
}

/* ── Search dropdown: never overflow viewport width ─────────────────────── */
#search-drop {
  right: 6px;
  max-width: calc(100vw - 12px);
}

/* Print */
@media print {
  header, aside, .toc, #progress, .orb, .bg-grid { display: none !important; }
  .layout { grid-template-columns: 1fr; }
  main { padding: 0; }
}
