/* =====================================================================
   CoD Mods Wiki — Custom Theme
   Dark, neutral styling for the modding wiki.
   ===================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

/* ---------- Tokens ---------- */
:root {
  --bg:            #18181b;
  --bg-1:          #18181b;
  --bg-2:          #27272a;
  --bg-3:          #3f3f46;
  --bg-elev:       #18181b;
  --border:        #27272a;
  --border-strong: #3f3f46;
  --text:          #fafafa;
  --text-muted:    #a1a1aa;
  --text-dim:      #71717a;

  --accent:        #14b8a6;
  --accent-hover:  #2dd4bf;
  --accent-2:      #06b6d4;
  --accent-3:      #38bdf8;
  --accent-soft:   rgba(20, 184, 166, 0.15);

  --warn:    #f59e0b;
  --success: #10b981;
  --danger:  #ef4444;
  --info:    #0ea5e9;
  --cta:     #fafafa;
  --cta-2:   #e4e4e7;
  --cta-soft: rgba(250, 250, 250, 0.12);

  --radius:    6px;
  --radius-md: 8px;
  --radius-lg: 8px;

  --header-h:    60px;
  --sidebar-w:   260px;
  --toc-w:       220px;
  --content-max: 1040px;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Public Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Cascadia Code', Consolas, monospace;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow:    0 6px 20px rgba(0,0,0,0.45);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.55);

  --t-fast: 120ms ease;
  --t:      200ms ease;
}

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

* {
  scrollbar-color: #3f3f46 #18181b;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: #0f1318;
}

*::-webkit-scrollbar-thumb {
  background: #3f3f46;
  border: 2px solid #18181b;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #52525b;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background-image:
    radial-gradient(1200px 700px at 80% -10%, rgba(20, 184, 166, 0.08), transparent 60%),
    radial-gradient(900px  600px at -10% 110%, rgba(6, 182, 212, 0.06), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-1) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle backdrop texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.35;
  -webkit-mask-image: linear-gradient(180deg, transparent, black 20%, black 80%, transparent);
          mask-image: linear-gradient(180deg, transparent, black 20%, black 80%, transparent);
}

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

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text);
  margin: 1.6em 0 0.6em;
  line-height: 1.25;
}
h1 { font-size: 2.25rem; letter-spacing: 0; margin-top: 0.3em; }
h2 { font-size: 1.65rem; padding-bottom: 0.4em; border-bottom: 1px solid var(--border); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0; color: var(--text-muted); }

h1 .headerlink, h2 .headerlink, h3 .headerlink, h4 .headerlink {
  font-family: var(--font-body);
  font-size: 0.7em;
  margin-left: 0.4em;
  opacity: 0;
  text-decoration: none;
  color: var(--accent) !important;
  transition: opacity var(--t-fast);
}
h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .headerlink { opacity: 1; }

p { margin: 0 0 1em; }

a {
  color: var(--accent-hover);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--accent-hover); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

strong, b { color: #f0f2f5; font-weight: 600; }

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: 2em 0;
}

blockquote {
  margin: 1.2em 0;
  padding: 0.8em 1.2em;
  border-left: 3px solid var(--accent);
  background: var(--bg-2);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-muted);
}
blockquote p:last-child { margin-bottom: 0; }

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

/* ---------- Code ---------- */
code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.88em;
}
:not(pre) > code {
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  color: #ffb4b4;
}
pre {
  background: #1e1e1e !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1em 1.2em;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.55;
  position: relative;
}
pre code { color: #d4d8df; background: none; border: 0; padding: 0; }
pre::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  background: var(--bg-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
th, td { padding: 0.7em 1em; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-3); font-family: var(--font-display); font-weight: 600; letter-spacing: 0; text-transform: uppercase; font-size: 0.8rem; color: var(--text-muted); }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(255,255,255,0.015); }

