/* layerscope — Vercel-inspired design system (dark).
   Geist Sans / Geist Mono are self-hosted (see assets/fonts/).
   monochrome, hairline borders, one white accent, two signal hues. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/geist-sans-latin-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/geist-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/geist-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/geist-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/geist-sans-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/geist-sans-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/geist-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/geist-mono-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/geist-mono-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/geist-mono-latin-700-normal.woff2") format("woff2");
}

:root {
  --bg: #000000;
  --bg-soft: #0a0a0a;
  --panel: #0a0a0a;
  --panel-2: #111111;
  --panel-3: #171717;
  --border: #1f1f1f;
  --border-strong: #2e2e2e;
  --text: #ededed;
  --dim: #a1a1a1;
  --dim-2: #8f8f8f;
  --accent: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.06);
  --accent-strong: #ffffff;
  --geist-gradient: linear-gradient(180deg, #ffffff 0%, #ffffff 42%, #8f8f8f 100%);
  --green: #00dc82;
  --green-soft: rgba(0, 220, 130, 0.09);
  --red: #ff5a4e;
  --red-soft: rgba(255, 90, 78, 0.1);
  --yellow: #ffb224;
  --yellow-soft: rgba(255, 178, 36, 0.1);
  --blue: #3291ff;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  --hairline: 1px solid var(--border);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* screen-reader-only text (accessibility labels; never visible) */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }


/* [hidden] must always win over author display rules */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container { width: min(1200px, 100% - 48px); margin-inline: auto; }

::selection { background: #fafafa; color: #000; }

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--panel-2);
  border: var(--hairline);
  border-radius: 5px;
  padding: 0.1em 0.4em;
  color: var(--text);
  white-space: nowrap;
}

/* ---------- top bar: blurred translucent, hairline bottom ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  border-bottom: var(--hairline);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.topbar-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { color: var(--text); }
.brand-word { font-family: var(--sans); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.topnav { display: flex; align-items: center; gap: 24px; }
.topnav a { color: var(--dim); text-decoration: none; font-size: 13.5px; font-weight: 500; transition: color .15s ease; }
.topnav a:hover { color: var(--text); }
.gh-link { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border-strong); border-radius: 7px; padding: 7px 13px; color: var(--text) !important; background: var(--bg-soft); }
.gh-link:hover { border-color: #4a4a4a; background: var(--panel-2); }

/* ---------- buttons: white is the accent ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 14px/1 var(--sans);
  color: #000;
  background: #fff;
  border: 1px solid #fff;
  border-radius: 7px;
  padding: 13px 21px;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease, opacity .15s ease;
}
.btn:hover { background: #e8e8e8; border-color: #e8e8e8; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.btn-ghost {
  background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 12px 18px; font-weight: 500;
}
.btn-ghost:hover { border-color: #4d4d4d; background: var(--panel-2); color: var(--text); box-shadow: none; }

/* command copy button */
.ld-command-row { display: flex; align-items: flex-start; gap: 10px; }
.ld-command-row .ld-command { flex: 1 1 auto; min-width: 0; }
.copy-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 11px/1.2 var(--mono);
  color: var(--dim);
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 4px 9px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.copy-btn:hover { color: var(--text); border-color: #4d4d4d; background: var(--panel-2); }
.copy-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.copy-btn.is-done { color: var(--green); border-color: var(--green); }
.copy-btn.is-fail { color: var(--red); border-color: var(--red); }

/* ---------- landing / hero: gradient display type, glow, dot grid ---------- */
.landing {
  padding: 76px 0 90px;
  position: relative;
  overflow: hidden;
}
.landing::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(720px 400px at 50% -120px, rgba(255, 255, 255, 0.075), transparent 62%);
  pointer-events: none;
}
.hero { text-align: center; max-width: 900px; margin-inline: auto; position: relative; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em;
  color: var(--dim); margin-bottom: 26px;
  display: inline-flex; align-items: center; gap: 10px;
  border: var(--hairline); border-radius: 999px; padding: 7px 16px; background: rgba(10,10,10,.55);
}
.eyebrow .eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(0,220,130,.55); }
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  line-height: 1.02; letter-spacing: -0.045em; font-weight: 800;
  text-wrap: balance;
  background: var(--geist-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.lede {
  margin: 26px auto 0; max-width: 600px;
  font-size: 17.5px; line-height: 1.6; color: var(--dim); text-wrap: pretty;
}
.lede code { white-space: normal; }

/* hero terminal snippet — pure Vercel */
.hero-term {
  margin: 30px auto 0; max-width: 560px;
  background: var(--bg-soft); border: var(--hairline); border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: left;
  overflow: hidden;
}
.hero-term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: var(--hairline); }
.hero-term-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--panel-3); border: 1px solid var(--border-strong); }
.hero-term-body { display: flex; align-items: center; gap: 12px; padding: 16px 18px; font-family: var(--mono); font-size: 13.5px; }
.hero-term-body .prompt { color: var(--green); user-select: none; }
.hero-term-body .hero-cmd { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; }
.hero-term-body .copy-btn { flex: 0 0 auto; }

