/* B612 — designed for aircraft cockpit displays (SIL Open Font License,
   see /THIRD_PARTY_LICENSES.txt). Self-hosted at a stable, unhashed path
   (see vite.config.ts) so it also works offline, matching the main app's
   own @font-face in src/style.css. */
@font-face {
  font-family: "B612";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/b612-regular.woff2") format("woff2");
}

@font-face {
  font-family: "B612";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/b612-bold.woff2") format("woff2");
}

:root {
  font-family: "B612", Consolas, "Courier New", monospace;
  color: #8affb8;
  background: #020704;
  color-scheme: dark;
  --bg: #020704;
  --panel: rgba(2, 12, 7, 0.94);
  --panel-strong: #061b11;
  --border: #2f8c59;
  --border-soft: rgba(47, 140, 89, 0.28);
  --text: #8affb8;
  --text-strong: #b8ffd0;
  --text-muted: #55b77c;
  --text-dim: #327953;
  --active: #63ff9e;
  --warning: #d5c464;
  --error: #ff8d8d;
  --page-overlay-top: rgba(2, 7, 4, 0.94);
  --page-overlay-bottom: rgba(2, 7, 4, 0.98);
  --grid-line-h: rgba(47, 140, 89, 0.045);
  --grid-line-v: rgba(47, 140, 89, 0.035);
  --header-bg: rgba(2, 7, 4, 0.96);
  --hover-bg: #0b2a1a;
  --nav-active-bg: rgba(47, 140, 89, 0.11);
  --status-glow: rgba(99, 255, 158, 0.55);
  --section-number: #276844;
  --mini-panel-bg: rgba(6, 27, 17, 0.52);
  --rule-soft: rgba(47, 140, 89, 0.15);
  --code-bg: #04150d;
  --state-head-bg: rgba(47, 140, 89, 0.14);
  --debug-border: #3ba66d;
  --note-border: rgba(213, 196, 100, 0.44);
  --note-bg: rgba(77, 65, 14, 0.13);
  --note-text: #b0a96d;
}

body.night-mode {
  --bg: #020000;
  --panel: rgba(8, 0, 0, 0.965);
  --panel-strong: #120000;
  --border: #710000;
  --border-soft: rgba(156, 0, 0, 0.46);
  --text: #ef6d6d;
  --text-strong: #ff9b9b;
  --text-muted: #9a3d3d;
  --text-dim: #652828;
  --active: #ff5b5b;
  --warning: #ff9b9b;
  --error: #ffc0c0;
  --page-overlay-top: rgba(8, 0, 0, 0.95);
  --page-overlay-bottom: rgba(3, 0, 0, 0.99);
  --grid-line-h: rgba(156, 0, 0, 0.055);
  --grid-line-v: rgba(156, 0, 0, 0.045);
  --header-bg: rgba(8, 0, 0, 0.97);
  --hover-bg: #220000;
  --nav-active-bg: rgba(156, 0, 0, 0.14);
  --status-glow: rgba(255, 91, 91, 0.48);
  --section-number: #652828;
  --mini-panel-bg: rgba(18, 0, 0, 0.7);
  --rule-soft: rgba(156, 0, 0, 0.22);
  --code-bg: #120000;
  --state-head-bg: rgba(156, 0, 0, 0.18);
  --debug-border: #8f2020;
  --note-border: rgba(255, 91, 91, 0.48);
  --note-bg: rgba(62, 0, 0, 0.34);
  --note-text: #c85d5d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  background:
    linear-gradient(var(--page-overlay-top), var(--page-overlay-bottom)),
    repeating-linear-gradient(0deg, transparent 0 31px, var(--grid-line-h) 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, var(--grid-line-v) 32px);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
}

a {
  color: inherit;
}

.guide-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(8px);
}

.guide-header-inner {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  min-height: 104px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(190px, 300px) minmax(190px, 1fr);
  align-items: center;
  gap: 22px;
  padding: 10px 0;
}

