@font-face {
  font-family: Inter;
  src: url('/inter.woff2') format('woff2');
  font-display: swap;
  font-weight: 100 900;
}
:root {
  color-scheme: dark;
  --back: #101725;
  --panel: #172235;
  --navy: #111b2c;
  --edge: #33435d;
  --paper: #edf5ff;
  --muted: #afbfda;
  --ice: #9ce3ff;
  --active: #b8edff;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* {box-sizing: border-box}
[hidden] {display: none !important}
body {margin: 0; background: var(--back); color: var(--paper); font: 500 1rem/1.55 Inter, system-ui, sans-serif}
a {color: var(--ice); text-underline-offset: .24em}
button, input {font: inherit}
button {cursor: pointer}
button:disabled {cursor: default; opacity: .55}
:focus-visible {outline: 2px solid #a3eaff; outline-offset: 3px}
.shell {width: min(1130px, calc(100% - 52px)); margin: 0 auto}
.masthead, .footer {display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 0; font-size: .82rem}
.brand {display: inline-flex; align-items: center; gap: 8px; font-weight: 820; color: var(--paper); text-decoration: none}
.mark {display: grid; place-items: center; width: 28px; height: 28px; border-radius: 5px; background: var(--ice); color: #162a3d; font: 850 .7rem var(--mono)}
.intro {display: flex; justify-content: space-between; align-items: end; gap: 15px; border: 1px solid #466080; border-radius: 11px; background: radial-gradient(ellipse at 90% 5%, #31598b, #182c4c 59%); padding: clamp(19px,4vw,49px); margin-bottom: 12px}
h1 {margin: 0; font-size: clamp(3.45rem,9vw,7.2rem); line-height: .88; letter-spacing: -.067em; word-spacing: .085em; font-weight: 840}
h1 em {font-style: normal; color: var(--ice)}
.intro p {color: #d3e7fc; max-width: 51ch; margin: 14px 0 0}
.signature {display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px}
.signature span {width: clamp(27px,4vw,53px); height: clamp(31px,4.5vw,60px); display: grid; place-items: center; color: #bfd5ee; background: #15263d; border: 1px solid #6280a7; border-radius: 5px; font: 700 clamp(.9rem,2vw,1.4rem) var(--mono)}
.signature span:nth-child(2), .signature span:nth-child(3) {color: #172f43; background: var(--active); border-color: var(--active)}
.workspace {display: grid; grid-template-columns: minmax(230px,.6fr) minmax(0,1fr); gap: 12px}
.panel {min-width: 0; border: 1px solid var(--edge); border-radius: 9px; background: var(--panel); padding: clamp(11px,2vw,20px)}
.panel-head {display: flex; align-items: start; justify-content: space-between; gap: 9px; margin-bottom: 9px}
h2 {margin: 0; font-size: 1.12rem; letter-spacing: -.03em}
label {display: block; margin: 8px 0 3px; font-size: .79rem; color: #c9d8ef; font-weight: 720}
input:not([type=checkbox]) {min-width: 0; min-height: 38px; width: 100%; border: 1px solid #546885; border-radius: 5px; background: var(--navy); padding: 6px 9px; color: var(--paper); font-family: var(--mono)}
.check {display: flex; align-items: center; gap: 5px; line-height: 1.3; margin-top: 12px}
.check input {accent-color: var(--ice); width: 15px; height: 15px}
.help, .error {margin: 5px 0 0; font-size: .78rem; color: var(--muted); overflow-wrap: anywhere}
.help:empty {display: none}
.error {color: #ffc0b6; font-weight: 740}
button, .cta {min-height: 36px; padding: 5px 9px; border: 1px solid #506684; border-radius: 5px; background: #1b2940; color: #d9ecff; font-size: .78rem; font-weight: 760}
button:hover:not(:disabled) {background: #284361}
.presets {display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px}
.presets button {min-width: 42px; min-height: 31px; font-family: var(--mono)}
.presets button[aria-pressed=true] {color: #183046; background: var(--active); border-color: var(--active)}
dl {display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin: 0}
dl div {min-width: 0; border: 1px solid #42546d; border-radius: 6px; padding: 7px 9px; background: var(--navy)}
dl .wide {grid-column: 1/-1}
dt {color: var(--muted); font-size: .73rem; font-weight: 710}
dd {margin: 3px 0 0; color: #d6f2ff; font: 740 clamp(.83rem,2.1vw,1.36rem)/1.35 var(--mono); overflow-wrap: anywhere}
.wide dd {font-size: .88rem}
.bits-panel {grid-column: 1/-1}
#bit-count {color: var(--ice); font: 700 .77rem/1.5 var(--mono); white-space: nowrap}
.bits {display: flex; flex-wrap: wrap; gap: 11px; align-items: start}
.byte {display: flex; flex-wrap: nowrap; gap: 3px}
.bit {width: clamp(29px,3.6vw,42px); min-height: 46px; flex-shrink: 0; display: grid; place-content: center; justify-items: center; padding: 3px 0; color: #adc9e4; background: #122036; font: 740 1rem/1.1 var(--mono)}
.bit[aria-pressed=true] {background: #b8edff; color: #142f46; border-color: #b8edff}
.bit[aria-pressed=true]:hover {background: #a5dcfa}
.bit small {font-size: .62rem; margin-top: 4px}
.footer {margin-top: 24px; border-top: 1px solid var(--edge)}
.guide {max-width: 710px; margin: 48px auto}
.guide h1 {font-size: clamp(3rem,8vw,6.3rem); margin-bottom: 26px}
.guide h2 {margin: 22px 0 6px}
.guide p {color: var(--muted)}
.guide code {color: var(--ice); font-family: var(--mono)}
.cta {display: inline-flex; align-items: center; margin-top: 8px; text-decoration: none}
@media (max-width: 710px) {
  .workspace {grid-template-columns: minmax(0,1fr)}
  .intro {align-items: start}
  .signature {grid-template-columns: repeat(2, 1fr)}
}
@media (max-width: 440px) {
  .shell {width: calc(100% - 24px)}
  h1 {font-size: clamp(2.7rem,12vw,4.4rem)}
  .intro {padding: 20px 13px}
  .signature {display: none}
  .masthead, .footer {font-size: .75rem}
  .bit {width: 29px}
}
