/* ==========================================================================
   PKasir Mobile Documentation — 2026 Design System (Mintlify / Fumadocs Style)
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --brand: #ee5a12;
  --brand-light: #ffa41b;
  --brand-dark: #c94608;
  --brand-soft: rgba(238, 90, 18, 0.1);
  --brand-soft-strong: rgba(238, 90, 18, 0.16);
  --brand-border: rgba(238, 90, 18, 0.28);

  --bg: #fcfcfd;
  --bg-subtle: #f5f6f8;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --topbar-bg: rgba(252, 252, 253, 0.82);

  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --border: #e2e8f0;
  --border-subtle: #edf1f7;

  --success: #15803d;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --info: #1d4ed8;
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;
  --warning: #b45309;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --pro: #9a3412;
  --pro-bg: linear-gradient(135deg, rgba(255, 164, 27, 0.14), rgba(238, 90, 18, 0.1));
  --pro-border: rgba(238, 90, 18, 0.34);

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.09);
  --shadow-phone: 0 22px 48px -12px rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(15, 23, 42, 0.08);

  --topbar-h: 64px;
  --sidebar-w: 282px;
  --toc-w: 244px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

html[data-theme='dark'] {
  --brand: #ff7a2f;
  --brand-light: #ffb547;
  --brand-dark: #ee5a12;
  --brand-soft: rgba(255, 122, 47, 0.14);
  --brand-soft-strong: rgba(255, 122, 47, 0.22);
  --brand-border: rgba(255, 122, 47, 0.36);

  --bg: #0b0d12;
  --bg-subtle: #11151d;
  --surface: #141923;
  --surface-elevated: #1a2130;
  --topbar-bg: rgba(11, 13, 18, 0.82);

  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --border: #232c3d;
  --border-subtle: #1b2230;

  --success: #4ade80;
  --success-bg: rgba(34, 197, 94, 0.1);
  --success-border: rgba(74, 222, 128, 0.26);
  --info: #60a5fa;
  --info-bg: rgba(59, 130, 246, 0.11);
  --info-border: rgba(96, 165, 250, 0.26);
  --warning: #fbbf24;
  --warning-bg: rgba(245, 158, 11, 0.11);
  --warning-border: rgba(251, 191, 36, 0.28);
  --pro: #ffb547;
  --pro-bg: linear-gradient(135deg, rgba(255, 181, 71, 0.14), rgba(238, 90, 18, 0.12));
  --pro-border: rgba(255, 122, 47, 0.38);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 6px 16px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.52);
  --shadow-phone: 0 24px 56px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(640px circle at 14% -8%, rgba(255, 164, 27, 0.09), transparent 62%),
    radial-gradient(560px circle at 88% 0%, rgba(238, 90, 18, 0.07), transparent 58%);
  background-attachment: fixed;
  overflow-x: hidden;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button, input {
  font-family: inherit;
}

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

.mobile-only {
  display: none !important;
}

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-light), var(--brand));
  z-index: 120;
  transition: width 0.08s linear;
}

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1520px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.topbar-center {
  flex: 1;
  max-width: 440px;
  display: flex;
  justify-content: center;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none !important;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 10px rgba(238, 90, 18, 0.25));
}

.brand-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--brand-border);
}

.search-trigger {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
  box-shadow: var(--shadow-xs);
}

.search-trigger:hover {
  border-color: var(--brand-border);
  color: var(--text);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.search-placeholder {
  flex: 1;
  text-align: left;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kbd-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  flex-shrink: 0;
}

.role-filter {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  gap: 2px;
}

.role-pill {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.role-pill:hover {
  color: var(--text);
}

.role-pill.is-active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow-xs);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.16s ease;
}

.icon-btn:hover {
  border-color: var(--brand-border);
  color: var(--brand);
  background: var(--brand-soft);
}

html[data-theme='light'] .icon-sun { display: none; }
html[data-theme='dark'] .icon-moon { display: none; }

/* ==========================================================================
   Main 3-Column Documentation Layout
   ========================================================================== */
.docs-shell {
  max-width: 1520px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  align-items: start;
}

/* Left Sidebar */
.sidebar {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  background: transparent;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 20px 14px 28px;
  scrollbar-width: thin;
}

.nav-group {
  margin-bottom: 20px;
}

.nav-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 4px 10px 8px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none !important;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.nav-item-link:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.nav-item-link.is-active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  border-color: var(--brand-border);
}

.nav-item-link.is-dimmed {
  opacity: 0.36;
}

.nav-item-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nav-item-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-pro-tag {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-subtle);
}

.sidebar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* Center Article Area */
.article-main {
  min-width: 0;
  padding: 36px 48px 96px;
}

.article-container {
  max-width: 860px;
  margin: 0 auto;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 12px;
}

.article-hero {
  margin-bottom: 32px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
}