.guide-brand {
  min-width: 0;
}

.guide-header-logo {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.guide-header-logo img {
  display: block;
  width: min(100%, 285px);
  max-height: 82px;
  object-fit: contain;
  object-position: center;
}

.eyebrow,
.nav-title,
.section-number,
.hero-status {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 2px;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: 1px;
}

.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.radar-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.radar-button:hover,
.radar-button:focus-visible {
  border-color: var(--active);
  background: var(--hover-bg);
  color: var(--text-strong);
  outline: none;
}

.radar-button-icon {
  font-size: 17px;
}

.guide-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

button.radar-button {
  font-family: inherit;
  cursor: pointer;
}

button.radar-button[aria-pressed="true"] {
  border-color: var(--active);
  color: var(--text-strong);
  box-shadow: inset 0 0 0 1px var(--border-soft);
}

.guide-layout {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 28px 0 56px;
}

.guide-sidebar {
  position: sticky;
  top: 122px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 138px);
  overflow-y: auto;
  padding-right: 3px;
}

.guide-nav {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}

.nav-title {
  padding: 4px 7px 10px;
  border-bottom: 1px solid var(--border-soft);
}

.guide-nav a {
  padding: 7px;
  border-left: 2px solid transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.35px;
  text-decoration: none;
}

.guide-nav a:hover,
.guide-nav a.active {
  border-left-color: var(--active);
  background: var(--nav-active-bg);
  color: var(--text-strong);
}

.third-party-box {
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}

.third-party-title {
  display: block;
  padding: 7px;
  border-left: 2px solid transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.35px;
  text-decoration: none;
}

.third-party-title:hover,
.third-party-title.active {
  border-left-color: var(--active);
  background: var(--nav-active-bg);
  color: var(--text-strong);
}



.guide-main {
  min-width: 0;
}

.hero-panel,
.guide-section {
  position: relative;
  padding: 22px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.34);
}

.hero-panel {
  margin-bottom: 20px;
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--active);
  box-shadow: 0 0 8px var(--status-glow);
}

.hero-panel h2,
.guide-section h2 {
  margin-bottom: 12px;
  color: var(--text-strong);
  font-size: 21px;
  letter-spacing: 0.6px;
}

.guide-section {
  scroll-margin-top: 122px;
  margin-bottom: 20px;
}

.section-number {
  position: absolute;
  top: 17px;
  right: 18px;
  color: var(--section-number);
  font-size: 19px;
}

.guide-section h3 {
  margin: 22px 0 7px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.7px;
}

.guide-section h3:first-of-type {
  margin-top: 13px;
}

.guide-section p,
.hero-panel p {
  max-width: 88ch;
  margin-bottom: 10px;
  color: var(--text-muted);
}

strong {
  color: var(--text-strong);
}

.muted {
  color: var(--text-dim) !important;
  font-size: 11px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 10px;
}

.note {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  margin-top: 17px;
  padding: 12px;
  border: 1px solid var(--note-border);
  background: var(--note-bg);
}

.note strong {
  color: var(--warning);
  font-size: 10px;
  letter-spacing: 0.6px;
}

.note span {
  color: var(--note-text);
}

.note.compact {
  grid-template-columns: 180px 1fr;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.mini-panel {
  padding: 13px;
  border: 1px solid var(--border-soft);
  background: var(--mini-panel-bg);
}

.mini-panel h3 {
  margin: 0 0 7px !important;
  padding: 0 !important;
  border: 0 !important;
}

.mini-panel p {
  margin: 0;
  font-size: 11px;
}

.definition-list {
  margin: 0;
}

.definition-list > div {
  display: grid;
  grid-template-columns: minmax(145px, 190px) 1fr;
  gap: 18px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.definition-list dt {
  color: var(--text);
  font-weight: 700;
}

.definition-list dd {
  margin: 0;
  color: var(--text-muted);
}

.code-panel,
.status-example {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  background: var(--code-bg);
  color: var(--text-strong);
  font-size: 11px;
}

.code-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 18px;
}

.status-example {
  overflow-x: auto;
  white-space: nowrap;
}

.state-table {
  margin-top: 16px;
  border: 1px solid var(--border);
}

.state-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 42px;
  border-bottom: 1px solid var(--border-soft);
}

