/* ============================================================
   BlockID Portal — Documentation UI
   Premium glassmorphism, light + dark themes, fully self-contained.
   No external fonts, no frameworks. System font stack only.
   ============================================================ */

:root {
  /* Brand */
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #0ea5e9 120%);

  /* Light theme surfaces */
  --bg: #f6f7fb;
  --bg-grad: radial-gradient(1200px 600px at 10% -10%, #eef2ff 0%, transparent 60%),
             radial-gradient(900px 500px at 110% 10%, #e0f2fe 0%, transparent 55%),
             #f6f7fb;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-2: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(17, 24, 39, 0.08);
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08), 0 2px 6px rgba(17, 24, 39, 0.04);
  --shadow-lg: 0 24px 60px rgba(17, 24, 39, 0.14);

  /* Text */
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --border: rgba(17, 24, 39, 0.1);
  --border-strong: rgba(17, 24, 39, 0.16);

  /* Code */
  --code-bg: #0b1020;
  --code-bg-2: #0f1730;
  --code-text: #e5e7eb;
  --code-inline-bg: rgba(79, 70, 229, 0.1);
  --code-inline-text: #4338ca;

  /* Callout accents */
  --note: #2563eb;     --note-bg: rgba(37, 99, 235, 0.08);
  --warn: #d97706;     --warn-bg: rgba(217, 119, 6, 0.1);
  --tip: #059669;      --tip-bg: rgba(5, 150, 105, 0.1);
  --danger: #dc2626;   --danger-bg: rgba(220, 38, 38, 0.09);

  /* Verdict colors */
  --ok: #059669;
  --bad: #dc2626;
  --hold: #d97706;

  /* Metrics */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --sidebar-w: 280px;
  --topbar-h: 60px;
  --maxw: 860px;
  --t: 200ms cubic-bezier(.4, 0, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
          "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

html[data-theme="dark"] {
  --bg: #0a0e1a;
  --bg-grad: radial-gradient(1200px 600px at 10% -10%, rgba(79,70,229,0.18) 0%, transparent 60%),
             radial-gradient(900px 500px at 110% 5%, rgba(14,165,233,0.14) 0%, transparent 55%),
             #0a0e1a;
  --surface: rgba(22, 28, 46, 0.7);
  --surface-solid: #131a2e;
  --surface-2: rgba(30, 38, 60, 0.5);
  --glass-border: rgba(148, 163, 184, 0.14);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);

  --text: #e7ebf3;
  --text-soft: #c7cfdd;
  --muted: #94a3b8;
  --faint: #64748b;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.26);

  --code-bg: #060912;
  --code-bg-2: #0a0f1f;
  --code-text: #e5e7eb;
  --code-inline-bg: rgba(124, 58, 237, 0.22);
  --code-inline-text: #c4b5fd;

  --note: #60a5fa;     --note-bg: rgba(37, 99, 235, 0.16);
  --warn: #fbbf24;     --warn-bg: rgba(217, 119, 6, 0.18);
  --tip: #34d399;      --tip-bg: rgba(5, 150, 105, 0.16);
  --danger: #f87171;   --danger-bg: rgba(220, 38, 38, 0.18);

  --ok: #34d399;
  --bad: #f87171;
  --hold: #fbbf24;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-grad);
  background-attachment: fixed;
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
::selection { background: rgba(124, 58, 237, 0.25); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-right: 1px solid var(--glass-border);
  display: flex; flex-direction: column;
  z-index: 60;
  transition: transform var(--t);
}
.sidebar__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px 12px;
  font-weight: 800; font-size: 1.02rem; letter-spacing: -0.01em;
  color: var(--text);
}
.sidebar__brand .diamond {
  width: 26px; height: 26px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 8px; color: #fff;
  background: var(--brand-grad);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}
.sidebar__search { padding: 6px 16px 12px; }
.search {
  position: relative; display: flex; align-items: center;
}
.search svg {
  position: absolute; left: 11px; width: 16px; height: 16px;
  color: var(--muted); pointer-events: none;
}
.search input {
  width: 100%; padding: 9px 12px 9px 34px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-family: inherit;
  transition: border-color var(--t), box-shadow var(--t);
}
.search input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}
.search input::placeholder { color: var(--faint); }

.sidebar__nav {
  flex: 1; overflow-y: auto; padding: 4px 12px 24px;
  scrollbar-width: thin;
}
.nav-group { margin-top: 14px; }
.nav-group__title {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--faint);
  padding: 4px 12px; margin-bottom: 2px;
}
.nav-link {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px; margin: 1px 0;
  border-radius: var(--radius-sm);
  color: var(--text-soft); font-size: 0.9rem; font-weight: 500;
  transition: background var(--t), color var(--t);
}
.nav-link:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav-link svg { width: 16px; height: 16px; flex: 0 0 auto; opacity: 0.7; }
.nav-link[aria-current="page"] {
  background: var(--brand-grad); color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}
