@import url('/ui/ui.css');

/* ==========================================================================
 * VietFuel API v2 — Complete Developer Portal Design System
 * Crafted with jakubkrehel/skills:
 *   - OKLCH neutral + single deep-teal accent ramp + distinct status hues
 *   - Strict semantic token roles, WCAG 2.2 AA contrast in light & dark themes
 *   - Unitless line-heights, tabular-nums on numeric/price columns, 16px mobile inputs
 *   - Concentric border radii, logical properties, hover-capable media queries
 *   - Reduced-motion opt-in transitions & press feedback
 * ========================================================================== */

:root {
  /* Neutral ramp (OKLCH) */
  --neutral-0: oklch(1 0 0);
  --neutral-50: oklch(0.985 0.002 250);
  --neutral-100: oklch(0.96 0.004 250);
  --neutral-150: oklch(0.935 0.005 250);
  --neutral-200: oklch(0.905 0.006 250);
  --neutral-300: oklch(0.835 0.008 250);
  --neutral-500: oklch(0.54 0.012 250);
  --neutral-700: oklch(0.36 0.014 250);
  --neutral-850: oklch(0.22 0.012 250);
  --neutral-900: oklch(0.18 0.012 250);
  --neutral-950: oklch(0.14 0.01 250);

  /* Accent ramp (Deep Petrol Teal, hue 195°) */
  --accent-50: oklch(0.96 0.02 195);
  --accent-100: oklch(0.91 0.04 195);
  --accent-400: oklch(0.68 0.11 195);
  --accent-500: oklch(0.56 0.11 195);
  --accent-600: oklch(0.46 0.11 195);
  --accent-700: oklch(0.39 0.10 195);

  /* Secondary chart bar hue (Warm Amber, hue 65° — > 120° apart from accent) */
  --amber-50: oklch(0.96 0.03 75);
  --amber-400: oklch(0.76 0.13 70);
  --amber-600: oklch(0.55 0.13 65);
  --amber-700: oklch(0.45 0.11 65);

  /* Status hues */
  --green-50: oklch(0.96 0.03 150);
  --green-400: oklch(0.72 0.14 150);
  --green-700: oklch(0.42 0.11 150);
  --red-50: oklch(0.96 0.025 25);
  --red-400: oklch(0.70 0.15 25);
  --red-700: oklch(0.46 0.16 25);

  /* Semantic tokens — Light */
  --color-bg-page: var(--neutral-50);
  --color-bg-surface: var(--neutral-0);
  --color-bg-subtle: var(--neutral-100);
  --color-bg-hover: var(--neutral-150);
  --color-bg-code: var(--neutral-950);
  --color-border-subtle: var(--neutral-200);
  --color-border-strong: var(--neutral-300);

  --color-text-primary: var(--neutral-950);
  --color-text-secondary: var(--neutral-700);
  --color-text-muted: var(--neutral-500);
  --color-text-on-code: var(--neutral-100);

  --color-accent-solid: var(--accent-600);
  --color-accent-solid-hover: var(--accent-700);
  --color-accent-subtle: var(--accent-50);
  --color-accent-border: var(--accent-100);
  --color-accent-text: var(--accent-700);
  --color-accent-on-solid: var(--neutral-0);

  --color-chart-r1: var(--accent-600);
  --color-chart-r2: var(--amber-600);

  --color-status-ok-bg: var(--green-50);
  --color-status-ok-text: var(--green-700);
  --color-status-warn-bg: var(--amber-50);
  --color-status-warn-text: var(--amber-700);
  --color-status-err-bg: var(--red-50);
  --color-status-err-text: var(--red-700);

  --color-focus-ring: var(--accent-600);
  --shadow-card: 0 1px 2px oklch(0 0 0 / 0.045), 0 0 0 1px oklch(0 0 0 / 0.06);
  --shadow-elevated: 0 6px 20px oklch(0 0 0 / 0.07), 0 0 0 1px oklch(0 0 0 / 0.06);

  /* Concentric radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --header-height: 4rem;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-block-start: calc(var(--header-height) + 1.25rem);
}

html[data-theme='dark'] {
  --color-bg-page: var(--neutral-950);
  --color-bg-surface: var(--neutral-900);
  --color-bg-subtle: var(--neutral-850);
  --color-bg-hover: oklch(0.26 0.012 250);
  --color-bg-code: oklch(0.11 0.008 250);
  --color-border-subtle: oklch(0.28 0.01 250);
  --color-border-strong: oklch(0.38 0.012 250);

  --color-text-primary: var(--neutral-50);
  --color-text-secondary: var(--neutral-300);
  --color-text-muted: oklch(0.68 0.01 250);
  --color-text-on-code: var(--neutral-100);

  --color-accent-solid: var(--accent-400);
  --color-accent-solid-hover: oklch(0.75 0.10 195);
  --color-accent-subtle: oklch(0.23 0.035 195);
  --color-accent-border: oklch(0.34 0.05 195);
  --color-accent-text: var(--accent-400);
  --color-accent-on-solid: var(--neutral-950);

  --color-chart-r1: var(--accent-400);
  --color-chart-r2: var(--amber-400);

  --color-status-ok-bg: oklch(0.23 0.04 150);
  --color-status-ok-text: var(--green-400);
  --color-status-warn-bg: oklch(0.24 0.04 75);
  --color-status-warn-text: var(--amber-400);
  --color-status-err-bg: oklch(0.24 0.05 25);
  --color-status-err-text: var(--red-400);

  --color-focus-ring: var(--accent-400);
  --shadow-card: 0 1px 3px oklch(0 0 0 / 0.3), 0 0 0 1px oklch(1 0 0 / 0.08);
  --shadow-elevated: 0 10px 28px oklch(0 0 0 / 0.45), 0 0 0 1px oklch(1 0 0 / 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--color-text-primary);
  background-color: var(--color-bg-page);
  text-align: start;
}

main {
  flex: 1 0 auto;
}

.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;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: -4rem;
  z-index: 100;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  background: var(--color-accent-solid);
  color: var(--color-accent-on-solid);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus-visible {
  inset-block-start: 0.75rem;
}

:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: max(1rem, env(safe-area-inset-left));
}

.tabular {
  font-variant-numeric: tabular-nums;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

:not(pre) > code {
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-xs);
  background: var(--color-bg-subtle);
  color: var(--color-accent-text);
  border: 1px solid var(--color-border-subtle);
}

a {
  color: var(--color-accent-text);
  text-underline-position: from-font;
  text-decoration-thickness: from-font;
}

/* External source verification links */
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--color-accent-text);
  text-decoration: none;
  font-weight: 600;
}

