/* ============================================================
   DEPOTDOWNLOADER — "Industrial Cargo Terminal × CLI"
   dark steel / steam-blue / warehouse-amber
   ============================================================ */

:root {
  --bg: #181c22;
  --bg-2: #1d222a;
  --panel: #222934;
  --panel-2: #2a3340;
  --line: rgba(165, 178, 192, 0.14);
  --line-strong: rgba(165, 178, 192, 0.28);
  --steam: #84aece;
  --steam-deep: #4a7aa3;
  --amber: #c9a87c;
  --amber-deep: #a9885c;
  --green: #8fc4a0;
  --red: #ff6b6b;
  --text: #cfd7df;
  --dim: #99a4b1;
  --faint: #707c89;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Archivo", sans-serif;
  --radius: 10px;
  --hazard: repeating-linear-gradient(
    -45deg,
    rgba(201, 168, 124, 0.22) 0 12px,
    transparent 12px 24px
  );
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--amber); color: #1a1610; }

/* ---- atmosphere layers ---- */
.grain {
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.blueprint {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(132, 174, 206, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(132, 174, 206, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(132, 174, 206, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(132, 174, 206, 0.025) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 80%);
}

main, header.topbar, footer { position: relative; z-index: 1; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

h1, h2, h3 { font-weight: 800; letter-spacing: -0.01em; line-height: 1.08; }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--amber);
}
.kicker::before {
  content: ""; width: 26px; height: 2px; background: var(--amber);
}
.kicker .idx { color: var(--faint); }

.section-head { margin-bottom: 48px; }
.section-head h2 {
  font-size: clamp(30px, 4.6vw, 52px);
  text-transform: uppercase;
  font-stretch: 92%;
  margin-top: 14px;
}
.section-head h2 .ghost {
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(170, 185, 200, 0.5);
}
.section-head p.lede { max-width: 620px; color: var(--dim); margin-top: 14px; font-size: 17px; }

section { padding: 110px 0; position: relative; }

/* ---- hazard divider ---- */
.hazard {
  height: 8px; background: var(--hazard);
  border-top: 1px solid rgba(201, 168, 124, 0.16);
  border-bottom: 1px solid rgba(201, 168, 124, 0.16);
}

/* ============ TOPBAR ============ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(24, 28, 34, 0.82);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 22px;
  height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; color: var(--text);
  font-weight: 800; letter-spacing: 0.04em; font-size: 15px;
  text-transform: uppercase;
}
.logo .crate { width: 30px; height: 30px; flex: none; }
.logo span b { color: var(--steam); }
.logo small {
  font-family: var(--mono); font-weight: 400; font-size: 10px;
  color: var(--faint); display: block; letter-spacing: 0.18em; margin-top: -2px;
}
.nav { display: flex; gap: 30px; align-items: center; flex: 1; min-width: 0; }
/* keep the link items at natural width; only the search bar grows */
.nav > a, .nav > .nav-more { flex: 0 0 auto; }
.nav a {
  color: var(--dim); text-decoration: none; font-size: 13.5px;
  font-family: var(--mono); letter-spacing: 0.06em; position: relative;
  transition: color 0.2s; white-space: nowrap;
}
.nav a:hover { color: var(--amber); }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 1px; background: var(--amber); transition: width 0.25s;
}
.nav a:hover::after { width: 100%; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 13.5px; font-weight: 600;
  letter-spacing: 0.04em; text-decoration: none; cursor: pointer;
  padding: 12px 22px; border-radius: 6px;
  border: 1px solid transparent; transition: all 0.2s;
}
.btn-amber {
  background: var(--amber); color: #1c160d;
  box-shadow: 0 0 0 0 rgba(201, 168, 124, 0);
}
.btn-amber:hover {
  background: #d8bb92; transform: translateY(-2px);
  box-shadow: 0 10px 28px -8px rgba(201, 168, 124, 0.45);
}
.btn-ghost {
  border-color: var(--line-strong); color: var(--text);
  background: rgba(42, 51, 64, 0.4);
}
.btn-ghost:hover { border-color: var(--steam); color: var(--steam); transform: translateY(-2px); }
.btn-sm { padding: 8px 16px; font-size: 12.5px; }

/* ============ HERO ============ */
.hero { padding: 170px 0 90px; overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px;
  align-items: center;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em;
  color: var(--steam); border: 1px solid rgba(132, 174, 206, 0.3);
  background: rgba(132, 174, 206, 0.07);
  padding: 7px 14px; border-radius: 100px; margin-bottom: 26px;
  text-transform: uppercase;
}
.hero-tag .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(143, 196, 160, 0.55); }
  60% { box-shadow: 0 0 0 8px rgba(143, 196, 160, 0); }
}
.hero h1 {
  font-size: clamp(42px, 6vw, 76px);
  text-transform: uppercase;
  font-stretch: 90%;
  line-height: 0.98;
}
.hero h1 .blue { color: var(--steam); }
.hero h1 .stamp {
  display: inline-block; color: var(--amber);
  position: relative;
}
.hero h1 .stamp::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: 6%;
  height: 26%; background: rgba(201, 168, 124, 0.16); z-index: -1;
  transform: skewX(-12deg);
}
.hero p.sub {
  color: var(--dim); font-size: 17.5px; max-width: 520px;
  margin: 26px 0 34px;
}
.hero p.sub code {
  font-family: var(--mono); font-size: 14px; color: var(--amber);
  background: rgba(201, 168, 124, 0.08); padding: 2px 7px; border-radius: 4px;
  border: 1px solid rgba(201, 168, 124, 0.2);
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* official direct-download grid (/download/) */
.dl-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.dl-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 18px 18px 16px;
  text-decoration: none; color: var(--text);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.dl-card:hover {
  border-color: var(--amber); transform: translateY(-3px);
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.7);
}
.dl-card .dl-head { display: flex; align-items: center; gap: 12px; }
.dl-card .dl-ico {
  color: var(--amber); flex: none;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 9px;
}
.dl-card .dl-ico svg { display: block; }
.dl-card .dl-headtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.dl-card .dl-os {
  font-weight: 800; font-size: 16px; letter-spacing: 0.01em; color: var(--text);
}
.dl-card .dl-for {
  font-family: var(--mono); font-size: 11px; line-height: 1.4; color: var(--dim);
}
/* architecture / format badge — the key differentiator between builds */
.dl-card .dl-arch {
  flex: none; align-self: flex-start;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line-strong); border-radius: 20px;
  padding: 3px 9px; white-space: nowrap;
}
.dl-card-alt .dl-arch { color: var(--amber); border-color: rgba(201, 168, 124, 0.4); background: rgba(201, 168, 124, 0.1); }
.dl-card .dl-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line);
}
.dl-card .dl-size { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.dl-card .dl-go {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--amber); font-weight: 600; transition: transform 0.2s;
}
.dl-card:hover .dl-go { transform: translateX(2px); }
.dl-card-alt { border-style: dashed; }
/* footnote links under the grid: match the site inline-link convention */
#downloads > .wrap > .note a { color: var(--steam); text-decoration: none; }
#downloads > .wrap > .note a:hover { color: var(--amber); }
.hero-meta {
  display: flex; gap: 26px; margin-top: 38px; flex-wrap: wrap;
}
.hero-meta .m {
  font-family: var(--mono); font-size: 12px; color: var(--faint);
  display: flex; align-items: center; gap: 8px;
}
.hero-meta .m svg { width: 15px; height: 15px; color: var(--steam); flex: none; }

