:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-3: #e9eff6;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-border: #bfdbfe;
  --secondary: #4f46e5;
  --secondary-soft: #eef2ff;

  --success: #16a34a;
  --success-soft: #f0fdf4;
  --success-border: #bbf7d0;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --warning-border: #fde68a;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;
  --info: #0284c7;
  --info-soft: #f0f9ff;
  --info-border: #bae6fd;

  --code-bg: #f8fafc;
  --code-text: #1e293b;
  --code-border: #e2e8f0;
  --terminal-bg: #0f172a;
  --terminal-text: #e2e8f0;
  --terminal-header: #1e293b;
  --terminal-dim: #94a3b8;

  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --container: 1120px;
  --content: 760px;
  --header-h: 64px;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);

  --transition: 160ms ease;
  --transition-slow: 260ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

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

::selection {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  margin-top: 2.4em;
}

h3 {
  font-size: 1.2rem;
  margin-top: 1.8em;
}

h4 {
  font-size: 1.02rem;
  margin-top: 1.5em;
}

p {
  margin: 0 0 1.1em;
}

ul,
ol {
  margin: 0 0 1.1em;
  padding-left: 1.4em;
}

li {
  margin: 0.3em 0;
}

code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.38em;
  color: var(--code-text);
  white-space: normal;
  overflow-wrap: anywhere;
}

.grid > *,
.callout > div,
.lookup-item__symptom > *,
.steps li,
.tabs__panel,
.result-card {
  min-width: 0;
}

kbd {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.1em 0.42em;
  font-size: 0.78em;
  color: var(--text-muted);
}

strong {
  font-weight: 650;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.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;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: top var(--transition);
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.prose {
  max-width: var(--content);
}

.section {
  padding: 4.5rem 0;
}

.section--tight {
  padding: 3rem 0;
}

.section--soft {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section__head {
  max-width: 720px;
  margin-bottom: 2.2rem;
}

.section__head p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.lead {
  font-size: 1.14rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.muted {
  color: var(--text-muted);
}

.dim {
  color: var(--text-dim);
}

.text-center {
  text-align: center;
}

.mx-auto {
  margin-inline: auto;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.stack > * + * {
  margin-top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 750;
  font-size: 1.06rem;
  color: var(--text);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

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

.brand__mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex-shrink: 0;
}

.brand__suffix {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.12em 0.5em;
  margin-left: 0.15rem;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.nav__link {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav__link:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}

.nav__link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.6rem;
}

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
}

.nav__toggle:hover {
  background: var(--surface-2);
}

.nav__toggle svg {
  width: 20px;
  height: 20px;
}

.nav__backdrop {
  display: none;
}

@media (max-width: 900px) {
  .nav {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    margin: 0;
    padding: 0.9rem 20px 1.4rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .nav.is-open {
    display: flex;
  }

  .nav__link {
    padding: 0.8rem 0.7rem;
    font-size: 1rem;
  }

  .nav__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin: 0.6rem 0 0;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border);
  }

  .nav__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .nav__toggle {
    display: inline-flex;
  }

  .nav__backdrop {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    z-index: 90;
  }

  .nav__backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-locked {
    overflow: hidden;
  }
}

.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 3.2rem 0 2.2rem;
  margin-top: 4rem;
  font-size: 0.92rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2rem;
}

.footer__brand p {
  color: var(--text-muted);
  max-width: 34ch;
  margin-top: 0.8rem;
}

.footer__title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 650;
  margin: 0 0 0.9rem;
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__links li {
  margin: 0.45rem 0;
}

.footer__links a {
  color: var(--text-muted);
}

.footer__links a:hover {
  color: var(--accent);
}

.footer__meta {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer__version {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.footer__disclaimer {
  margin-top: 1.2rem;
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.6;
  max-width: 100%;
}

@media (max-width: 780px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem;
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.72rem 1.15rem;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
    color var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn--secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn--secondary:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn--ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn--sm {
  font-size: 0.86rem;
  padding: 0.5rem 0.85rem;
  min-height: 40px;
}

.btn--lg {
  font-size: 1rem;
  padding: 0.9rem 1.5rem;
}

.btn__icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.4em 0.7em;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  white-space: nowrap;
}

.badge--accent {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-hover);
}

.badge--success {
  background: var(--success-soft);
  border-color: var(--success-border);
  color: var(--success);
}

.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.22em 0.55em;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.card--pad-sm {
  padding: 1.15rem;
}

.card--link {
  display: block;
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition),
    transform var(--transition);
}

.card--link:hover {
  color: inherit;
  text-decoration: none;
  border-color: var(--accent-border);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1rem;
}

.card__icon svg {
  width: 21px;
  height: 21px;
}

.card h3 {
  margin-top: 0;
  font-size: 1.08rem;
}

.card p {
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 0.96rem;
}

.card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr));
}
.grid--auto-sm {
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
}

@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .grid--2,
  .grid--3 { grid-template-columns: 1fr; }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.feature-card__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1.05rem;
}