.source-link svg {
  flex-shrink: 0;
  opacity: 0.75;
}

@media (hover: hover) {
  .source-link:hover {
    text-decoration: underline;
  }
  .source-link:hover svg {
    opacity: 1;
  }
}

/* ── Header & Navigation ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  min-height: var(--header-height);
  background: var(--color-bg-surface);
  border-block-end: 1px solid var(--color-border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
  flex-wrap: wrap;
  padding-block: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-text-primary);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
}

.brand-logo {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
}

.brand-logo-sm {
  width: 1.75rem;
  height: 1.75rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}

.main-nav a[aria-current='page'] {
  background: var(--color-accent-subtle);
  color: var(--color-accent-text);
  font-weight: 600;
}

@media (hover: hover) {
  .main-nav a:hover:not([aria-current='page']) {
    background: var(--color-bg-subtle);
    color: var(--color-text-primary);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-subtle);
  gap: 2px;
}

.lang-btn {
  min-height: 1.875rem;
  min-width: 2.25rem;
  padding: 0.125rem 0.5rem;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-btn[aria-pressed='true'] {
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-card);
}

html[data-theme='light'] .icon-sun { display: none; }
html[data-theme='dark'] .icon-moon { display: none; }

/* ── Typography ─────────────────────────────────────────────────────────── */
h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3.3vw, 2.625rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  margin: 0 0 0.375rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h3 {
  margin: 0 0 0.375rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

h4 {
  margin: 0 0 0.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
}

.lead {
  margin: 0 0 1.5rem;
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
  max-width: 100%;
  text-wrap: pretty;
}

.section-desc {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  max-width: 100%;
  text-wrap: pretty;
}

.muted {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ── Badges & Pills ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--color-bg-subtle);
  color: var(--color-text-secondary);
}

.badge-accent {
  background: var(--color-accent-subtle);
  color: var(--color-accent-text);
}

.badge-ok {
  background: var(--color-status-ok-bg);
  color: var(--color-status-ok-text);
}

.badge-warn {
  background: var(--color-status-warn-bg);
  color: var(--color-status-warn-text);
}

.badge-err {
  background: var(--color-status-err-bg);
  color: var(--color-status-err-text);
}

.method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  padding: 0.1875rem 0.5rem;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.method-get {
  background: var(--color-status-ok-bg);
  color: var(--color-status-ok-text);
}

.method-post {
  background: var(--color-status-warn-bg);
  color: var(--color-status-warn-text);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--color-bg-subtle);
  color: var(--color-text-secondary);
  margin-block-end: 1rem;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: currentColor;
}

.status-pill.is-healthy {
  background: var(--color-status-ok-bg);
  color: var(--color-status-ok-text);
}

.status-pill.is-degraded {
  background: var(--color-status-warn-bg);
  color: var(--color-status-warn-text);
}

/* ── Buttons & Form Controls (Redesigned tactile polish) ────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4375rem;
  min-height: 2.5rem;
  padding: 0.5rem 0.9375rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, box-shadow 150ms ease-out;
}

.btn-sm {
  min-height: 2rem;
  padding: 0.3125rem 0.6875rem;
  font-size: 0.8125rem;
}

.btn-icon {
  width: 2.375rem;
  min-height: 2.375rem;
  padding: 0;
}

.btn-primary {
  background: var(--color-accent-solid);
  color: var(--color-accent-on-solid);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.2), 0 1px 2px oklch(0 0 0 / 0.14);
}

.btn-subtle {
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  border-color: var(--color-border-strong);
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.04);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: var(--color-border-subtle);
}

.btn-code-copy {
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  border-color: var(--color-border-default);
  padding-inline-start: 0.5625rem;
}

.icon-swap {
  position: relative;
  display: inline-flex;
  width: 14px;
  height: 14px;
}

.icon-swap .icon-a,
.icon-swap .icon-b {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 260ms cubic-bezier(0.2, 0, 0, 1), transform 260ms cubic-bezier(0.2, 0, 0, 1);
}

.icon-swap .icon-b {
  opacity: 0;
  transform: scale(0.35);
}

.is-copied .icon-swap .icon-a {
  opacity: 0;
  transform: scale(0.35);
}

.is-copied .icon-swap .icon-b {
  opacity: 1;
  transform: scale(1);
  color: var(--color-status-ok-text);
}

@media (hover: hover) {
  .btn-primary:hover {
    background: var(--color-accent-solid-hover);
    box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.22), 0 3px 8px oklch(0 0 0 / 0.16);
  }
  .btn-subtle:hover,
  .btn-ghost:hover,
  .btn-code-copy:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text-primary);
    border-color: var(--color-border-strong);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .btn {
    transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, box-shadow 150ms ease-out, transform 150ms ease-out;
  }
  .btn:active:not(:disabled) { transform: scale(0.96); }
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── Redesigned Search Component ────────────────────────────────────────── */
.search-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 13.5rem;
  border-radius: var(--radius-sm);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-strong);
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.04);
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.search-field:focus-within {
  border-color: var(--color-accent-solid);
  box-shadow: 0 0 0 3px oklch(0.56 0.11 195 / 0.18);
}