/* terminal */
.term {
  background: #14181f;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 90px -30px rgba(132, 174, 206, 0.25);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 12.8px;
  position: relative;
  transform: rotate(0.6deg);
}
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; background: #1e242e;
  border-bottom: 1px solid var(--line);
}
.term-bar .b { width: 11px; height: 11px; border-radius: 50%; }
.term-bar .b1 { background: #ff5f57; } .term-bar .b2 { background: #febc2e; } .term-bar .b3 { background: #28c840; }
.term-bar .title {
  margin-left: auto; margin-right: auto; color: var(--faint);
  font-size: 11px; letter-spacing: 0.08em;
}
.term-body {
  padding: 18px 20px 22px; min-height: 330px; line-height: 1.75;
  color: #a8b3bf;
}
.term-body .ln { white-space: pre-wrap; word-break: break-all; }
.t-prompt { color: var(--green); }
.t-cmd { color: var(--text); }
.t-flag { color: var(--steam); }
.t-val { color: var(--amber); }
.t-ok { color: var(--green); }
.t-info { color: var(--faint); }
.t-err { color: var(--red); }
.t-warn { color: var(--amber); }
.t-pct { color: var(--amber); }
.t-done { color: var(--green); font-weight: 600; }
.cursor {
  display: inline-block; width: 8px; height: 15px;
  background: var(--amber); vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.t-bar-track {
  display: inline-block; width: 200px; height: 9px;
  background: #2a323d; border-radius: 99px; overflow: hidden;
  vertical-align: middle; margin: 0 8px;
  border: 1px solid rgba(165, 178, 192, 0.18);
}
.t-bar-fill {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--steam-deep), var(--steam));
  border-radius: 99px;
  transition: width 0.18s linear;
}

/* floating chunk squares behind terminal */
.chunk-field { position: absolute; inset: -60px; z-index: -1; pointer-events: none; }
.chunk {
  position: absolute; border: 1px solid rgba(132, 174, 206, 0.35);
  background: rgba(132, 174, 206, 0.06);
  border-radius: 3px;
  animation: floatChunk 7s ease-in-out infinite;
}
.chunk.amb { border-color: rgba(201, 168, 124, 0.4); background: rgba(201, 168, 124, 0.07); }
@keyframes floatChunk {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(4deg); }
}