/* ---------- Layout ---------- */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: 100%;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(24, 24, 27, 0.88);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
          backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1.5rem;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  font-size: 1.05rem;
  white-space: nowrap;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand__logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
}
.brand__name {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 1.5rem;
}
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  border-radius: var(--radius);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav a:hover { color: var(--text); background: var(--bg-2); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--bg-2); }

.header-spacer { flex: 1; }

.search-box {
  position: relative;
  width: 260px;
}
.search-box input {
  width: 100%;
  height: 36px;
  padding: 0 0.8rem 0 2.2rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.search-box input::placeholder { color: var(--text-dim); }
.search-box input:focus { border-color: var(--accent); background: var(--bg-3); }
.search-box::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a1ad' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
}

.gh-source {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 0.7rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 240px;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.gh-source:hover { color: var(--text); border-color: var(--border-strong); text-decoration: none; }
.gh-source__icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--text);
}
.gh-source__icon svg { width: 100%; height: 100%; fill: currentColor; }
.gh-source__meta { display: flex; flex-direction: column; min-width: 0; }
.gh-source__repo {
  color: var(--text); font-weight: 600; font-size: 0.78rem;
  overflow: hidden; text-overflow: ellipsis;
}
.gh-source__facts {
  display: flex; gap: 0.6rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  list-style: none;
  margin: 0;
  padding: 0;
}
.gh-source__fact:first-child::before { content: "★ "; color: var(--accent-hover); }
.gh-source__fact + .gh-source__fact::before { content: "⑂ "; }

.menu-toggle {
  display: none;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-toggle svg { width: 18px; height: 18px; }

/* ---------- Layout grid ---------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  width: 100%;
  gap: 0;
  position: relative;
  align-items: start;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  border-right: 1px solid var(--border);
  background: rgba(24, 24, 27, 0.72);
  overflow-y: auto;
  padding: 1.25rem 0.5rem 2rem 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.sidebar__search { margin-bottom: 1rem; padding-right: 0.75rem; position: relative; }
.sidebar__search input {
  width: 100%; height: 34px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 0.7rem 0 2rem;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
}
.sidebar__search input:focus { border-color: var(--accent); }
.sidebar__search::before {
  content: "";
  position: absolute;
  left: 0.6rem; top: 10px;
  width: 14px; height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a1ad' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
}

.nav-tree { list-style: none; padding: 0; margin: 0; }
.nav-tree__group { margin-bottom: 1.2rem; }
.nav-tree__title {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.3rem 0.6rem;
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-bottom: 0.25rem;
}
.nav-tree__title:hover { color: var(--text); text-decoration: none; }
.nav-tree__title.active { color: var(--text); border-left-color: var(--text); }

.nav-tree__list { list-style: none; padding: 0; margin: 0; }
.nav-tree__item > a {
  display: block;
  padding: 0.32rem 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius) var(--radius) 0;
  text-decoration: none;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.nav-tree__item > a:hover { color: var(--text); background: rgba(255,255,255,0.025); text-decoration: none; }
.nav-tree__item > a.active {
  color: var(--text);
  background: var(--accent-soft);
  border-left-color: var(--text);
}
.nav-tree__sub {
  list-style: none;
  margin: 0.15rem 0 0.3rem 0.6rem;
  padding: 0 0 0 0.6rem;
  border-left: 1px solid var(--border);
}
.nav-tree__sub a {
  display: block;
  padding: 0.25rem 0.6rem;
  font-size: 0.83rem;
  color: var(--text-dim);
  border-radius: var(--radius);
  text-decoration: none;
}
.nav-tree__sub a:hover { color: var(--text); background: rgba(255,255,255,0.02); text-decoration: none; }
.nav-tree__sub a.active { color: var(--text); }

/* Mobile sidebar overlay — must be removed from grid flow at all widths */
.sidebar-overlay {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: rgba(0,0,0,0.6);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
  display: none;
}

/* ---------- Main ---------- */
.main {
  min-width: 0;
  width: 100%;
  padding: 1.75rem 2.5rem 4rem;
}
.content { max-width: 100%; width: 100%; }
.content h1:first-child { margin-top: 0; }

.main--has-hero {
  position: relative;
}

.main--hero-with-crumbs,
.main:has(.content > .hero:first-child) {
  padding-top: 0;
}

.main--hero-with-crumbs > nav[aria-label="breadcrumb"],
.main:has(.content > .hero:first-child) > nav[aria-label="breadcrumb"] {
  position: relative;
  z-index: 3;
  margin: 0 0 -2.2rem;
  padding-top: 0.85rem;
}

.main--hero-with-crumbs .breadcrumbs,
.main:has(.content > .hero:first-child) .breadcrumbs {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
}

.main--hero-with-crumbs .content > .hero:first-child,
.main:has(.content > .hero:first-child) .content > .hero:first-child {
  margin-top: 0;
  padding-top: 4.95rem;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; }
.breadcrumbs li + li::before {
  content: "/";
  color: var(--text-dim);
  margin-right: 0.1rem;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); text-decoration: none; }