.state-row:last-child {
  border-bottom: 0;
}

.state-row > span {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  color: var(--text-muted);
}

.state-row > span:first-child {
  border-right: 1px solid var(--border-soft);
}

.state-head {
  background: var(--state-head-bg);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.state-head > span {
  color: var(--text);
}

.state {
  color: var(--text) !important;
  font-weight: 700;
}

.state.good {
  color: var(--active) !important;
}

.state.warn {
  color: var(--warning) !important;
}

.state.bad {
  color: var(--error) !important;
}

.check-list {
  margin: 10px 0 0;
  padding-left: 19px;
  color: var(--text-muted);
}

.check-list li {
  margin: 4px 0;
}

.third-party-section {
  border-color: var(--border);
}

.license-block {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  background: var(--mini-panel-bg);
}

.license-block h3 {
  margin: 0 0 12px !important;
  padding: 0 0 10px !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-strong);
  font-size: 12px;
}

.license-block h4 {
  margin: 16px 0 8px;
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0.5px;
}

.license-block p {
  max-width: none;
  margin-bottom: 8px;
}

.license-legal-note {
  margin-top: 26px;
}

.license-legal-note h3 {
  margin: 0 0 12px !important;
  padding: 0 0 10px !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-strong);
  font-size: 12px;
}

.license-legal-note p {
  max-width: none;
  margin-bottom: 8px;
}

.license-block code {
  padding: 1px 4px;
  border: 1px solid var(--border-soft);
  background: var(--code-bg);
  color: var(--text-strong);
  font-family: inherit;
  font-size: 0.95em;
  overflow-wrap: anywhere;
}

.inline-link,
.license-link-grid a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.inline-link:hover,
.inline-link:focus-visible,
.license-link-grid a:hover,
.license-link-grid a:focus-visible {
  color: var(--active);
  text-decoration-color: var(--active);
  outline: none;
}

.license-list {
  margin: 10px 0 12px;
  padding-left: 20px;
  color: var(--text-muted);
}

.license-list li {
  margin: 5px 0;
}

.license-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
  margin: 10px 0 14px;
}

.legal-emphasis {
  margin-top: 12px !important;
  padding: 10px 12px;
  border-left: 2px solid var(--warning);
  background: var(--note-bg);
  color: var(--note-text) !important;
}

.floating-top-button {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 40;
  min-width: 64px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 120ms ease, transform 120ms ease, border-color 120ms ease, color 120ms ease;
}

.floating-top-button.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.floating-top-button:hover,
.floating-top-button:focus-visible {
  border-color: var(--active);
  color: var(--text-strong);
  outline: none;
}

.debug-section {
  border-color: var(--debug-border);
}

.guide-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 2px 0;
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.5px;
}

.guide-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.guide-footer a:hover {
  color: var(--active);
}