/* ============ MARQUEE ============ */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden; padding: 16px 0;
}
.marquee-track {
  display: flex; gap: 0; width: max-content;
  animation: scroll 36s linear infinite;
}
.marquee-track span {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--faint);
  padding: 0 28px; white-space: nowrap;
}
.marquee-track span b { color: var(--amber); font-weight: 400; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ============ ANATOMY (what is a depot) ============ */
.anatomy .wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.anatomy-copy p { color: var(--dim); margin-bottom: 18px; }
.anatomy-copy p b { color: var(--text); }
.anatomy-copy .term-words {
  display: grid; gap: 12px; margin-top: 30px;
}
.term-word {
  display: grid; grid-template-columns: 110px 1fr; gap: 16px;
  padding: 14px 18px; border: 1px solid var(--line);
  border-left: 3px solid var(--steam); border-radius: 8px;
  background: rgba(17, 25, 35, 0.6);
  transition: transform 0.2s, border-color 0.2s;
}
.term-word:hover { transform: translateX(6px); border-left-color: var(--amber); }
.term-word dt { font-family: var(--mono); color: var(--steam); font-size: 13.5px; padding-top: 2px; }
.term-word dd { color: var(--dim); font-size: 14px; }

.flow-diagram {
  background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; position: relative; overflow: hidden;
}
.flow-diagram::before {
  content: "FIG. 01 — STEAM CONTENT SYSTEM"; position: absolute;
  top: 14px; right: 18px; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.2em; color: var(--faint);
}
.flow-diagram svg { width: 100%; height: auto; display: block; }
.flow-label { font-family: var(--mono); font-size: 11px; fill: var(--dim); letter-spacing: 0.1em; }
.flow-label.hl { fill: var(--amber); }
.flow-box { fill: rgba(21, 32, 44, 0.9); stroke: var(--line-strong); rx: 6; }
.flow-box.app { stroke: var(--steam); }
.flow-line {
  stroke: var(--line-strong); stroke-width: 1.4; fill: none;
  stroke-dasharray: 5 5;
  animation: dashFlow 1.4s linear infinite;
}
@keyframes dashFlow { to { stroke-dashoffset: -20; } }
.chunk-sq { fill: rgba(132, 174, 206, 0.18); stroke: var(--steam); stroke-width: 1; }
.chunk-sq.a { fill: rgba(201, 168, 124, 0.18); stroke: var(--amber); }

/* ============ PIPELINE ============ */
.pipeline { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pipe-steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  position: relative;
}
.pipe-steps::before {
  content: ""; position: absolute; top: 34px; left: 6%; right: 6%;
  height: 2px; z-index: 0;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 10px, transparent 10px 18px);
}
.pipe-step {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 22px;
  position: relative; z-index: 1;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.pipe-step:hover {
  transform: translateY(-8px); border-color: rgba(201, 168, 124, 0.5);
  box-shadow: 0 20px 50px -18px rgba(0, 0, 0, 0.7);
}
.pipe-step .num {
  width: 44px; height: 44px; border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: 16px;
  background: rgba(201, 168, 124, 0.1); color: var(--amber);
  border: 1px solid rgba(201, 168, 124, 0.35);
  margin-bottom: 18px;
}
.pipe-step h3 { font-size: 17px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.02em; }
.pipe-step p { color: var(--dim); font-size: 13.5px; }
.pipe-step code {
  font-family: var(--mono); font-size: 11.5px; color: var(--steam);
  display: inline-block; margin-top: 12px;
  background: rgba(132, 174, 206, 0.07); border: 1px solid rgba(132, 174, 206, 0.18);
  padding: 3px 8px; border-radius: 4px;
}

/* ============ FEATURES BENTO ============ */
.bento {
  display: grid; grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(150px, auto); gap: 16px;
}
.cell {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
  position: relative; overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.cell:hover { border-color: rgba(132, 174, 206, 0.45); transform: translateY(-4px); }
.cell h3 { font-size: 18px; margin-bottom: 8px; }
.cell p { color: var(--dim); font-size: 13.5px; max-width: 420px; }
.cell .ic {
  width: 38px; height: 38px; color: var(--steam); margin-bottom: 16px;
}
.cell-wide { grid-column: span 4; }
.cell-2 { grid-column: span 2; }
.cell-3 { grid-column: span 3; }
.cell-tall { grid-row: span 2; }

.cell-hero { grid-column: span 4; background: linear-gradient(135deg, var(--panel) 0%, rgba(27, 111, 174, 0.16) 100%); }
.cell-hero h3 { font-size: 24px; text-transform: uppercase; }
.cell-hero .timeline {
  margin-top: 24px; display: flex; align-items: center; gap: 0;
  font-family: var(--mono); font-size: 10.5px;
}
.tl-node { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.tl-node .pt {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--panel-2); border: 2px solid var(--faint);
  position: relative; z-index: 1;
}
.tl-node.sel .pt { border-color: var(--amber); background: var(--amber); box-shadow: 0 0 14px rgba(255,177,61,0.7); }
.tl-node span { color: var(--faint); white-space: nowrap; }
.tl-node.sel span { color: var(--amber); }
.tl-rail { height: 2px; background: var(--line-strong); flex: 2; margin-bottom: 22px; }

.cell-amber { border-color: rgba(201, 168, 124, 0.3); }
.cell-amber .ic { color: var(--amber); }

.os-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.os-chips span {
  font-family: var(--mono); font-size: 11px; padding: 5px 11px;
  border: 1px solid var(--line-strong); border-radius: 99px; color: var(--dim);
}

/* ============ USE CASES ============ */
.usecases { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.case {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 30px;
  position: relative; overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
}
.case::after {
  content: attr(data-no); position: absolute; right: 18px; top: 8px;
  font-size: 84px; font-weight: 800; color: transparent;
  -webkit-text-stroke: 1px rgba(165, 178, 192, 0.13);
  line-height: 1; pointer-events: none;
  font-stretch: 85%;
}
.case:hover { transform: translateY(-6px); border-color: rgba(201, 168, 124, 0.45); }
.case .tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--amber);
}
.case h3 { font-size: 21px; margin: 10px 0 10px; }
.case p { color: var(--dim); font-size: 14px; margin-bottom: 18px; }
.case .cmd {
  font-family: var(--mono); font-size: 12px; color: #adbac7;
  background: #14181f; border: 1px solid var(--line);
  border-radius: 7px; padding: 12px 14px;
  white-space: nowrap; overflow-x: auto;
}
.case .cmd .t-flag { color: var(--steam); }
.case .cmd .t-val { color: var(--amber); }

/* ============ QUICKSTART ============ */
.quickstart .panel {
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.6);
}
.tabs {
  display: flex; border-bottom: 1px solid var(--line);
  background: var(--bg-2); overflow-x: auto;
}
.tab {
  font-family: var(--mono); font-size: 13px; color: var(--dim);
  padding: 16px 26px; cursor: pointer; border: none; background: none;
  border-bottom: 2px solid transparent; white-space: nowrap;
  letter-spacing: 0.04em; transition: color 0.2s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--amber); border-bottom-color: var(--amber); background: var(--panel); }