.breadcrumbs li.active { color: var(--text); }

/* ---------- TOC (right rail) ---------- */
.toc-rail {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 1.5rem 1.25rem 2rem;
  border-left: 1px solid var(--border);
  font-size: 0.85rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.toc-rail::-webkit-scrollbar { width: 5px; }
.toc-rail::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.toc-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 96;
  min-height: 38px;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(10, 13, 18, 0.96);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
  transition: bottom 160ms ease, border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}

.toc-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}

.toc-overlay {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: rgba(0,0,0,0.45);
  z-index: 94;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
  display: none;
}

.toc-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.page-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.page-meta a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-muted);
  font-size: 0.86rem;
  text-decoration: none;
  transition: color var(--t-fast);
}
.page-meta a:hover { color: var(--accent); text-decoration: none; }
.page-meta svg { width: 14px; height: 14px; flex-shrink: 0; }

.toc-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 0.6rem;
  font-weight: 700;
}
#TableOfContents ul { list-style: none; margin: 0; padding: 0; }
#TableOfContents li { margin: 0; }
#TableOfContents a {
  display: block;
  padding: 0.25rem 0.6rem;
  color: var(--text-muted);
  border-left: 2px solid var(--border);
  text-decoration: none;
  font-size: 0.84rem;
  line-height: 1.4;
  transition: color var(--t-fast), border-color var(--t-fast);
}
#TableOfContents a:hover { color: var(--text); border-left-color: var(--text-muted); }
#TableOfContents a.active { color: var(--text); border-left-color: var(--text); }
#TableOfContents ul ul a { padding-left: 1.2rem; font-size: 0.8rem; }
#TableOfContents ul ul ul a { padding-left: 1.8rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(24, 24, 27, 0.86);
  padding: 1.5rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); text-decoration: none; }
.footer-social { display: flex; gap: 0.6rem; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.footer-social a:hover { border-color: var(--accent); color: var(--accent); }
.footer-social svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Hero / landing ---------- */
.hero {
  position: relative;
  margin: -1.75rem -2.5rem 2.5rem;
  padding: 4rem 2.5rem 3rem;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background:
    radial-gradient(700px 400px at 80% 0%, rgba(20, 184, 166, 0.18), transparent 70%),
    radial-gradient(500px 300px at 0% 100%, rgba(6, 182, 212, 0.12), transparent 60%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><path d='M0 39.5h40M39.5 0v40' stroke='%23ffffff' stroke-opacity='0.04' stroke-width='1'/></svg>");
  pointer-events: none;
}
.hero__inner { position: relative; max-width: 1200px; }
.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
  color: var(--accent);
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.hero__title {
  font-family: var(--font-display);
  font-size: 3.2rem;
  line-height: 1.05;
  margin: 0 0 1rem;
  letter-spacing: 0;
}
.hero__title .accent {
  background: linear-gradient(90deg, var(--accent-hover), var(--accent-2));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.hero__lead { font-size: 1.1rem; color: var(--text-muted); max-width: 640px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--t-fast);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent), var(--bg-2);
  color: var(--text);
  border-color: var(--border);
}
.btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-3); text-decoration: none; }
.btn--primary {
  background: var(--cta);
  color: #09090b;
  border-color: var(--cta);
  box-shadow: none;
}
.btn--primary:hover {
  background: var(--cta-2);
  color: #09090b;
  border-color: var(--cta-2);
  box-shadow: none;
}
.btn--ghost { background: transparent; }