.dropzone {
  margin: 26px auto 0; max-width: 620px;
  border: 1px dashed #2e2e2e;
  border-radius: 14px;
  padding: 38px 30px;
  background: rgba(10, 10, 10, 0.65);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  transition: border-color .18s ease, background .18s ease;
}
.dropzone:hover, .dropzone.is-dragover, .dropzone:focus-visible {
  border-color: #5a5a5a;
  background: #0e0e0e;
  outline: none;
}
.dz-icon { color: var(--text); opacity: .92; }
.dz-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.dz-sub { color: var(--dim); font-size: 13px; }
.dropzone .btn { margin-top: 6px; }

.hero-alt { margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--dim); font-size: 14px; flex-wrap: wrap; }
.hero-alt-note { color: var(--dim-2); font-size: 12.5px; width: 100%; }

.hero-facts {
  list-style: none; margin: 52px auto 0; max-width: 1120px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border);
  border: var(--hairline); border-radius: var(--radius); overflow: hidden; text-align: left;
}
.hero-facts li { background: var(--bg-soft); padding: 22px 22px 20px; transition: background .2s ease; }
.hero-facts li:hover { background: var(--panel-2); }
.hero-facts .fact-idx { font-family: var(--mono); font-size: 11px; color: var(--dim-2); letter-spacing: .18em; }
.hero-facts strong { display: block; font-size: 15px; font-weight: 600; margin: 10px 0 6px; letter-spacing: -0.01em; }
.hero-facts span.fact-body { color: var(--dim); font-size: 13px; line-height: 1.55; }

.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 84px; text-align: left; }
.how-card { border-top: 1px solid var(--border-strong); padding: 20px 0 0; }
.how-step { font-family: var(--mono); color: var(--dim-2); font-size: 12px; letter-spacing: .14em; }
.how-card h2 { margin: 12px 0 8px; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.how-card p { color: var(--dim); font-size: 13.5px; line-height: 1.6; }

/* ---------- analysis: summary bar ---------- */
.analysis { padding: 36px 0 80px; }

.summary-bar {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) auto;
  gap: 30px; align-items: center;
  background: var(--bg-soft); border: var(--hairline); border-radius: 14px;
  padding: 26px 28px; position: relative; overflow: hidden;
}
.summary-eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim-2); margin-bottom: 8px; }
.summary-id { min-width: 0; }
.image-name { font-family: var(--mono); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary-chips { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.chip {
  font-family: var(--mono); font-size: 11px; color: var(--dim);
  background: var(--panel-2); border: var(--hairline);
  padding: 4px 10px; border-radius: 5px; letter-spacing: .02em;
}

.summary-stats { display: flex; gap: 34px; align-items: center; justify-content: flex-end; }
.stat { display: flex; flex-direction: column; gap: 4px; min-width: 104px; }
.stat-label { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim-2); cursor: help; }
.stat-value { font-family: var(--mono); font-size: 23px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--dim-2); font-size: 11px; max-width: 150px; line-height: 1.4; }
.stat-warn { color: var(--red); }
.stat-ok { color: var(--green); }

