/* Glitch City 2026 — articles site stylesheet (/assets/site.css)
 * Same visual identity as the game (SPEC.md §2): one deliberate dark neon night-city theme.
 * Mobile-first, RTL-first (logical properties everywhere, so lang="en" dir="ltr" pages work too), no JS required.
 * Components (see site/_template/README.md): header, breadcrumb, article head + hero figure, TOC, prose, figure / figure-row /
 * figure-phone, callouts (tip / warn / info / new), facts box, card grid, key table, CTA band, FAQ, related, footer.
 */

/* ------------------------------------------------------------------ tokens */
:root {
  --asphalt: #16131D;
  --asphalt-2: #1B1724;
  --panel: #221C2E;
  --panel-2: #2A2338;
  --line: rgba(244, 238, 255, .10);
  --line-2: rgba(244, 238, 255, .18);
  --sodium: #FFB547;
  --led: #7DF9FF;
  --glitch: #FF3D8B;
  --data: #6CFFB0;
  --lilac: #B18CFF;
  --ink: #F4EEFF;
  --ink-2: #E4DCF2;
  --muted: #A79FB8;
  --f-display: "Reem Kufi", system-ui, "Geeza Pro", Tahoma, sans-serif;
  --f-body: "IBM Plex Sans Arabic", system-ui, "Geeza Pro", Tahoma, "Segoe UI", sans-serif;
  --f-mono: "Martian Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 16px;
  --radius-lg: 22px;
  --wrap: 1180px;
  --prose: 44rem;
  --gutter: 16px;
  --shadow: 0 18px 50px rgba(4, 2, 10, .55);
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gutter: 28px; } }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--asphalt);
  background-image:
    radial-gradient(1100px 520px at 88% -8%, rgba(255, 181, 71, .10), transparent 62%),
    radial-gradient(900px 480px at 4% 6%, rgba(125, 249, 255, .07), transparent 60%),
    radial-gradient(1000px 700px at 50% 110%, rgba(255, 61, 139, .06), transparent 60%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.9;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (min-width: 900px) { body { font-size: 1.125rem; } }
:lang(en) body, body:lang(en) { line-height: 1.7; }
img, svg, video { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--led); text-decoration-thickness: 1px; text-underline-offset: .28em; }
a:hover { color: #B8FCFF; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--led); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(255, 181, 71, .35); color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; line-height: 1.35; margin: 0; letter-spacing: 0; }
p { margin: 0 0 1.1em; }
.num, time, .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50;
  background: var(--sodium); color: #16131D; font-weight: 700; padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: relative; z-index: 5;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 19, 29, .96), rgba(22, 19, 29, .80));
}
.site-header .wrap { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.logo {
  display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink);
  font-family: var(--f-display); font-weight: 700; font-size: 1.35rem; line-height: 1; white-space: nowrap;
}
.logo:hover { color: var(--ink); text-decoration: none; }
.logo-word { text-shadow: -1px 0 rgba(255, 61, 139, .75), 1px 0 rgba(125, 249, 255, .65); }
.logo:hover .logo-word { text-shadow: -2px 0 rgba(255, 61, 139, .9), 2px 0 rgba(125, 249, 255, .8); }
.logo-year {
  font-family: var(--f-mono); font-size: .7rem; font-weight: 700; letter-spacing: .14em; color: var(--sodium);
  border: 1px solid rgba(255, 181, 71, .45); border-radius: 6px; padding: 4px 6px 3px; direction: ltr;
}
.site-nav { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 8px 12px; border-radius: 10px; white-space: nowrap;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: rgba(244, 238, 255, .06); color: var(--ink); }
.site-nav .nav-extra { display: none; }
@media (min-width: 880px) { .site-nav .nav-extra { display: inline-block; } }
@media (max-width: 420px) { .site-nav .nav-articles { display: none; } }
.btn-play {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--sodium); color: #1A1320; font-weight: 700; text-decoration: none; white-space: nowrap;
  padding: 10px 18px; border-radius: 999px; line-height: 1.2; font-size: 1rem;
  box-shadow: 0 0 0 4px rgba(255, 181, 71, .14), 0 8px 24px rgba(255, 181, 71, .20);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-play:hover { color: #1A1320; text-decoration: none; transform: translateY(-1px); box-shadow: 0 0 0 6px rgba(255, 181, 71, .20), 0 10px 28px rgba(255, 181, 71, .28); }
.btn-play svg { width: 1em; height: 1em; flex: none; }
.btn-play.btn-lg { font-size: 1.12rem; padding: 14px 26px; }
.site-header .btn-play { margin-inline-start: 6px; }

/* ------------------------------------------------------------------ breadcrumb */
.breadcrumb { margin-top: 22px; font-size: .9rem; color: var(--muted); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.breadcrumb li { display: inline-flex; align-items: center; min-width: 0; }
.breadcrumb li + li::before { content: "‹"; margin-inline: 10px; color: rgba(167, 159, 184, .7); }
:lang(en) .breadcrumb li + li::before, .breadcrumb:lang(en) li + li::before { content: "›"; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

/* ------------------------------------------------------------------ article head */
.article-head { margin-top: 18px; max-width: 58rem; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-size: .85rem; font-weight: 700; color: var(--sodium);
  border: 1px solid rgba(255, 181, 71, .38); background: rgba(255, 181, 71, .07);
  padding: 4px 12px; border-radius: 999px;
}
.kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--glitch); box-shadow: 0 0 10px var(--glitch); }
.article-head h1 { font-size: clamp(1.9rem, 1.2rem + 3.4vw, 3.15rem); color: var(--ink); }
.article-head h1 .hl { color: var(--sodium); }
.lead { margin: 16px 0 0; font-size: 1.14em; line-height: 1.8; color: var(--ink-2); max-width: 46rem; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 16px; color: var(--muted); font-size: .9rem; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { width: 16px; height: 16px; opacity: .8; }
.meta time { font-size: .82rem; }

.hero-figure { margin: 26px 0 0; }
.hero-figure img, .figure img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius-lg); border: 1px solid var(--line-2); background: var(--panel);
  box-shadow: var(--shadow), 0 0 0 1px rgba(125, 249, 255, .05);
}
.hero-figure figcaption, .figure figcaption { margin-top: 10px; color: var(--muted); font-size: .88rem; line-height: 1.7; }

