:root {
  color-scheme: dark;
  --navy: #f0f4fb;
  --ink: #e5ebf5;
  --muted: #a0aec2;
  --line: #29374c;
  --surface: #121d2e;
  --canvas: #0a1220;
  --blue: #88a9ff;
  --blue-dark: #a1baff;
  --green: #8fddb3;
  --danger: #ff918a;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.shell { width: min(860px, calc(100% - 40px)); margin: 0 auto; }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); text-decoration: none; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: #396ee8; color: #fff; font-size: 16px; }
.brand-muted { color: #91a0b6; font-weight: 500; }
.local-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid #28513f; border-radius: 999px; background: #12271f; color: #a9ddbf; font-size: 12px; font-weight: 600; }
.local-badge span { width: 7px; height: 7px; border-radius: 50%; background: #54cf8e; box-shadow: 0 0 0 3px #214331; }
.intro { padding: 46px 0 27px; }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
h1 { margin: 0; color: var(--navy); font-size: clamp(29px, 5vw, 40px); letter-spacing: -.045em; line-height: 1.15; }
.lede { max-width: 620px; margin: 13px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
form { display: grid; gap: 16px; }
.panel { padding: 26px 28px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 8px 24px rgb(0 0 0 / 12%); }
.section-heading { display: flex; align-items: flex-start; gap: 13px; }
.step { flex: 0 0 29px; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: #1d2d4a; color: var(--blue); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; font-weight: 500; }
h2 { margin: 0; color: var(--navy); font-size: 16px; letter-spacing: -.015em; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; margin: 23px 0 0 42px; }
.field { display: grid; gap: 8px; min-width: 0; color: #d2dbea; font-size: 12px; font-weight: 600; }
.required { margin-left: 5px; color: #9aa9bd; font-size: 10px; font-weight: 500; }
.input-wrap { position: relative; display: flex; }
input[type='password'], input[type='text'], textarea { width: 100%; border: 1px solid #35445a; border-radius: 7px; outline: none; background: #0c1524; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input[type='password'] { height: 42px; padding: 0 58px 0 12px; }
textarea { display: block; min-height: 154px; resize: vertical; padding: 12px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; font-weight: 400; line-height: 1.6; }
input:focus, textarea:focus { border-color: #779bfa; box-shadow: 0 0 0 3px rgb(105 143 239 / 18%); }
input[aria-invalid='true'], textarea[aria-invalid='true'] { border-color: #ee7770; }
.visibility-toggle { position: absolute; top: 0; right: 0; height: 42px; padding: 0 12px; border: 0; background: transparent; color: var(--blue); font-size: 11px; font-weight: 700; }
.field-help { color: #9ba9bd; font-size: 11px; font-weight: 400; line-height: 1.5; }
.error { min-height: 0; color: var(--danger); font-size: 11px; font-weight: 500; }
.section-heading + .field { margin: 23px 0 0 42px; }
.upload-row { min-height: 44px; display: flex; align-items: center; gap: 12px; margin: 15px 0 0 42px; }
.upload-button, .secondary-button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border: 1px solid #3a4960; border-radius: 7px; background: #18253a; color: #dce5f4; font-size: 11px; font-weight: 700; cursor: pointer; transition: background .15s, border-color .15s; }
.upload-button:hover, .secondary-button:hover { border-color: #62748e; background: #202f47; }
.upload-button span { color: var(--blue); font-size: 17px; }
.file-name { overflow: hidden; color: #9ba9bd; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.visually-hidden:focus-visible + .file-name { outline: 2px solid var(--blue); }
.exclude-note { margin: 14px 0 0 42px; color: #9ba9bd; font-size: 11px; line-height: 1.5; }
.exclude-note span { margin-right: 4px; color: var(--blue); }
.form-actions { display: flex; min-height: 45px; align-items: center; justify-content: space-between; gap: 16px; }
.form-error { margin: 0; color: var(--danger); font-size: 12px; }
.primary-button { min-height: 43px; display: inline-flex; align-items: center; gap: 15px; padding: 0 17px; border: 0; border-radius: 7px; background: #396ee8; color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 2px 12px rgb(26 78 193 / 30%); transition: background .15s, transform .15s; }
.primary-button:hover { background: #4b7cf0; transform: translateY(-1px); }
.primary-button:disabled { opacity: .65; cursor: wait; transform: none; }
.results-panel { margin-top: 20px; padding-bottom: 17px; }
.results-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.step-done { background: #19382b; color: var(--green); font-size: 14px; }
.secondary-button { flex-shrink: 0; color: var(--blue); }
.notice { margin: 17px 0 0; padding: 10px 12px; border: 1px solid #66532d; border-radius: 7px; background: #2d2618; color: #f0d28b; font-size: 11px; line-height: 1.5; }
.table-wrap { overflow-x: auto; margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 10px 14px; background: #19263a; color: #9baac0; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
td { padding: 11px 14px; border-top: 1px solid #29374c; font-size: 12px; }
td:first-child { width: 35%; color: #d6dfed; font-weight: 600; }
td:last-child { color: #edf2fa; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; }
footer { display: flex; justify-content: space-between; gap: 15px; padding: 20px 0 34px; color: #94a2b7; font-size: 10px; }
.text-button { padding: 0; border: 0; background: transparent; color: #a6b4c8; font-size: 10px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--blue); }
:focus-visible { outline: 3px solid #8da9f7; outline-offset: 2px; }
[hidden] { display: none !important; }

@media (max-width: 640px) {
  .shell { width: min(100% - 28px, 520px); }
  .topbar { min-height: 66px; }
  .brand { gap: 8px; font-size: 13px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-muted { display: none; }
  .local-badge { padding: 6px 8px; font-size: 10px; }
  .intro { padding: 35px 0 22px; }
  .lede { font-size: 14px; }
  .panel { padding: 21px 17px; }
  .field-grid { grid-template-columns: 1fr; gap: 16px; margin-left: 0; }
  .section-heading + .field, .upload-row, .exclude-note { margin-left: 0; }
  .results-heading { align-items: flex-start; flex-direction: column; }
  footer { align-items: flex-start; flex-direction: column; gap: 9px; }
}