.article-hero.is-landing {
  position: relative;
  padding: 32px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--brand-border);
  background:
    radial-gradient(480px circle at 95% 0%, rgba(255, 164, 27, 0.16), transparent 62%),
    radial-gradient(360px circle at 0% 100%, rgba(238, 90, 18, 0.1), transparent 58%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.article-title {
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text);
}

.article-lead {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.badge-role-admin {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.25);
  color: #7c3aed;
}
html[data-theme='dark'] .badge-role-admin { color: #c4b5fd; }

.badge-role-manager {
  background: var(--info-bg);
  border-color: var(--info-border);
  color: var(--info);
}

.badge-role-cashier {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}

.badge-plan-free {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}

.badge-plan-pro {
  background: var(--pro-bg);
  border-color: var(--pro-border);
  color: var(--brand);
  font-weight: 700;
}

.badge-path {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--surface);
}

/* Section Headings */
.doc-section {
  margin-top: 38px;
  scroll-margin-top: calc(var(--topbar-h) + 24px);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.anchor-copy {
  opacity: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 15px;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.section-heading:hover .anchor-copy,
.anchor-copy:focus-visible {
  opacity: 1;
}

.anchor-copy:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.section-prose {
  margin: 0 0 16px;
  color: var(--text-secondary);
}

.section-prose p {
  margin: 0 0 12px;
}

.section-prose p:last-child {
  margin-bottom: 0;
}

.section-prose strong {
  color: var(--text);
  font-weight: 700;
}

.section-prose code, .inline-code {
  font-family: var(--font-mono);
  font-size: 0.87em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--brand-dark);
}
html[data-theme='dark'] .section-prose code,
html[data-theme='dark'] .inline-code {
  color: var(--brand-light);
}

/* Quick Start Cards & Feature Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  color: inherit;
  text-decoration: none !important;
}

a.doc-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-border);
  box-shadow: var(--shadow-sm);
}

.doc-card-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
}

.doc-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.doc-card-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

/* Stats Ribbon on Landing */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.stat-box {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   Realistic Mobile Device Screenshot Gallery
   ========================================================================== */
.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
  margin: 22px 0 12px;
  align-items: start;
}

.screenshot-gallery.is-single {
  grid-template-columns: minmax(240px, 300px);
}

.phone-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.phone-frame-btn {
  position: relative;
  display: block;
  width: 100%;
  max-width: 280px;
  padding: 18px 10px 10px;
  border-radius: 34px;
  border: 2px solid #262c36;
  background: #11141a;
  box-shadow: var(--shadow-phone);
  cursor: zoom-in;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}

.phone-frame-btn:hover {
  transform: translateY(-4px) scale(1.012);
}

.phone-notch {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: #2d3544;
  z-index: 3;
  pointer-events: none;
}

.phone-screen {
  display: block;
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #f8fafc;
  aspect-ratio: 390 / 844;
  transform: translateZ(0);
}

.phone-screen img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  object-fit: cover;
  object-position: top center;
}

.phone-zoom-pill {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.phone-frame-btn:hover .phone-zoom-pill,
.phone-frame-btn:focus-visible .phone-zoom-pill {
  opacity: 1;
  transform: translateY(0);
}

.phone-caption {
  text-align: center;
  max-width: 280px;
}

.phone-caption-title {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.phone-caption-desc {
  display: block;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ==========================================================================
   Feature Breakdown List (UI Controls / Elements)
   ========================================================================== */
.element-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.element-item {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
}

.element-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.element-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

.element-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   Step-by-Step Timeline
   ========================================================================== */
.steps-list {
  list-style: none;
  margin: 18px 0;
  padding: 0;
  position: relative;
}

.steps-list::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--border);
}

.step-item {
  position: relative;
  padding-left: 46px;
  padding-bottom: 20px;
}

.step-item:last-child {
  padding-bottom: 0;
}

.step-num {
  position: absolute;
  left: 0;
  top: 1px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--brand);
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px var(--bg);
}

.step-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

.step-body {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   Callouts
   ========================================================================== */
.callout {
  display: flex;
  gap: 12px;
  padding: 15px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin: 18px 0;
  font-size: 14px;
  line-height: 1.6;
}

.callout-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
}

.callout-title {
  font-weight: 700;
  margin-bottom: 3px;
}

.callout-info {
  background: var(--info-bg);
  border-color: var(--info-border);
  color: var(--text-secondary);
}
.callout-info .callout-title, .callout-info .callout-icon { color: var(--info); }

.callout-tip {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--text-secondary);
}
.callout-tip .callout-title, .callout-tip .callout-icon { color: var(--success); }

.callout-warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--text-secondary);
}
.callout-warning .callout-title, .callout-warning .callout-icon { color: var(--warning); }

.callout-pro {
  background: var(--pro-bg);
  border-color: var(--pro-border);
  color: var(--text-secondary);
}
.callout-pro .callout-title, .callout-pro .callout-icon { color: var(--brand); }