/* ---------- Cards / Section grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.card {
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.25rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: transform var(--t-fast), border-color var(--t-fast), background var(--t-fast);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity var(--t-fast);
}
.card:hover {
  border-color: var(--border-strong);
  background: var(--bg-3);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}
.card:hover::before { opacity: 1; }
.card__eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.card__title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin: 0 0 0.4rem; color: var(--text); }
.card__desc { color: var(--text-muted); font-size: 0.88rem; flex: 1; margin: 0; }
.card__footer { margin-top: 0.9rem; font-size: 0.8rem; color: var(--text-dim); display: flex; justify-content: space-between; }

/* Old "section-index" support */
.section-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.section-index .entry {
  padding: 1.1rem 1.25rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--t-fast), transform var(--t-fast), background var(--t-fast);
}
.section-index .entry:hover { border-color: var(--border-strong); background: var(--bg-3); transform: translateY(-2px); }
.section-index .entry h5 { margin: 0 0 0.35rem; font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--text); }
.section-index .entry h5 a { color: var(--text); }
.section-index .entry h5 a:hover { color: var(--accent); text-decoration: none; }
.section-index .entry p { color: var(--text-muted); font-size: 0.88rem; margin: 0; }
.panel-line { display: none; }

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin: 2rem 0 0;
  list-style: none;
  padding: 0;
}
.pagination button, .pagination a {
  min-width: 36px;
  height: 36px;
  padding: 0 0.7rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pagination button:hover:not(:disabled), .pagination a:hover { color: var(--text); border-color: var(--border-strong); }
.pagination .active { background: var(--text); color: #09090b; border-color: var(--text); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Badges & alerts ---------- */
.badge {
  display: inline-block;
  padding: 0.18em 0.55em;
  border-radius: 999px;
  font-size: 0.72rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}
.badge-primary, .badge-info { background: rgba(76,201,240,0.12); color: var(--info); }
.badge-success { background: rgba(61,220,151,0.12); color: var(--success); }
.badge-warning { background: rgba(245,166,35,0.12); color: var(--warn); }
.badge-danger  { background: rgba(255,84,112,0.12); color: var(--danger); }
.badge-secondary { background: var(--bg-3); color: var(--text-muted); }

.alert {
  border-radius: var(--radius-md);
  padding: 1em 1.2em;
  margin: 1.25em 0;
  border: 1px solid var(--border);
  background: var(--bg-2);
}
.alert-heading { margin: 0 0 0.4em; font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0; font-size: 0.92rem; color: var(--text); }
.alert p:last-child { margin-bottom: 0; }

.alert-primary {
  border-color: rgba(20, 184, 166, 0.72);
  background: rgba(20, 184, 166, 0.16);
}

.alert-success {
  border-color: rgba(61,220,151,0.72);
  background: rgba(61,220,151,0.16);
}

.alert-info {
  border-color: rgba(76,201,240,0.72);
  background: rgba(76,201,240,0.14);
}

.alert-warning {
  border-color: rgba(245,166,35,0.74);
  background: rgba(245,166,35,0.16);
}

.alert-danger {
  border-color: rgba(255,84,112,0.76);
  background: rgba(255,84,112,0.16);
}

.code-block {
  margin: 1.2em 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #1e1e1e;
}

.code-block__toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 34px;
  padding: 0 0.5rem;
  border-bottom: 1px solid var(--border);
  background: #18181b;
}

.code-copy {
  min-height: 26px;
  padding: 0 0.65rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-2);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
}

