:root { --ink: #14181f; --muted: #667085; --line: #e4e7ec; --bg: #f5f6f8; --card: #fff; --brand: #087f75; --danger: #c0283f; font: 14px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); }
:root[data-theme="dark"] { --ink: #e7edf2; --muted: #9aa8b4; --line: #2c3742; --bg: #0e1418; --card: #161d24; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --ink: #e7edf2; --muted: #9aa8b4; --line: #2c3742; --bg: #0e1418; --card: #161d24; } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; }
h1, h2 { margin: 0; }
h1 { font-size: 20px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
p { margin: 0; }
code { font-size: 12px; background: color-mix(in srgb, var(--muted) 14%, transparent); padding: 1px 4px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px; background: #0b2724; color: #fff; flex-wrap: wrap; }
.brand { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.logo { color: #5eead4; }
.sub { font-weight: 400; color: #9fb8b4; font-size: 12px; }
.topbar-right { display: flex; gap: 8px; }
.pill { border: 0; font: inherit; background: #22c55e; color: #052e16; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.pill--muted { background: #23433f; color: #e4e7ec; font-weight: 500; }
.pill--warn { background: #fbbf24; color: #3b2800; }
button.pill { cursor: pointer; }
.setup { max-width: 600px; margin: 40px auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: grid; gap: 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
input, select { font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--card); min-width: 0; }
input:focus-visible, select:focus-visible, .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.setup input { flex: 1; }
.btn { font: inherit; font-weight: 600; border: 0; background: var(--brand); color: #fff; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.btn--danger { background: transparent; color: var(--danger); border: 1px solid var(--line); }
.btn--small { padding: 3px 9px; font-size: 12px; }
.hint, .muted { color: var(--muted); font-size: 12.5px; }
.layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; padding: 14px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 12px; align-content: start; }
.panel-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: start; }
.controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.controls input[type="color"] { padding: 0; width: 34px; height: 28px; vertical-align: middle; }
.check { display: inline-flex; gap: 6px; align-items: center; }
.application { display: grid; gap: 16px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0; display: grid; gap: 12px; min-width: 0; }
legend { font-weight: 700; padding: 0 6px; }
.tag { font-weight: 500; font-size: 11px; color: var(--brand); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.postcode-row { display: grid; gap: 4px; max-width: 420px; }
.postcode-row label { font-size: 12.5px; color: var(--muted); }
.postcode-row .row input { flex: 1; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.grid label, .stack label { display: grid; gap: 3px; font-size: 12.5px; color: var(--muted); }
.stack { display: grid; gap: 10px; }
.stack label.check { display: inline-flex; }
.address-card { border: 1px dashed var(--line); border-radius: 10px; padding: 12px; }
.address-card strong { color: var(--ink); }
.side { display: grid; gap: 14px; align-content: start; }
.code { margin: 0; overflow-x: auto; background: #0b1620; color: #d7e3ec; border-radius: 10px; padding: 12px; font-size: 12px; line-height: 1.5; }
.code code { background: none; padding: 0; color: inherit; }
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12px; max-height: 420px; overflow: auto; }
.events li { border-bottom: 1px solid var(--line); padding: 4px 0; overflow-wrap: anywhere; }
.events b { display: block; }
.events .who { color: var(--brand); font-weight: 600; }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: #101828; color: #fff; padding: 10px 14px; border-radius: 10px; max-width: calc(100vw - 32px); }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; padding: 10px; } }
.back { color: #98a2b3; font-weight: 500; font-size: 12.5px; text-decoration: none; margin-right: 6px; }
.back:hover { color: #fff; }
.notice { margin: 14px 14px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 13px; }
