/* =========================================================
   Guide / Docs — light educational theme
   Independent of homepage dark skin (do not require styles.css)
   Inspired by docs-style layouts (sidebar TOC + prose)
   ========================================================= */

:root {
  --docs-bg: #ffffff;
  --docs-bg-subtle: #fafafa;
  --docs-bg-muted: #f4f4f5;
  --docs-border: #e4e4e7;
  --docs-border-strong: #d4d4d8;
  --docs-text: #18181b;
  --docs-text-secondary: #3f3f46;
  --docs-text-muted: #71717a;
  --docs-text-faint: #a1a1aa;
  /* Burgundy point color on neutral gray base */
  --docs-accent: #8b2e3d;
  --docs-accent-hover: #6e2430;
  --docs-accent-soft: #faf5f6;
  --docs-accent-border: #e8cfd4;
  --docs-warn-bg: #faf5f6;
  --docs-warn-border: #e8cfd4;
  --docs-warn-text: #8b2e3d;
  --docs-success: #6e2430;
  --docs-radius: 8px;
  --docs-radius-lg: 12px;
  --docs-font: "Inter", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  --docs-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --docs-sidebar-w: 240px;
  --docs-content-max: 720px;
  --docs-topbar-h: 56px;
  --docs-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --docs-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--docs-topbar-h) + 16px);
}

body.guide-page,
body.docs-page {
  margin: 0;
  font-family: var(--docs-font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--docs-text-secondary);
  background: var(--docs-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  overflow-wrap: break-word;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(139, 46, 61, 0.14);
  color: var(--docs-text);
}

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

.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: -100px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--docs-text);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
}

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

/* ── Top bar ── */
.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--docs-topbar-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--docs-border);
}

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

.docs-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.docs-brand .logo-img,
.docs-footer .footer-logo-img {
  height: 26px;
  width: auto;
  max-width: 148px;
  object-fit: contain;
  /* light-theme logo asset (dark mark for white backgrounds) — no filter */
}

.docs-crumb {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--docs-text-faint);
  min-width: 0;
}

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

.docs-crumb a:hover {
  color: var(--docs-text);
}

.docs-crumb .sep {
  opacity: 0.5;
}

.docs-crumb .current {
  color: var(--docs-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 32ch;
}

@media (min-width: 720px) {
  .docs-crumb {
    display: flex;
  }
}

.docs-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.docs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  cursor: pointer;
}

.docs-btn-ghost {
  color: var(--docs-text-muted);
  border-color: var(--docs-border);
  background: #fff;
}

.docs-btn-ghost:hover {
  color: var(--docs-text);
  border-color: var(--docs-border-strong);
  background: var(--docs-bg-subtle);
}

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

.docs-btn-primary:hover {
  background: var(--docs-accent-hover);
  border-color: var(--docs-accent-hover);
}

@media (max-width: 639px) {
  .docs-btn-primary {
    display: none;
  }
}

/* ── Shell: sidebar + main ── */
.docs-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  gap: 0;
  align-items: start;
}

@media (min-width: 960px) {
  .docs-shell {
    grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr);
    gap: 0 40px;
  }
}

/* ── Sidebar TOC ── */
.docs-sidebar {
  display: none;
}

@media (min-width: 960px) {
  .docs-sidebar {
    display: block;
    position: sticky;
    top: var(--docs-topbar-h);
    height: calc(100vh - var(--docs-topbar-h));
    overflow: auto;
    padding: 28px 0 48px;
    border-right: 1px solid var(--docs-border);
    padding-right: 20px;
    scrollbar-width: thin;
  }
}

.docs-toc-label {
  margin: 0 0 12px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--docs-text-faint);
}

.docs-toc {
  font-size: 13px;
}

.docs-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-toc > ul > li {
  margin: 0 0 2px;
}

.docs-toc a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--docs-text-muted);
  line-height: 1.35;
  transition: color 0.12s, background 0.12s;
}

.docs-toc a:hover {
  color: var(--docs-text);
  background: var(--docs-bg-muted);
}

