/* Starchaser Linux website. One stylesheet, no framework.
   Identity: the night-flight palette from the logo, the cut corners and thin periwinkle lines of the Cockpit
   desktop itself, Space Grotesk for reading and Space Mono for anything a terminal would print. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("/fonts/space-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("/fonts/space-mono-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0d0b1a;
  --bg-2: #131027;
  --surface: #181336;
  --surface-2: #211a4a;
  --line: #3a3470;
  --line-strong: #6a68c4;
  --text: #e8e2ff;
  --muted: #b3acd6;
  --dim: #8f88b5;
  --accent: #a0a7ff;
  --action: #44def5;
  --action-ink: #0d0b1a;
  --pink: #ffa0db;
  --warn: #ffd08a;
  --glow: rgba(160, 167, 255, 0.13);
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
  --cut: 14px;
  --wrap: 72rem;
  --read: 46rem;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #e4def4;
  --bg-2: #d9d2ec;
  --surface: #ece8f8;
  --surface-2: #d2cae8;
  --line: #bdb4da;
  --line-strong: #7a74c4;
  --text: #120a33;
  --muted: #3f3766;
  --dim: #5a5283;
  --accent: #4039b0;
  --action: #0e072e;
  --action-ink: #e4def4;
  --pink: #a8257a;
  --warn: #7a4a00;
  --glow: rgba(160, 167, 255, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(60rem 28rem at 78% -8rem, var(--glow), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font: 400 1.0625rem/1.62 var(--sans);
  overflow-wrap: break-word;
}
img, picture, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }
:root[data-theme="light"] :focus-visible { outline-color: var(--accent); }
::selection { background: var(--accent); color: #0d0b1a; }

h1, h2, h3, h4 { font-family: var(--sans); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1.1vw, 2rem); margin-top: 2.2em; }
h3 { font-size: 1.2rem; margin-top: 1.8em; }
h4 { font-size: 1rem; margin-top: 1.4em; }
p, ul, ol, dl, pre, table, figure, blockquote { margin: 0 0 1.15em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.35em; }
li::marker { color: var(--dim); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
code, kbd, pre, samp { font-family: var(--mono); font-size: 0.875em; }
code { background: var(--surface); border: 1px solid var(--line); padding: 0.08em 0.35em; }
pre code { background: none; border: 0; padding: 0; font-size: 1em; }
strong { font-weight: 600; }
small { font-size: 0.875rem; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.read { max-width: var(--read); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--action); color: var(--action-ink); padding: 0.6rem 1rem; font-family: var(--mono); }
.skip:focus { top: 0.75rem; }

/* The mono label used above sections, the way the desktop labels its panels. */
.label {
  font: 400 0.75rem/1.4 var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.label::before { content: "✦"; letter-spacing: 0; color: var(--action); font-size: 0.85rem; }
:root[data-theme="light"] .label::before { color: var(--accent); }
.lead { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem); line-height: 1.5; color: var(--text); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.875rem; }

