/* ==========================================================================
   HiClinica User Manual — shared stylesheet
   Every page in the manual links this file. Colours are tokens on :root so
   light and dark themes stay in sync.
   ========================================================================== */

:root {
  --brand: #0b5cf0;
  --brand-strong: #0847bd;
  --brand-soft: #e8f0fe;

  --bg: #ffffff;
  --bg-subtle: #f7f8fa;
  --bg-sidebar: #fbfbfc;
  --surface: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;

  --text: #1f2937;
  --text-strong: #0f172a;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;

  --code-bg: #f3f4f6;
  --kbd-bg: #ffffff;

  --note-bg: #eff6ff;   --note-border: #3b82f6;
  --tip-bg: #ecfdf5;    --tip-border: #10b981;
  --warn-bg: #fffbeb;   --warn-border: #f59e0b;
  --danger-bg: #fef2f2; --danger-border: #ef4444;

  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);

  --header-h: 64px;
  --sidebar-w: 288px;
  --toc-w: 232px;
  --content-max: 780px;

  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, "SFMono-Regular", Menlo, monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #5b93ff;
    --brand-strong: #86afff;
    --brand-soft: rgba(91, 147, 255, .12);
    --bg: #0e1117;
    --bg-subtle: #151a23;
    --bg-sidebar: #11151c;
    --surface: #161b24;
    --border: #252c38;
    --border-strong: #333c4b;
    --text: #d1d5db;
    --text-strong: #f3f4f6;
    --text-muted: #9ca3af;
    --text-faint: #6b7280;
    --code-bg: #1d2330;
    --kbd-bg: #1d2330;
    --note-bg: rgba(59, 130, 246, .10);
    --tip-bg: rgba(16, 185, 129, .10);
    --warn-bg: rgba(245, 158, 11, .10);
    --danger-bg: rgba(239, 68, 68, .10);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --brand: #5b93ff;
  --brand-strong: #86afff;
  --brand-soft: rgba(91, 147, 255, .12);
  --bg: #0e1117;
  --bg-subtle: #151a23;
  --bg-sidebar: #11151c;
  --surface: #161b24;
  --border: #252c38;
  --border-strong: #333c4b;
  --text: #d1d5db;
  --text-strong: #f3f4f6;
  --text-muted: #9ca3af;
  --text-faint: #6b7280;
  --code-bg: #1d2330;
  --kbd-bg: #1d2330;
  --note-bg: rgba(59, 130, 246, .10);
  --tip-bg: rgba(16, 185, 129, .10);
  --warn-bg: rgba(245, 158, 11, .10);
  --danger-bg: rgba(239, 68, 68, .10);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

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

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

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

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

img { max-width: 100%; height: auto; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--text-strong); font-weight: 700; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand .brand-sub { font-weight: 500; color: var(--text-muted); font-size: 14px; padding-left: 10px; border-left: 1px solid var(--border-strong); }

.header-spacer { flex: 1; }

.search-trigger {
  display: flex; align-items: center; gap: 10px;
  width: 260px; height: 38px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-subtle); color: var(--text-muted);
  font: inherit; font-size: 14px; cursor: pointer;
}
.search-trigger:hover { border-color: var(--border-strong); }
.search-trigger svg { flex: none; width: 16px; height: 16px; }
.search-trigger .search-label { white-space: nowrap; }
.search-trigger .kbd-hint { margin-left: auto; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text-muted);
  cursor: pointer;
}
.icon-btn:hover { color: var(--text-strong); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }

.menu-btn { display: none; }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  max-width: 1480px;
  margin: 0 auto;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 28px 20px 48px 24px;
  border-right: 1px solid var(--border);
  background: var(--bg-sidebar);
  scrollbar-width: thin;
}

.nav-section + .nav-section { margin-top: 26px; }

.nav-section h4 {
  margin: 0 0 8px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-strong);
}
.nav-section h4 .num {
  display: inline-grid; place-items: center;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 11px; letter-spacing: 0;
}

.nav-section ul { list-style: none; margin: 0; padding: 0 0 0 9px; border-left: 1px solid var(--border); }