/* ==========================================================================
   Data Tables
   ========================================================================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  margin: 18px 0;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.doc-table th {
  background: var(--bg-subtle);
  color: var(--text);
  font-weight: 700;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.doc-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: top;
}

.doc-table tr:last-child td {
  border-bottom: none;
}

.doc-table td:first-child {
  font-weight: 600;
  color: var(--text);
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.faq-item {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  padding: 14px 18px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  transition: transform 0.2s ease;
  color: var(--text-muted);
  flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--brand);
}

.faq-answer {
  padding: 0 18px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

/* ==========================================================================
   Article Footer Prev / Next Pagination
   ========================================================================== */
.article-pager {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none !important;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.pager-link:hover {
  border-color: var(--brand-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.pager-link.is-next {
  text-align: right;
  align-items: flex-end;
}

.pager-dir {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.pager-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.pager-link:hover .pager-title {
  color: var(--brand);
}

/* ==========================================================================
   Right Sticky TOC
   ========================================================================== */
.toc-aside {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  padding: 28px 20px 28px 12px;
  overflow-y: auto;
}

.toc-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
}

.toc-link {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none !important;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc-link:hover {
  color: var(--text);
}

.toc-link.is-active {
  color: var(--brand);
  border-left-color: var(--brand);
  font-weight: 600;
}

.toc-actions {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toc-action-btn:hover {
  border-color: var(--brand-border);
  color: var(--brand);
  background: var(--brand-soft);
}

/* ==========================================================================
   Modals (Command Search & Lightbox)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(9, 13, 22, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 9vh 16px 24px;
}

.modal-overlay[hidden] {
  display: none !important;
}

.search-dialog {
  width: 100%;
  max-width: 640px;
  border-radius: var(--radius-lg);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 76vh;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.search-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.search-results {
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-hit {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  padding: 11px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: inherit;
}

.search-hit:hover,
.search-hit.is-selected {
  background: var(--brand-soft);
  border-color: var(--brand-border);
}

.search-hit-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
}

.search-hit-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

.search-hit-snippet {
  font-size: 12.5px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-hit mark {
  background: rgba(255, 164, 27, 0.34);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

.search-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.search-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.search-footer kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-right: 4px;
}

/* Lightbox */
.lightbox-overlay {
  align-items: center;
  padding: 20px;
  background: rgba(6, 9, 16, 0.88);
}

.lightbox-shell {
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lightbox-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #f8fafc;
}

.lightbox-counter {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.lightbox-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.lightbox-nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.16s ease;
}

.lightbox-nav:hover {
  background: var(--brand);
  border-color: var(--brand);
}

.lightbox-nav[disabled] {
  opacity: 0.28;
  cursor: not-allowed;
}

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox-figure img {
  max-height: 76vh;
  max-width: min(82vw, 420px);
  width: auto;
  border-radius: 22px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.65);
  border: 3px solid rgba(255, 255, 255, 0.16);
}

.lightbox-figure figcaption {
  color: #e2e8f0;
  font-size: 14px;
  text-align: center;
  max-width: 560px;
}

/* Toast Notification */
.docs-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 16px);
  padding: 10px 16px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  z-index: 300;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.docs-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1180px) {
  .docs-shell {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  }
  .toc-aside {
    display: none;
  }
  .article-main {
    padding: 32px 32px 84px;
  }
}

@media (max-width: 900px) {
  .mobile-only {
    display: inline-flex !important;
  }
  .topbar-right .role-filter {
    display: none;
  }
  .search-placeholder {
    display: none;
  }
  .search-trigger {
    width: auto;
    padding: 0 11px;
  }
  .kbd-hint {
    display: none;
  }
  .topbar-center {
    flex: 0;
  }
  .docs-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    width: min(310px, 86vw);
    z-index: 160;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    transform: translateX(-105%);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(9, 13, 22, 0.55);
    backdrop-filter: blur(4px);
  }
  .sidebar-mobile-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-mobile-title {
    font-size: 15px;
    font-weight: 800;
  }
  .sidebar-mobile-roles {
    display: flex !important;
    padding: 10px 14px;
    gap: 4px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-subtle);
  }
  .sidebar-mobile-roles .role-pill {
    flex: 1;
    padding: 6px 4px;
    text-align: center;
  }
  .article-main {
    padding: 24px 18px 72px;
  }
  .article-hero.is-landing {
    padding: 22px 18px;
  }
  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .article-pager {
    grid-template-columns: 1fr;
  }
  .lightbox-stage {
    gap: 8px;
  }
  .lightbox-nav {
    width: 36px;
    height: 36px;
  }
}

@media print {
  .topbar, .sidebar, .toc-aside, .article-pager, .phone-zoom-pill, .anchor-copy {
    display: none !important;
  }
  .docs-shell {
    display: block;
  }
  .article-main {
    padding: 0;
  }
  .phone-frame-btn {
    box-shadow: none;
    border: 1px solid #cbd5e1;
  }
}