.docs-toc a.is-active {
  color: var(--docs-accent);
  background: var(--docs-accent-soft);
  font-weight: 500;
}

.docs-toc .toc-sub {
  margin: 0 0 8px;
  padding-left: 8px;
}

.docs-toc .toc-sub a {
  padding: 4px 10px 4px 12px;
  font-size: 12.5px;
  color: var(--docs-text-faint);
}

.docs-toc .toc-sub a:hover,
.docs-toc .toc-sub a.is-active {
  color: var(--docs-accent);
}

/* Mobile TOC */
.docs-toc-mobile {
  margin: 16px 0 8px;
}

.docs-toc-mobile summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  border-radius: var(--docs-radius);
  border: 1px solid var(--docs-border);
  background: var(--docs-bg-subtle);
  font-size: 13px;
  font-weight: 600;
  color: var(--docs-text-secondary);
}

.docs-toc-mobile summary::-webkit-details-marker {
  display: none;
}

.docs-toc-mobile[open] summary {
  border-radius: var(--docs-radius) var(--docs-radius) 0 0;
  border-bottom-color: transparent;
}

.docs-toc-mobile .docs-toc {
  padding: 4px 8px 12px;
  border: 1px solid var(--docs-border);
  border-top: 0;
  border-radius: 0 0 var(--docs-radius) var(--docs-radius);
  background: var(--docs-bg-subtle);
}

@media (min-width: 960px) {
  .docs-toc-mobile {
    display: none;
  }
}

/* ── Main content ── */
.docs-main {
  min-width: 0;
  padding: 28px 0 80px;
}

@media (min-width: 960px) {
  .docs-main {
    padding: 32px 0 96px 8px;
  }
}

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

/* Page title (replaces hero) */
.docs-page-header {
  margin: 0 0 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--docs-border);
}

.docs-eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--docs-accent);
}

.docs-page-header h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 3.5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--docs-text);
}

.docs-lede {
  margin: 0 0 14px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--docs-text-muted);
}

.docs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--docs-text-faint);
}

.docs-meta strong {
  color: var(--docs-text-muted);
  font-weight: 500;
}

/* Steps quick nav */
.docs-step-links {
  display: grid;
  gap: 8px;
  margin: 0 0 32px;
}

@media (min-width: 640px) {
  .docs-step-links {
    grid-template-columns: repeat(3, 1fr);
  }
}

.docs-step-link {
  display: block;
  padding: 12px 14px;
  border-radius: var(--docs-radius);
  border: 1px solid var(--docs-border);
  background: var(--docs-bg-subtle);
  transition: border-color 0.15s, background 0.15s;
}

.docs-step-link:hover {
  border-color: var(--docs-accent-border);
  background: var(--docs-accent-soft);
}

.docs-step-link .n {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--docs-accent);
}

.docs-step-link .t {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--docs-text);
  margin-bottom: 2px;
}

.docs-step-link .d {
  display: block;
  font-size: 12px;
  color: var(--docs-text-faint);
  line-height: 1.4;
}

/* Prose */
.docs-article h2 {
  margin: 40px 0 12px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--docs-text);
  scroll-margin-top: calc(var(--docs-topbar-h) + 16px);
}

.docs-article h2:first-of-type {
  margin-top: 0;
}

.docs-article h3 {
  margin: 28px 0 10px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--docs-text);
  scroll-margin-top: calc(var(--docs-topbar-h) + 16px);
}

.docs-article h4 {
  margin: 18px 0 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--docs-text-secondary);
}

.docs-article p {
  margin: 0 0 14px;
  color: var(--docs-text-secondary);
  line-height: 1.75;
}

.docs-article ul,
.docs-article ol {
  margin: 0 0 16px;
  padding-left: 1.35em;
  color: var(--docs-text-secondary);
  line-height: 1.7;
}

.docs-article li {
  margin-bottom: 4px;
}

.docs-article li::marker {
  color: var(--docs-text-faint);
}