.feature-card__icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.04rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.hero {
  position: relative;
  padding: 4.2rem 0 3.6rem;
  overflow: hidden;
  background:
    radial-gradient(60% 60% at 15% 0%, rgba(37, 99, 235, 0.1), transparent 70%),
    radial-gradient(50% 60% at 100% 10%, rgba(79, 70, 229, 0.09), transparent 70%),
    var(--bg);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero__lead {
  font-size: 1.16rem;
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: 1.6rem;
}

.hero__badges {
  margin-bottom: 1.4rem;
}

.hero__cta {
  margin-bottom: 1.6rem;
}

.hero__note {
  font-size: 0.88rem;
  color: var(--text-dim);
}

.hero__visual {
  min-width: 0;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }
  .hero {
    padding: 3.2rem 0 2.8rem;
  }
}

.codeblock {
  position: relative;
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  background: var(--code-bg);
  overflow: hidden;
  min-width: 0;
}

.codeblock__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.5rem 0.5rem 0.9rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--code-border);
  min-height: 44px;
}

.codeblock__label {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.codeblock__lang {
  font-family: var(--font-mono);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.74rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.12em 0.55em;
}

.codeblock__body {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
  background: var(--code-bg);
  color: var(--code-text);
}

.codeblock__body code {
  font-family: var(--font-mono);
  white-space: pre;
  color: inherit;
}

.codeblock--wrap .codeblock__body code {
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal {
  border: 1px solid #1e293b;
  border-radius: var(--radius);
  background: var(--terminal-bg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.55rem 0.55rem 0.9rem;
  background: var(--terminal-header);
  border-bottom: 1px solid #0b1220;
  min-height: 44px;
}

.terminal__dots {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}

.terminal__dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}

.terminal__dots i:nth-child(1) { background: #ff5f57; }
.terminal__dots i:nth-child(2) { background: #febc2e; }
.terminal__dots i:nth-child(3) { background: #28c840; }

.terminal__title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--terminal-dim);
  margin-right: auto;
}

.terminal__body {
  margin: 0;
  padding: 1.05rem 1.1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--terminal-text);
}

.terminal__body code {
  font-family: inherit;
  white-space: pre;
  color: inherit;
}

.terminal .prompt { color: #38bdf8; user-select: none; }
.terminal .comment { color: var(--terminal-dim); }
.terminal .value { color: #fbbf24; }
.terminal .command { color: var(--terminal-text); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  min-height: 36px;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition);
  flex-shrink: 0;
}

.copy-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.copy-btn.is-copied {
  background: var(--success-soft);
  border-color: var(--success-border);
  color: var(--success);
}

.terminal .copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--terminal-text);
}

.terminal .copy-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.terminal .copy-btn.is-copied {
  background: rgba(22, 163, 74, 0.22);
  border-color: rgba(22, 163, 74, 0.5);
  color: #86efac;
}

.code-tabs {
  margin: 1.4rem 0;
}

.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tabs__list [role="tab"] {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.55rem 0.85rem;
  min-height: 44px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.tabs__list [role="tab"]:hover {
  color: var(--text);
}

.tabs__list [role="tab"][aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tabs__panel[hidden] {
  display: none;
}

.callout {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--info-border);
  background: var(--info-soft);
  margin: 1.4rem 0;
  font-size: 0.95rem;
}

.callout__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  color: var(--info);
}

.callout__icon svg {
  width: 20px;
  height: 20px;
}

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

.callout__title {
  font-weight: 650;
  display: block;
  margin-bottom: 0.2rem;
}

.callout--warn {
  border-color: var(--warning-border);
  background: var(--warning-soft);
}

.callout--warn .callout__icon { color: var(--warning); }

.callout--danger {
  border-color: var(--danger-border);
  background: var(--danger-soft);
}

.callout--danger .callout__icon { color: var(--danger); }

.callout--success {
  border-color: var(--success-border);
  background: var(--success-soft);
}

.callout--success .callout__icon { color: var(--success); }

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1.4rem 0;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table caption {
  caption-side: top;
  text-align: left;
  padding: 0.8rem 1rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

th,
td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

thead th {
  background: var(--surface-2);
  font-weight: 650;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: var(--bg-soft);
}

td code {
  white-space: nowrap;
}

.table--compact th,
.table--compact td {
  padding: 0.5rem 0.75rem;
}

.check {
  color: var(--success);
  font-weight: 700;
}

.cross {
  color: var(--danger);
  font-weight: 700;
}

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

.faq__item {
  border-bottom: 1px solid var(--border);
}

.faq__item:last-child {
  border-bottom: 0;
}

.faq__item > summary {
  list-style: none;
  cursor: pointer;
  padding: 1.05rem 3rem 1.05rem 1.15rem;
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  color: var(--text);
  transition: background var(--transition);
}

.faq__item > summary::-webkit-details-marker {
  display: none;
}

.faq__item > summary:hover {
  background: var(--bg-soft);
}

.faq__item > summary::after {
  content: "";
  position: absolute;
  right: 1.15rem;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--transition);
}

.faq__item[open] > summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq__body {
  padding: 0 1.15rem 1.15rem;
  color: var(--text-muted);
  font-size: 0.96rem;
}

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

.breadcrumbs {
  font-size: 0.84rem;
  color: var(--text-dim);
  margin: 0 0 1.2rem;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.breadcrumbs li + li::before {
  content: "/";
  color: var(--border-strong);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.tldr-box {
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  margin: 1.6rem 0 2rem;
}

.tldr-box__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-hover);
  margin-bottom: 0.7rem;
}

.tldr-box__title svg {
  width: 16px;
  height: 16px;
}

.tldr-box ul {
  margin: 0;
  padding-left: 1.2rem;
}

.tldr-box li {
  margin: 0.35rem 0;
  color: var(--text);
  font-size: 0.96rem;
}

.doc-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 2.6rem;
  align-items: start;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.doc-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
  padding-right: 0.5rem;
  font-size: 0.9rem;
}

