/* Prizrak-Box Guide — slate + teal theme */
:root {
  --bg-deep: #0b1218;
  --bg: #0f1a22;
  --bg-elevated: #15232e;
  --bg-soft: #1a2d3b;
  --border: rgba(94, 196, 186, 0.14);
  --border-strong: rgba(94, 196, 186, 0.32);
  --text: #e8f0f4;
  --text-muted: #8fa3b0;
  --accent: #3ecfbf;
  --accent-soft: rgba(62, 207, 191, 0.14);
  --accent-hot: #5eead4;
  --vpn: #3ecfbf;
  --direct: #f0b429;
  --reject: #f07178;
  --radius: 14px;
  --nav-h: 64px;
  --sidebar-w: 260px;
  --doc-max: 1120px;
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(62, 207, 191, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(46, 120, 140, 0.22), transparent 50%),
    radial-gradient(ellipse 50% 50% at 50% 100%, rgba(20, 60, 80, 0.35), transparent 60%),
    linear-gradient(180deg, #0b1218 0%, #0f1a22 40%, #0c151c 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-hot);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #fff;
}

/* —— Nav —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.25rem;
  background: rgba(11, 18, 24, 0.78);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.nav-from {
  margin-left: 0.15rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--accent-soft);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--accent-hot);
}

.nav-brand img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 6px;
  background: #1a1a1a;
}

.nav-links {
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  margin-left: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  flex-shrink: 0;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--accent-soft);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  font-family: inherit;
}

/* —— Doc layout (Notion-style sidebar TOC) —— */
.page-doc .doc-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 2.75rem);
  width: min(var(--doc-max), calc(100% - 2rem));
  margin-inline: auto;
  padding: 0 0 3rem;
  align-items: start;
}

.page-doc .doc-content {
  min-width: 0;
  padding-right: clamp(0.25rem, 2vw, 1rem);
}

.page-doc .doc-content .wrap {
  width: 100%;
  max-width: 680px;
  margin-inline: 0;
}

.page-doc .hero {
  min-height: auto;
  padding: 1.75rem 0 2rem;
}

.page-doc .hero h1 {
  max-width: none;
}

.doc-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  align-self: start;
  max-height: calc(100vh - var(--nav-h) - 1.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.75rem 1.25rem 2rem 0;
  border-right: 1px solid var(--border);
  background: transparent;
  scrollbar-width: thin;
}