.docs-article a.ext,
.docs-article p a,
.docs-article li a,
.docs-article figcaption a {
  color: var(--docs-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(139, 46, 61, 0.35);
}

.docs-article a.ext:hover,
.docs-article p a:hover,
.docs-article li a:hover,
.docs-article figcaption a:hover {
  color: var(--docs-accent-hover);
  text-decoration-color: var(--docs-accent-hover);
}

.docs-article strong {
  color: var(--docs-text);
  font-weight: 600;
}

/* Step section header */
.step-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin: 48px 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--docs-border);
  scroll-margin-top: calc(var(--docs-topbar-h) + 16px);
}

.step-banner .step-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--docs-accent);
}

.step-banner h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.4rem;
}

/* Callouts */
.callout {
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: var(--docs-radius);
  border: 1px solid var(--docs-border);
  background: var(--docs-bg-subtle);
  font-size: 14px;
  line-height: 1.65;
  color: var(--docs-text-secondary);
}

.callout strong {
  color: var(--docs-text);
}

.callout-point {
  border-color: var(--docs-accent-border);
  background: var(--docs-accent-soft);
}

.callout-point .callout-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--docs-accent);
}

.callout-warn {
  border-color: var(--docs-warn-border);
  background: var(--docs-warn-bg);
}

.callout-warn .callout-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--docs-warn-text);
}

/* Checklist */
.checklist {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  margin: 0 0 6px;
  padding: 10px 12px 10px 36px;
  border-radius: var(--docs-radius);
  border: 1px solid var(--docs-border);
  background: #fff;
  color: var(--docs-text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 13px;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1.5px solid var(--docs-border-strong);
  background: #fff;
}

/* Tables */
.guide-table-wrap {
  margin: 0 0 16px;
  overflow-x: auto;
  border-radius: var(--docs-radius);
  border: 1px solid var(--docs-border);
  background: #fff;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.guide-table th,
.guide-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--docs-border);
  vertical-align: top;
}

.guide-table th {
  background: var(--docs-bg-subtle);
  color: var(--docs-text-muted);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.guide-table td {
  color: var(--docs-text-secondary);
}

.guide-table tr:last-child th,
.guide-table tr:last-child td {
  border-bottom: 0;
}

.guide-table tbody tr:hover td {
  background: var(--docs-bg-subtle);
}

/* Worksheet */
.worksheet {
  margin: 14px 0 20px;
  padding: 14px 16px;
  border-radius: var(--docs-radius);
  border: 1px solid var(--docs-border);
  background: var(--docs-bg-subtle);
}

.worksheet h4 {
  margin: 0 0 8px;
  color: var(--docs-text);
  font-size: 0.95rem;
}

.worksheet ol,
.worksheet ul {
  margin-bottom: 0;
  font-size: 14px;
}

.worksheet p,
.worksheet .ws-note {
  margin: 12px 0 0;
  font-size: 13px !important;
  color: var(--docs-text-muted) !important;
  line-height: 1.55;
}

/* Stage blocks */
.stage-block {
  margin: 0 0 12px;
  padding: 14px 16px;
  border-radius: var(--docs-radius);
  border: 1px solid var(--docs-border);
  background: #fff;
}

.stage-block .stage-label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--docs-accent);
}

.stage-block h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--docs-text);
}

.stage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--docs-text-faint);
}

.stage-meta strong {
  color: var(--docs-text-muted);
  font-weight: 500;
}

.stage-block p:last-child,
.stage-block ul:last-child {
  margin-bottom: 0;
}

/* Figures */
.guide-figure {
  margin: 16px 0 20px;
  padding: 0;
  border: 0;
}

.guide-figure img,
.guide-figure svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--docs-radius);
  border: 1px solid var(--docs-border);
  background: #fff;
  box-shadow: var(--docs-shadow-sm);
}

.guide-figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--docs-text-muted);
}

.guide-figure figcaption strong {
  color: var(--docs-text-secondary);
  font-weight: 600;
}

.guide-figure-row {
  display: grid;
  gap: 12px;
  margin: 16px 0 20px;
}

