
:root {
  --void: #000000;
  --surface: #0b0b0b;
  --elevated: #14171d;
  --border: #21252d;
  --accent: #ff8735;
  --accent-bright: #ffa15c;
  --accent-dim: #d9691f;
  --accent-glow: #ffb37a;
  --text: #ffffff;
  --muted: #8a8a8a;
  --font-display: "Oxanium", "Segoe UI", sans-serif;
  --font-body: "Sora", "Segoe UI", sans-serif;
  --topbar-h: 3.5rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); background: var(--void);
  font-family: var(--font-body); font-size: 1.05rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-bright); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--accent); color: #000; font-weight: 600;
  padding: .65rem 1rem; text-decoration: none;
}
.skip:focus { top: 1rem; }
.wrap { width: min(1080px, calc(100% - 2rem)); margin-inline: auto; }

.topbar {
  position: absolute; inset: 0 0 auto; z-index: 20;
  min-height: var(--topbar-h); padding: .85rem 0;
}
.page-hero .topbar {
  position: sticky; top: 0;
  background: rgba(0,0,0,.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.topbar-brand {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--text); text-decoration: none; font-family: var(--font-display);
  font-weight: 600; letter-spacing: .06em; font-size: .95rem;
}
.topbar-brand img { width: 28px; height: 28px; border-radius: 50%; }
.topbar-brand:hover { color: var(--accent-bright); text-decoration: none; }
.nav-toggle {
  display: none; background: transparent; color: var(--text);
  border: 1px solid rgba(255,255,255,.28); padding: .55rem .75rem;
  font: inherit; cursor: pointer; min-height: 44px; min-width: 44px;
}
.nav-links {
  display: flex; align-items: center; gap: 1.35rem; list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: rgba(255,255,255,.78); text-decoration: none;
  font-size: .92rem; font-weight: 500;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; }
.nav-links a[aria-current="page"] { border-bottom: 2px solid var(--accent); padding-bottom: .15rem; }

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(0,0,0,.96); border-bottom: 1px solid var(--border);
    padding: .35rem 1rem 1rem;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    display: block; padding: .85rem 0; min-height: 44px;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .nav-links a[aria-current="page"] { border-bottom-color: var(--accent); }
}

.hero, .page-hero {
  position: relative; overflow: hidden; background: var(--void);
}
.hero {
  min-height: 100svh; display: grid; align-content: end;
  padding: calc(var(--topbar-h) + 2.25rem) 0 3.25rem;
}
.page-hero {
  padding: 0 0 2.25rem;
  min-height: 14rem;
}
.page-hero .wrap.page-hero-copy {
  padding-top: 1.5rem;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.55) 42%, rgba(0,0,0,.88) 78%, #000 100%),
    radial-gradient(ellipse 70% 55% at 18% 70%, rgba(255,135,53,.18), transparent 55%),
    url("/brand/default.jpg") center / cover no-repeat;
}
.page-hero .hero-bg {
  background:
    linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.78) 55%, #000 100%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(255,135,53,.14), transparent 50%),
    url("/brand/default.jpg") center 40% / cover no-repeat;
}
.hero .wrap, .page-hero .wrap { position: relative; z-index: 1; }

.wordmark {
  margin: 0 0 .65rem; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.1rem, 8vw, 5.75rem); letter-spacing: .06em; line-height: .95;
  color: var(--accent); text-shadow: 0 0 40px rgba(255,135,53,.28);
  white-space: nowrap;
}
.page-title {
  margin: 0 0 .5rem; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.75rem, 4.5vw, 2.75rem); letter-spacing: .05em;
  color: var(--accent);
}
.hero-lead, .page-lead {
  margin: 0 0 1.5rem; max-width: 38rem;
  font-size: clamp(1.05rem, 2.4vw, 1.15rem); color: #eaeaea;
}
.page-lead { margin-bottom: 0; }