.code-copy:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.code-block__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
}

.code-gutter {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 3.2rem;
  padding: 0.95rem 0.55rem 0.95rem 0.75rem;
  border-right: 1px solid var(--border);
  background: #18181b;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  user-select: none;
}

.code-gutter > span { display: block; }

.code-block pre {
  margin: 0 !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent !important;
}

.code-block pre::before {
  display: none;
}

.hero--media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 43%);
  gap: 1.15rem;
  align-items: stretch;
}

.hero--media .hero__inner {
  max-width: none;
  z-index: 2;
}

.hero--media .hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0.75rem;
}

.hero__media {
  position: relative;
  z-index: 2;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0a0c10;
  aspect-ratio: 16 / 9;
  min-height: 0;
}

.hero__media-image,
.hero__media-frame {
  width: 100%;
  height: 100%;
  display: block;
}

.hero__media > a {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}

.hero__media-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  border-radius: 12px;
  background: #ff0000;
  box-shadow: 0 8px 22px rgba(0,0,0,0.45);
}

.hero__media-play-icon::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 14px;
  width: 0;
  height: 0;
  border-left: 15px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.hero__media-image {
  object-fit: cover;
}

/* ---------- Posts ---------- */
.post-preview {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.post-preview h2 { border-bottom: none; margin-top: 0; }
.post-date { color: var(--text-dim); font-size: 0.85rem; }

.tag-entry {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tag-entry:last-child { border: 0; }

/* ---------- Feedback ---------- */
.feedback--title { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0; font-size: 0.92rem; color: var(--text-muted); margin-top: 2.5rem; }
.feedback--question { color: var(--text-muted); }
.feedback--answer {
  padding: 0.45rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  transition: all var(--t-fast);
}
.feedback--answer:hover {
  border-color: var(--border-strong);
  color: var(--text);
  box-shadow: none;
}
.feedback--answer + .feedback--answer { margin-left: 0.5rem; }
.feedback--response { display: none; margin-top: 1em; color: var(--text-muted); }
.feedback--response__visible { display: block; }

/* ---------- Search results ---------- */
#search-results { list-style: none; padding: 0; margin: 1rem 0; }
#search-results li {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 0.6rem;
}
#search-results h4 { margin: 0 0 0.3rem; font-size: 1rem; }
#search-results strong { color: var(--accent); }

/* ---------- Scroll to top ---------- */
#scrolltop {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.1rem;
  transition: bottom 160ms ease, background var(--t-fast), color var(--t-fast), border-color var(--t-fast), opacity var(--t-fast);
  align-items: center;
  justify-content: center;
}
#scrolltop:hover { background: var(--text); color: #09090b; border-color: var(--text); }
#scrolltop.visible { display: inline-flex; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .toc-toggle {
    display: inline-flex;
    bottom: 0.85rem;
    top: auto;
    right: 1rem;
  }
  .toc-overlay { display: block; }
  #scrolltop {
    right: 1rem;
    bottom: 4.6rem;
    top: auto;
  }
  .toc-rail {
    display: block;
    position: fixed;
    top: var(--header-h);
    right: 0;
    height: calc(100vh - var(--header-h));
    width: min(340px, 88vw);
    transform: translateX(100%);
    transition: transform var(--t);
    z-index: 95;
    background: var(--bg-1);
    box-shadow: var(--shadow-lg);
  }
  .toc-rail.open { transform: translateX(0); }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 240px; }
  .nav { display: none; }
  .header-spacer { display: none; }
  .search-box { width: 180px; }
  .gh-source__meta { display: none; }
}