@media (min-width: 640px) {
  .guide-figure-row.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.guide-figure-row .guide-figure {
  margin: 0;
}

.guide-figure.is-screenshot img {
  background: #eef1f6;
}

.guide-visual-note {
  display: inline-flex;
  margin: 2px 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--docs-text-faint);
}

/* CTA */
.guide-cta {
  margin: 40px 0 0;
  padding: 28px 20px;
  border-radius: var(--docs-radius-lg);
  border: 1px solid var(--docs-border);
  background: var(--docs-bg-subtle);
  text-align: center;
}

.guide-cta h2 {
  margin: 0 0 8px !important;
  font-size: 1.15rem !important;
  color: var(--docs-text);
}

.guide-cta p {
  margin: 0 auto 16px;
  max-width: 36em;
  color: var(--docs-text-muted);
  font-size: 14px;
}

.guide-cta .btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* Source */
.guide-source {
  margin: 32px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--docs-border);
  font-size: 12px;
  line-height: 1.55;
  color: var(--docs-text-faint);
}

.guide-source p {
  margin: 0 0 8px;
  color: var(--docs-text-faint) !important;
  font-size: 12px !important;
}

/* Footer */
.docs-footer {
  border-top: 1px solid var(--docs-border);
  background: var(--docs-bg-subtle);
  padding: 24px 0 32px;
  font-size: 13px;
  color: var(--docs-text-muted);
}

.docs-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.docs-footer a:hover {
  color: var(--docs-text);
}

.docs-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.docs-footer .footer-logo-img {
  height: 22px;
  width: auto;
  max-width: 120px;
  margin-bottom: 6px;
}

/* Code path */
code.path {
  font-family: var(--docs-mono);
  font-size: 0.86em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--docs-bg-muted);
  color: var(--docs-text-secondary);
  word-break: break-all;
  border: 1px solid var(--docs-border);
}

/* Legacy class aliases (keep HTML working) */
.guide-layout,
.guide-article,
.guide-toc,
.guide-header,
.guide-hero {
  /* no-op containers superseded by docs-* where rewritten */
}

.guide-article {
  max-width: var(--docs-content-max);
}

/* ── Admin Trailhead / learning guide components ── */
.docs-steps {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  counter-reset: docs-step;
}

.docs-steps li {
  counter-increment: docs-step;
  position: relative;
  padding: 12px 0 12px 40px;
  border-bottom: 1px solid var(--docs-border);
  font-size: 14px;
  color: var(--docs-text);
  line-height: 1.55;
}

.docs-steps li:last-child {
  border-bottom: 0;
}

.docs-steps li::before {
  content: counter(docs-step);
  position: absolute;
  left: 0;
  top: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--docs-accent);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.docs-steps .sub {
  display: block;
  color: var(--docs-text-muted);
  font-size: 13px;
  margin-top: 3px;
  font-weight: 400;
}

.docs-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.docs-concept-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0;
}

@media (min-width: 640px) {
  .docs-concept-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.docs-concept {
  padding: 14px 12px;
  border-radius: var(--docs-radius);
  border: 1px solid var(--docs-border);
  background: var(--docs-bg-subtle);
  text-align: center;
}

.docs-concept b {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--docs-text);
}

.docs-concept span {
  font-size: 12px;
  color: var(--docs-text-muted);
  line-height: 1.4;
}

.docs-rank-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--docs-text-muted);
}

.docs-rank-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--docs-border);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--docs-text-secondary);
}

.docs-two-col {
  display: grid;
  gap: 12px;
  margin: 12px 0 0;
}

@media (min-width: 640px) {
  .docs-two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.docs-two-col .col {
  padding: 14px 16px;
  border-radius: var(--docs-radius);
  border: 1px solid var(--docs-border);
  background: var(--docs-bg-subtle);
}

.docs-two-col .col b {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--docs-text);
}

.docs-two-col .col p {
  margin: 0;
  font-size: 13.5px;
}