.search-icon {
  position: absolute;
  inset-inline-start: 0.6875rem;
  display: inline-flex;
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-field input[type='search'],
.search-field input[type='text'] {
  width: 100%;
  border: none;
  background: transparent;
  padding-inline-start: 2.125rem;
  padding-inline-end: 2.125rem;
  box-shadow: none;
}

.search-field input:focus-visible {
  outline: none;
}

.search-field input[type='search']::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.search-clear {
  position: absolute;
  inset-inline-end: 0.375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}

@media (hover: hover) {
  .search-clear:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text-primary);
  }
}

.search-kbd {
  position: absolute;
  inset-inline-end: 0.5rem;
  padding: 0.0625rem 0.375rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-bg-subtle);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  pointer-events: none;
}

/* ── Redesigned Accessible Combobox Component ───────────────────────────── */
.combobox {
  position: relative;
  display: inline-block;
  min-width: 14.5rem;
}

.cb-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.4375rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.04);
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.combobox.is-open .cb-trigger {
  border-color: var(--color-accent-solid);
  box-shadow: 0 0 0 3px oklch(0.56 0.11 195 / 0.18);
}

.cb-trigger-text {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cb-chevron {
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform 180ms ease-out;
}

.combobox.is-open .cb-chevron {
  transform: rotate(180deg);
}

.cb-popover {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: calc(100% + 6px);
  z-index: 70;
  min-width: 100%;
  width: max-content;
  max-width: min(22rem, 90vw);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
  transform-origin: top center;
}

@media (prefers-reduced-motion: no-preference) {
  .cb-popover:not([hidden]) {
    animation: cb-enter 160ms ease-out both;
  }
}

@keyframes cb-enter {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cb-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.5rem;
  border-block-end: 1px solid var(--color-border-subtle);
}

.cb-search-icon {
  position: absolute;
  inset-inline-start: 1rem;
  display: inline-flex;
  color: var(--color-text-muted);
  pointer-events: none;
}

.cb-search {
  width: 100%;
  min-height: 2rem !important;
  padding: 0.25rem 0.5rem 0.25rem 1.875rem !important;
  border-radius: var(--radius-xs) !important;
  border: 1px solid var(--color-border-subtle) !important;
  background: var(--color-bg-page) !important;
  font-size: 0.875rem !important;
}

.cb-list {
  list-style: none;
  margin: 0;
  padding: 0.375rem;
  max-height: 16rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cb-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4375rem 0.625rem;
  border-radius: var(--radius-xs);
  font-size: 0.875rem;
  color: var(--color-text-primary);
  cursor: pointer;
}

.cb-option-main {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.cb-option-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cb-item-badge {
  padding: 0.0625rem 0.375rem;
  border-radius: var(--radius-xs);
  background: var(--color-bg-subtle);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
}

.cb-option.is-active {
  background: var(--color-bg-subtle);
}

.cb-option.is-selected {
  color: var(--color-accent-text);
  font-weight: 600;
}

@media (hover: hover) {
  .cb-option:hover {
    background: var(--color-bg-subtle);
  }
}

.cb-check {
  display: inline-flex;
  width: 14px;
  color: var(--color-accent-text);
}

.cb-empty {
  padding: 0.75rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ── Redesigned JSON Block (Interactive Collapsible Tree + Search + Copy) ─ */
.json-block {
  --jb-bg: var(--color-bg-surface);
  --jb-bar: var(--color-bg-subtle);
  --jb-border: var(--color-border-default);
  --jb-hover: oklch(0.95 0.004 250);
  --jb-ink: var(--color-text-primary);
  --jb-muted: var(--color-text-secondary);
  --jb-key: oklch(0.22 0.015 250);
  --jb-str: oklch(0.42 0.14 148);
  --jb-num: oklch(0.50 0.16 65);
  --jb-bool: oklch(0.46 0.19 275);
  --jb-null: oklch(0.52 0.14 20);
  border-radius: var(--radius-lg);
  border: 1px solid var(--jb-border);
  background: var(--jb-bg);
  color: var(--jb-ink);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

[data-theme='dark'] .json-block {
  --jb-bg: oklch(0.195 0.004 250);
  --jb-bar: oklch(0.175 0.004 250);
  --jb-border: oklch(1 0 0 / 0.1);
  --jb-hover: oklch(1 0 0 / 0.055);
  --jb-ink: oklch(0.94 0.004 250);
  --jb-muted: oklch(0.62 0.008 250);
  --jb-key: oklch(0.95 0.004 250);
  --jb-str: oklch(0.79 0.14 148);
  --jb-num: oklch(0.82 0.14 75);
  --jb-bool: oklch(0.75 0.16 280);
  --jb-null: oklch(0.70 0.12 22);
}

.json-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  background: var(--jb-bar);
  border-block-end: 1px solid var(--jb-border);
}

.json-block-title,
.json-block-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.json-block-label {
  font-family: var(--font-mono);
  font-size: 0.84375rem;
  font-weight: 700;
  color: var(--jb-ink);
}

.jb-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--jb-muted);
}

.jb-search {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2rem;
  padding-inline: 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--jb-border);
  background: var(--jb-bg);
  color: var(--jb-muted);
}