/* ------------------------------------------------------------------ layout: body + toc aside */
.layout { display: grid; gap: 28px; margin-top: 30px; }
@media (min-width: 1040px) {
  .layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 56px; align-items: start; }
  .layout > .toc { grid-column: 2; grid-row: 1; position: sticky; top: 24px; }
  .layout > .article-body { grid-column: 1; grid-row: 1; }
}

/* ------------------------------------------------------------------ table of contents */
.toc {
  background: linear-gradient(180deg, rgba(34, 28, 46, .92), rgba(27, 23, 36, .92));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
}
.toc-title { font-family: var(--f-display); font-size: 1.02rem; color: var(--sodium); margin: 0 0 8px; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 10px; padding: 6px 4px; text-decoration: none; color: var(--ink-2);
  font-size: .94rem; line-height: 1.55; border-radius: 8px;
}
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--f-mono); font-size: .72rem; color: var(--led); padding-top: .25em; flex: none; }
.toc a:hover { color: var(--ink); background: rgba(244, 238, 255, .05); }
.toc ol ol { padding-inline-start: 26px; counter-reset: sub; }
.toc ol ol li { counter-increment: sub; }
.toc ol ol a { font-size: .88rem; color: var(--muted); }
.toc ol ol a::before { content: "·"; font-family: inherit; }

