:root {
  --bg: #eff2f8;
  --surface: #fbfcff;
  --ink: #1b2540;
  --muted: #536179;
  --border: #d4dceb;
  --accent: #234da3;
  --tint: #e2ebff;
  --header: #223469;
  --heading: system-ui, sans-serif;
  --on-accent: #fff;
  --danger: #a32c28;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, sans-serif; }
.shell { width: min(1120px, 100% - 48px); margin-inline: auto; }
.masthead { background: var(--header); color: #f5f5fa; }
.head-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.head-inner p { margin: 0; font-size: .82rem; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 750; }
.brand span { border: 1px solid #ffffff60; padding: 4px 7px; border-radius: 5px; font: 700 11px/1.3 ui-monospace, monospace; letter-spacing: .05em; }
main { flex: 1; padding-block: 52px 30px; }
.intro { margin-bottom: 30px; }
h1, h2, p { margin: 0; }
h1 { font: 700 clamp(2rem, 5.6vw, 4.45rem)/1.02 var(--heading); letter-spacing: -.05em; text-wrap: balance; }
.intro p { font-size: clamp(1rem, 2vw, 1.2rem); max-width: 65ch; margin-top: 14px; color: var(--muted); }
h2 { font-size: 1.18rem; line-height: 1.25; }
.drop, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.drop { padding: 28px 18px; text-align: center; border: 1px dashed var(--accent); }
.drop p, .panel-head p, .source p { color: var(--muted); margin: 6px 0 14px; overflow-wrap: anywhere; }
.panel-head p { margin-bottom: 0; }
.drop .primary { margin-right: 5px; }
.file-icon { display: grid; place-items: center; width: 52px; height: 50px; margin: 0 auto 13px; background: var(--tint); color: var(--accent); border-radius: 8px; font: 750 .95rem ui-monospace, monospace; }
.drop.over, .source.over { background: var(--tint); border-color: var(--accent); }
.drop:has(+ :not([hidden])) .file-icon { display: none; }
.panel { margin-top: 16px; padding: 20px; }
.panel-head, .actions, .toolbar, .pager { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.panel-head { align-items: center; justify-content: space-between; margin-bottom: 14px; }
.toolbar { margin-block: 12px; padding-block: 12px; border-block: 1px solid var(--border); }
button, input, select { font: inherit; }
button, input:not([type=file]):not([type=checkbox]), select { min-height: 39px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 7px 11px; }
button { cursor: pointer; font-weight: 650; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled, select:disabled { opacity: .45; cursor: default; }
button.primary { color: var(--on-accent); border-color: var(--accent); background: var(--accent); }
button.primary:hover:not(:disabled) { filter: brightness(.92); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
label { color: var(--muted); font-size: .84rem; }
label > input:not([type=checkbox]), label > select { display: block; margin-top: 4px; max-width: 100%; }
label.field { display: block; margin-top: 12px; }
label.field select { width: 100%; }
.hint { margin: 4px 0 12px; color: var(--muted); font-size: .86rem; }
.status { min-height: 1.5em; margin-top: 12px; color: var(--muted); overflow-wrap: anywhere; }
.status.error, .error { color: var(--danger); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
th { background: var(--tint); color: var(--ink); font-size: .8rem; }
td { vertical-align: top; }
.pager { align-items: center; justify-content: flex-end; margin-top: 12px; }
.pager span { margin-right: auto; color: var(--muted); font-size: .85rem; }
footer { display: flex; justify-content: space-between; gap: 12px; padding-block: 16px 23px; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
footer a { color: var(--accent); text-underline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 580px) {
  .shell { width: calc(100% - 28px); }
  main { padding-top: 31px; }
  .panel { padding: 12px; }
  th, td { padding-inline: 7px; }
}
.inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.source { margin: 0; border-top: 3px solid var(--accent); }
.compare { margin-top: 15px; }
td { min-width: 95px; max-width: 320px; white-space: pre-wrap; }
td:first-child { font-weight: 650; }
@media (max-width: 620px) { .inputs { grid-template-columns: 1fr; } }