/* Trail cards */
.docs-trail {
  margin: 16px 0 0;
  padding: 18px 18px 16px;
  border-radius: var(--docs-radius-lg);
  border: 1px solid var(--docs-border);
  background: var(--docs-bg-subtle);
}

.docs-trail-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.docs-trail-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.docs-trail-letter {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--docs-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.docs-trail-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--docs-text);
}

.docs-trail-title a {
  color: var(--docs-text);
  text-decoration: none;
  border-bottom: 1.5px solid var(--docs-accent-border);
}

.docs-trail-title a:hover {
  color: var(--docs-accent);
  border-bottom-color: var(--docs-accent);
}

.docs-trail-title .meta-tag {
  font-weight: 400;
  font-size: 12px;
  color: var(--docs-text-faint);
}

.docs-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.docs-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid var(--docs-border);
  background: #fff;
  color: var(--docs-text-muted);
}

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

.docs-why-line {
  margin: 0 0 12px;
  padding: 0 0 0 10px;
  border-left: 3px solid var(--docs-accent);
  font-size: 13.5px;
  color: var(--docs-text-muted);
  line-height: 1.55;
}

.docs-module-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.docs-module-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 12px;
  padding: 10px 12px;
  border-radius: var(--docs-radius);
  border: 1px solid var(--docs-border);
  background: #fff;
  font-size: 13.5px;
}

.docs-module-list .mname {
  font-weight: 600;
  color: var(--docs-text);
}

.docs-module-list .mtime {
  font-size: 12px;
  color: var(--docs-text-faint);
  white-space: nowrap;
}

.docs-module-list .mdesc {
  width: 100%;
  font-size: 12.5px;
  color: var(--docs-text-muted);
  line-height: 1.45;
}

.docs-module-list .mskip {
  font-style: italic;
  color: var(--docs-text-faint);
  font-weight: 500;
}

.docs-total-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--docs-radius);
  border: 1px solid var(--docs-border);
  background: #fff;
}

.docs-total-box b {
  display: block;
  font-size: 14px;
  color: var(--docs-text);
  margin-bottom: 2px;
}

.docs-total-box span {
  font-size: 12.5px;
  color: var(--docs-text-muted);
}

.docs-order-row {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

@media (min-width: 720px) {
  .docs-order-row {
    grid-template-columns: repeat(5, 1fr);
  }
}

.docs-order-step {
  padding: 12px 10px;
  border-radius: var(--docs-radius);
  border: 1px solid var(--docs-border);
  background: #fff;
  text-align: center;
}

.docs-order-step .o-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--docs-accent);
  letter-spacing: 0.02em;
}

.docs-order-step .o-name {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--docs-text);
  line-height: 1.35;
}

.docs-order-step .o-time {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--docs-text-faint);
}

.docs-tip {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--docs-border);
}

.docs-tip:last-child {
  border-bottom: 0;
}

.docs-tip .n {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--docs-accent-soft);
  color: var(--docs-accent);
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.docs-tip p {
  margin: 0;
  font-size: 14px;
}

code:not(.path) {
  font-family: var(--docs-mono);
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--docs-bg-muted);
  color: var(--docs-text-secondary);
  border: 1px solid var(--docs-border);
}

/* =========================================================
   Additions — 2026-07-25
   badge variants · doc meta · hub page · print
   ========================================================= */

/* Optional / newly added trail badges */
.docs-badge.opt {
  border-style: dashed;
  color: var(--docs-text-muted);
}

.docs-badge.new {
  border-color: var(--docs-border-strong);
  background: var(--docs-bg-muted);
  color: var(--docs-text);
}

/* Document version line (updated date / review cadence) */
.guide-docinfo {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 18px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius);
  background: var(--docs-bg-subtle);
  list-style: none;
  font-size: 12px;
  color: var(--docs-text-muted);
}

.guide-docinfo li {
  margin: 0;
}

.guide-docinfo strong {
  color: var(--docs-text-secondary);
  font-weight: 600;
}

.guide-docinfo .print-hint {
  color: var(--docs-text-faint);
}