@media (max-width: 820px) {
  .guide-header-inner {
    grid-template-columns: minmax(170px, 1fr) minmax(145px, 220px) auto;
    gap: 12px;
  }

  .guide-header-logo img {
    width: min(100%, 210px);
    max-height: 72px;
  }

  .guide-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .guide-sidebar {
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .guide-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-title {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .guide-header-inner,
  .guide-layout {
    width: min(100% - 22px, 1180px);
  }

  .guide-header-inner {
    min-height: 90px;
    grid-template-columns: minmax(125px, 1fr) minmax(82px, 118px) auto;
    gap: 7px;
    padding: 7px 0;
  }

  .guide-brand .eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
  }

  .guide-brand h1 {
    margin-bottom: 2px;
    font-size: clamp(16px, 4.5vw, 20px);
    line-height: 1.05;
  }

  .subtitle {
    display: block;
    max-width: 175px;
    font-size: 9px;
    line-height: 1.25;
  }

  .guide-header-logo img {
    width: min(100%, 112px);
    max-height: 62px;
  }

  .guide-header-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .radar-button {
    min-width: 34px;
    min-height: 34px;
    padding: 0 8px;
  }

  .radar-button span:last-child {
    display: none;
  }

  .guide-nav {
    grid-template-columns: 1fr 1fr;
  }

  .hero-panel,
  .guide-section {
    padding: 17px;
  }

  .panel-grid,
  .code-panel {
    grid-template-columns: 1fr;
  }

  .definition-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .note,
  .note.compact {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .state-row {
    grid-template-columns: 135px 1fr;
  }

  .section-number {
    right: 13px;
    font-size: 15px;
  }

  .license-link-grid {
    grid-template-columns: 1fr;
  }

  .floating-top-button {
    right: max(11px, env(safe-area-inset-right));
    bottom: max(11px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .guide-header-inner {
    width: min(100% - 14px, 1180px);
    grid-template-columns: minmax(112px, 1fr) 82px auto;
    gap: 5px;
  }

  .guide-brand .eyebrow {
    font-size: 8px;
  }

  .guide-brand h1 {
    font-size: 15px;
  }

  .subtitle {
    max-width: 138px;
    font-size: 8px;
  }

  .guide-header-logo img {
    width: 82px;
    max-height: 48px;
  }

  .radar-button {
    min-width: 32px;
    min-height: 32px;
    padding: 0 6px;
  }

  .radar-button-icon {
    font-size: 15px;
  }

  .guide-nav {
    grid-template-columns: 1fr;
  }

  .nav-title {
    grid-column: auto;
  }

  .state-row {
    grid-template-columns: 1fr;
  }

  .state-row > span:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--border-soft);
  }

  .state-head {
    display: none;
  }
}

/* Mobile chapter selector -------------------------------------------------- */
.guide-sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-chapter-toggle {
  display: none;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--text-strong);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.35px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.34);
}

.mobile-chapter-toggle:hover,
.mobile-chapter-toggle:focus-visible,
.mobile-chapter-toggle[aria-expanded="true"] {
  border-color: var(--active);
  background: var(--hover-bg);
  outline: none;
}

.mobile-chapter-chevron {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1;
  transition: transform 120ms ease;
}

.mobile-chapter-toggle[aria-expanded="true"] .mobile-chapter-chevron {
  transform: rotate(180deg);
}

@media (max-width: 820px) {
  /* Keep the wide logo geometrically centred between title and controls. */
  .guide-header-inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .guide-brand {
    justify-self: start;
  }

  .guide-header-logo {
    justify-self: center;
  }

  .guide-header-actions {
    justify-self: end;
  }

  /* On compact layouts the full index becomes a sticky chapter selector. */
  .guide-sidebar {
    position: sticky;
    top: calc(var(--guide-header-height, 104px) + 7px);
    z-index: 19;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .mobile-chapter-toggle {
    display: flex;
  }

  .guide-sidebar-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--guide-header-height, 104px) - 70px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0;
  }

  .guide-sidebar.is-open .guide-sidebar-menu {
    display: flex;
  }

  .guide-sidebar.is-open .guide-nav,
  .guide-sidebar.is-open .third-party-box {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
  }
}

@media (max-width: 620px) {
  .guide-header-inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .guide-header-logo img {
    width: clamp(88px, 24vw, 112px);
  }

  .guide-header-actions {
    justify-self: end;
  }

  .mobile-chapter-toggle {
    min-height: 38px;
    padding: 0 10px;
  }
}

@media (max-width: 420px) {
  .guide-header-inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .guide-header-logo img {
    width: clamp(72px, 21vw, 88px);
  }

  .mobile-chapter-toggle {
    font-size: 10px;
  }
}

@media (max-width: 820px) {
  .guide-section {
    scroll-margin-top: calc(var(--guide-header-height, 104px) + 58px);
  }
}

