:root {
  color-scheme: dark;
  --bg: #09192c;
  --panel: #11263e;
  --inset: #0b1d32;
  --ink: #f3f7fc;
  --muted: #b8c9dd;
  --line: #3a5570;
  --accent: #93d7ff;
  --signal: #ff9cac;
  --action: #a7ddff;
  font-family: "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.55; }
a { color: var(--accent); text-underline-offset: .22em; }
button, input, select { font: inherit; }
:is(a, button, input, select, summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.shell { width: min(1100px, calc(100% - 2rem)); margin-inline: auto; }
.top { border-top: 3px solid #b31942; border-bottom: 1px solid var(--line); background: var(--inset); }
.bar { min-height: 65px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; padding-block: .65rem; }
.bar a { font-weight: 750; }
.bar span, .eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .12em; }
.bar span, .muted, footer { color: var(--muted); }
.hero { padding-block: clamp(2rem, 7vw, 5rem) 2rem; }
.eyebrow { color: var(--signal); text-transform: uppercase; margin: 0 0 .7rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.5rem, 8vw, 5.25rem); line-height: 1.02; letter-spacing: -.055em; }
.hero > p + p, .hero h1 + p { margin-top: .85rem; max-width: 60ch; font-size: 1.12rem; color: var(--muted); }
.tag { display: inline-block; margin-top: 1rem; padding: .26rem .65rem; border: 1px solid var(--line); border-radius: 3px; color: var(--accent); font: .8rem ui-monospace, monospace; }
.panel { padding: clamp(1rem, 3vw, 1.65rem); border: 1px solid var(--line); border-radius: 6px; background: var(--panel); margin-bottom: 1rem; }
.panel h2 { font-size: 1.25rem; letter-spacing: -.02em; }
.panel h2 + p, .panel summary + p { margin-top: .5rem; }
.control-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; margin-block: 1rem; }
.control-grid label { display: grid; gap: .35rem; color: var(--muted); font-weight: 650; min-width: 0; }
.control-grid input, .control-grid select { min-width: 0; min-height: 44px; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--inset); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.actions a { padding: .35rem .4rem; }
button { min-height: 44px; cursor: pointer; border: 1px solid transparent; border-radius: 4px; padding: .5rem .9rem; background: var(--action); color: #102136; font-weight: 800; }
button:hover { filter: brightness(1.12); }
button.secondary { background: var(--inset); border-color: var(--line); color: var(--ink); }
button:disabled { opacity: .55; cursor: default; }
#notice { margin-top: .7rem; min-height: 1.55em; }
.bytes { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .35rem; margin-top: .8rem; }
.byte { display: grid; justify-items: center; gap: .15rem; padding: .38rem .15rem; border: 1px solid var(--line); border-radius: 4px; background: var(--inset); font-family: ui-monospace, monospace; }
.byte small { color: var(--muted); font-size: .7rem; }
.byte del { color: var(--muted); }
.byte.changed { border-color: var(--signal); color: var(--signal); }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: .8rem; }
.result { color: var(--accent); font-weight: 750; }
.trace { margin: .45rem 0 0; padding: 0; list-style: none; }
.trace li { display: grid; gap: .12rem; padding: .4rem .55rem; border-bottom: 1px solid var(--line); }
.trace li:nth-child(odd) { background: var(--inset); }
.trace code, pre { color: var(--accent); font: .85rem/1.55 ui-monospace, monospace; }
.trace small { color: var(--muted); overflow-wrap: anywhere; }
summary { font-weight: 800; cursor: pointer; }
pre { margin-bottom: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
footer { padding-block: .75rem 2.5rem; font-size: .9rem; }
@media (max-width: 620px) {
  .control-grid, .split { grid-template-columns: 1fr; }
  .bytes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