.jb-search:focus-within {
  border-color: var(--color-accent-solid);
  color: var(--jb-ink);
}

.jb-search input.jb-search-input {
  width: 9.5rem;
  min-height: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  box-shadow: none;
  background: transparent;
  color: var(--jb-ink);
  font-family: inherit;
  font-size: 0.8125rem;
}

.jb-search input.jb-search-input:focus-visible {
  outline: none;
}

.jb-search input.jb-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.jb-search input.jb-search-input::placeholder {
  color: var(--jb-muted);
}

.jb-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  padding-inline: 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--jb-border);
  background: var(--jb-bg);
  color: var(--jb-ink);
  font-family: inherit;
  font-size: 0.78125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 120ms ease-out, border-color 120ms ease-out;
}

.jb-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--jb-border);
  background: var(--jb-bg);
  color: var(--jb-muted);
  cursor: pointer;
  transition: color 120ms ease-out, background-color 120ms ease-out, border-color 120ms ease-out;
}

.jb-icon-btn.is-copied {
  color: var(--color-status-ok-text);
  border-color: var(--color-status-ok-text);
}

@media (hover: hover) {
  .jb-pill-btn:hover,
  .jb-icon-btn:hover {
    background: var(--jb-hover);
    color: var(--jb-ink);
  }
}

.json-block-body {
  max-height: 28rem;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0.5rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.84375rem;
  line-height: 1.65;
}

.json-tree {
  display: grid;
  gap: 0.125rem;
}

.jt-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-inline-start: calc(var(--jt-depth, 0) * 1.125rem + 0.375rem);
  padding-inline-end: 0.375rem;
  border-radius: var(--radius-sm);
  min-height: 1.85rem;
  transition: background-color 100ms ease-out;
}

@media (hover: hover) {
  .jt-row:hover {
    background: var(--jb-hover);
  }
}

.jt-toggle,
.jt-leaf {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  min-width: 0;
  flex: 1 1 auto;
  padding-block: 0.1875rem;
  text-align: start;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.5;
  color: var(--jb-ink);
  overflow-wrap: anywhere;
}

.jt-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding-inline: 0;
}

.jt-chev {
  flex-shrink: 0;
  align-self: center;
  color: var(--jb-muted);
  transition: transform 140ms ease-out;
  margin-inline-end: 0.125rem;
}

.jt-row.is-open > .jt-toggle > .jt-chev {
  transform: rotate(90deg);
}

.jt-spacer {
  display: inline-block;
  width: 0.875rem;
  flex-shrink: 0;
}

.jt-key {
  font-weight: 700;
  color: var(--jb-key);
  flex-shrink: 0;
}

.jt-key.is-hit {
  background: oklch(0.84 0.16 90 / 0.35);
  border-radius: 3px;
  padding-inline: 2px;
}

.jt-idx {
  color: var(--jb-muted);
  flex-shrink: 0;
}

.jt-colon {
  color: var(--jb-muted);
  margin-inline-end: 0.25rem;
  flex-shrink: 0;
}

.jt-summary {
  color: var(--jb-muted);
  font-size: 0.8125rem;
}

.jt-brace {
  color: var(--jb-muted);
  letter-spacing: 0.04em;
}

.jt-count {
  color: var(--jb-muted);
  opacity: 0.85;
}

.jt-val {
  min-width: 0;
  overflow-wrap: anywhere;
}

.jt-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  flex-shrink: 0;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--jb-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease-out, color 120ms ease-out, background-color 120ms ease-out;
}

.jt-row:hover .jt-copy,
.jt-row:focus-within .jt-copy,
.jt-copy.is-copied {
  opacity: 1;
}

.jt-copy.is-copied {
  color: var(--color-status-ok-text);
}

.jt-empty {
  padding: 1rem;
  text-align: center;
  color: var(--jb-muted);
  font-size: 0.8125rem;
}

.json-block-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.875rem;
  background: var(--jb-bar);
  border-block-start: 1px solid var(--jb-border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--jb-muted);
}

.jb-foot-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jb-foot-count {
  flex-shrink: 0;
}

.jb-lines {
  display: table;
  width: 100%;
}

.jb-line {
  display: table-row;
}

@media (hover: hover) {
  .jb-line:hover {
    background: var(--color-bg-subtle);
  }
}

.jb-ln {
  display: table-cell;
  width: 3rem;
  padding-inline: 0.75rem 0.875rem;
  text-align: end;
  color: var(--color-text-muted);
  user-select: none;
  font-variant-numeric: tabular-nums;
  border-inline-end: 1px solid var(--color-border-subtle);
}

.jb-code {
  display: table-cell;
  padding-inline: 0.875rem 1rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--color-text-primary);
}

.json-block .jk { color: var(--jb-key); }
.json-block .js { color: var(--jb-str); }
.json-block .jn { color: var(--jb-num); }
.json-block .jb { color: var(--jb-bool); }
.json-block .jnull { color: var(--jb-null); }
.json-block .jp { color: var(--jb-muted); }

/* ── Dual-Zone Price Cell Stack (Region 1 + Region 2) ───────────────────── */
.zone-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1875rem;
  line-height: 1.25;
}

.zone-row {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-variant-numeric: tabular-nums;
}

.zone-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.03125rem 0.3125rem;
  border-radius: var(--radius-xs);
  letter-spacing: 0.02em;
}

.zone-tag-1 {
  background: var(--color-accent-subtle);
  color: var(--color-accent-text);
}

.zone-tag-2 {
  background: var(--color-status-warn-bg);
  color: var(--color-status-warn-text);
}