.doc-toc-top {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.doc-toc-hub {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.doc-toc-hub:hover {
  color: var(--accent-hot);
}

.doc-toc-sep {
  border: none;
  height: 1px;
  margin: 0.85rem 0;
  background: var(--border);
}

.doc-toc-heading {
  margin: 0 0 0.5rem;
  padding: 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.doc-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-toc-list ul {
  list-style: none;
  margin: 0.15rem 0 0.35rem;
  padding: 0 0 0 0.65rem;
  border-left: 1px solid var(--border);
}

.doc-toc-list a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.doc-toc-list a:hover {
  color: var(--text);
  background: rgba(62, 207, 191, 0.08);
}

.doc-toc-list a.active {
  color: var(--accent-hot);
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.doc-toc-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
}

.doc-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-h);
  z-index: 90;
  background: rgba(0, 0, 0, 0.55);
  border: none;
  cursor: pointer;
}

.page-doc.sidebar-open .doc-sidebar-backdrop {
  display: block;
}

.page-doc.sidebar-open {
  overflow: hidden;
}

@media (max-width: 960px) {
  .page-doc.sidebar-open .doc-sidebar {
    transform: translateX(0);
  }
}

/* —— Layout —— */
.wrap {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

section {
  padding: 4.5rem 0;
}

.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.2rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 36em;
  margin: 0;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: 3rem 0 4rem;
  overflow: hidden;
}

.hero-wave {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
  background:
    radial-gradient(ellipse 70% 60% at 70% 40%, rgba(62, 207, 191, 0.12), transparent 60%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 40px,
      rgba(62, 207, 191, 0.03) 40px,
      rgba(62, 207, 191, 0.03) 41px
    );
  pointer-events: none;
  animation: wave-drift 18s ease-in-out infinite alternate;
}

@keyframes wave-drift {
  from { transform: translateX(0) scale(1); }
  to { transform: translateX(-2%) scale(1.03); }
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-brand img {
  width: clamp(44px, 6vw, 56px);
  height: clamp(44px, 6vw, 56px);
  border-radius: 12px;
  background: #141414;
  box-shadow: 0 0 0 1px var(--border);
}

.hero h1 {
  max-width: 14ch;
  margin-bottom: 1rem;
}

.hero .lead {
  margin-bottom: 2rem;
}

.hero-byline {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.hero-byline strong {
  color: var(--accent-hot);
  font-weight: 700;
}

.hero-prereq {
  margin: 1.5rem 0 0;
  max-width: 36em;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.hero-prereq strong {
  color: var(--text);
  font-weight: 600;
}

.site-footer p {
  margin: 0;
}

.site-footer p + p {
  margin-top: 0.45rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text);
}

.footer-brand strong {
  color: var(--accent-hot);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #06201c;
}

.btn-primary:hover {
  background: var(--accent-hot);
  color: #06201c;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
}

/* —— Steps —— */
.step {
  margin-bottom: 3.5rem;
}

.step:last-child {
  margin-bottom: 0;
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.step-num {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
}

.step-list {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
}

.step-list li {
  margin-bottom: 0.55rem;
}

.step-list strong {
  color: var(--accent-hot);
  font-weight: 600;
}

.shot-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.shot-grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.shot {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  cursor: zoom-in;
  transition: border-color 0.25s, transform 0.35s var(--ease), box-shadow 0.35s;
}

.shot:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}

.shot figcaption {
  padding: 0.65rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.shot-hint {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: rgba(11, 18, 24, 0.75);
  font-size: 0.7rem;
  color: var(--accent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.shot:hover .shot-hint {
  opacity: 1;
}

/* —— Spoilers —— */
.pro-note {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  overflow: hidden;
}

.pro-note summary {
  list-style: none;
  cursor: pointer;
  padding: 0.9rem 1.1rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}

.pro-note summary::-webkit-details-marker {
  display: none;
}

.pro-note summary::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform 0.25s var(--ease);
}

.pro-note[open] summary::before {
  transform: rotate(45deg);
}

.pro-note-body {
  padding: 0 1.1rem 1.1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--border);
}

.pro-note-body p:first-child {
  margin-top: 0.9rem;
}

.pro-note-body code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-hot);
}

/* —— Callout —— */
.callout {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  margin: 1.25rem 0;
}

.callout-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--accent);
}

.callout p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* —— Config —— */
.config-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.25rem 0;
}

.config-block {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #081018;
  max-height: 520px;
  overflow: auto;
}

.config-block pre {
  margin: 0;
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: #b8d4c8;
  white-space: pre;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: #06201c;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  z-index: 300;
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.35s;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* —— Table —— */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.25rem 0 1rem;
}

.routing-search-wrap {
  display: block;
  margin-bottom: 1rem;
}