.tabpanes { padding: 28px; }
.tabpane { display: none; }
.tabpane.active { display: block; animation: fadeUp 0.35s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.codeblock {
  position: relative;
  background: #14181f; border: 1px solid var(--line); border-radius: 8px;
  padding: 18px 20px; font-family: var(--mono); font-size: 13px;
  line-height: 1.9; color: #adbac7; overflow-x: auto;
  margin-bottom: 14px;
}
/* hub H2 groups (docs/guides/troubleshooting/faq indexes) */
.hub-group { padding-top: 4px; }
.hub-group .wrap > h2 {
  font-family: var(--sans); font-size: clamp(21px, 2.6vw, 28px);
  font-weight: 800; letter-spacing: -0.01em; color: var(--text);
  margin: 38px 0 8px;
}
.hub-group .wrap > h2 .ghost { color: var(--faint); }
.hub-group .hub-intro {
  color: var(--dim); max-width: 760px; margin: 0 0 26px;
  line-height: 1.65; font-size: 15px;
}
.hub-group .hub-intro a { color: var(--steam); text-decoration: none; }
.hub-group .hub-intro a:hover { color: var(--amber); }

/* article media: original diagrams + attributed frames */
figure.media {
  margin: 26px 0; padding: 0;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-2); overflow: hidden;
}
figure.media img, figure.media svg {
  display: block; width: 100%; height: auto;
  border-bottom: 1px solid var(--line);
}
figure.media figcaption {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.6;
  color: var(--faint); padding: 11px 16px; letter-spacing: 0.01em;
}
figure.media figcaption b { color: var(--dim); font-weight: 600; }
figure.media figcaption a { color: var(--steam); text-decoration: none; }
figure.media figcaption a:hover { color: var(--amber); }
.codeblock .cm { color: var(--faint); }
.codeblock .t-flag { color: var(--steam); }
.codeblock .t-val { color: var(--amber); }
.codeblock .t-prompt { color: var(--green); }
.copy-btn {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em;
  background: var(--panel-2); color: var(--dim);
  border: 1px solid var(--line-strong); border-radius: 5px;
  padding: 5px 10px; cursor: pointer; transition: all 0.2s;
}
.copy-btn:hover { color: var(--amber); border-color: var(--amber); }
.tabpane .note { font-size: 13px; color: var(--faint); font-family: var(--mono); }
.tabpane .note a { color: var(--steam); }

/* ============ ECOSYSTEM ============ */
.eco-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.eco {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; background: var(--panel);
  display: flex; flex-direction: column; gap: 12px;
  text-decoration: none; color: var(--text);
  transition: transform 0.25s, border-color 0.25s;
}
.eco:hover { transform: translateY(-6px); border-color: var(--steam); }
.eco .eco-ic {
  width: 44px; height: 44px; border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(132, 174, 206, 0.08); border: 1px solid rgba(132, 174, 206, 0.25);
  color: var(--steam);
}
.eco h3 { font-size: 17px; }
.eco p { color: var(--dim); font-size: 13.5px; flex: 1; }
.eco .lnk {
  font-family: var(--mono); font-size: 12px; color: var(--amber);
  display: inline-flex; align-items: center; gap: 6px;
}
.eco:hover .lnk { text-decoration: underline; }

/* ============ FAQ ============ */
.faq { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.faq .wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; align-items: start; }
.acc { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-q {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 4px; color: var(--text); text-align: left;
  font-family: var(--sans); font-size: 16.5px; font-weight: 600;
  transition: color 0.2s;
}
.acc-q:hover { color: var(--amber); }
.acc-q .pm {
  font-family: var(--mono); color: var(--amber); font-size: 20px;
  transition: transform 0.3s; flex: none; margin-left: 18px;
}
.acc-item.open .acc-q .pm { transform: rotate(45deg); }
.acc-a {
  max-height: 0; overflow: hidden; transition: max-height 0.35s ease;
  color: var(--dim); font-size: 14.5px;
}
.acc-a > div { padding: 0 4px 22px; max-width: 560px; }
.acc-a code {
  font-family: var(--mono); font-size: 12.5px; color: var(--steam);
  background: rgba(132, 174, 206, 0.08); padding: 1px 6px; border-radius: 4px;
}

/* ============ CTA / DOWNLOAD ============ */
.cta { text-align: center; padding: 130px 0; overflow: hidden; }
.cta h2 {
  font-size: clamp(36px, 5.5vw, 64px); text-transform: uppercase;
  font-stretch: 90%;
}
.cta h2 .blue { color: var(--steam); }
.cta p { color: var(--dim); margin: 18px auto 36px; max-width: 480px; }
.cta .hero-cta { justify-content: center; }
.cta .stamp-box {
  display: inline-block; margin-bottom: 30px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em;
  color: var(--amber); border: 1.5px dashed rgba(201, 168, 124, 0.5);
  padding: 9px 20px; border-radius: 4px;
  transform: rotate(-2deg); text-transform: uppercase;
}

/* ============ FOOTER ============ */
footer { border-top: 1px solid var(--line); background: #14171d; }
.foot-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px; padding: 64px 0 40px;
}
.foot-grid h4, .foot-grid .foot-h {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 18px;
}
.foot-grid ul { list-style: none; display: grid; gap: 10px; }
.foot-grid a { color: var(--dim); text-decoration: none; font-size: 13.5px; transition: color 0.2s; }
.foot-grid a:hover { color: var(--amber); }
.foot-brand p { color: var(--faint); font-size: 13px; max-width: 280px; margin-top: 14px; }
.foot-bottom {
  border-top: 1px solid var(--line);
  padding: 22px 0; display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11.5px; color: var(--faint);
  flex-wrap: wrap; gap: 10px;
}
.foot-word {
  font-size: clamp(36px, 7.4vw, 106px); font-weight: 800;
  text-transform: uppercase; text-align: center;
  color: transparent; -webkit-text-stroke: 1px rgba(165, 178, 192, 0.22);
  line-height: 1; padding: 50px 0 0; user-select: none;
  font-stretch: 85%; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden;
}

/* ============ MULTI-PAGE ============ */
.nav a.active { color: var(--amber); }
.nav a.active::after { width: 100%; }

.page-hero {
  padding: 165px 0 0;
}
.page-hero .crumb {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 18px;
}
.page-hero .crumb a { color: var(--faint); text-decoration: none; }
.page-hero .crumb a:hover { color: var(--amber); }
.page-hero .crumb b { color: var(--amber); font-weight: 400; }
.page-hero h1 {
  font-size: clamp(34px, 5vw, 62px);
  text-transform: uppercase; font-stretch: 90%;
  margin-top: 14px; max-width: 800px;
}
.page-hero h1 .blue { color: var(--steam); }
.page-hero .lede { max-width: 640px; color: var(--dim); margin-top: 18px; font-size: 17px; }

/* directory cards on the home page */
a.case { display: block; text-decoration: none; color: var(--text); }
.case .go {
  font-family: var(--mono); font-size: 12.5px; color: var(--amber);
  display: inline-flex; align-items: center; gap: 7px; margin-top: 4px;
}
a.case:hover .go { text-decoration: underline; }

/* next page link at the bottom of subpages */
.next-nav { padding: 0 0 110px; }
.next-page {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 30px 36px;
  transition: transform 0.25s, border-color 0.25s;
}
.next-page:hover { transform: translateY(-4px); border-color: var(--amber); }
.next-page .np-k {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--faint); display: block; margin-bottom: 8px;
}
.next-page .np-t {
  font-size: clamp(20px, 2.6vw, 28px); font-weight: 800;
  text-transform: uppercase; color: var(--text); font-stretch: 92%;
}
.next-page .np-arrow {
  font-size: 30px; color: var(--amber); flex: none;
  transition: transform 0.25s;
}
.next-page:hover .np-arrow { transform: translateX(8px); }