/* ------------------------------------------------------------------ prose */
.article-body { min-width: 0; max-width: var(--prose); }
.article-body > * + * { margin-top: 0; }
.article-body h2 {
  position: relative; font-size: clamp(1.45rem, 1.1rem + 1.4vw, 1.95rem);
  margin: 2.2em 0 .7em; padding-inline-start: 18px; scroll-margin-top: 20px;
}
.article-body h2::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .28em; bottom: .28em; width: 5px; border-radius: 3px;
  background: linear-gradient(180deg, var(--sodium), var(--glitch));
}
.article-body h3 { font-size: clamp(1.15rem, 1rem + .6vw, 1.35rem); color: var(--led); margin: 1.7em 0 .5em; scroll-margin-top: 20px; }
.article-body h4 { font-family: var(--f-body); font-size: 1.02rem; color: var(--sodium); margin: 1.4em 0 .4em; }
.article-body p, .article-body li { color: rgba(244, 238, 255, .93); }
.article-body strong { color: var(--ink); font-weight: 700; }
.article-body ul, .article-body ol { margin: 0 0 1.2em; padding-inline-start: 1.3em; }
.article-body li { margin: .35em 0; padding-inline-start: .2em; }
.article-body ul > li::marker { content: "◆  "; color: var(--data); font-size: .7em; }
.article-body ol > li::marker { font-family: var(--f-mono); color: var(--sodium); font-size: .85em; }
.article-body blockquote {
  margin: 1.4em 0; padding: 14px 18px; border-inline-start: 3px solid var(--lilac);
  background: rgba(177, 140, 255, .07); color: var(--ink-2);
  border-start-end-radius: 12px; border-end-end-radius: 12px;
}
.article-body hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
kbd {
  display: inline-block; min-width: 1.9em; padding: .05em .45em .1em; margin: 0 .1em;
  font-family: var(--f-mono); font-size: .78em; line-height: 1.6; text-align: center; direction: ltr;
  color: var(--ink); background: var(--panel-2); border: 1px solid var(--line-2); border-bottom-width: 3px; border-radius: 7px;
}
code { font-family: var(--f-mono); font-size: .85em; background: rgba(244, 238, 255, .07); padding: .1em .4em; border-radius: 6px; direction: ltr; unicode-bidi: isolate; }
.ver { font-family: var(--f-mono); font-size: .8em; color: var(--data); background: rgba(108, 255, 176, .08); border: 1px solid rgba(108, 255, 176, .28); border-radius: 6px; padding: .05em .4em; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }

/* ------------------------------------------------------------------ figures */
.figure { margin: 1.8em 0; }
.figure-row { display: grid; gap: 16px; margin: 1.8em 0; }
.figure-row .figure { margin: 0; }
@media (min-width: 700px) { .figure-row { grid-template-columns: 1fr 1fr; } }
.figure-phone { max-width: 300px; margin-inline: auto; }
.figure-phone img { aspect-ratio: 585 / 1266; border-radius: 30px; border: 1px solid var(--line-2); box-shadow: var(--shadow), 0 0 0 6px #0F0C16, 0 0 0 7px var(--line-2); }
.figure-phone figcaption { text-align: center; }
.figure-row.with-phone { align-items: center; }
@media (min-width: 700px) { .figure-row.with-phone { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }

/* ------------------------------------------------------------------ callouts */
.callout {
  --c: var(--led);
  position: relative; margin: 1.6em 0; padding: 16px 18px 14px; padding-inline-start: 60px;
  background: linear-gradient(180deg, rgba(34, 28, 46, .9), rgba(27, 23, 36, .9));
  border: 1px solid var(--line); border-inline-start: 4px solid var(--c); border-radius: var(--radius);
}
.callout > svg { position: absolute; inset-inline-start: 18px; top: 18px; width: 26px; height: 26px; color: var(--c); }
.callout-title { margin: 0 0 4px; font-weight: 700; color: var(--c); font-size: .95rem; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout-tip { --c: var(--data); }
.callout-warn { --c: var(--glitch); }
.callout-info { --c: var(--led); }
.callout-new { --c: var(--sodium); background: linear-gradient(180deg, rgba(255, 181, 71, .09), rgba(27, 23, 36, .9)); }

/* ------------------------------------------------------------------ facts box (key facts / infobox) */
.facts {
  display: grid; gap: 1px; margin: 1.6em 0; padding: 0; overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
}
.facts > div { background: var(--asphalt-2); padding: 12px 14px; }
.facts dt { font-size: .8rem; color: var(--muted); margin: 0 0 2px; }
.facts dd { margin: 0; font-weight: 700; color: var(--ink); line-height: 1.5; }

/* ------------------------------------------------------------------ card grid (heroes, maps, bosses…) */
.card-grid { display: grid; gap: 14px; margin: 1.4em 0 1.8em; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.article-body .card-grid > li { margin: 0; padding: 0; }
.article-body .card-grid > li::marker { content: none; }
.card {
  --c: var(--sodium);
  height: 100%; padding: 14px 16px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(34, 28, 46, .95), rgba(27, 23, 36, .95));
  border: 1px solid var(--line); border-top: 3px solid var(--c);
}
.card h3, .card .card-title { font-family: var(--f-display); font-size: 1.12rem; color: var(--ink); margin: 0 0 2px; }
.card .handle { font-family: var(--f-mono); font-size: .78rem; color: var(--c); direction: ltr; unicode-bidi: isolate; }
.card p { font-size: .93rem; line-height: 1.7; margin: 6px 0 0; color: var(--ink-2); }
.card .tag { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--c); border: 1px solid currentColor; border-radius: 999px; padding: 0 8px; margin-top: 8px; }

/* ------------------------------------------------------------------ tables */
.table-wrap { margin: 1.6em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: 2px; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; line-height: 1.6; min-width: 520px; }
caption { caption-side: top; text-align: start; padding: 12px 14px 0; color: var(--muted); font-size: .85rem; }
th, td { padding: 11px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-weight: 700; color: var(--sodium); background: rgba(255, 181, 71, .06); white-space: nowrap; }
tbody tr:nth-child(even) td { background: rgba(244, 238, 255, .025); }
tbody tr:last-child td { border-bottom: 0; }

/* ------------------------------------------------------------------ CTA band */
.cta {
  position: relative; margin: 2.4em 0; padding: 24px 22px; border-radius: var(--radius-lg); overflow: hidden;
  background:
    radial-gradient(600px 220px at 100% 0%, rgba(255, 181, 71, .18), transparent 70%),
    radial-gradient(500px 220px at 0% 100%, rgba(255, 61, 139, .14), transparent 70%),
    var(--panel);
  border: 1px solid rgba(255, 181, 71, .35);
}
.cta-title { font-family: var(--f-display); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); margin: 0 0 6px; color: var(--ink); }
.cta p { color: var(--ink-2); margin: 0 0 16px; }
.cta-note { display: block; margin-top: 12px; font-size: .85rem; color: var(--muted); }

/* ------------------------------------------------------------------ FAQ */
.faq { margin-top: 2.6em; }
.faq details {
  border: 1px solid var(--line); border-radius: 14px; background: rgba(34, 28, 46, .7);
  margin: 10px 0; padding: 0 18px;
}
.faq details[open] { border-color: rgba(125, 249, 255, .28); background: rgba(34, 28, 46, .95); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 0; font-weight: 700; color: var(--ink); font-size: 1.02rem; line-height: 1.6;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-mono); font-size: 1rem; color: var(--led); border: 1px solid rgba(125, 249, 255, .35);
}
.faq details[open] summary::after { content: "−"; color: var(--sodium); border-color: rgba(255, 181, 71, .45); }
.faq .answer { padding: 0 0 14px; color: var(--ink-2); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ related articles */
.related { margin: 3.2em 0 1em; }
.related-title { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); margin-bottom: 16px; }
.related-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); list-style: none; margin: 0; padding: 0; }
.related-card {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .15s ease, border-color .15s ease;
}
.related-card:hover { color: var(--ink); text-decoration: none; transform: translateY(-2px); border-color: rgba(255, 181, 71, .45); }
.related-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--line); background: var(--asphalt-2); }
.related-card .rc-body { padding: 12px 14px 14px; }
.related-card .rc-title { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; line-height: 1.45; margin: 0 0 6px; }
.related-card .rc-desc { font-size: .88rem; line-height: 1.65; color: var(--muted); margin: 0; }

/* ------------------------------------------------------------------ footer */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: rgba(15, 12, 22, .6); padding: 34px 0 40px; color: var(--muted); font-size: .92rem; }
.footer-grid { display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .logo { font-size: 1.2rem; margin-bottom: 10px; }
.site-footer p { margin: 0 0 .6em; line-height: 1.8; }
.footer-title { font-family: var(--f-display); color: var(--ink); font-size: 1rem; margin: 0 0 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 4px 0; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--sodium); text-decoration: underline; }
.footer-bottom { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; font-size: .84rem; }