.zone-tag-single {
  background: var(--color-bg-subtle);
  color: var(--color-text-muted);
}

/* ── Model-Orbit Inspired API Flow Illustration ─────────────────────────── */
.orbit-stage {
  --orb-ink: var(--neutral-900);
  --orb-chip: var(--neutral-0);
  --orb-halo: oklch(0 0 0 / 0.10);
  --orb-band: oklch(0 0 0 / 0.038);
  --orb-accent: var(--accent-600);
  --orb-spark: oklch(0.62 0.15 195);
  --orb-num: oklch(0 0 0 / 0.38);
  --orb-tip-bg: oklch(0.14 0.01 250 / 0.92);
  --orb-tip-ink: oklch(0.99 0 0);

  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  cursor: grab;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-card);
}

html[data-theme='dark'] .orbit-stage {
  --orb-ink: var(--neutral-50);
  --orb-chip: oklch(0.22 0.012 250);
  --orb-halo: oklch(1 0 0 / 0.12);
  --orb-band: oklch(1 0 0 / 0.055);
  --orb-accent: var(--accent-400);
  --orb-spark: oklch(0.76 0.13 195);
  --orb-num: oklch(1 0 0 / 0.42);
  --orb-tip-bg: oklch(0.96 0.004 250 / 0.94);
  --orb-tip-ink: oklch(0.14 0.01 250);
}

.orbit-stage[data-dragging='true'] {
  cursor: grabbing;
}

.orbit-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.orbit-tip {
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 0.0625rem;
  padding: 0.4375rem 0.6875rem;
  border-radius: var(--radius-sm);
  background: var(--orb-tip-bg);
  color: var(--orb-tip-ink);
  font-size: 0.75rem;
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
  /* left/top are set in px by JS (clamped inside the frame); only centre horizontally here */
  transform: translateX(-50%);
  box-shadow: 0 4px 12px oklch(0 0 0 / 0.18);
}

.orbit-tip[hidden] {
  display: none;
}

.orbit-tip strong { font-weight: 700; }
.orbit-tip span { font-family: var(--font-mono); font-size: 0.6875rem; opacity: 0.8; }
.orbit-tip em { font-style: normal; font-size: 0.6875rem; font-weight: 600; opacity: 0.9; }

.orbit-hint {
  position: absolute;
  inset-inline-end: 0.875rem;
  inset-block-end: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: var(--color-bg-subtle);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  pointer-events: none;
}

/* Segmented tabs */
.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-subtle);
  gap: 4px;
  flex-wrap: wrap;
}

.segmented-btn {
  min-height: 2.25rem;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.segmented-btn[aria-selected='true'] {
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-card);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.field label,
.field-inline label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.field-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

input[type='text'],
input[type='search'],
input[type='date'],
input[type='password'],
select {
  min-height: 2.5rem;
  padding: 0.4375rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: 1rem;
}

@media (min-width: 48rem) {
  input[type='text'],
  input[type='search'],
  input[type='date'],
  input[type='password'],
  select {
    font-size: 0.9375rem;
  }
}

/* ── Layout Sections, Grids & Cards ─────────────────────────────────────── */
.page-hero {
  padding-block: 2.75rem 2rem;
}

.section {
  padding-block: 2.25rem;
}

.section + .section {
  border-block-start: 1px solid var(--color-border-subtle);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 1.25rem;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.panel,
.card {
  background: var(--color-bg-surface);
  border: 1px solid transparent;
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.card-sm {
  background: var(--color-bg-surface);
  border: 1px solid transparent;
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
  gap: 1rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.875rem;
}

@media (min-width: 48rem) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

@media (min-width: 60rem) {
  .hero-split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
}

.price-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.75rem 1rem;
  margin-block-end: 0.875rem;
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  font-size: 0.84375rem;
  color: var(--color-text-secondary);
}

.price-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.history-filters {
  display: grid;
  gap: 0.875rem;
}

.history-filters-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.history-filters-main > * {
  min-width: 0;
}

.history-filters-main .combobox {
  min-width: 0;
  width: 100%;
}

.history-filters-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (min-width: 58rem) {
  .history-filters-main {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(6rem, 0.65fr) auto;
  }
}

.history-date-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block-start: 0.75rem;
  border-block-start: 1px solid var(--color-border-subtle);
}

.date-presets {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-subtle);
  flex-wrap: wrap;
}

.date-preset-btn {
  border: 0;
  background: transparent;
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background-color 140ms ease-out, color 140ms ease-out, box-shadow 140ms ease-out;
}

.date-preset-btn[aria-pressed='true'] {
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-card);
}

.date-range-group {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  max-width: 100%;
}