/* Cut-corner frame. Two clipped layers draw the border and the fill, so focus rings are never clipped. */
.cut { position: relative; isolation: isolate; padding: 1.25rem 1.4rem; }
.cut::before, .cut::after {
  content: "";
  position: absolute;
  z-index: -1;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
.cut::before { inset: 0; background: var(--line); }
.cut::after { inset: 1px; background: var(--surface); }
.cut.strong::before { background: var(--line-strong); }
.cut > :last-child { margin-bottom: 0; }
.cut > :first-child { margin-top: 0; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 0.5rem 1.5rem; flex-wrap: wrap; padding-block: 0.65rem; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 2.5rem; width: auto; }
.logo-light { display: none; }
/* Screenshots come in dark and light twins; show the one that matches the page. */
.shot-light { display: none; }
:root[data-theme="light"] .shot-dark { display: none; }
:root[data-theme="light"] .shot-light { display: revert; }
:root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="light"] .logo-light { display: block; }
.site-nav { flex: 1 1 auto; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.1rem 0.15rem; margin: 0; padding: 0; }
.site-nav li { margin: 0; }
.site-nav a { display: block; padding: 0.4rem 0.6rem; font: 400 0.8125rem/1.3 var(--mono); color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--text); border-bottom-color: var(--line-strong); }
.site-nav a[aria-current] { color: var(--text); border-bottom-color: var(--action); }
:root[data-theme="light"] .site-nav a[aria-current] { border-bottom-color: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.search-form { display: flex; }
.search-form input { width: 10.5rem; }
input[type="search"], input[type="text"] {
  font: 400 0.875rem/1.3 var(--mono);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.5rem 0.7rem;
  border-radius: 0;
  min-width: 0;
}
input[type="search"]::placeholder { color: var(--dim); }
input[type="search"]:focus-visible { outline-offset: 0; border-color: var(--line-strong); }
.icon-btn { font: 400 0.8125rem/1 var(--mono); color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 0.55rem 0.7rem; cursor: pointer; border-radius: 0; }
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.no-js .needs-js { display: none; }

@media (max-width: 720px) {
  .brand img { height: 2.1rem; }
  .header-tools { order: 2; }
  .site-nav { order: 3; flex-basis: 100%; }
  .site-nav ul { gap: 0; margin-inline: -0.5rem; }
  .site-nav a { padding: 0.45rem 0.5rem; }
  .search-form input { width: 8.5rem; }
}

/* ---------- buttons ---------- */
.btn { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.3rem; font: 700 0.875rem/1.2 var(--mono); letter-spacing: 0.03em; text-decoration: none; color: var(--action-ink); --cut: 9px; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--action); clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.btn:hover::before { filter: brightness(1.12); }
.btn.ghost { color: var(--text); }
.btn.ghost::before { background: var(--line-strong); }
.btn.ghost::after { content: ""; position: absolute; inset: 1px; z-index: -1; background: var(--bg); clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.btn.ghost:hover::after { background: var(--surface); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.6rem 0 1rem; }

/* ---------- screenshots ---------- */
.shot { margin: 0 0 1.4em; }
.shot picture { border: 1px solid var(--line); background: #0d0b1a; }
.shot img { width: 100%; }
.shot figcaption { font-size: 0.9375rem; color: var(--muted); margin-top: 0.7rem; max-width: 44rem; }
.shot figcaption b { color: var(--text); font-weight: 600; }

/* ---------- home ---------- */
.hero { padding: clamp(2rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem); }
.hero .wrap { display: grid; gap: 2rem 3rem; align-items: center; }
@media (min-width: 980px) { .hero .wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.hero-mark { width: 9.5rem; margin: 0 0 1.4rem -0.6rem; }
.hero h1 { margin-bottom: 0.4em; }
.hero p { max-width: 36rem; }
.hero .shot { margin: 0; }
.status-line { font: 400 0.8125rem/1.5 var(--mono); color: var(--muted); border-left: 2px solid var(--warn); padding-left: 0.8rem; max-width: 34rem; }
.status-line a { color: inherit; }
.status-line.ok { border-left-color: var(--action); }

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--line); }
.section h2 { margin-top: 0; max-width: 40rem; }
.split .shot { margin: 0; }
.section-intro { max-width: 44rem; color: var(--muted); }

.tour { display: grid; gap: 2.5rem 2rem; margin-top: 2.2rem; }
@media (min-width: 860px) { .tour { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tour .shot { margin: 0; }
.tour .wide { grid-column: 1 / -1; }

.theme-grid { list-style: none; padding: 0; margin: 2rem 0 1.2rem; display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .theme-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .theme-grid.seven { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.7rem; } }
.theme-grid li { margin: 0; }
.theme-grid a { display: block; text-decoration: none; color: var(--muted); font: 400 0.75rem/1.4 var(--mono); }
.theme-grid picture { border: 1px solid var(--line); margin-bottom: 0.45rem; }
.theme-grid a:hover picture, .theme-grid a:focus-visible picture { border-color: var(--action); }
.theme-grid a:hover { color: var(--text); }

.theme-list { display: grid; gap: 3rem; margin-top: 2.5rem; }
.theme-list h2 { font-size: 1.3rem; margin: 0 0 0.2rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.8rem; }
.theme-list p { color: var(--muted); font-size: 0.9375rem; }
.tag { font: 400 0.6875rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; border: 1px solid var(--line-strong); color: var(--accent); padding: 0.3rem 0.5rem; }

.split { display: grid; gap: 2rem 3.5rem; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .split.wide-left { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.split > * > :first-child { margin-top: 0; }

.plain-list { list-style: none; padding: 0; }
.plain-list li { padding: 0.75rem 0 0.75rem 1.6rem; border-top: 1px solid var(--line); margin: 0; position: relative; }
.plain-list li::before { content: "✦"; position: absolute; left: 0; top: 0.8rem; color: var(--accent); font-size: 0.8rem; }

/* ---------- terminal ---------- */
.term, pre.code { background: var(--bg-2); border: 1px solid var(--line); padding: 1rem 1.15rem; overflow-x: auto; font: 400 0.8125rem/1.7 var(--mono); color: var(--text); border-radius: 0; white-space: pre; }
.term .p { color: var(--action); user-select: none; }
.term .c { color: var(--dim); }
:root[data-theme="light"] .term .p { color: var(--accent); }
.term-title { font: 400 0.6875rem/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); border: 1px solid var(--line); border-bottom: 0; padding: 0.55rem 1.15rem; background: var(--surface); margin: 0; }

/* ---------- keys ---------- */
.keys { white-space: nowrap; display: inline-flex; align-items: center; gap: 0.2rem; vertical-align: baseline; }
kbd { display: inline-block; font: 400 0.75rem/1 var(--mono); padding: 0.32rem 0.45rem; background: var(--surface); border: 1px solid var(--line-strong); border-bottom-width: 2px; color: var(--text); min-width: 1.6rem; text-align: center; }
.plus { color: var(--dim); font: 400 0.75rem/1 var(--mono); }
.alt-keys { color: var(--dim); font-size: 0.8125rem; margin-inline: 0.35rem; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; margin: 0; }
th, td { text-align: left; padding: 0.6rem 0.9rem; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; font: 400 0.6875rem/1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); background: var(--surface); white-space: nowrap; }
tbody tr:hover { background: var(--bg-2); }
td.num, th.num { text-align: right; white-space: nowrap; }
td.mono, .data td:first-child { font-family: var(--mono); font-size: 0.8125rem; }
td.nowrap { white-space: nowrap; }
.keys-table td:last-child { text-align: right; white-space: nowrap; }
.keys-table th:last-child { text-align: right; }
@media (max-width: 560px) { .keys-table td:last-child { white-space: normal; } .keys-table .keys { margin-block: 0.15rem; } }
.empty { padding: 2.2rem 1.4rem; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--text); font-size: 1.1rem; margin-bottom: 0.3rem; }

dl.facts { display: grid; grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr); gap: 0; border: 1px solid var(--line); margin-bottom: 1.4em; }
dl.facts dt, dl.facts dd { padding: 0.6rem 0.9rem; margin: 0; border-top: 1px solid var(--line); }
dl.facts dt:first-of-type, dl.facts dt:first-of-type + dd { border-top: 0; }
dl.facts dt { font: 400 0.6875rem/1.9 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); background: var(--surface); }
dl.facts dd { font-size: 0.9375rem; min-width: 0; }
dl.facts dd.mono { font-size: 0.8125rem; word-break: break-all; }
@media (max-width: 560px) { dl.facts { grid-template-columns: 1fr; } dl.facts dd { border-top: 0; } }

/* ---------- page furniture ---------- */
.page-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; }
.page-head h1 { margin-bottom: 0.35em; }
.page-head .lead { max-width: 44rem; color: var(--muted); }
.crumbs { font: 400 0.75rem/1.4 var(--mono); color: var(--dim); margin-bottom: 1.1rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; padding: 0; margin: 0; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.page-body { padding-bottom: clamp(3rem, 7vw, 5rem); }
.prose > h2:first-child { margin-top: 0; }
.prose h2 { padding-top: 1.4rem; border-top: 1px solid var(--line); }
.prose { max-width: var(--read); }
.prose .shot { margin-block: 1.8em; }
.anchor { color: var(--line-strong); text-decoration: none; font-family: var(--mono); font-size: 0.8em; opacity: 0; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus-visible { opacity: 1; }
blockquote { border-left: 2px solid var(--accent); background: var(--surface); padding: 0.9rem 1.1rem; margin-inline: 0; color: var(--muted); }
blockquote > :last-child { margin-bottom: 0; }
.notice { border-left: 2px solid var(--warn); background: var(--surface); padding: 1rem 1.2rem; margin-bottom: 1.6rem; max-width: 48rem; }
.notice > :last-child { margin-bottom: 0; }
.notice strong:first-child { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--warn); display: block; margin-bottom: 0.3rem; }
.notice.info { border-left-color: var(--accent); }
.notice.info strong:first-child { color: var(--accent); }

.cards { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin-bottom: 1.6rem; }
.card h2, .card h3 { margin-top: 0; font-size: 1.15rem; }
.card p { font-size: 0.9375rem; color: var(--muted); }
.card .state { font: 400 0.75rem/1.5 var(--mono); color: var(--warn); border-top: 1px solid var(--line); padding-top: 0.8rem; margin-top: 1rem; }
.card .state.ok { color: var(--text); }
.link-list { list-style: none; padding: 0; }
.link-list li { margin-bottom: 0.3rem; }

/* ---------- wiki ---------- */
.doc { display: grid; gap: 2rem 3.5rem; }
@media (min-width: 1000px) { .doc { grid-template-columns: minmax(0, 1fr) 16rem; } .doc aside { order: 2; } }
.toc { font-size: 0.875rem; }
@media (min-width: 1000px) { .toc { position: sticky; top: 5.5rem; max-height: calc(100vh - 7rem); overflow: auto; } }
.toc summary { font: 400 0.6875rem/1.4 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); cursor: pointer; padding: 0.3rem 0; }
.toc ol { list-style: none; padding: 0; margin: 0.6rem 0 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 0.28rem 0.9rem; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); }
.toc .d3 a { padding-left: 1.8rem; font-size: 0.8125rem; }
.doc-meta { font: 400 0.75rem/1.6 var(--mono); color: var(--dim); border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; }
.see-also { margin-top: 2.5rem; }
.see-also h2 { font-size: 1.1rem; border: 0; padding: 0; }
.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; font-size: 0.9375rem; }
.pager span { display: block; font: 400 0.6875rem/1.6 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.pager .next { text-align: right; margin-left: auto; }

.wiki-cats { display: grid; gap: 2.2rem 3rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.wiki-cats h2 { font-size: 1.15rem; margin: 0 0 0.3rem; padding-top: 0.9rem; border-top: 1px solid var(--line-strong); }
.wiki-cats p { color: var(--dim); font-size: 0.875rem; margin-bottom: 0.7rem; }
.wiki-cats ul { list-style: none; padding: 0; margin: 0; }
.wiki-cats li { padding: 0.32rem 0; margin: 0; }
.wiki-search { margin: 0 0 2.5rem; max-width: 36rem; }
.wiki-search label { display: block; font: 400 0.6875rem/1.4 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); margin-bottom: 0.4rem; }
.wiki-search input, .filter input { width: 100%; padding: 0.75rem 0.9rem; font-size: 1rem; }
.results { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.results li { padding: 0.9rem 0; border-top: 1px solid var(--line); margin: 0; }
.results .kind { font: 400 0.6875rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-right: 0.6rem; }
.results p { margin: 0.25rem 0 0; font-size: 0.9375rem; color: var(--muted); }
.filter { margin-bottom: 1rem; max-width: 30rem; }
.count { font: 400 0.75rem/1.6 var(--mono); color: var(--dim); margin-bottom: 0.6rem; }

/* ---------- news ---------- */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { padding: 1.3rem 0; border-top: 1px solid var(--line); margin: 0; }
.news-list li:first-child { border-top: 0; padding-top: 0; }
.news-list time, .post-date { font: 400 0.75rem/1.4 var(--mono); letter-spacing: 0.08em; color: var(--dim); display: block; margin-bottom: 0.3rem; }
.news-list h2, .news-list h3 { font-size: 1.2rem; margin: 0 0 0.35rem; }
.news-list p { margin: 0; color: var(--muted); font-size: 0.9375rem; max-width: 44rem; }
.forum-list p { font: 400 0.8125rem/1.5 var(--mono); letter-spacing: 0.02em; }
.forum-empty { color: var(--muted); max-width: 44rem; margin: 0 0 1rem; }
.side-box h2 { font-size: 1.05rem; margin: 0 0 0.9rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.side-box h2 a { font: 400 0.75rem/1 var(--mono); }
.side-box table { font-size: 0.8125rem; }
.side-box td, .side-box th { padding: 0.45rem 0.7rem; }

/* ---------- forums ---------- */
.forum-table td:first-child { width: 60%; }
.forum-table .name { font-weight: 600; font-size: 1.02rem; display: block; margin-bottom: 0.15rem; }
.forum-table .about { color: var(--muted); font-size: 0.875rem; }
.slot { border: 1px dashed var(--line-strong); padding: 1.1rem 1.2rem; margin-bottom: 1rem; color: var(--muted); font-size: 0.9375rem; }
.slot .slot-name { font: 400 0.6875rem/1.4 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 0.35rem; }
.slot.indent { margin-left: clamp(0.8rem, 4vw, 2.5rem); }

/* ---------- about ---------- */
.about-grid { display: grid; gap: 2rem 3.5rem; align-items: start; }
@media (min-width: 900px) { .about-grid { grid-template-columns: minmax(0, 1fr) 21rem; } }
.portrait picture { border: 1px solid var(--line); }
.portrait figcaption { font: 400 0.75rem/1.5 var(--mono); color: var(--dim); margin-top: 0.6rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 3rem 0 2rem; font-size: 0.9375rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.5fr repeat(4, 1fr); } }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 860px) { .footer-brand { grid-column: auto; } }
.footer-brand img { width: 7rem; margin: -0.5rem 0 0.6rem -0.4rem; }
.footer-brand p { color: var(--muted); font-size: 0.875rem; max-width: 20rem; }
.site-footer h2 { font: 400 0.6875rem/1.4 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); margin: 0 0 0.8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.legal { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font: 400 0.75rem/1.7 var(--mono); color: var(--dim); display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; }
.legal a { color: var(--dim); text-decoration: underline; }

.err { padding: clamp(3rem, 10vw, 7rem) 0; }
.err .code-big { font: 700 clamp(3.5rem, 12vw, 7rem)/1 var(--mono); color: var(--accent); letter-spacing: -0.04em; margin: 0 0 1rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  a, .icon-btn, .btn::before { transition: color 0.12s, border-color 0.12s, filter 0.12s; }
}
@media print {
  .site-header, .site-footer, .toc, .skip { display: none; }
  body { background: #fff; color: #000; }
}

/* Grid children must be allowed to shrink, or a wide code block pushes the page sideways on phones. */
.doc > *, .split > *, .about-grid > *, .hero .wrap > *, .cards > * { min-width: 0; }
.prose, article { min-width: 0; }

/* Long dependency lists run in columns. */
ul.link-list.mono { columns: 14rem auto; column-gap: 2rem; }
ul.link-list.mono li { break-inside: avoid; }
.side-box ul.link-list.mono { columns: auto; }

/* On phones a shortcut row stacks: the action, then its keys underneath, so no key is cut off. */
@media (max-width: 560px) {
  .keys-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .keys-table tr { display: block; padding: 0.6rem 0.9rem; border-top: 1px solid var(--line); }
  .keys-table tbody tr:first-child { border-top: 0; }
  .keys-table td { display: block; padding: 0; border: 0; }
  .keys-table td:last-child { text-align: left; white-space: normal; margin-top: 0.4rem; }
  .keys-table .keys { flex-wrap: wrap; white-space: normal; }
}