@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: 80%;
    max-width: 320px;
    height: calc(100vh - var(--header-h));
    z-index: 90;
    transform: translateX(-100%);
    transition: transform var(--t);
    background: var(--bg-1);
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-overlay { display: block; }
  .sidebar-overlay.visible { opacity: 1; pointer-events: auto; }
  .menu-toggle { display: inline-flex; }
  .main { padding: 1.25rem 1.25rem 3rem; }
  .main--hero-with-crumbs > nav[aria-label="breadcrumb"],
  .main:has(.content > .hero:first-child) > nav[aria-label="breadcrumb"] {
    margin-bottom: -1.8rem;
    padding-top: 0;
  }
  .hero { margin: -1.25rem -1.25rem 2rem; padding: 3rem 1.25rem 2rem; }
  .main--hero-with-crumbs .breadcrumbs,
  .main:has(.content > .hero:first-child) .breadcrumbs {
    padding: 0;
  }
  .main--hero-with-crumbs .content > .hero:first-child,
  .main:has(.content > .hero:first-child) .content > .hero:first-child {
    margin-top: 0;
    padding-top: 4.35rem;
  }
  .hero--media {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .hero__media {
    aspect-ratio: 16 / 9;
  }
  #scrolltop {
    right: 0.85rem;
    bottom: 4.6rem;
    top: auto;
  }
  .toc-toggle {
    bottom: 0.85rem;
    top: auto;
    right: 0.85rem;
  }
  .code-gutter {
    min-width: 2.6rem;
    padding: 0.85rem 0.4rem 0.85rem 0.5rem;
    font-size: 0.72rem;
  }
  .hero__title { font-size: 2.2rem; }
  .search-box { display: none; }
}

/* ---------- Interactive demos ---------- */
.lui-positioning-demo {
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
    var(--bg-2);
  overflow: hidden;
}

.lui-demo__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.lui-demo__eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--accent-hover);
}

.lui-demo__title {
  margin-top: 0.1rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.lui-demo__summary {
  max-width: 360px;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: right;
}

.lui-demo__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(24,24,27,0.42);
}

.lui-demo__presets button,
.lui-demo__segmented button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.lui-demo__presets button {
  padding: 0.35rem 0.65rem;
}

.lui-demo__presets button:hover,
.lui-demo__segmented button:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.lui-demo__presets button.is-active,
.lui-demo__segmented button.is-active {
  border-color: var(--accent-hover);
  background: var(--accent-soft);
  color: #ccfbf1;
}

.lui-demo__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 1rem;
  padding: 1rem;
}

.lui-demo__visual-panel {
  min-width: 0;
}

.lui-demo__stage {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 260px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
    #09090b;
  background-size: 5% 8.888%, 5% 8.888%, auto;
  overflow: hidden;
}

.lui-demo__root {
  position: relative;
  width: 100%;
  height: 100%;
}

.lui-demo__root-label,
.lui-demo__parent-label,
.lui-demo__child span {
  position: absolute;
  z-index: 4;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1;
  pointer-events: none;
}

.lui-demo__root-label {
  left: 0.65rem;
  top: 0.65rem;
  color: var(--text-dim);
}

.lui-demo__parent {
  position: absolute;
  border: 2px solid #f59e0b;
  background: rgba(245,158,11,0.08);
  box-shadow: inset 0 0 0 1px rgba(245,158,11,0.2);
  overflow: visible;
}

.lui-demo__parent-label {
  left: 0.45rem;
  top: 0.45rem;
  color: #fde68a;
}

.lui-demo__child {
  position: absolute;
  min-width: 2px;
  min-height: 2px;
  border: 2px solid var(--accent-2);
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(45,212,191,0.36), rgba(6,182,212,0.2)),
    rgba(20,184,166,0.18);
  box-shadow: 0 0 0 1px rgba(45,212,191,0.24), 0 10px 24px rgba(0,0,0,0.28);
}

.lui-demo__child.is-invalid {
  border-color: var(--danger);
  background: rgba(239,68,68,0.2);
}

.lui-demo__child.is-compact span {
  display: none;
}