.date-range-icon {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.date-range-slot {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
}

.date-range-lbl {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.date-range-group input.date-range-input {
  min-height: 2rem;
  padding: 0.15rem 0.25rem;
  border: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-primary);
  cursor: pointer;
}

.date-range-group input.date-range-input:focus-visible {
  outline: none;
}

.date-range-sep {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.legal-sources-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 0.625rem 1.25rem;
}

.legal-sources-grid li {
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  background: var(--color-bg-page);
  border: 1px solid var(--color-border-subtle);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.metric-card dt {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-block-end: 0.25rem;
}

.metric-card dd {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

/* Source Directory Cards */
.source-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.source-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.source-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table-frame {
  width: 100%;
  overflow-x: auto;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.data-table th,
.data-table td {
  padding: 0.75rem 0.875rem;
  border-block-end: 1px solid var(--color-border-subtle);
  text-align: start;
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-block-end: none;
}

.data-table th {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-bg-subtle);
}

.data-table th.num,
.data-table td.num {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.data-table th button.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

@media (hover: hover) {
  .data-table tbody tr:hover {
    background: var(--color-bg-subtle);
  }
}

.empty-cell {
  color: var(--color-text-muted);
  white-space: normal;
  padding: 1.5rem 1rem;
}

/* ── Code Blocks & Tabs ─────────────────────────────────────────────────── */
.code-box {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-bg-code);
  color: var(--color-text-on-code);
}

.code-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.875rem;
  background: oklch(0.18 0.01 250);
  border-block-end: 1px solid oklch(1 0 0 / 0.1);
}

.code-tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.code-tab {
  padding: 0.25rem 0.625rem;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: oklch(0.76 0.01 250);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.code-tab[aria-selected='true'] {
  background: oklch(0.28 0.02 250);
  color: oklch(0.98 0 0);
}

.code-box pre,
.json-viewer {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.84375rem;
  line-height: 1.55;
  color: var(--color-text-on-code);
  background: var(--color-bg-code);
}

.json-viewer {
  border-radius: var(--radius-md);
  max-height: 30rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ── Lightweight SVG Grouped Bar Chart ──────────────────────────────────── */
.chart-wrap {
  width: 100%;
  overflow-x: auto;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-block-end: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.legend-swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 2px;
}

.legend-r1 { background: var(--color-chart-r1); }
.legend-r2 { background: var(--color-chart-r2); }

/* ── Province Explorer ──────────────────────────────────────────────────── */
.province-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 52rem) {
  .province-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: start;
  }
}

.province-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.5rem;
  max-height: 26rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.625rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
}

.province-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: start;
  cursor: pointer;
}

.province-btn[aria-current='true'] {
  border-color: var(--color-accent-solid);
  background: var(--color-accent-subtle);
  color: var(--color-accent-text);
  font-weight: 600;
}

.province-prices {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.province-prices li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.625rem;
  border-block-end: 1px solid var(--color-border-subtle);
}

.province-prices li:last-child { border-block-end: none; }

/* ── Docs 2-Column Layout ───────────────────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  padding-block: 2rem 3rem;
}

@media (min-width: 60rem) {
  .docs-layout {
    grid-template-columns: 15.5rem minmax(0, 1fr);
    align-items: start;
  }
}

.docs-sidebar {
  position: sticky;
  inset-block-start: calc(var(--header-height) + 1.25rem);
  max-height: calc(100dvh - var(--header-height) - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
}

.docs-sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin: 0 0 0.625rem;
}

.docs-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

.docs-toc a {
  display: block;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-xs);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
}

@media (hover: hover) {
  .docs-toc a:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text-primary);
  }
}

.docs-content {
  min-width: 0;
  display: grid;
  gap: 2.25rem;
}

.endpoint-card {
  display: grid;
  gap: 0.875rem;
}

.endpoint-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
  overflow-wrap: break-word;
}

.callout {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-accent-border);
  background: var(--color-accent-subtle);
  color: var(--color-text-primary);
  font-size: 0.9375rem;
}

/* ── Playground ─────────────────────────────────────────────────────────── */
.playground-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

@media (min-width: 60rem) {
  .playground-grid {
    grid-template-columns: 18rem minmax(0, 1fr);
    align-items: start;
  }
}

.preset-list {
  display: grid;
  gap: 0.375rem;
}

.preset-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-align: start;
  cursor: pointer;
}

@media (hover: hover) {
  .preset-btn:hover {
    background: var(--color-bg-subtle);
    border-color: var(--color-border-strong);
  }
}

.request-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.request-bar input[type='text'] {
  flex: 1 1 16rem;
  min-width: 0;
  font-family: var(--font-mono);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  margin-block-start: auto;
  border-block-start: 1px solid var(--color-border-subtle);
  background: var(--color-bg-surface);
  padding-block: 2rem;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  }
}

.footer-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.375rem;
}

.footer-list a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

@media (hover: hover) {
  .footer-list a:hover {
    color: var(--color-accent-text);
    text-decoration: underline;
  }
}

.footer-bottom {
  margin-block-start: 1.5rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--color-border-subtle);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ── Status Toast ───────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  inset-inline-end: 1.25rem;
  inset-block-end: 1.25rem;
  z-index: 80;
  max-width: 24rem;
  padding: 0.625rem 0.9375rem;
  border-radius: var(--radius-sm);
  background: var(--color-bg-code);
  color: var(--color-text-on-code);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--shadow-elevated);
  transition: opacity 150ms ease-out;
}

.toast.is-visible {
  opacity: 1;
}

/* ── Region comparison chart (HTML/CSS horizontal bars) ─────────────────── */
.rc {
  display: grid;
  gap: 1.125rem;
}

.rc-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
}

.rc-stat {
  display: grid;
  gap: 0.125rem;
  padding: 0.75rem 0.9375rem;
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-subtle);
}