/* ============ reveal on scroll ============ */
.rv { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: 0.08s; } .rv-d2 { transition-delay: 0.16s; }
.rv-d3 { transition-delay: 0.24s; } .rv-d4 { transition-delay: 0.32s; }

/* ============ responsive ============ */
@media (max-width: 980px) {
  .hero .wrap, .anatomy .wrap, .faq .wrap { grid-template-columns: 1fr; }
  .pipe-steps { grid-template-columns: repeat(2, 1fr); }
  .pipe-steps::before { display: none; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .cell-wide, .cell-2, .cell-3, .cell-hero { grid-column: span 2; }
  .case-grid { grid-template-columns: 1fr; }
  .eco-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .term { transform: none; }
}
@media (max-width: 560px) {
  .pipe-steps { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .cell-wide, .cell-2, .cell-3, .cell-hero { grid-column: span 1; }
  section { padding: 70px 0; }
  .hero { padding: 130px 0 60px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
}

/* ============================================================
   v1 POLISH PASS — same soul, finer finish
   deeper backdrop, tactile cards, warmer light
   ============================================================ */

:root {
  --bg: #14181e;
  --bg-2: #181d24;
  --panel: #1e242e;
  --panel-2: #262e39;
}

/* hero atmosphere: faint warm + cool light pools */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 46% 42% at 76% 26%, rgba(201, 168, 124, 0.07), transparent 65%),
    radial-gradient(ellipse 42% 38% at 12% 18%, rgba(132, 174, 206, 0.06), transparent 65%);
}
.cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 46% 55% at 50% 55%, rgba(201, 168, 124, 0.05), transparent 70%);
}

/* tactile cards: hairline top light + grounded base shadow */
.pipe-step, .cell, .case, .eco, .next-page, .term-word,
.flow-diagram, .quickstart .panel {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 2px 4px rgba(0, 0, 0, 0.25),
    0 12px 32px -18px rgba(0, 0, 0, 0.5);
}
.pipe-step:hover, .case:hover, .next-page:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 22px 48px -16px rgba(0, 0, 0, 0.65),
    0 0 50px -22px rgba(201, 168, 124, 0.35);
}
.cell:hover, .eco:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 22px 48px -16px rgba(0, 0, 0, 0.65),
    0 0 50px -22px rgba(132, 174, 206, 0.35);
}
.term-word:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 28px -12px rgba(0, 0, 0, 0.55);
}