/* ------------------------------------------------------------------ articles hub (/articles/) */
.hub-head { max-width: 50rem; }
.hub-intro { max-width: var(--prose); margin-top: 22px; }
.hub-intro p { color: rgba(244, 238, 255, .93); }
.hub-section { margin-top: 44px; }
.hub-section h2 {
  position: relative; font-size: clamp(1.45rem, 1.1rem + 1.4vw, 1.95rem);
  margin: 0 0 6px; padding-inline-start: 18px; scroll-margin-top: 20px;
}
.hub-section h2::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .28em; bottom: .28em; width: 5px; border-radius: 3px;
  background: linear-gradient(180deg, var(--sodium), var(--glitch));
}
.hub-sub { color: var(--muted); max-width: var(--prose); margin: 0 0 18px; font-size: .98rem; line-height: 1.8; }
.hub-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); list-style: none; margin: 0; padding: 0; }
.hub-grid > li { min-width: 0; }
@media (min-width: 700px) { .hub-grid.hub-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hub-intro .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) { .hub-intro .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hub-card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.hub-card:hover, .hub-card:focus-within { transform: translateY(-2px); border-color: rgba(255, 181, 71, .45); box-shadow: 0 14px 36px rgba(4, 2, 10, .45); }
.hub-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--line); background: var(--asphalt-2); }
.hc-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.hc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; font-size: .8rem; color: var(--muted); }
.hc-section { font-weight: 700; color: var(--sodium); }
.hc-title { font-family: var(--f-display); font-size: 1.12rem; line-height: 1.5; margin: 0; }
.hc-title a { color: var(--ink); text-decoration: none; }
.hc-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.hc-title a:hover { color: var(--ink); text-decoration: none; }
.hc-title a:focus-visible { outline: none; }
.hub-card:has(.hc-title a:focus-visible) { outline: 3px solid var(--led); outline-offset: 3px; }
.hc-desc { margin: 0; font-size: .9rem; line-height: 1.7; color: var(--ink-2); }
@media (min-width: 900px) {
  .hub-grid > li:has(> .is-feature) { grid-column: 1 / -1; }
  .hub-card.is-feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .hub-card.is-feature img { height: 100%; border-bottom: 0; border-inline-end: 1px solid var(--line); }
  .hub-card.is-feature .hc-body { justify-content: center; padding: 26px 30px; gap: 10px; }
  .hub-card.is-feature .hc-title { font-size: clamp(1.35rem, 1rem + 1vw, 1.75rem); }
  .hub-card.is-feature .hc-desc { font-size: 1rem; }
}

/* ------------------------------------------------------------------ 404 */
.nf { max-width: 46rem; margin: 56px auto 0; text-align: center; }
.nf-code {
  font-family: var(--f-mono); font-weight: 700; font-size: clamp(4.5rem, 3rem + 8vw, 8rem); line-height: 1; margin: 0 0 12px;
  color: var(--ink); direction: ltr; letter-spacing: .04em;
  text-shadow: -3px 0 rgba(255, 61, 139, .8), 3px 0 rgba(125, 249, 255, .75);
}
.nf h1 { font-size: clamp(1.7rem, 1.2rem + 2.4vw, 2.6rem); margin: 0 0 12px; }
.nf .lead { margin: 0 auto 26px; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 36px; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; line-height: 1.2;
  color: var(--ink); text-decoration: none; font-weight: 700; border: 1px solid var(--line-2); background: rgba(244, 238, 255, .04);
}
.btn-ghost:hover { color: var(--ink); text-decoration: none; border-color: rgba(125, 249, 255, .45); background: rgba(125, 249, 255, .06); }
.nf-links { text-align: start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.nf-links h2 { font-size: 1.1rem; color: var(--sodium); margin: 0 0 8px; }
.nf-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.nf-links li { margin: 0; }
.nf-links a { display: block; padding: 6px 0; color: var(--ink-2); text-decoration: none; }
.nf-links a:hover { color: var(--sodium); text-decoration: underline; }

/* ------------------------------------------------------------------ motion + print */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  body { background: #fff; color: #000; }
  .site-header, .toc, .cta, .related, .site-footer, .skip-link { display: none !important; }
  .article-body p, .article-body li { color: #000; }
  a { color: #000; }
}