.doc-sidebar__toggle {
  display: none;
}

.doc-sidebar__group {
  margin-bottom: 1.5rem;
}

.doc-sidebar__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 0.6rem;
}

.doc-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}

.doc-sidebar__list a {
  display: block;
  padding: 0.34rem 0.8rem;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  margin-left: -1px;
  font-size: 0.88rem;
  transition: color var(--transition), border-color var(--transition);
}

.doc-sidebar__list a:hover {
  color: var(--text);
  text-decoration: none;
}

.doc-sidebar__list a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

.doc-content {
  max-width: 820px;
  min-width: 0;
}

.doc-content h2 {
  padding-top: 0.6rem;
}

.doc-section {
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.2rem;
}

.doc-section:last-child {
  border-bottom: 0;
}

@media (max-width: 980px) {
  .doc-shell {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .doc-sidebar__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 44px;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    font-weight: 600;
    cursor: pointer;
  }

  .doc-sidebar {
    position: static;
    max-height: none;
    display: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    background: var(--surface);
  }

  .doc-sidebar.is-open {
    display: block;
  }
}

.planner {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.planner__form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.planner__output {
  min-width: 0;
}

.field {
  margin-bottom: 1.05rem;
}

.field__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.field__hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.field__error {
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 0.3rem;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.7rem;
  min-height: 44px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 44px;
}

.radio-group input {
  accent-color: var(--accent);
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  min-height: 44px;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.planner__result {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.planner__result > * {
  min-width: 0;
}

.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm);
}

.result-card__title {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 0.7rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem;
}

.stat__label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 600;
}

.stat__value {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.2rem;
  word-break: break-word;
}

.notice {
  display: flex;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 0.9rem;
}

.notice--warn {
  border-color: var(--warning-border);
  background: var(--warning-soft);
}

.notice--danger {
  border-color: var(--danger-border);
  background: var(--danger-soft);
}

.notice--info {
  border-color: var(--info-border);
  background: var(--info-soft);
}

.notice__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
}

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

.spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 820px) {
  .planner {
    grid-template-columns: 1fr;
  }
  .spotlight {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding: 1.5rem;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  margin: 0 0 1.1rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid var(--accent-border);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin: 1.4rem 0;
}

.filter-search {
  position: relative;
  flex: 1 1 240px;
}

.filter-search input {
  padding-left: 2.3rem;
}

.filter-search svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.42rem 0.75rem;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition);
}

.chip:hover {
  background: var(--surface-2);
  color: var(--text);
}

.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.filter-count {
  font-size: 0.84rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.filter-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.lookup-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.lookup-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm);
}

.lookup-item__symptom {
  font-weight: 650;
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin-bottom: 0.7rem;
}

.lookup-item__symptom code {
  white-space: normal;
}

.lookup-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.to-top.is-visible {
  display: inline-flex;
}

[data-reveal] {
  opacity: 1;
  transform: none;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
  will-change: opacity, transform;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal],
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .nav,
  .to-top,
  .copy-btn,
  .filter-bar {
    display: none !important;
  }

  .doc-shell {
    display: block;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }
}

.cheat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 1.1rem;
}

.cheat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.cheat-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.cheat-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.cheat-card__title {
  font-size: 0.98rem;
  margin: 0;
}

.cheat-card .tag {
  flex-shrink: 0;
}

.cheat-card .codeblock__bar {
  min-height: 38px;
  padding: 0.3rem 0.4rem 0.3rem 0.7rem;
}

.cheat-card .copy-btn {
  min-height: 30px;
  padding: 0.25rem 0.55rem;
}

.cheat-card .codeblock__body {
  font-size: 0.8rem;
  padding: 0.7rem 0.85rem;
  line-height: 1.65;
}

.cheat-card__more {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
}

.lookup-item__symptom h2 {
  font-size: 1.02rem;
  margin: 0;
}

.trouble__icon {
  flex-shrink: 0;
  color: var(--danger);
  font-weight: 700;
  line-height: 1.35;
}

.glossary {
  margin: 1.4rem 0 0;
}

.glossary dt {
  font-weight: 650;
  margin-top: 1.05rem;
}

.glossary dt:first-child {
  margin-top: 0;
}

.glossary dd {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.96rem;
}

@media (pointer: coarse) {
  .btn,
  .btn--sm,
  .btn--lg,
  .copy-btn,
  .chip,
  .nav__toggle {
    min-height: 44px;
  }
}