.stat-gauge { align-items: center; }
.gauge { position: relative; width: 96px; height: 96px; }
.gauge svg { transform: rotate(-90deg); }
.gauge-track { stroke: #1a1a1a; stroke-width: 10; fill: none; }
.gauge-fill {
  stroke: #fff; stroke-width: 10; fill: none; stroke-linecap: round;
  transition: stroke-dashoffset 1.1s cubic-bezier(.2,.7,.2,1), stroke .4s;
}
.gauge-fill.good { stroke: var(--green); }
.gauge-fill.ok { stroke: #fff; }
.gauge-fill.bad { stroke: var(--red); }
.gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-center span:first-child { font-family: var(--mono); font-size: 18px; font-weight: 700; letter-spacing: -0.03em; }
.gauge-label { font-size: 8.5px; color: var(--dim-2); text-transform: uppercase; letter-spacing: .14em; }

.summary-actions { display: flex; flex-direction: column; gap: 8px; }

/* ---------- platform picker (multi-platform OCI indexes) ---------- */
.platform-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding: 12px 16px; border: var(--hairline); border-radius: var(--radius-sm); background: var(--panel-2); }
.platform-row[hidden] { display: none; }
.platform-title { font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: var(--dim); }
.platform-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.platform-chip {
  font-family: var(--mono); font-size: 11.5px; color: var(--dim);
  background: transparent; border: var(--hairline); border-radius: 999px;
  padding: 5px 12px; cursor: pointer; letter-spacing: .02em; transition: color .15s, border-color .15s, background .15s;
}
.platform-chip:hover { border-color: rgba(255,255,255,.35); color: #fff; }
.platform-chip.is-active { background: #fff; color: #050505; border-color: #fff; cursor: default; }

/* ---------- warnings ---------- */
.warnings {
  margin-top: 16px; border: 1px solid rgba(255, 178, 36, 0.32); background: var(--yellow-soft);
  border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; color: #ffd88a;
}
.warnings ul { margin: 6px 0 0 18px; }
.error-box { border-color: rgba(255, 90, 78, 0.4) !important; background: var(--red-soft) !important; color: #ffb3ab !important; }

/* ---------- tabs: vercel hairline underline ---------- */
.tabs { display: flex; gap: 4px; margin: 28px 0 0; border-bottom: var(--hairline); }
.tab {
  font: 500 13.5px var(--sans); color: var(--dim);
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  padding: 12px 16px; cursor: pointer; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-bottom-color: #fff; }
.tab:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

.panel { padding: 22px 0 10px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 16px; flex-wrap: wrap; }
.panel h3 { letter-spacing: -0.02em; font-weight: 600; }
.panel-sub { color: var(--dim); font-size: 12.5px; margin-top: 4px; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.top-table, .wasted-table { min-width: 560px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--dim-2); font-weight: 500;
  padding: 10px 12px; border-bottom: var(--hairline);
}
.table td { padding: 10px 12px; border-bottom: 1px solid #141414; vertical-align: middle; }
.table tbody tr:hover { background: #101010; }
.table .num { font-family: var(--mono); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table th.num { text-align: right; }
.table .path { font-family: var(--mono); font-size: 12px; word-break: break-all; }

/* ---------- layers layout ---------- */
.layers-layout { display: grid; grid-template-columns: minmax(340px, 460px) 1fr; gap: 18px; align-items: start; }
.layer-list-wrap {
  background: var(--bg-soft); border: var(--hairline); border-radius: var(--radius);
  overflow: auto; max-height: 720px; position: sticky; top: 84px;
}
.layer-table tbody tr { cursor: pointer; }
.layer-table tbody tr.is-selected { background: #141414; box-shadow: inset 2px 0 0 #fff; }
.layer-table td { border-bottom: 1px solid #141414; }
.layer-size-bar { height: 3px; border-radius: 2px; background: var(--panel-3); overflow: hidden; min-width: 60px; }
.layer-size-bar > span { display: block; height: 100%; background: #fff; opacity: .85; }
.layer-cmd { font-family: var(--mono); font-size: 11px; color: var(--dim); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-table .idx { font-family: var(--mono); color: var(--dim-2); }

.layer-detail {
  background: var(--bg-soft); border: var(--hairline); border-radius: var(--radius);
  padding: 22px 24px; min-height: 400px;
}
.layer-detail-head { display: flex; justify-content: space-between; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.ld-eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim-2); }
.ld-command { font-family: var(--mono); font-size: 13px; margin: 10px 0 6px; word-break: break-word; color: var(--text); }
.ld-digest { font-family: var(--mono); font-size: 10.5px; color: var(--dim-2); word-break: break-all; }
.ld-stats { display: flex; gap: 20px; }
.ld-stat { text-align: right; }
.ld-num { display: block; font-family: var(--mono); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ld-cap { font-size: 9.5px; color: var(--dim-2); text-transform: uppercase; letter-spacing: .14em; font-family: var(--mono); }

.ld-diff-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin: 18px 0 12px; background: var(--panel-3); }
.seg-added { background: var(--green); }
.seg-modified { background: var(--yellow); }
.seg-deleted { background: var(--red); }
.ld-counts { display: flex; gap: 10px; align-items: center; color: var(--dim); font-size: 12px; font-family: var(--mono); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-added { background: var(--green); }
.dot-modified { background: var(--yellow); }
.dot-deleted { background: var(--red); }

.ld-controls { display: flex; gap: 10px; margin: 18px 0 12px; align-items: center; flex-wrap: wrap; }
.filter-input {
  flex: 1; min-width: 180px; background: var(--panel-2); border: var(--hairline);
  color: var(--text); border-radius: var(--radius-sm); padding: 10px 12px; font: 13px var(--mono);
}
.filter-input::placeholder { color: var(--dim-2); }
.filter-input:focus { outline: 1px solid #fff; outline-offset: 1px; border-color: transparent; }
.segmented { display: inline-flex; background: var(--panel-2); border: var(--hairline); border-radius: 8px; padding: 3px; gap: 2px; }
.seg-btn {
  border: 0; background: transparent; color: var(--dim); font: 500 12px var(--sans);
  padding: 7px 13px; border-radius: 6px; cursor: pointer; transition: color .15s ease, background .15s ease;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.is-active { background: #fff; color: #000; }

.file-list {
  border: var(--hairline); border-radius: var(--radius-sm);
  max-height: 430px; overflow: auto; background: var(--panel-2);
}
.file-row {
  display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 12px; border-bottom: 1px solid #161616; font-size: 12px;
}
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: #181818; }
.file-kind { font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .08em; text-align: center; border-radius: 4px; padding: 3px 0; white-space: nowrap; }
.kind-added { color: var(--green); background: var(--green-soft); }
.kind-modified { color: var(--yellow); background: var(--yellow-soft); }
.kind-deleted { color: var(--red); background: var(--red-soft); }
.file-path { font-family: var(--mono); word-break: break-all; color: var(--text); }
.file-meta { font-family: var(--mono); color: var(--dim); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.file-meta s { color: var(--dim-2); }
.no-op { color: var(--dim-2); font-size: 10.5px; }
.ld-truncated { color: var(--dim-2); font-size: 11.5px; margin-top: 8px; font-family: var(--mono); }
.file-list-empty { color: var(--dim-2); text-align: center; padding: 34px 10px; font-size: 13px; }

/* ---------- top files ---------- */
.top-table td, .top-table th { padding-left: 14px; padding-right: 14px; }
.share-bar { height: 4px; background: var(--panel-3); border-radius: 2px; min-width: 90px; overflow: hidden; }
.share-bar > span { display: block; height: 100%; background: #fff; opacity: .8; }
.rank { color: var(--dim-2); font-family: var(--mono); }

/* ---------- wasted ---------- */
.wasted-top { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; margin-bottom: 20px; }
.wasted-explainer { background: var(--bg-soft); border: var(--hairline); border-radius: var(--radius); padding: 22px 24px; }
.wasted-explainer h3 { font-size: 16px; margin-bottom: 8px; letter-spacing: -0.01em; }
.wasted-explainer p { color: var(--dim); font-size: 13px; }
.formula-list { list-style: none; margin: 14px 0; border: var(--hairline); border-radius: var(--radius-sm); overflow: hidden; }
.formula-list li { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid #161616; font-size: 12px; }
.formula-list li:last-child { border-bottom: 0; }
.formula-key { font-family: var(--mono); color: var(--text); }
.fine-print { font-size: 11.5px !important; color: var(--dim-2) !important; }

.wasted-scorecard { background: var(--bg-soft); border: var(--hairline); border-radius: var(--radius); padding: 22px 24px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.ws-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 11px 0; border-bottom: 1px dashed #242424; }
.ws-row:last-child { border-bottom: 0; }
.ws-cap { color: var(--dim); font-size: 12.5px; }
.ws-num { font-family: var(--mono); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ws-warn { color: var(--red); }

.wasted-table .bar-cell { width: 190px; }
.waste-bar { height: 4px; background: var(--panel-3); border-radius: 2px; overflow: hidden; }
.waste-bar > span { display: block; height: 100%; background: var(--red); opacity: .9; }
.empty-state { text-align: center; color: var(--green); padding: 34px; font-size: 14px; }

/* ---------- overlay ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.overlay-card {
  width: min(480px, 90vw); background: var(--bg-soft); border: 1px solid var(--border-strong);
  border-radius: 14px; padding: 26px 28px; box-shadow: var(--shadow);
}
.overlay-title { font-weight: 600; margin-bottom: 14px; letter-spacing: -0.01em; }
.progress-track { height: 6px; background: var(--panel-3); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; width: 6%; background: linear-gradient(90deg, #8a8a8a, #fff); border-radius: 3px; transition: width .3s ease; }
.overlay-text { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-top: 14px; }
.overlay-file { font-family: var(--mono); font-size: 11px; color: var(--dim-2); margin-top: 4px; word-break: break-all; }

/* ---------- footer: hairline top, mono columns, bottom line ---------- */
.site-footer { border-top: var(--hairline); padding: 48px 0 0; background: #050505; }
.footer-inner { display: grid; grid-template-columns: 1.15fr 1.5fr 1fr; gap: 40px; padding-bottom: 44px; }
.footer-title { font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim-2); margin-bottom: 12px; }
.site-footer p, .site-footer li { color: var(--dim); font-size: 12.5px; line-height: 1.65; }
.site-footer ul { margin-left: 16px; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border-strong); }
.site-footer a:hover { border-bottom-color: #fff; }
.footer-bottom { border-top: var(--hairline); padding: 16px 0; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; color: var(--dim-2); }
.footer-bottom a { color: var(--dim); text-decoration: none; }
.footer-bottom a:hover { color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .summary-bar { grid-template-columns: 1fr; gap: 20px; }
  .summary-stats { justify-content: flex-start; flex-wrap: wrap; }
  .layers-layout { grid-template-columns: 1fr; }
  .layer-list-wrap { position: static; max-height: 320px; }
  .wasted-top { grid-template-columns: 1fr; }
  .hero-facts, .how-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 40px); }
  .topnav a:not(.gh-link) { display: none; }
  .topnav { gap: 12px; }
  .summary-stats { gap: 18px; }
  .table td, .table th { padding-left: 8px; padding-right: 8px; }
  .ld-stats { flex-wrap: wrap; }
  .size-bar-cell { display: none; }
  .layer-cmd { max-width: 150px; font-size: 10.5px; }
  .table td, .table th { padding-left: 6px; padding-right: 6px; }
  .hero-term-body { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