/* ==========================================================
   v0.20.49 — GUIDE SEARCH / QUICK START / DEEP LINKS
   ========================================================== */

.guide-search-box {
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}

.guide-search-box label {
  display: block;
  margin-bottom: 7px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.9px;
}

.guide-search-input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 0;
  outline: none;
  background: var(--code-bg);
  color: var(--text-strong);
  font: inherit;
  font-size: 10px;
  appearance: none;
}

.guide-search-input::placeholder {
  color: var(--text-dim);
  opacity: 1;
}

.guide-search-input:focus-visible {
  border-color: var(--active);
  box-shadow: inset 0 0 0 1px var(--border-soft);
}

.guide-search-hint {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 8px;
  line-height: 1.35;
}

.guide-search-results {
  max-height: min(340px, 45vh);
  margin-top: 9px;
  overflow-y: auto;
  border-top: 1px solid var(--border-soft);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.guide-search-results[hidden] {
  display: none;
}

.guide-search-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 44px;
  justify-content: center;
  padding: 7px 6px;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--text-muted);
  text-decoration: none;
}

.guide-search-result:hover,
.guide-search-result:focus-visible {
  background: var(--nav-active-bg);
  color: var(--text-strong);
  outline: none;
}

.guide-search-result-section {
  color: var(--text-dim);
  font-size: 8px;
  letter-spacing: 0.4px;
}

.guide-search-result strong {
  font-size: 9px;
}

.guide-search-highlight {
  background: var(--active);
  color: var(--bg);
  border-radius: 2px;
  padding: 0 2px;
  box-shadow: 0 0 0 1px var(--active);
}

.guide-search-empty {
  padding: 10px 6px 4px;
  color: var(--text-dim);
  font-size: 9px;
}

.quick-start-panel {
  position: relative;
  margin-bottom: 20px;
  padding: 17px 22px 20px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.34);
}

.quick-start-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 11px;
}

.quick-start-kicker {
  color: var(--active);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.quick-start-panel h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 16px;
  letter-spacing: 0.5px;
}

.quick-start-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
}

.quick-start-grid > a {
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  background: var(--mini-panel-bg);
  color: var(--text-muted);
  text-decoration: none;
}

.quick-start-grid > a:hover,
.quick-start-grid > a:focus-visible {
  border-color: var(--active);
  background: var(--nav-active-bg);
  color: var(--text-strong);
  outline: none;
}

.quick-start-grid > a > strong {
  color: var(--active);
  font-size: 10px;
}

.quick-start-grid > a > span {
  font-size: 10px;
  line-height: 1.4;
}

.heading-link {
  display: inline-flex;
  width: 28px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  margin-left: 7px;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
  opacity: 0.55;
}

h2:hover > .heading-link,
h3:hover > .heading-link,
.heading-link:focus-visible {
  border-color: var(--border-soft);
  color: var(--active);
  opacity: 1;
  outline: none;
}

.guide-section h3[id],
.quick-start-panel [id] {
  scroll-margin-top: calc(var(--guide-header-height, 104px) + 18px);
}

.guide-nav a:focus-visible,
.third-party-title:focus-visible,
.floating-top-button:focus-visible {
  border-color: var(--active);
  background: var(--nav-active-bg);
  color: var(--text-strong);
  outline: 1px solid var(--active);
  outline-offset: 2px;
}

@media (max-width: 820px) {
  .guide-search-input,
  .mobile-chapter-toggle,
  .radar-button {
    min-height: 44px;
  }

  .radar-button {
    min-width: 44px;
  }

  .guide-section h3[id],
  .quick-start-panel [id] {
    scroll-margin-top: calc(var(--guide-header-height, 104px) + 66px);
  }
}

@media (max-width: 620px) {
  .quick-start-panel {
    padding: 15px 17px 17px;
  }

  .quick-start-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .quick-start-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .floating-top-button,
  .mobile-chapter-chevron {
    transition: none;
  }
}