.rc-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.rc-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.rc-stat-sub {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rc-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.rc-unit {
  margin-inline-start: auto;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.rc-axis,
.rc-row {
  display: grid;
  grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.rc-axis-track {
  position: relative;
  height: 1.25rem;
  margin-inline-end: 5.5rem;
  border-block-end: 1px solid var(--color-border-subtle);
}

.rc-tick {
  position: absolute;
  inset-inline-start: var(--x);
  inset-block-start: 0;
  transform: translateX(-50%);
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.rc-tick:first-child { transform: none; }
.rc-tick:last-child { transform: translateX(-100%); }

.rc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.rc-row {
  padding-block: 0.75rem;
  border-block-end: 1px solid var(--color-border-subtle);
}

.rc-row:last-child { border-block-end: none; }

.rc-label {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.rc-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.rc-delta {
  justify-self: start;
  padding: 0.0625rem 0.4375rem;
  border-radius: var(--radius-xs);
  background: var(--color-status-warn-bg);
  color: var(--color-status-warn-text);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rc-delta-flat {
  background: var(--color-bg-subtle);
  color: var(--color-text-muted);
}

.rc-bars {
  display: grid;
  gap: 0.375rem;
  min-width: 0;
}

.rc-bar-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.5rem;
  align-items: center;
  /* Background track so short bars still read against the full axis */
  background: linear-gradient(var(--color-bg-subtle), var(--color-bg-subtle)) no-repeat left center / calc(100% - 5.5rem) 0.75rem;
  border-radius: 999px;
}

.rc-bar {
  display: block;
  height: 0.75rem;
  width: var(--w);
  border-radius: 999px;
}

.rc-bar-1 { background: var(--color-chart-r1); }
.rc-bar-2 { background: var(--color-chart-r2); }

@media (prefers-reduced-motion: no-preference) {
  .rc-bar {
    animation: rc-grow 420ms cubic-bezier(0.2, 0, 0, 1) both;
    transform-origin: left center;
  }
}

@keyframes rc-grow {
  from { transform: scaleX(0.2); opacity: 0.4; }
  to { transform: scaleX(1); opacity: 1; }
}

.rc-val {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.rc-key {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0 0.25rem;
  border-radius: 3px;
}

.rc-key-1 { background: var(--color-accent-subtle); color: var(--color-accent-text); }
.rc-key-2 { background: var(--color-status-warn-bg); color: var(--color-status-warn-text); }

.rc-note {
  margin: 0;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

@media (max-width: 40rem) {
  .rc-axis { display: none; }
  .rc-row { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
}

/* ── JSON block: wrap long lines instead of overflowing ─────────────────── */
.playground-grid > *,
.playground-grid .panel > *,
#pg-output {
  min-width: 0;
}

.json-block {
  max-width: 100%;
}

.json-block-body {
  overflow-x: hidden;
}

.jb-lines {
  table-layout: fixed;
}

.jb-ln {
  width: 3.25rem;
  vertical-align: top;
}

.jb-code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ── LLM-friendly Markdown docs ─────────────────────────────────────────── */
.md-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
}

.md-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.md-body {
  min-width: 0;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-card);
  line-height: 1.65;
}

.md-body > :first-child { margin-block-start: 0; }

.md-body h1 { font-size: 1.75rem; margin: 0 0 0.75rem; }

.md-body h2 {
  font-size: 1.3125rem;
  margin: 2.25rem 0 0.75rem;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--color-border-subtle);
}

.md-body h3 {
  font-size: 1.0625rem;
  margin: 1.5rem 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.md-body p,
.md-body ul,
.md-body ol {
  margin: 0 0 0.875rem;
  color: var(--color-text-secondary);
}

.md-body ul,
.md-body ol { padding-inline-start: 1.375rem; }

.md-body li { margin-block-end: 0.25rem; }

.md-body blockquote {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-inline-start: 3px solid var(--color-accent-solid);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--color-accent-subtle);
  color: var(--color-text-primary);
}

.md-body blockquote p { margin: 0; color: inherit; }

.md-body pre {
  margin: 0 0 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  background: var(--color-bg-code);
  color: var(--color-text-on-code);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.8125rem;
  line-height: 1.6;
}

.md-body .table-frame { margin-block-end: 1rem; }

.md-body .json-block { margin-block-end: 1rem; }

.md-body a { font-weight: 500; }

.md-anchor {
  margin-inline-start: 0.25rem;
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 400;
  opacity: 0;
}

.md-body h2:hover .md-anchor,
.md-body h3:hover .md-anchor,
.md-anchor:focus-visible { opacity: 1; }

.docs-toc a.is-sub { padding-inline-start: 1.25rem; font-size: 0.8125rem; }

/* ── Legal page ─────────────────────────────────────────────────────────── */
.legal-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.875rem;
}

.legal-summary-card {
  display: grid;
  align-content: start;
  gap: 0.375rem;
  padding: 1rem 1.125rem;
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  border: 1px solid transparent;
  box-shadow: var(--shadow-card);
}

.legal-summary-card h2 {
  margin: 0.25rem 0 0;
  font-size: 1rem;
}

.legal-summary-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.legal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: var(--color-accent-subtle);
  color: var(--color-accent-text);
}

.legal-content {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.legal-section h2 {
  font-size: 1.1875rem;
  margin-block-end: 0.75rem;
}

.legal-section p,
.legal-section li {
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.legal-section p { margin: 0 0 0.75rem; }
.legal-section ul { margin: 0 0 0.75rem; padding-inline-start: 1.25rem; }
.legal-section li { margin-block-end: 0.375rem; }

.legal-do-dont {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.875rem;
  margin-block-end: 0.75rem;
}

.legal-do,
.legal-dont {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
}

.legal-do { background: var(--color-status-ok-bg); }
.legal-dont { background: var(--color-status-err-bg); }

.legal-do h3 { color: var(--color-status-ok-text); font-size: 0.9375rem; }
.legal-dont h3 { color: var(--color-status-err-text); font-size: 0.9375rem; }

.legal-do ul,
.legal-dont ul { margin: 0; }

.legal-do li,
.legal-dont li { color: var(--color-text-primary); }

.legal-sources-grid li {
  display: grid;
  gap: 0.125rem;
}

.legal-sources-grid .source-link {
  font-size: 0.8125rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* ── Docs audience cards ────────────────────────────────────────────────── */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.875rem;
  margin-block-end: 1rem;
}

.audience-card {
  display: grid;
  gap: 0.375rem;
  padding: 1rem 1.125rem;
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-primary);
  text-decoration: none;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.audience-card strong { font-size: 1rem; }

.audience-card span {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

@media (hover: hover) {
  .audience-card:hover {
    border-color: var(--color-accent-solid);
    box-shadow: var(--shadow-card);
  }
}


/* ── Stable filter bar & unified combobox slots ─────────────────────────── */
#live-table-sub {
  min-height: 2.75rem;
}

.pg-method-slot {
  width: 8.25rem;
  flex-shrink: 0;
}

.pg-method-slot .combobox {
  min-width: 100%;
}

#prov-region-combobox .combobox {
  min-width: 9.5rem;
}

#h-limit-combobox .combobox {
  min-width: 6.5rem;
}

/* ── Hero Petrolimex Visual Fuel Chart ──────────────────────────────────── */
.hero-chart-panel {
  display: flex;
  flex-direction: column;
}

.hero-chart-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block-start: 0.875rem;
  padding-block-start: 0.75rem;
  border-block-start: 1px solid var(--color-border-subtle);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hfc-legend {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex-wrap: wrap;
  margin-block-end: 0.75rem;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.hfc-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hfc-leg-unit {
  margin-inline-start: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.hfc-swatch {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 3px;
}

.hfc-swatch.is-v1 { background: var(--color-accent-solid); }
.hfc-swatch.is-v2 { background: oklch(0.72 0.14 68); }

.hfc-list {
  display: grid;
  gap: 0.375rem;
}

.hfc-row {
  --tone-color: var(--color-accent-solid);
  display: grid;
  grid-template-columns: minmax(7.5rem, 1.15fr) minmax(4.5rem, 1fr) auto;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius-xs);
  background: var(--color-bg-subtle);
}

.hfc-row[data-tone='ron95'] { --tone-color: oklch(0.56 0.16 250); }
.hfc-row[data-tone='ron92'] { --tone-color: oklch(0.56 0.15 162); }
.hfc-row[data-tone='diesel'] { --tone-color: oklch(0.62 0.16 62); }
.hfc-row[data-tone='kero'] { --tone-color: oklch(0.56 0.16 300); }

[data-theme='dark'] .hfc-row[data-tone='ron95'] { --tone-color: oklch(0.70 0.15 250); }
[data-theme='dark'] .hfc-row[data-tone='ron92'] { --tone-color: oklch(0.72 0.14 162); }
[data-theme='dark'] .hfc-row[data-tone='diesel'] { --tone-color: oklch(0.76 0.15 68); }
[data-theme='dark'] .hfc-row[data-tone='kero'] { --tone-color: oklch(0.74 0.15 300); }

.hfc-name {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.hfc-name > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hfc-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--tone-color);
  flex-shrink: 0;
}

.hfc-track {
  position: relative;
  height: 0.45rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--color-text-primary) 9%, transparent);
  overflow: hidden;
}