.routing-search {
  width: 100%;
  max-width: 420px;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.routing-search::placeholder {
  color: var(--text-muted);
}

.routing-search:focus {
  border-color: var(--border-strong);
}

.routing-empty {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.routing-empty.hidden {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.filter-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-soft);
  border-color: var(--border-strong);
  color: var(--text);
}

.table-wrap {
  overflow: auto;
  max-height: min(70vh, 640px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

table.routing {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.routing th,
table.routing td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.routing th {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
}

table.routing tr:last-child td {
  border-bottom: none;
}

table.routing tr.hidden {
  display: none;
}

table.routing tr:hover td {
  background: rgba(62, 207, 191, 0.04);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-vpn {
  background: rgba(62, 207, 191, 0.15);
  color: var(--vpn);
}

.badge-direct {
  background: rgba(240, 180, 41, 0.15);
  color: var(--direct);
}

.badge-reject {
  background: rgba(240, 113, 120, 0.15);
  color: var(--reject);
}

.badge-type {
  background: rgba(143, 163, 176, 0.12);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
}

/* —— Cheatsheet —— */
.cheat-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.cheat-item {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.cheat-item h3 {
  margin-bottom: 0.5rem;
}

.cheat-item p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.code-sample {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #081018;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #b8d4c8;
  overflow-x: auto;
}

.priority-flow {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.priority-flow span {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  background: var(--bg-soft);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.priority-flow span em {
  font-style: normal;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  min-width: 1.25rem;
}

/* —— Reveal animation —— */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* —— Footer —— */
.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* —— Lightbox —— */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(4, 8, 12, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  cursor: grab;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox.dragging {
  cursor: grabbing;
}

.lightbox-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.05s linear;
  will-change: transform;
}

.lightbox-ui {
  position: absolute;
  z-index: 2;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.lightbox-ui.top {
  top: 1rem;
  right: 1rem;
}

.lightbox-ui.bottom {
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.4rem;
  border-radius: 999px;
  background: rgba(15, 26, 34, 0.85);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.lb-btn {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  font-family: var(--font-display);
  transition: background 0.2s;
}

.lb-btn:hover {
  background: var(--accent);
  color: #06201c;
}

.lb-zoom-label {
  min-width: 3.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.lightbox-caption {
  position: absolute;
  bottom: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(90vw, 520px);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

/* —— Responsive —— */
@media (max-width: 960px) {
  .page-doc .doc-shell {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 0;
    padding: 0 0 2rem;
  }

  .doc-toc-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 2.25rem;
  }

  .doc-sidebar {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    z-index: 95;
    width: min(300px, 88vw);
    max-height: calc(100vh - var(--nav-h));
    height: calc(100vh - var(--nav-h));
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease);
    box-shadow: var(--shadow);
    background: rgba(11, 18, 24, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1.25rem 1rem 2rem;
    border-right: 1px solid var(--border);
  }

  .page-doc .doc-content {
    padding-inline: 1rem;
  }

  .page-doc .doc-content .wrap {
    max-width: none;
  }

  .page-doc .hero {
    padding: 1.5rem 0 1.25rem;
  }

  .page-doc section {
    padding: 2.5rem 0;
  }

  .doc-toc-list a {
    padding: 0.55rem 0.65rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 0.75rem;
    background: rgba(11, 18, 24, 0.96);
    border-bottom: 1px solid var(--border);
    margin-left: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding-top: 2.5rem;
  }

  section {
    padding: 3rem 0;
  }

  .page-hub section {
    padding: 2rem 0 3rem;
  }

  .category-grid {
    max-width: none;
  }

  .client-accordion summary {
    padding: 0.85rem 1rem;
  }

  .config-block {
    margin-inline: -0.25rem;
  }

  .config-block pre {
    font-size: 0.72rem;
  }

  .filters {
    gap: 0.35rem;
  }

  .filter-btn {
    font-size: 0.78rem;
    padding: 0.35rem 0.6rem;
  }

  .routing-filters,
  .routing-search-wrap {
    width: 100%;
  }

  .routing-search {
    width: 100%;
  }

  table.routing {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-row .btn {
    width: 100%;
    justify-content: center;
  }
}

/* —— Hub landing —— */
.page-hub .hero-hub {
  min-height: calc(55vh - var(--nav-h));
  padding-bottom: 2rem;
}

.hub-section {
  padding: 2rem 0 4.5rem;
}

/* Category hub — docs.rw style tiles */
.category-panel {
  padding: 1.35rem 1.35rem 1.5rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border);
  background: rgba(21, 35, 46, 0.72);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.category-panel-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.category-panel-emoji {
  font-size: 1.15rem;
  line-height: 1;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  max-width: 520px;
  margin-inline: auto;
}

.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1.15rem 0.85rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 26, 34, 0.65);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s, transform 0.3s var(--ease), background 0.25s, box-shadow 0.3s;
}

.category-tile:hover {
  border-color: var(--border-strong);
  background: rgba(26, 45, 59, 0.85);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.category-tile--accent:hover {
  border-color: rgba(62, 207, 191, 0.45);
  box-shadow: 0 12px 32px rgba(62, 207, 191, 0.12);
}

.category-tile-icon-wrap {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
}

.category-tile-icon {
  width: 72px;
  height: 72px;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s var(--ease);
}

.category-tile:hover .category-tile-icon {
  transform: scale(1.06);
}

.category-tile-emoji {
  font-size: 3.25rem;
  line-height: 1;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s var(--ease);
  user-select: none;
}

.category-tile:hover .category-tile-emoji {
  transform: scale(1.06);
}

.category-tile-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.category-tile-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.35;
}

.hub-summary {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 2rem;
}

.hub-summary-card {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.hub-summary-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.hub-summary-card p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.hub-summary-card a {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-hot);
  text-decoration: none;
}

.hub-summary-card a:hover {
  text-decoration: underline;
}

.hero-brand--platform {
  gap: 0.85rem;
}

.hero-platform-icon {
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.hero-platform-icon--prizrak {
  border-radius: 12px;
  background: #141414;
  box-shadow: 0 0 0 1px var(--border);
}

.hero-platform-emoji {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(21, 35, 46, 0.72);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-size: 2rem;
  line-height: 1;
  user-select: none;
}

.platform-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.platform-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s, transform 0.35s var(--ease), box-shadow 0.35s;
}

.platform-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.platform-card--accent {
  border-color: var(--border-strong);
  background: linear-gradient(145deg, var(--bg-elevated) 0%, rgba(62, 207, 191, 0.08) 100%);
}

.platform-icon {
  font-size: 2rem;
  line-height: 1;
}

.platform-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.platform-card h2 {
  margin: 0;
  font-size: 1.45rem;
}

.platform-card > p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  flex: 1;
}

.platform-features {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.platform-features li {
  margin-bottom: 0.35rem;
}

.platform-cta {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-hot);
}

/* —— iOS compact hero —— */
.hero-compact {
  min-height: auto;
  padding: 2.5rem 0 2rem;
}

.hero-compact h1 {
  max-width: 18ch;
}

/* —— Client accordions —— */
.client-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.client-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  overflow: hidden;
}

.client-accordion--featured {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px rgba(62, 207, 191, 0.06);
}

.client-accordion--featured[open] {
  border-color: rgba(62, 207, 191, 0.45);
}

.client-accordion--guide {
  margin-top: 1rem;
}

.client-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
  transition: background 0.2s;
}

.client-accordion summary::-webkit-details-marker {
  display: none;
}

.client-accordion summary:hover {
  background: rgba(62, 207, 191, 0.04);
}

.client-accordion-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.client-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.client-accordion-chevron {
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform 0.25s var(--ease);
}

.client-accordion[open] .client-accordion-chevron {
  transform: rotate(45deg);
}

.client-accordion-body {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
}

.client-accordion-body > .client-intro:first-child,
.client-accordion-body > p:first-child {
  margin-top: 1rem;
}

.client-intro {
  margin: 1rem 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.client-accordion-body .step-list {
  margin-top: 0.5rem;
}

.client-accordion-body .callout {
  margin-top: 1rem;
}

.client-accordion-body .pro-note {
  margin-top: 1rem;
}

.store-link {
  margin: 0.5rem 0 0.25rem;
}

.site-footer a {
  color: var(--accent-hot);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.nav-links a[href^="/"] {
  color: var(--text-muted);
}

.nav-links a[href^="/"]:hover {
  color: var(--text);
}