.nav-section li a, .nav-section li span.nav-soon {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-left: -1px;
  padding: 5px 0 5px 16px;
  border-left: 2px solid transparent;
  font-size: 14.5px; line-height: 1.45;
  color: var(--text-muted);
}
.nav-section li a:hover { color: var(--text-strong); text-decoration: none; border-left-color: var(--border-strong); }
.nav-section li a.active { color: var(--brand); font-weight: 600; border-left-color: var(--brand); }

.nav-section li span.nav-soon { color: var(--text-faint); cursor: default; }
.badge-soon {
  flex: none;
  font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 999px;
  background: var(--bg-subtle); color: var(--text-faint); border: 1px solid var(--border);
}

.nav-empty { font-size: 14px; color: var(--text-muted); padding: 8px 0; }

/* ---------- Main content ---------- */
.content {
  min-width: 0;
  padding: 44px 56px 96px;
}
.content-inner { max-width: var(--content-max); margin: 0 auto; }

.breadcrumbs { font-size: 13.5px; color: var(--text-muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs span.sep { margin: 0 6px; color: var(--text-faint); }

.prose h1 {
  margin: 0 0 12px;
  font-size: 40px; line-height: 1.15; letter-spacing: -.02em;
  color: var(--text-strong); font-weight: 800;
}
.prose .lead { font-size: 19px; line-height: 1.65; color: var(--text-muted); margin: 0 0 32px; }

.prose h2 {
  margin: 56px 0 14px; padding-top: 8px;
  font-size: 26px; line-height: 1.3; letter-spacing: -.01em;
  color: var(--text-strong); font-weight: 700;
}
.prose h3 { margin: 36px 0 10px; font-size: 20px; line-height: 1.4; color: var(--text-strong); font-weight: 650; }
.prose h2 .anchor, .prose h3 .anchor {
  margin-left: 8px; color: var(--text-faint); opacity: 0; font-weight: 400; transition: opacity .15s;
}
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; text-decoration: none; }

.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--text-faint); }
.prose strong { color: var(--text-strong); font-weight: 650; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 48px 0; }

.prose code {
  font-family: var(--font-mono); font-size: .88em;
  padding: 2px 6px; border-radius: 6px;
  background: var(--code-bg); color: var(--text-strong);
}

kbd {
  display: inline-block; min-width: 22px;
  padding: 1px 6px;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.6; text-align: center;
  color: var(--text-strong);
  background: var(--kbd-bg);
  border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px;
}

/* UI element reference, e.g. <span class="ui">Save</span> */
.ui {
  display: inline-block;
  padding: 0 7px; border-radius: 6px;
  font-size: .9em; font-weight: 600;
  color: var(--text-strong);
  background: var(--bg-subtle); border: 1px solid var(--border);
}

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--border); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 11px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.prose th { background: var(--bg-subtle); color: var(--text-strong); font-weight: 650; font-size: 13.5px; }
.prose tr:last-child td { border-bottom: 0; }

/* ---------- Callouts ---------- */
.callout {
  display: flex; gap: 14px;
  margin: 0 0 24px; padding: 16px 18px;
  border-radius: 12px; border: 1px solid transparent; border-left-width: 4px;
  font-size: 15px;
}
.callout p:last-child { margin-bottom: 0; }
.callout .callout-icon { flex: none; width: 22px; height: 22px; margin-top: 2px; }
.callout .callout-title { display: block; font-weight: 700; color: var(--text-strong); margin-bottom: 2px; }
.callout.note   { background: var(--note-bg);   border-color: var(--note-border); }
.callout.tip    { background: var(--tip-bg);    border-color: var(--tip-border); }
.callout.warn   { background: var(--warn-bg);   border-color: var(--warn-border); }
.callout.danger { background: var(--danger-bg); border-color: var(--danger-border); }
.callout.note   .callout-icon { color: var(--note-border); }
.callout.tip    .callout-icon { color: var(--tip-border); }
.callout.warn   .callout-icon { color: var(--warn-border); }
.callout.danger .callout-icon { color: var(--danger-border); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  margin: 0 0 40px; padding: 36px 36px 32px;
  border: 1px solid var(--border); border-radius: 18px;
  background:
    radial-gradient(600px 240px at 100% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
    radial-gradient(400px 200px at 0% 100%, color-mix(in srgb, #10b981 10%, transparent), transparent 70%),
    var(--surface);
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 14px; padding: 4px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--brand);
  background: var(--brand-soft);
}
.hero h1 { margin-bottom: 14px; }
.hero .lead { margin-bottom: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 10px;
  font-size: 15px; font-weight: 600;
  border: 1px solid var(--border-strong); color: var(--text-strong); background: var(--surface);
}
.btn:hover { text-decoration: none; border-color: var(--text-faint); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
:root[data-theme="dark"] .btn.primary { color: #0b1220; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0b1220; } }
.btn svg { width: 16px; height: 16px; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 0 28px; }
.card-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  display: block; position: relative;
  padding: 18px 18px 16px;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 50%, var(--border)); box-shadow: var(--shadow); transform: translateY(-1px); }
.card .card-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; margin-bottom: 12px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand);
}
.card .card-icon svg { width: 20px; height: 20px; }
.card h3, .card .card-title { margin: 0 0 4px; font-size: 16px; font-weight: 650; color: var(--text-strong); }
.card p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-muted); }