.hfc-fill {
  position: absolute;
  inset-inline-start: 0;
  inset-block: 0;
  border-radius: 999px;
  transition: width 320ms cubic-bezier(0.2, 0, 0, 1);
}

.hfc-fill.is-v1 {
  background: var(--tone-color);
  z-index: 2;
}

.hfc-fill.is-v2 {
  background: oklch(0.74 0.15 68 / 0.65);
  z-index: 1;
}

.hfc-prices {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-primary);
  white-space: nowrap;
}

.hfc-v2 {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

@media (max-width: 34rem) {
  .hfc-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .hfc-track {
    grid-column: 1 / -1;
    order: 3;
  }
}

.metric-note {
  display: block;
  margin-block-start: 0.125rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

/* ── Mobile Hamburger Menu ──────────────────────────────────────────────── */
.nav-toggle {
  display: none;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle.is-open .icon-menu {
  display: none;
}

.nav-toggle.is-open .icon-close {
  display: block;
}

.mobile-nav {
  border-block-start: 1px solid var(--color-border-subtle);
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-elevated);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav-inner {
  display: grid;
  gap: 0.25rem;
  padding-block: 0.625rem 0.875rem;
}

.mobile-nav-inner a {
  display: flex;
  align-items: center;
  min-height: 2.625rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.mobile-nav-inner a[aria-current='page'] {
  background: var(--color-accent-subtle);
  color: var(--color-accent-text);
  font-weight: 600;
}

@media (max-width: 56rem) {
  .main-nav {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .header-inner {
    flex-wrap: nowrap;
  }
}

/* ── Mobile Collapsible Docs TOC Bar ────────────────────────────────────── */
.docs-toc-toggle {
  display: none;
}

@media (max-width: 59.99rem) {
  .docs-sidebar {
    position: sticky;
    inset-block-start: calc(var(--header-height) + 0.5rem);
    z-index: 30;
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow-card);
  }

  .rail-toc-title {
    display: none;
  }

  .docs-toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6875rem 0.875rem;
    border: 0;
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
  }

  .docs-toc-toggle-left {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
  }

  .docs-toc-current {
    font-weight: 500;
    color: var(--color-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .docs-sidebar.is-mobile-open .docs-toc-toggle .cb-chevron {
    transform: rotate(180deg);
  }

  .docs-sidebar .rail-toc-list {
    display: none;
    max-height: 52vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.375rem 0.75rem 0.75rem;
    border-block-start: 1px solid var(--color-border-subtle);
  }

  .docs-sidebar.is-mobile-open .rail-toc-list {
    display: block;
  }
}