/* primary button: brushed-metal sand, firmer press */
.btn-amber {
  background: linear-gradient(180deg, #d8ba8e 0%, #c9a87c 55%, #bd9a6b 100%);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.35);
}
.btn-amber:hover {
  background: linear-gradient(180deg, #e2c69e 0%, #d4b489 55%, #c7a577 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 12px 30px -8px rgba(201, 168, 124, 0.5);
}
.btn-ghost { backdrop-filter: blur(6px); }
.btn-ghost:hover { box-shadow: 0 10px 26px -12px rgba(132, 174, 206, 0.4); }

/* terminal: deeper well, warm rim light */
.term {
  background: #10141b;
  box-shadow:
    0 34px 90px -22px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 0 80px -28px rgba(132, 174, 206, 0.22),
    0 0 60px -30px rgba(201, 168, 124, 0.18);
}
.term-bar { background: #161b23; }
.t-bar-fill { background: linear-gradient(90deg, #4a7aa3, #84aece 70%, #a8c8e2); }
.codeblock, .case .cmd { background: #10141b; }

/* hazard stripes: a touch more present, still calm */
.hazard {
  height: 10px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(201, 168, 124, 0.3) 0 12px,
    rgba(20, 24, 30, 0) 12px 24px
  );
  border-top: 1px solid rgba(201, 168, 124, 0.22);
  border-bottom: 1px solid rgba(201, 168, 124, 0.22);
}

/* step badges: subtle inner light */
.pipe-step .num {
  background: linear-gradient(180deg, rgba(201, 168, 124, 0.18), rgba(201, 168, 124, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* bento hero cell: warm wash matching the timeline accent */
.cell-hero {
  background:
    radial-gradient(ellipse 75% 100% at 88% 0%, rgba(201, 168, 124, 0.1), transparent 60%),
    linear-gradient(135deg, var(--panel) 0%, rgba(74, 122, 163, 0.14) 100%);
}

/* ghost words: slightly clearer outline */
.section-head h2 .ghost { -webkit-text-stroke: 1.2px rgba(178, 192, 207, 0.55); }

/* footer wordmark: more presence */
.foot-word { -webkit-text-stroke: 1px rgba(165, 178, 192, 0.3); }

/* topbar: match deeper bg */
.topbar { background: rgba(18, 22, 28, 0.82); }

/* tab underline: sand → blue blend */
.tab.active {
  border-bottom-color: transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(90deg, var(--amber), var(--steam)) border-box;
  border-bottom: 2px solid transparent;
}

/* flow diagram: faint inner vignette for depth */
.flow-diagram {
  background:
    radial-gradient(ellipse 90% 80% at 50% 0%, rgba(132, 174, 206, 0.05), transparent 70%),
    var(--panel);
}

/* tighter hero: pull content up toward the topbar */
.hero { padding: 112px 0 84px; }
.page-hero { padding: 124px 0 0; }
@media (max-width: 560px) {
  .hero { padding: 96px 0 56px; }
  .page-hero { padding: 104px 0 0; }
}

/* hero: badge tighter to the topbar, terminal anchored to the top */
.hero { padding: 92px 0 80px; }
.hero .wrap { align-items: start; }
.hero-tag { margin-bottom: 22px; }
.hero-term { margin-top: 4px; }

/* subpage headers: same tight gap to the topbar as the home hero */
.page-hero { padding: 92px 0 0; }
.page-hero .crumb { margin-bottom: 14px; }
@media (max-width: 560px) {
  .page-hero { padding: 88px 0 0; }
}

/* ============================================================
   ARTICLE LAYOUT — long-form guides & docs
   ============================================================ */

.article-wrap {
  display: grid; grid-template-columns: 220px minmax(0, 720px);
  gap: 56px; justify-content: center;
  padding: 40px 0 90px;
}
.article-toc {
  position: sticky; top: 96px; align-self: start;
  font-family: var(--mono); font-size: 12px;
}
.article-toc .toc-title {
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 14px; font-size: 10.5px;
}
.article-toc ol { list-style: none; display: grid; gap: 9px; }
.article-toc a {
  color: var(--dim); text-decoration: none; display: block;
  border-left: 2px solid var(--line); padding-left: 12px;
  line-height: 1.45; transition: color 0.2s, border-color 0.2s;
}
.article-toc a:hover { color: var(--amber); border-left-color: var(--amber); }

.article-meta {
  display: flex; gap: 18px; flex-wrap: wrap; margin-top: 20px;
  font-family: var(--mono); font-size: 11.5px; color: var(--faint);
  letter-spacing: 0.06em;
}
.article-meta .sep { color: var(--line-strong); }

.prose { font-size: 16.5px; line-height: 1.75; color: var(--text); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 {
  font-size: clamp(24px, 3vw, 32px); text-transform: uppercase;
  font-stretch: 92%; margin-top: 2.2em; scroll-margin-top: 90px;
  padding-top: 1.2em; border-top: 1px solid var(--line);
}
.prose h2 .no {
  font-family: var(--mono); font-size: 0.55em; color: var(--amber);
  vertical-align: 0.45em; margin-right: 10px; letter-spacing: 0.1em;
}
.prose h3 {
  font-size: 19px; margin-top: 1.8em; scroll-margin-top: 90px;
}
.prose p { color: var(--dim); }
.prose p strong, .prose li strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--steam); text-decoration: underline; text-decoration-color: rgba(132, 174, 206, 0.35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--steam); }
.prose ul, .prose ol { padding-left: 1.3em; color: var(--dim); display: grid; gap: 0.5em; }
.prose li::marker { color: var(--amber); }
.prose code {
  font-family: var(--mono); font-size: 0.85em; color: var(--amber);
  background: rgba(201, 168, 124, 0.08); padding: 2px 7px; border-radius: 4px;
  border: 1px solid rgba(201, 168, 124, 0.18);
}
.prose .codeblock { margin: 1.4em 0; }
.prose .codeblock code { background: none; border: none; color: inherit; padding: 0; font-size: inherit; }

.callout {
  border: 1px solid var(--line-strong); border-left: 3px solid var(--steam);
  border-radius: 8px; background: var(--panel);
  padding: 16px 20px; font-size: 14.5px; color: var(--dim);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.callout .co-label {
  display: block; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--steam); margin-bottom: 6px;
}
.callout.warn { border-left-color: var(--amber); }
.callout.warn .co-label { color: var(--amber); }

.step-list { counter-reset: step; list-style: none; padding-left: 0 !important; gap: 1em !important; }
.step-list > li {
  counter-increment: step; position: relative; padding-left: 52px;
}
.step-list > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 2px;
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  color: var(--amber); border: 1px solid rgba(201, 168, 124, 0.35);
  background: linear-gradient(180deg, rgba(201, 168, 124, 0.14), rgba(201, 168, 124, 0.05));
}

.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 1.4em 0; }
.prose th {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint); text-align: left;
  padding: 10px 14px; border-bottom: 1px solid var(--line-strong);
}
.prose td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--dim); }
.prose td code { white-space: nowrap; }

/* guides hub cards */
.guide-card-meta {
  font-family: var(--mono); font-size: 11px; color: var(--faint);
  letter-spacing: 0.08em; margin-top: 10px;
}
.case.soon { opacity: 0.55; pointer-events: none; }
.case.soon .go { color: var(--faint); }

@media (max-width: 980px) {
  .article-wrap { grid-template-columns: minmax(0, 1fr); }
  .article-toc { display: none; }
}

/* ============================================================
   STATUS PAGE — live banner + timeline
   ============================================================ */

.status-banner {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--panel); padding: 26px 30px;
  display: grid; grid-template-columns: auto 1fr; gap: 20px;
  align-items: start; margin: 36px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 32px -18px rgba(0, 0, 0, 0.5);
}
.status-light {
  width: 18px; height: 18px; border-radius: 50%; margin-top: 5px;
  background: var(--faint); flex: none;
}
.status-banner.green  { border-left: 3px solid #8fc4a0; }
.status-banner.yellow { border-left: 3px solid var(--amber); }
.status-banner.red    { border-left: 3px solid var(--red); }
.status-banner.green  .status-light { background: #8fc4a0; box-shadow: 0 0 14px rgba(143, 196, 160, 0.7); }
.status-banner.yellow .status-light { background: var(--amber); box-shadow: 0 0 14px rgba(201, 168, 124, 0.7); }
.status-banner.red    .status-light { background: var(--red); box-shadow: 0 0 14px rgba(255, 107, 107, 0.7); }
.status-banner h2 {
  font-size: 19px; text-transform: none; font-stretch: 100%;
  line-height: 1.4; margin: 0; border: none; padding: 0;
}
.status-banner .st-updated {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 8px;
}
.status-banner .st-note { color: var(--dim); font-size: 14px; margin-top: 10px; }

.timeline-list { list-style: none; padding-left: 0 !important; position: relative; }
.timeline-list::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 1px; background: repeating-linear-gradient(var(--line-strong) 0 6px, transparent 6px 12px);
}
.timeline-list > li { position: relative; padding-left: 34px; }
.timeline-list > li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--steam);
}
.timeline-list > li.warn::before { border-color: var(--amber); }
.timeline-list > li .tl-date {
  font-family: var(--mono); font-size: 12px; color: var(--amber);
  letter-spacing: 0.1em; display: block; margin-bottom: 2px;
}