.ctas { display: flex; flex-wrap: wrap; gap: .65rem; }
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .75rem 1.2rem; border: 1px solid var(--accent);
  color: var(--accent); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  letter-spacing: .03em;
}
.cta.primary { background: var(--accent); color: #000; }
.cta.primary:hover { background: var(--accent-bright); color: #000; }
.cta:not(.primary) {
  background: rgba(11,11,11,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.cta:not(.primary):hover {
  border-color: var(--accent-bright); color: var(--accent-bright);
  background: rgba(255,135,53,.12);
}

main { background: var(--void); }
main .section, main section {
  padding: 2.75rem 0; border-top: 1px solid var(--border);
}
main h2 {
  margin: 0 0 .7rem; font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.55rem); font-weight: 600;
  letter-spacing: .04em; color: var(--accent);
}
main h3 {
  margin: 1.75rem 0 .55rem; font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 600; letter-spacing: .03em; color: #fff;
}
main p { margin: 0 0 1rem; max-width: 42rem; color: #d8d8d8; }
.muted { color: var(--muted); font-size: .95rem; }
code, .mono {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  color: var(--accent-glow); font-size: .92em;
}
.hash-box {
  display: block; margin: 0 0 1.25rem; padding: .75rem .9rem;
  background: var(--elevated); border: 1px solid var(--border);
  font-family: ui-monospace, Consolas, monospace; font-size: .82rem;
  color: var(--accent-glow); word-break: break-all; max-width: 42rem;
}
.req {
  display: inline-block; margin: .35rem 0 1rem; padding: .55rem .85rem;
  border-left: 3px solid var(--accent); background: var(--elevated);
  color: #ddd; font-size: .95rem;
}
.dl-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1rem;
  margin: 0 0 1.25rem;
}
.checksum a {
  font-family: var(--font-display); font-weight: 600; font-size: .9rem;
  text-decoration: none; border-bottom: 1px solid currentColor;
}

.legend {
  display: flex; flex-wrap: wrap; gap: .5rem .85rem; margin: 0 0 1.5rem;
  font-size: .88rem; color: var(--muted);
}
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.badge {
  display: inline-block; font-family: var(--font-display); font-size: .72rem;
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: .2rem .45rem; border: 1px solid var(--border); color: #bbb;
}
.badge.default { border-color: var(--accent-dim); color: var(--accent); }
.badge.optional { border-color: #555; color: #999; }
.badge.set { border-color: #3a3f4a; color: #c8c8c8; }

.table-scroll {
  width: 100%;
  max-width: 100%;
  margin: 0 0 1.5rem;
  border: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tool-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 0;
  font-size: .95rem;
}
/* Same split on every tools/lab table — percentages beat rem so long names
   cannot stretch one category’s first column past the others. */
.tool-table col.col-tool { width: 28%; }
.tool-table col.col-desc { width: 72%; }
.tool-table th, .tool-table td {
  text-align: left;
  padding: .55rem .75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.tool-table thead th {
  font-family: var(--font-display); font-weight: 600; font-size: .82rem;
  letter-spacing: .04em; color: var(--muted); text-transform: uppercase;
  background: var(--surface);
}
.tool-table thead th:first-child,
.tool-table tbody th[scope="row"] {
  width: 28%;
}
.tool-table thead th:last-child,
.tool-table tbody td {
  width: 72%;
}
.tool-table td {
  color: #cfcfcf;
}
.tool-table tr:hover td, .tool-table tr:hover th[scope="row"] { background: rgba(255,135,53,.04); }
.tool-table th[scope="row"] {
  color: #fff; text-transform: none; letter-spacing: 0; font-size: .95rem;
  font-family: var(--font-body); font-weight: 600;
}

.cat-grid {
  display: grid; gap: .75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  margin: 0; padding: 0; list-style: none;
}
.cat-grid > li {
  display: grid; min-width: 0; height: 100%;
}
.cat-grid a {
  display: flex; flex-direction: column;
  box-sizing: border-box;
  height: 100%; min-height: 6.75rem;
  padding: 1rem 1.1rem; border: 1px solid var(--border);
  background: var(--surface); color: #e8e8e8; text-decoration: none;
}
.cat-grid a:hover { border-color: var(--accent-dim); color: #fff; }
.cat-grid strong {
  display: block; font-family: var(--font-display); color: var(--accent);
  margin-bottom: .35rem; font-weight: 600;
}
.cat-grid span {
  font-size: .88rem; color: var(--muted); line-height: 1.35;
  flex: 1 1 auto;
}
@media (max-width: 900px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.toc {
  display: flex; flex-wrap: wrap; gap: .45rem .75rem; margin: 0 0 1.75rem;
  padding: 0; list-style: none;
}
.toc a {
  font-size: .88rem; text-decoration: none;
  border-bottom: 1px solid rgba(255,135,53,.35);
}

.term {
  margin: 1rem 0 1.5rem; border: 1px solid var(--border); background: #070707;
  max-width: 42rem; overflow: auto;
}
.term .bar {
  display: flex; align-items: center; gap: .4rem; padding: .45rem .65rem;
  border-bottom: 1px solid var(--border); color: var(--muted); font-size: .78rem;
}
.term .dot { width: .55rem; height: .55rem; border-radius: 50%; background: #333; }
.term .dot.r { background: #c44; }
.term .dot.y { background: #b90; }
.term .dot.g { background: #3a3; }
.term pre {
  margin: 0; padding: .85rem 1rem; font-size: .88rem; line-height: 1.45;
  color: #d0d0d0; white-space: pre-wrap; overflow-wrap: anywhere;
}
.term .b { color: var(--accent-glow); font-weight: 500; }
.term .m { color: #666; }
figcaption { margin: -.75rem 0 1.5rem; font-size: .88rem; color: var(--muted); max-width: 42rem; }

.steps { margin: 0 0 1.25rem; padding-left: 1.2rem; color: #d8d8d8; max-width: 42rem; }
.steps li { margin: 0 0 .55rem; }

footer {
  padding: 2rem 0 2.75rem; border-top: 1px solid var(--border);
  color: var(--muted); font-size: .9rem;
}
footer .wrap {
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  justify-content: space-between; align-items: baseline;
}

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
  .ctas { flex-direction: column; }
  .cta { width: 100%; }
  .wordmark { letter-spacing: .04em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta:not(.primary), .page-hero .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

.tag-linux {
  display: inline-block;
  margin-left: .45rem;
  padding: .12rem .4rem;
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}