/* Contents (chapter list) */
.chapters { counter-reset: chapter; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 0 28px; }
.chapter {
  padding: 18px 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
}
.chapter-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.chapter-num { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--brand); }
.chapter-title { font-size: 16px; font-weight: 700; color: var(--text-strong); }
.chapter-desc { margin: 0 0 10px; font-size: 14px; color: var(--text-muted); line-height: 1.55; }
.chapter ul { list-style: none; margin: 0; padding: 0; }
.chapter li { margin: 0; font-size: 14.5px; }
.chapter li a, .chapter li span { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.chapter li span { color: var(--text-faint); }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0 !important; margin: 0 0 24px; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 18px 48px; margin: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 14px; font-weight: 700;
  background: var(--brand-soft); color: var(--brand);
}
.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 14.5px; top: 34px; bottom: 4px; width: 1px; background: var(--border);
}
.steps > li strong:first-child { display: block; }

/* Pager (prev / next) */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--border); }
.pager a, .pager span.pager-soon { display: block; padding: 14px 18px; border: 1px solid var(--border); border-radius: 12px; }
.pager a:hover { text-decoration: none; border-color: var(--brand); }
.pager .pager-label { display: block; font-size: 12.5px; color: var(--text-muted); }
.pager .pager-title { display: block; font-weight: 650; color: var(--text-strong); }
.pager .next { text-align: right; grid-column: 2; }
.pager span.pager-soon .pager-title { color: var(--text-faint); }

.page-meta { margin-top: 28px; font-size: 13px; color: var(--text-faint); }

/* ---------- On this page ---------- */
.toc {
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 44px 20px 40px 8px;
}
.toc h5 { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-strong); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li a { display: block; padding: 4px 0; font-size: 13.5px; line-height: 1.45; color: var(--text-muted); }
.toc li.lvl-3 a { padding-left: 14px; }
.toc li a:hover { color: var(--text-strong); text-decoration: none; }
.toc li a.active { color: var(--brand); font-weight: 600; }

/* ---------- Search dialog ---------- */
.search-dialog {
  position: fixed; inset: 0; z-index: 60;
  display: none; align-items: flex-start; justify-content: center;
  padding: 12vh 16px 16px;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(3px);
}
.search-dialog.open { display: flex; }
.search-panel {
  width: 100%; max-width: 600px;
  border-radius: 16px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}