.nav-link[aria-current="page"] svg { opacity: 1; }
.nav-link.is-hidden { display: none; }
.nav-group.is-hidden { display: none; }

/* ---------- Main column ---------- */
.main {
  flex: 1; margin-left: var(--sidebar-w);
  display: flex; flex-direction: column; min-width: 0;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 22px;
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
}
.topbar__title {
  font-weight: 700; font-size: 0.95rem; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 8px; color: var(--text);
}
.topbar__title .gem { color: var(--brand); }
.topbar__spacer { flex: 1; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }

.menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
}

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; font-family: inherit;
  border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text);
  cursor: pointer; transition: all var(--t); white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; }
.btn--primary {
  background: var(--brand-grad); color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}
.btn--primary:hover { color: #fff; filter: brightness(1.06); }
.btn--icon { padding: 8px; width: 38px; height: 38px; justify-content: center; }
.btn--icon svg { width: 18px; height: 18px; }

.theme-toggle .moon { display: none; }
html[data-theme="dark"] .theme-toggle .sun { display: none; }
html[data-theme="dark"] .theme-toggle .moon { display: block; }

/* ---------- Content ---------- */
.content {
  width: 100%; max-width: calc(var(--maxw) + 80px);
  margin: 0 auto; padding: 38px 40px 80px;
}
.content > * { max-width: var(--maxw); }

.breadcrumbs {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 0.82rem; color: var(--muted); margin-bottom: 18px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs .sep { opacity: 0.5; }

/* Typography */
h1, h2, h3, h4 { color: var(--text); line-height: 1.25; letter-spacing: -0.02em; scroll-margin-top: 80px; }
h1 { font-size: 2.1rem; font-weight: 800; margin: 0 0 14px; }
h2 {
  font-size: 1.45rem; font-weight: 750; margin: 44px 0 14px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
h3 { font-size: 1.15rem; font-weight: 700; margin: 30px 0 10px; }
h4 { font-size: 1rem; font-weight: 700; margin: 22px 0 8px; }
p { margin: 0 0 14px; color: var(--text-soft); }
ul, ol { margin: 0 0 16px; padding-left: 22px; color: var(--text-soft); }
li { margin: 5px 0; }
li::marker { color: var(--brand); }
strong { color: var(--text); font-weight: 650; }
hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.lead { font-size: 1.12rem; color: var(--muted); margin-bottom: 24px; }
.section-label {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--brand);
  margin-bottom: 8px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 38px; margin-bottom: 34px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 90% -20%, rgba(124,58,237,0.18), transparent 60%);
  pointer-events: none;
}
.hero h1 { font-size: 2.4rem; margin-bottom: 12px; }
.hero .lead { max-width: 640px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ---------- Code ---------- */
code {
  font-family: var(--mono); font-size: 0.86em;
  background: var(--code-inline-bg); color: var(--code-inline-text);
  padding: 0.12em 0.42em; border-radius: 6px;
  word-break: break-word;
}
pre {
  position: relative;
  background: linear-gradient(180deg, var(--code-bg-2), var(--code-bg));
  color: var(--code-text);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-sm);
  padding: 16px 18px; margin: 0 0 18px;
  overflow-x: auto; font-size: 0.85rem; line-height: 1.6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--shadow);
}
pre code {
  background: none; color: inherit; padding: 0; font-size: inherit;
  border-radius: 0; white-space: pre;
}
pre::-webkit-scrollbar { height: 9px; }
pre::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.4); border-radius: 9px; }
.code-copy {
  position: absolute; top: 9px; right: 9px;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font); font-size: 0.72rem; font-weight: 600;
  padding: 5px 9px; border-radius: 7px; cursor: pointer;
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.22);
  transition: all var(--t); opacity: 0; backdrop-filter: blur(6px);
}
pre:hover .code-copy, .code-copy:focus { opacity: 1; }
.code-copy:hover { background: rgba(79, 70, 229, 0.35); color: #fff; border-color: transparent; }
.code-copy svg { width: 13px; height: 13px; }
.code-copy.copied { background: rgba(5, 150, 105, 0.4); color: #fff; }
.code-label {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  margin: 12px 0 6px;
}

/* ---------- Callouts ---------- */
.callout {
  position: relative; display: flex; gap: 12px;
  padding: 14px 16px; margin: 18px 0;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  border-left-width: 4px; background: var(--surface);
  font-size: 0.93rem;
}
.callout__icon { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; }
.callout__icon svg { width: 20px; height: 20px; }
.callout__body { min-width: 0; }
.callout__body > :last-child { margin-bottom: 0; }
.callout strong:first-child { display: inline; }
.note   { border-left-color: var(--note);   background: var(--note-bg);   }
.note   .callout__icon { color: var(--note); }
.warn   { border-left-color: var(--warn);   background: var(--warn-bg);   }
.warn   .callout__icon { color: var(--warn); }
.tip    { border-left-color: var(--tip);    background: var(--tip-bg);    }
.tip    .callout__icon { color: var(--tip); }
.danger { border-left-color: var(--danger); background: var(--danger-bg); }
.danger .callout__icon { color: var(--danger); }

/* ---------- Steps timeline ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 20px 0; }
.steps > li {
  position: relative; padding: 0 0 22px 52px; margin: 0;
  counter-increment: step;
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.95rem; color: #fff;
  background: var(--brand-grad);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}
.steps > li::after {
  content: ""; position: absolute; left: 16px; top: 38px; bottom: 4px;
  width: 2px; background: var(--border-strong);
}
.steps > li:last-child::after { display: none; }
.steps > li > h4, .steps > li > strong:first-child {
  display: block; color: var(--text); margin: 4px 0 6px; font-size: 1rem; font-weight: 700;
}
.steps > li p { margin-bottom: 8px; }
.steps > li > :last-child { margin-bottom: 0; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid; gap: 16px; margin: 22px 0;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.doc-card {
  display: block; padding: 20px;
  background: var(--surface); border: 1px solid var(--glass-border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--text); transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.doc-card:hover {
  text-decoration: none; transform: translateY(-3px);
  box-shadow: var(--shadow-lg); border-color: rgba(79, 70, 229, 0.4);
}
.doc-card__icon {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; margin-bottom: 12px;
  background: var(--code-inline-bg); color: var(--brand);
}
.doc-card__icon svg { width: 22px; height: 22px; }
.doc-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.doc-card p { margin: 0; font-size: 0.88rem; color: var(--muted); }
.doc-card.is-hidden { display: none; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.01em;
  background: var(--surface-2); color: var(--text-soft);
  border: 1px solid var(--border-strong); white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; }
.badge--super  { background: rgba(124,58,237,0.14); color: var(--brand-2); border-color: rgba(124,58,237,0.3); }
.badge--admin  { background: rgba(37,99,235,0.13);  color: var(--note);    border-color: rgba(37,99,235,0.3); }
.badge--issuer { background: rgba(5,150,105,0.13);  color: var(--tip);     border-color: rgba(5,150,105,0.3); }
.badge--verifier { background: rgba(217,119,6,0.14); color: var(--warn);   border-color: rgba(217,119,6,0.32); }
.badge--user   { background: rgba(14,165,233,0.13); color: #0ea5e9;        border-color: rgba(14,165,233,0.3); }
.badge--ok     { background: rgba(5,150,105,0.14);  color: var(--ok);      border-color: rgba(5,150,105,0.32); }
.badge--get    { background: rgba(5,150,105,0.14);  color: var(--ok);      border-color: rgba(5,150,105,0.32); }
.badge--post   { background: rgba(37,99,235,0.13);  color: var(--note);    border-color: rgba(37,99,235,0.3); }
.badge--del    { background: rgba(220,38,38,0.12);  color: var(--bad);     border-color: rgba(220,38,38,0.3); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 18px 0; border-radius: var(--radius-sm); border: 1px solid var(--border); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; background: var(--surface-solid); }
thead th {
  text-align: left; padding: 11px 14px; font-weight: 700; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted);
  background: var(--surface-2); border-bottom: 1px solid var(--border-strong);
}
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text-soft); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
table code { white-space: nowrap; }

/* ---------- FAQ accordion (details) ---------- */
.faq { margin: 18px 0; display: flex; flex-direction: column; gap: 10px; }
details.qa {
  background: var(--surface); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden;
}
details.qa > summary {
  cursor: pointer; list-style: none; padding: 14px 16px;
  font-weight: 650; color: var(--text); display: flex;
  align-items: center; justify-content: space-between; gap: 10px;
}
details.qa > summary::-webkit-details-marker { display: none; }
details.qa > summary .chev { transition: transform var(--t); flex: 0 0 auto; color: var(--muted); }
details.qa[open] > summary .chev { transform: rotate(90deg); }
details.qa > summary:hover { color: var(--brand); }
details.qa .qa__body { padding: 0 16px 14px; color: var(--text-soft); }
details.qa .qa__body > :last-child { margin-bottom: 0; }
details.qa.is-hidden { display: none; }

/* ---------- MOCK UI panels (faux screenshots) ---------- */
.mock {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-solid);
  box-shadow: var(--shadow-lg); overflow: hidden; margin: 22px 0;
}
.mock__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.mock__dots { display: flex; gap: 6px; }
.mock__dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.mock__dots i:nth-child(1) { background: #ff5f57; }
.mock__dots i:nth-child(2) { background: #febc2e; }
.mock__dots i:nth-child(3) { background: #28c840; }
.mock__url {
  flex: 1; font-family: var(--mono); font-size: 0.74rem; color: var(--muted);
  background: var(--bg); border: 1px solid var(--border); border-radius: 7px;
  padding: 4px 10px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mock__body { padding: 18px; }
.mock-caption { font-size: 0.8rem; color: var(--faint); text-align: center; margin: -10px 0 22px; }

.faux-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px; background: var(--surface);
}
.faux-row { display: flex; align-items: center; gap: 12px; }
.faux-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.faux-stat {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; background: var(--surface);
}
.faux-stat .num { font-size: 1.6rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.faux-stat .lbl { font-size: 0.76rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.faux-stat .num.brand { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* faux credential card */
.cred-card {
  position: relative; overflow: hidden;
  border-radius: 14px; padding: 18px 20px; color: #fff;
  background: linear-gradient(135deg, #4338ca, #6d28d9 55%, #0e7490);
  box-shadow: var(--shadow-lg); max-width: 420px;
}
.cred-card::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 70%);
}
.cred-card .cc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.cred-card .cc-issuer { font-size: 0.78rem; opacity: 0.85; }
.cred-card .cc-title { font-size: 1.25rem; font-weight: 800; margin: 2px 0 14px; }
.cred-card .cc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.cred-card .cc-k { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.7; }
.cred-card .cc-v { font-size: 0.92rem; font-weight: 600; word-break: break-word; }
.cred-card .cc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 12px; }
.cred-card .cc-status {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.2); padding: 3px 10px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700;
}
.cc-qr {
  width: 56px; height: 56px; border-radius: 8px; background: #fff; padding: 5px;
  display: grid; place-items: center; flex: 0 0 auto;
}
.cc-qr svg { width: 100%; height: 100%; }

/* faux verify result */
.verify-panel {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--surface);
}
.verify-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.verify-head.ok   { background: var(--tip-bg); }
.verify-head.bad  { background: var(--danger-bg); }
.verify-head.hold { background: var(--warn-bg); }
.verdict-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 999px; font-weight: 800;
  font-size: 0.92rem; letter-spacing: 0.02em;
}
.verdict-pill.ok   { background: var(--ok);   color: #fff; }
.verdict-pill.bad  { background: var(--bad);  color: #fff; }
.verdict-pill.hold { background: var(--hold); color: #fff; }
.verify-head .vp-sub { font-size: 0.85rem; color: var(--muted); }
.check-list { list-style: none; padding: 12px 18px; margin: 0; }
.check-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; font-size: 0.9rem; color: var(--text-soft);
  border-bottom: 1px solid var(--border);
}
.check-list li:last-child { border-bottom: none; }
.check-ico { flex: 0 0 auto; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; }
.check-ico.pass { background: rgba(5,150,105,0.16); color: var(--ok); }
.check-ico.fail { background: rgba(220,38,38,0.16); color: var(--bad); }
.check-ico svg { width: 13px; height: 13px; }
.check-list .ck-val { margin-left: auto; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }

/* faux profile dropdown */
.profile-dd {
  width: 260px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface-solid);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.profile-dd__head { display: flex; align-items: center; gap: 11px; padding: 14px; border-bottom: 1px solid var(--border); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 800; color: #fff;
  background: var(--brand-grad); font-size: 0.95rem;
}
.profile-dd__name { font-weight: 700; color: var(--text); font-size: 0.92rem; }
.profile-dd__role { font-size: 0.76rem; color: var(--muted); }
.profile-dd__menu { padding: 6px; }
.profile-dd__item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: 8px; font-size: 0.88rem; color: var(--text-soft); cursor: default;
}
.profile-dd__item:hover { background: var(--surface-2); }
.profile-dd__item svg { width: 16px; height: 16px; opacity: 0.7; }
.profile-dd__item.danger { color: var(--bad); }
.profile-dd__sep { height: 1px; background: var(--border); margin: 6px 4px; }

/* faux dashboard mini-sidebar */
.faux-app { display: grid; grid-template-columns: 180px 1fr; min-height: 230px; }
.faux-side { background: var(--surface-2); border-right: 1px solid var(--border); padding: 12px 8px; }
.faux-side .fs-brand { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 0.82rem; padding: 4px 8px 10px; color: var(--text); }
.faux-side .fs-brand .diamond { width: 20px; height: 20px; border-radius: 6px; background: var(--brand-grad); display: grid; place-items: center; color: #fff; }
.faux-nav-item { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 7px; font-size: 0.8rem; color: var(--muted); }
.faux-nav-item svg { width: 14px; height: 14px; }
.faux-nav-item.active { background: var(--brand-grad); color: #fff; }
.faux-main { padding: 14px 16px; }
.faux-main .fm-bc { font-size: 0.72rem; color: var(--faint); margin-bottom: 10px; }

/* toast / modal mocks */
.toast {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--surface-solid); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg); font-size: 0.88rem; color: var(--text);
}
.toast .t-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.toast.ok .t-ico { background: rgba(5,150,105,0.16); color: var(--ok); }
.toast .t-ico svg { width: 14px; height: 14px; }

/* keyboard hint */
kbd {
  font-family: var(--mono); font-size: 0.78em; padding: 2px 6px;
  border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: 6px; background: var(--surface-2); color: var(--text-soft);
}

/* misc utility */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }
.grid-2 { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.endpoint {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.9rem; margin: 8px 0;
  padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text);
}
.endpoint .path { word-break: break-all; }
.toc {
  background: var(--surface); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 16px 20px; margin: 22px 0;
  box-shadow: var(--shadow);
}
.toc strong { display: block; margin-bottom: 8px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.toc ul { columns: 2; column-gap: 28px; margin: 0; padding-left: 18px; }
.toc a { font-size: 0.9rem; }

.no-results {
  display: none; padding: 24px; text-align: center; color: var(--muted);
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); margin: 16px 0;
}
.no-results.show { display: block; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border); padding: 22px 40px;
  color: var(--muted); font-size: 0.85rem;
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
  max-width: calc(var(--maxw) + 80px); margin: 0 auto; width: 100%;
}
.footer .dot { opacity: 0.5; }

/* ---------- Sidebar scrim (mobile) ---------- */
.scrim {
  position: fixed; inset: 0; background: rgba(10,14,26,0.5);
  backdrop-filter: blur(2px); z-index: 55; opacity: 0;
  visibility: hidden; transition: opacity var(--t);
}
.scrim.show { opacity: 1; visibility: visible; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-2, .toc ul { grid-template-columns: 1fr; columns: 1; }
}
@media (max-width: 860px) {
  :root { --sidebar-w: 290px; }
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .content { padding: 26px 20px 70px; }
  .hero { padding: 30px 22px; }
  .hero h1 { font-size: 1.9rem; }
  h1 { font-size: 1.8rem; }
  .footer { padding: 22px 20px; }
  .topbar__title { font-size: 0.88rem; }
  .btn .btn-label-lg { display: none; }
}
@media (max-width: 520px) {
  .cred-card .cc-grid { grid-template-columns: 1fr; }
  .faux-app { grid-template-columns: 1fr; }
  .faux-side { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .doc-card:hover, .btn:hover { transform: none; }
}

/* ---------- Print ---------- */
@media print {
  :root { --maxw: 100%; }
  .sidebar, .topbar, .scrim, .menu-btn, .code-copy, .search, .hero__cta, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .main { margin-left: 0; }
  .content { max-width: 100%; padding: 0; }
  .hero, .doc-card, .callout, .mock, .toc, .faq details, .table-wrap {
    box-shadow: none !important; border: 1px solid #ccc !important; background: #fff !important; break-inside: avoid;
  }
  .hero::before, .hero::after, .cred-card::after { display: none !important; }
  h1, h2, h3, h4, p, li, td, th { color: #000 !important; }
  pre { background: #f4f4f4 !important; color: #000 !important; border: 1px solid #bbb !important; }
  pre code { color: #000 !important; }
  a { color: #000; text-decoration: underline; }
  /* show link URLs */
  .content a[href^="http"]::after,
  .content a[href$=".html"]::after,
  .content a[href$=".php"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #555; word-break: break-all; }
  .nav-link[aria-current="page"] { background: none; color: #000; }
  details.qa[open] .qa__body, details.qa .qa__body { display: block; }
  details.qa > summary .chev { display: none; }
  .steps > li::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* force color accuracy for brand chips in print where intended */
.cred-card, .verdict-pill, .nav-link[aria-current="page"], .steps > li::before, .diamond, .doc-card__icon {
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
