:root {
  --bg: #080b12;
  --surface: rgba(18, 23, 35, 0.86);
  --surface-strong: #151b29;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4f6fb;
  --muted: #929cb1;
  --accent: #f6a94a;
  --accent-2: #73d8c2;
  --positive: #6ee7a8;
  --negative: #ff7e8a;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 50% -20%, #202b43 0, var(--bg) 45%);
  line-height: 1.5;
}
.ambient { position: fixed; width: 30rem; height: 30rem; border-radius: 50%; filter: blur(110px); opacity: .13; pointer-events: none; }
.ambient-one { top: 8rem; left: -18rem; background: var(--accent); }
.ambient-two { right: -18rem; bottom: 0; background: var(--accent-2); }
.masthead, .tabs, main, footer { width: min(1480px, calc(100% - 40px)); margin-inline: auto; }
.masthead { display: flex; align-items: center; gap: 16px; padding: 38px 0 28px; }
.brand-mark { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid rgba(246,169,74,.55); border-radius: 15px; color: #16100a; background: linear-gradient(135deg, #ffd48b, var(--accent)); font-weight: 900; letter-spacing: -.05em; box-shadow: 0 12px 40px rgba(246,169,74,.2); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.45rem, 3vw, 2.15rem); letter-spacing: -.045em; }
h2 { margin-bottom: 8px; font-size: clamp(1.55rem, 3vw, 2.35rem); letter-spacing: -.045em; }
.eyebrow { margin-bottom: 4px; color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.dump-count { margin-left: auto; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(8,11,18,.5); font-size: .82rem; }
.tabs { display: flex; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: rgba(8,11,18,.58); backdrop-filter: blur(16px); }
.tab { flex: 0 0 auto; padding: 10px 18px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font: inherit; font-weight: 750; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: var(--surface-strong); box-shadow: inset 0 0 0 1px var(--line); }
main { padding: 18px 0 48px; }
.panel { display: none; }
.panel.active { display: block; animation: reveal .22s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } }
.panel-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; padding: 30px 4px 24px; }
.panel-heading > div:first-child { max-width: 760px; }
.lede { margin-bottom: 0; color: var(--muted); }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.controls { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(220px, .8fr); gap: 12px; min-width: min(100%, 530px); }
.diff-controls { grid-template-columns: minmax(230px, 1fr) minmax(230px, 1fr) auto; }
label { display: grid; gap: 6px; color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .04em; }
select, input { width: 100%; min-height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; outline: none; color: var(--text); background: #0d121d; font: inherit; font-size: .9rem; }
select:focus, input:focus { border-color: rgba(246,169,74,.6); box-shadow: 0 0 0 3px rgba(246,169,74,.1); }
button.primary { align-self: end; min-height: 43px; padding: 0 19px; border: 0; border-radius: 10px; color: #171006; background: linear-gradient(135deg, #ffd38a, var(--accent)); font: inherit; font-weight: 850; cursor: pointer; }
button.primary:disabled { opacity: .5; cursor: wait; }
.status { margin: 4px 0 18px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--surface); }
.status.loading { color: #f5c982; }
.status.error { color: #ffadb5; border-color: rgba(255,126,138,.25); background: rgba(91,27,38,.28); }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.summary-card { min-height: 102px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, rgba(24,31,47,.94), rgba(13,17,27,.92)); }
.summary-card span { display: block; margin-bottom: 9px; color: var(--muted); font-size: .74rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.summary-card strong { font-size: 1.4rem; letter-spacing: -.035em; }
.summary-card.accent { border-color: rgba(246,169,74,.28); }
.summary-card.accent strong { color: #ffc975; }
.summary-card.positive strong { color: var(--positive); }
.summary-card.negative strong { color: var(--negative); }
.table-shell { overflow: auto; max-height: 68vh; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 24px 80px rgba(0,0,0,.18); }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th { position: sticky; z-index: 1; top: 0; padding: 13px 16px; color: var(--muted); background: #111724; font-size: .69rem; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
td { padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: top; }
tbody tr:hover { background: rgba(255,255,255,.025); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.total { color: #ffc975; font-weight: 800; }
.code-value { color: #addfd4; font-family: "SFMono-Regular", Consolas, monospace; }
.tech-identity { display: flex; align-items: center; min-width: 250px; gap: 12px; }
.tech-identity > span:last-child { display: grid; }
.tech-identity small { margin-top: 2px; color: var(--muted); font-size: .7rem; font-weight: 650; }
.tech-icon { flex: 0 0 auto; width: 42px; height: 42px; border: 1px solid rgba(246,169,74,.22); border-radius: 10px; background: #0c111b; object-fit: contain; box-shadow: 0 7px 22px rgba(0,0,0,.22); }
.tech-icon.placeholder { display: grid; place-items: center; color: #715934; font-size: .65rem; font-weight: 900; }
.config-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
summary { padding: 12px 14px; cursor: pointer; font-size: .84rem; font-weight: 800; }
summary span { float: right; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 13px; }
.chip { padding: 4px 8px; border-radius: 7px; color: var(--muted); background: rgba(255,255,255,.05); font-size: .72rem; }
.chip.changed { color: #ffd28a; background: rgba(246,169,74,.1); }
.chip.added { color: var(--positive); background: rgba(110,231,168,.08); }
.chip.removed { color: var(--negative); background: rgba(255,126,138,.08); }
.empty { color: var(--muted); font-size: .8rem; }
.diff-toolbar { display: flex; align-items: end; gap: 16px; margin: 4px 0 12px; }
.diff-toolbar label { width: min(420px, 100%); }
#diff-visible-count { margin-left: auto; color: var(--muted); font-size: .78rem; }
#diff-table td:nth-child(2) { min-width: 280px; }
#diff-table td:nth-child(4), #diff-table td:nth-child(5) { max-width: 360px; }
.change-kind { display: inline-block; padding: 4px 7px; border-radius: 6px; color: #ffd28a; background: rgba(246,169,74,.1); font-size: .68rem; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.change-kind.added { color: var(--positive); background: rgba(110,231,168,.08); }
.change-kind.removed { color: var(--negative); background: rgba(255,126,138,.08); }
.value { display: block; overflow-wrap: anywhere; color: #c9d1e2; white-space: pre-wrap; }
.value.before { color: #ffb2ba; }
.value.after { color: #9de5c1; }
footer { padding: 0 0 32px; color: #687287; font-size: .76rem; text-align: center; }

@media (max-width: 900px) {
  .panel-heading { display: block; }
  .controls { margin-top: 20px; min-width: 0; }
  .diff-controls { grid-template-columns: 1fr 1fr; }
  .diff-controls button { grid-column: 1 / -1; }
  .config-groups { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .masthead, .tabs, main, footer { width: min(100% - 24px, 1480px); }
  .masthead { padding-top: 24px; }
  .dump-count { display: none; }
  .controls, .diff-controls { grid-template-columns: 1fr; }
  .tab { flex: 1; }
  .panel-heading { padding-top: 24px; }
  td, th { padding: 11px 12px; }
  .diff-toolbar { display: block; }
  #diff-visible-count { display: block; margin-top: 8px; }
}