.status-table-ok { color: #8fc4a0 !important; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.status-table-warn { color: var(--amber) !important; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.status-table-bad { color: var(--red) !important; font-family: var(--mono); font-size: 12px; white-space: nowrap; }

/* ============================================================
   NAV "MORE" DROPDOWN
   ============================================================ */
.nav-more { position: relative; }
.nav-more-btn {
  background: none; border: none; cursor: pointer;
  color: var(--dim); font-size: 13.5px;
  font-family: var(--mono); letter-spacing: 0.06em;
  padding: 0; transition: color 0.2s;
}
.nav-more-btn:hover, .nav-more-btn.active { color: var(--amber); }
.nav-drop {
  position: absolute; top: calc(100% + 16px); right: -14px;
  min-width: 175px; display: none; flex-direction: column; gap: 2px;
  background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: 9px; padding: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 44px -14px rgba(0, 0, 0, 0.7);
  z-index: 110;
}
.nav-drop::before {
  content: ""; position: absolute; top: -18px; left: 0; right: 0; height: 18px;
}
.nav-more:hover .nav-drop, .nav-more.open .nav-drop { display: flex; }
.nav .nav-drop a {
  padding: 8px 12px; border-radius: 6px; font-size: 13px;
}
.nav .nav-drop a::after { display: none; }
.nav .nav-drop a:hover { background: rgba(201, 168, 124, 0.08); }

/* topbar must beat main content (header.topbar selector outranks .topbar) */
header.topbar { z-index: 120; }

/* ---------- command constructor (§6 interactive) ---------- */
.builder {
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: rgba(16, 20, 27, 0.6); padding: 22px; margin: 1.6em 0;
}
.builder-head {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  color: var(--amber); margin-bottom: 16px;
}
.builder-head span { color: var(--faint); letter-spacing: 0.04em; margin-left: 12px; text-transform: none; }
.builder-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 18px; margin-bottom: 18px;
}
.builder-grid label {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint);
}
.builder-grid input[type="text"], .builder-grid select {
  font-family: var(--mono); font-size: 13px;
  background: #10141b; color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 7px;
  padding: 9px 12px; outline: none; width: 100%;
  transition: border-color 0.2s;
}
.builder-grid input[type="text"]:focus, .builder-grid select:focus { border-color: var(--amber); }
.builder-grid input::placeholder { color: var(--faint); opacity: 0.7; }
.builder-grid .cb-checks {
  flex-direction: row; align-items: center; gap: 9px;
  text-transform: none; letter-spacing: 0.06em; font-size: 12px;
  color: var(--dim); padding-top: 18px;
}
.builder-grid .cb-checks input { accent-color: var(--amber); width: 15px; height: 15px; }
.builder .codeblock { margin: 0; }
.builder-note {
  font-family: var(--mono); font-size: 11.5px; color: var(--amber);
  margin-top: 10px; min-height: 1em;
}
@media (max-width: 760px) { .builder-grid { grid-template-columns: 1fr; } .builder-grid .cb-checks { padding-top: 0; } }