/* ── Guides hub ── */
.docs-shell.no-sidebar {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 960px) {
  .docs-shell.no-sidebar {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .docs-shell.no-sidebar .docs-main {
    padding-left: 0;
  }
}

/* No sidebar to balance against — center the prose column */
.docs-shell.no-sidebar .docs-article {
  margin-left: auto;
  margin-right: auto;
}

.hub-grid {
  display: grid;
  gap: 16px;
  margin: 24px 0 0;
}

@media (min-width: 720px) {
  .hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hub-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius-lg);
  background: var(--docs-bg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s var(--docs-ease), box-shadow 0.2s var(--docs-ease),
    transform 0.2s var(--docs-ease);
}

.hub-card:hover,
.hub-card:focus-visible {
  border-color: var(--docs-accent-border);
  box-shadow: var(--docs-shadow-sm);
  transform: translateY(-2px);
}

.hub-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-card-num {
  font-family: var(--docs-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--docs-accent);
}

.hub-card-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--docs-border);
  background: var(--docs-bg-subtle);
  color: var(--docs-text-muted);
}

.hub-card h3 {
  margin: 2px 0 0;
  font-size: 17px;
  line-height: 1.4;
  color: var(--docs-text);
}

.hub-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--docs-text-muted);
}

.hub-card-meta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  color: var(--docs-text-faint);
}

.hub-card-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--docs-accent);
}

.hub-soon {
  margin: 28px 0 0;
  padding: 16px 18px;
  border: 1px dashed var(--docs-border-strong);
  border-radius: var(--docs-radius-lg);
  background: var(--docs-bg-subtle);
}

.hub-soon h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--docs-text);
}

.hub-soon ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--docs-text-muted);
}

/* ── Print / PDF ──
   Guides double as printable worksheets and internal handouts. */
@media print {
  :root {
    --docs-content-max: 100%;
  }

  html {
    scroll-behavior: auto;
  }

  body.guide-page,
  body.docs-page {
    font-size: 10.5pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  .skip-link,
  .docs-topbar,
  .docs-sidebar,
  .docs-toc-mobile,
  .docs-step-links,
  .docs-footer,
  .docs-top-actions,
  .guide-cta .btn-row {
    display: none !important;
  }

  /* Keep external learning links readable on paper, minus the button chrome */
  .docs-inline-links {
    display: block;
  }

  .docs-inline-links .docs-btn {
    display: block;
    padding: 0;
    margin: 2pt 0;
    border: 0 !important;
    background: transparent !important;
    color: #000 !important;
    font-weight: 600;
    text-align: left;
  }

  .docs-shell {
    display: block;
    max-width: none;
    padding: 0;
  }

  .docs-main {
    padding: 0;
  }

  .docs-article {
    max-width: none;
  }

  /* Keep blocks from splitting mid-thought */
  .guide-table-wrap,
  .worksheet,
  .stage-block,
  .callout,
  .docs-trail,
  .guide-figure,
  .docs-tip {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .step-banner,
  h2,
  h3 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .step-banner {
    border-top: 2px solid #000;
    background: transparent !important;
  }

  /* Worksheets need writing room on paper */
  .worksheet {
    border: 1px solid #666;
    background: transparent !important;
  }

  .worksheet ol li,
  .worksheet ul li {
    margin-bottom: 14pt;
  }

  .checklist li {
    margin-bottom: 8pt;
  }

  .callout,
  .callout-point,
  .callout-warn {
    background: transparent !important;
    border: 1px solid #999 !important;
  }

  .guide-figure img {
    max-width: 100%;
    max-height: 8cm;
  }

  /* Screenshots are illustrative only — drop them to save toner/pages */
  .guide-figure.is-screenshot,
  .guide-visual-note {
    display: none !important;
  }

  /* Spell out link targets so a printed copy stays usable */
  .docs-article a.ext[href^="http"]::after,
  .docs-inline-links a[href^="http"]::after,
  .docs-trail-title a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #555;
    word-break: break-all;
  }

  .guide-source {
    border-top: 1px solid #000;
  }
}