.lui-demo__child span {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #f0f9ff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.lui-demo__anchor-line {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.lui-demo__anchor-line::after {
  content: attr(data-label);
  position: absolute;
  z-index: 5;
  padding: 0.12rem 0.28rem;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 4px;
  background: rgba(9,9,11,0.82);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.2;
  white-space: nowrap;
}

.lui-demo__anchor-line--x {
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1px dashed rgba(255,255,255,0.58);
}

.lui-demo__anchor-line--x::after {
  top: 2.15rem;
  left: 0.25rem;
}

.lui-demo__anchor-line--x.is-near-end::after {
  left: auto;
  right: 0.25rem;
}

.lui-demo__anchor-line--y {
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px dashed rgba(255,255,255,0.58);
}

.lui-demo__anchor-line--y::after {
  top: 0.25rem;
  left: 0.45rem;
}

.lui-demo__anchor-line--y.is-near-end::after {
  top: auto;
  bottom: 0.25rem;
}

.lui-demo__anchor-line--secondary {
  opacity: 0.72;
}

.lui-demo__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  margin-top: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
}

.lui-demo__legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lui-demo__legend-mark {
  display: inline-block;
  width: 0.95rem;
  height: 0.65rem;
  border-radius: 3px;
}

.lui-demo__legend-mark--parent {
  border: 1px solid #f59e0b;
  background: rgba(245,158,11,0.12);
}

.lui-demo__legend-mark--child {
  border: 1px solid var(--accent-2);
  background: rgba(20,184,166,0.22);
}

.lui-demo__legend-mark--anchor {
  width: 1.1rem;
  height: 0;
  border-top: 1px dashed rgba(255,255,255,0.58);
}

.lui-demo__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.lui-demo__metrics div {
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(24,24,27,0.6);
}

.lui-demo__metrics span {
  display: block;
  color: var(--text-dim);
  font-size: 0.68rem;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 700;
}

.lui-demo__metrics strong {
  display: block;
  margin-top: 0.1rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.lui-demo__controls {
  display: grid;
  gap: 0.75rem;
}

.lui-demo__controls fieldset {
  margin: 0;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(24,24,27,0.42);
}

.lui-demo__controls legend {
  padding: 0 0.3rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text);
}

.lui-demo__segmented {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.lui-demo__segmented button {
  width: 100%;
  padding: 0.35rem 0.25rem;
}

.lui-demo__input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.lui-demo__input-grid--anchors {
  margin-bottom: 0.55rem;
}

.lui-demo__input-grid label {
  display: grid;
  gap: 0.25rem;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-family: var(--font-display);
  font-weight: 700;
}

.lui-demo__input-grid input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.lui-demo__input-grid input:focus {
  outline: none;
  border-color: var(--accent-hover);
}

.lui-demo__input-grid input:disabled {
  opacity: 0.62;
  color: var(--text-dim);
  cursor: not-allowed;
}

.lui-demo__readout {
  border-top: 1px solid var(--border);
  padding: 1rem;
  background: rgba(9,9,11,0.54);
}

.lui-demo__calls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.lui-demo__calls code {
  display: inline-flex;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.lui-demo__formula {
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #111113;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-x: auto;
}

@media (max-width: 980px) {
  .lui-demo__grid {
    grid-template-columns: 1fr;
  }

  .lui-demo__summary {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .lui-demo__top {
    display: grid;
  }

  .lui-demo__stage {
    min-height: 220px;
  }

  .lui-demo__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lui-demo__segmented {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .sidebar, .toc-rail, .site-footer, #scrolltop, .feedback--title, .feedback--question, .feedback--answer { display: none !important; }
  body { background: white; color: black; }
  .layout { display: block; }
  .main { padding: 0; }
}

/* Misc utility */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }
.linked-section { scroll-margin-top: calc(var(--header-h) + 16px); }
:target { scroll-margin-top: calc(var(--header-h) + 16px); }