/* ---------- site search (§6 interactive) ---------- */
.search-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  color: var(--dim); background: none; border: 1px solid var(--line-strong);
  border-radius: 7px; padding: 8px 14px; cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  /* stretch across the free space, ending at the Download button */
  flex: 1 1 auto; min-width: 130px; justify-content: space-between;
}
.search-btn .sb-label { margin-right: auto; }
.search-btn:hover { color: var(--amber); border-color: var(--amber); }
.search-btn kbd {
  font-family: var(--mono); font-size: 10px; color: var(--faint);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px;
}
.search-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 13, 18, 0.82); backdrop-filter: blur(3px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 9vh 20px 20px;
}
.search-overlay.open { display: flex; }
.search-panel {
  width: 100%; max-width: 640px;
  background: #131822; border: 1px solid var(--line-strong);
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.search-input {
  width: 100%; font-family: var(--mono); font-size: 15px;
  background: #10141b; color: var(--text);
  border: none; border-bottom: 1px solid var(--line-strong);
  padding: 16px 18px; outline: none;
}
.search-input::placeholder { color: var(--faint); }
.search-results { max-height: 56vh; overflow-y: auto; }
.search-hit { display: block; padding: 13px 18px; border-bottom: 1px solid var(--line); text-decoration: none; }
.search-hit:last-child { border-bottom: none; }
.search-hit:hover, .search-hit.sel { background: rgba(201, 168, 124, 0.07); }
.search-hit .sh-t { color: var(--text); font-weight: 600; font-size: 14.5px; }
.search-hit .sh-u { font-family: var(--mono); font-size: 10.5px; color: var(--amber); letter-spacing: 0.06em; margin-left: 10px; }
.search-hit .sh-s { color: var(--dim); font-size: 13px; margin-top: 4px; line-height: 1.45; }
.search-hit .sh-s mark { background: none; color: var(--steam); font-weight: 600; }
.search-empty { padding: 22px 18px; font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
@media (max-width: 860px) { .search-btn span.sb-label, .search-btn kbd { display: none; } }

/* ---------- download password modal ---------- */
.dl-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 30%, rgba(132, 174, 206, 0.1), transparent 34%),
    rgba(10, 13, 18, 0.84);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition-property: opacity;
  transition-duration: 0.2s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}
.dl-modal.open {
  display: flex;
  opacity: 1;
}
.dl-modal-card {
  position: relative;
  width: min(100%, 500px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(42, 51, 64, 0.78), rgba(29, 34, 42, 0.98)),
    var(--panel);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 0 1px rgba(201, 168, 124, 0.08);
  padding: 30px;
  transform: translateY(10px) scale(0.98);
  transition-property: transform;
  transition-duration: 0.24s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}
.dl-modal-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--hazard);
  border-bottom: 1px solid rgba(201, 168, 124, 0.24);
}
.dl-modal.open .dl-modal-card {
  transform: translateY(0) scale(1);
}
.dl-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  background: rgba(24, 28, 34, 0.5);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition-property: color, border-color, background-color, transform;
  transition-duration: 0.16s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}
.dl-modal-close:hover {
  color: var(--amber);
  border-color: rgba(201, 168, 124, 0.45);
  background: rgba(201, 168, 124, 0.08);
}
.dl-modal-close:active,
.dl-modal-copy:active,
.dl-modal-actions .btn:active {
  transform: scale(0.96);
}
.dl-modal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 2px 46px 12px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}
.dl-modal-kicker span {
  width: 24px;
  height: 2px;
  background: var(--amber);
}
.dl-modal-title {
  margin: 0 46px 10px 0;
  color: var(--text);
  font-size: clamp(25px, 5vw, 36px);
  line-height: 1.04;
  text-transform: uppercase;
  text-wrap: balance;
}
.dl-modal-desc {
  margin: 0 0 20px;
  max-width: 58ch;
  color: var(--dim);
  font-size: 15.5px;
  line-height: 1.65;
  text-wrap: pretty;
  white-space: pre-line;
}
.dl-modal-pw {
  margin: 0 0 22px;
  border: 1px solid rgba(132, 174, 206, 0.22);
  border-radius: 10px;
  background: rgba(20, 24, 31, 0.62);
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.dl-modal-pw[hidden] {
  display: none;
}
.dl-modal-pw-label {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--faint);
  text-transform: uppercase;
}
.dl-modal-pw-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.dl-modal-pw-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #14181f;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.03em;
  padding: 10px 12px;
  user-select: all;
}
.dl-modal-copy {
  min-width: 98px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition-property: color, border-color, background-color, transform;
  transition-duration: 0.16s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}
.dl-modal-copy:hover {
  color: var(--steam);
  border-color: rgba(132, 174, 206, 0.5);
  background: rgba(132, 174, 206, 0.1);
}
.dl-modal-copy.copied {
  color: var(--green);
  border-color: rgba(143, 196, 160, 0.48);
  background: rgba(143, 196, 160, 0.09);
}
.dl-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.dl-modal-actions .btn {
  min-height: 42px;
  transition-property: color, border-color, background-color, box-shadow, transform;
}
body.dl-modal-open {
  overflow: hidden;
}
@media (max-width: 540px) {
  .dl-modal { padding: 14px; }
  .dl-modal-card { padding: 26px 18px 18px; }
  .dl-modal-title { margin-right: 42px; }
  .dl-modal-pw-row { flex-direction: column; }
  .dl-modal-copy { width: 100%; min-height: 42px; }
  .dl-modal-actions { flex-direction: column-reverse; }
  .dl-modal-actions .btn { width: 100%; justify-content: center; }
}