.search-panel .search-input-row { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.search-panel .search-input-row svg { width: 18px; height: 18px; color: var(--text-muted); flex: none; }
.search-panel input {
  flex: 1; height: 56px; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 16px; color: var(--text-strong);
}
.search-results { max-height: 50vh; overflow-y: auto; padding: 8px; margin: 0; list-style: none; }
.search-results li a, .search-results li span {
  display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; color: var(--text);
}
.search-results li a:hover, .search-results li a.selected { background: var(--brand-soft); text-decoration: none; }
.search-results .r-title { font-weight: 600; color: var(--text-strong); font-size: 15px; }
.search-results .r-section { font-size: 12.5px; color: var(--text-muted); }
.search-results li span .r-title { color: var(--text-faint); }
.search-empty { padding: 28px 16px; text-align: center; color: var(--text-muted); font-size: 14.5px; }
.search-footer { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 48px; font-size: 13px; color: var(--text-faint); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .toc { display: none; }
}

@media (max-width: 900px) {
  :root { --header-h: 56px; }
  .site-header { padding: 0 16px; gap: 10px; }
  .menu-btn { display: inline-grid; }
  .brand .brand-sub { display: none; }
  .search-trigger { width: auto; }
  .search-trigger .search-label, .search-trigger .kbd-hint { display: none; }
  .search-trigger { width: 38px; padding: 0; justify-content: center; }

  .layout { display: block; }
  .sidebar {
    position: fixed; top: var(--header-h); left: 0; bottom: 0; z-index: 50;
    width: min(320px, 86vw); height: auto;
    transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: var(--shadow);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after {
    content: ""; position: fixed; inset: var(--header-h) 0 0 0; z-index: 45; background: rgba(15, 23, 42, .4);
  }

  .content { padding: 28px 16px 72px; }
  .prose h1 { font-size: 30px; }
  .prose .lead { font-size: 17px; }
  .hero { padding: 24px 20px; }
  .card-grid, .card-grid.three, .chapters { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
}

@media print {
  .site-header, .sidebar, .toc, .pager, .search-dialog { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; }
  a { color: inherit; }
}

/* ---------- Illustrated UI mock-ups ----------
   A lightweight drawing of an app screen, used until real screenshots are
   added. Numbered .marker badges match the .legend list below the figure. */
.figure { margin: 8px 0 28px; }
.figure figcaption { margin-top: 10px; font-size: 13.5px; color: var(--text-muted); text-align: center; }

.mock-scroll { overflow-x: auto; border-radius: 14px; }
.mock {
  min-width: 600px;
  padding: 16px;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow);
  font-size: 13px; line-height: 1.4; color: var(--text);
}
.mock-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.mock-row:last-child { margin-bottom: 0; }
.mock-title { font-weight: 700; font-size: 15px; color: var(--text-strong); margin-right: auto; }
.mock-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border-strong); background: var(--bg-subtle); color: var(--text-strong);
}
.mock-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.mock-btn.green { background: var(--tip-bg); border-color: var(--tip-border); color: var(--text-strong); }
.mock-input {
  flex: 1; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--border-strong); color: var(--text-faint); background: var(--bg);
}
.mock-select { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border-strong); color: var(--text-muted); font-size: 12px; }
.mock-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 8px;
  background: var(--note-bg); border: 1px solid color-mix(in srgb, var(--note-border) 35%, transparent);
}
.mock-bar .spacer { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.mock-table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.mock-table th {
  padding: 7px 8px; text-align: left; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
  background: var(--bg-subtle); color: var(--text-muted); font-weight: 600;
}
.mock-table td { padding: 7px 8px; border-top: 1px solid var(--border); white-space: nowrap; }
.mock-table tr.hover td { background: var(--brand-soft); }
.mock-avatar { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: var(--border-strong); vertical-align: middle; margin-right: 6px; }
.mock-chip { padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--warn-bg); color: var(--text-strong); border: 1px solid color-mix(in srgb, var(--warn-border) 45%, transparent); }
.mock-check { display: inline-block; width: 13px; height: 13px; border: 1.5px solid var(--text-faint); border-radius: 3px; vertical-align: middle; }
.mock-check.on { background: var(--brand); border-color: var(--brand); }
.mock-foot { margin-top: 8px; font-size: 12px; color: var(--text-muted); }

.marker {
  display: inline-grid; place-items: center; flex: none;
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 11px; font-weight: 700; line-height: 1;
  background: #f59e0b; color: #111827;
  box-shadow: 0 0 0 2px var(--surface);
  vertical-align: middle;
}

.legend { list-style: none; padding: 0 !important; margin: 0 0 28px; display: grid; gap: 10px; }
.legend li { display: flex; gap: 12px; margin: 0; }
.legend li .marker { margin-top: 3px; }

/* Inline icon used in text to show an on-screen icon */
.inline-icon { display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -0.15em; color: var(--text-strong); }

/* Related topics list at the end of a page */
.related { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; }
@media (max-width: 900px) { .related { grid-template-columns: 1fr; } }

/* Cross-reference to a topic that is not published yet */
a.is-soon { color: var(--text-faint); cursor: default; text-decoration: none; }
a.is-soon .badge-soon { margin-left: 6px; vertical-align: 1px; }
a.card.is-soon:hover { transform: none; box-shadow: none; border-color: var(--border); }
