:root {
  color-scheme: light;
  --navy: #102a43;
  --blue: #1769e0;
  --blue-dark: #0d51b8;
  --pale: #edf5ff;
  --line: #d8e2ec;
  --muted: #627d98;
  --danger: #c53030;
  --success: #16845b;
  --surface: #ffffff;
  --background: #f3f7fb;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--navy); background: radial-gradient(circle at top, #e4f0ff, var(--background) 32rem); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { width: min(100%, 680px); margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); }
.brand { display: flex; align-items: center; gap: 11px; margin: 4px 4px 18px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: white; background: var(--blue); font-weight: 800; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 15px; }
.brand span { color: var(--muted); font-size: 12px; margin-top: 1px; }
.progress { position: relative; height: 4px; margin: 0 4px 16px; overflow: hidden; background: #dbe7f3; border-radius: 4px; }
.progress-bar { display: block; width: 33%; height: 100%; background: var(--blue); transition: width .3s ease; }
.card { padding: 26px 22px; background: rgba(255,255,255,.97); border: 1px solid rgba(216,226,236,.9); border-radius: 20px; box-shadow: 0 18px 50px rgba(16,42,67,.08); }
.hidden { display: none !important; }
h1 { margin: 5px 0 8px; letter-spacing: -.025em; font-size: clamp(25px, 7vw, 34px); line-height: 1.12; }
.eyebrow { margin: 0; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lead { margin: 0 0 24px; color: var(--muted); line-height: 1.5; }
form { display: grid; gap: 19px; }
label, legend { font-size: 14px; font-weight: 700; }
label > input, label > select, label > textarea { margin-top: 7px; }
input, select, textarea { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--navy); background: white; border: 1px solid #bcccdc; border-radius: 10px; outline: none; }
textarea { resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,224,.12); }
.optional, .hint { color: var(--muted); font-size: 12px; font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { min-width: 0; padding: 0; border: 0; }
legend { margin-bottom: 9px; }
.choices { display: grid; gap: 8px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choice input, .checks input { position: absolute; opacity: 0; pointer-events: none; }
.choice span, .checks span { display: flex; align-items: center; min-height: 46px; padding: 10px 12px; border: 1px solid #bcccdc; border-radius: 10px; font-weight: 600; }
.choice input:checked + span, .checks input:checked + span { color: var(--blue-dark); border-color: var(--blue); background: var(--pale); box-shadow: inset 0 0 0 1px var(--blue); }
.checks { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.field-error { margin: 7px 0 0; color: var(--danger); font-size: 13px; }
.primary, .secondary { min-height: 50px; padding: 12px 18px; border-radius: 11px; font-weight: 800; }
.primary { width: 100%; color: white; background: var(--blue); border: 0; box-shadow: 0 8px 20px rgba(23,105,224,.2); }
.primary:hover { background: var(--blue-dark); }
.primary:disabled { opacity: .55; cursor: wait; }
.secondary { color: var(--blue-dark); background: white; border: 1px solid #9fb3c8; }
.text-button { display: block; margin: 16px auto 0; padding: 8px; color: var(--muted); background: transparent; border: 0; text-decoration: underline; }
.spinner { width: 52px; height: 52px; margin: 4px 0 20px; border: 5px solid #dceaff; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.test-list { display: grid; gap: 8px; }
.test-item { display: flex; justify-content: space-between; gap: 14px; padding: 12px; background: #f7fafd; border-radius: 9px; font-size: 14px; }
.test-item span:last-child { color: var(--muted); }
.step-icon, .result-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 18px; border-radius: 18px; color: white; background: var(--blue); font-size: 25px; font-weight: 900; }
.result-icon { background: var(--success); }
.result-icon.warning { background: #d97706; }
.instructions { margin: 20px 0 24px; padding-left: 24px; color: #334e68; }
.instructions li { padding: 5px 0 8px 5px; line-height: 1.45; }
.comparison { display: grid; gap: 10px; margin: 22px 0; }
.comparison-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 12px; background: #f7fafd; border-radius: 10px; font-size: 13px; }
.status { min-width: 64px; text-align: center; font-weight: 800; }
.status.ok { color: var(--success); }
.status.fail { color: var(--danger); }
.report-code, .offline-box { margin-top: 20px; padding: 18px; text-align: center; background: var(--pale); border-radius: 14px; }
.report-code span, .report-code strong { display: block; }
.report-code strong { margin: 5px 0 15px; letter-spacing: .12em; font-size: 25px; }
.offline-box { text-align: left; background: #fff7e6; }
.offline-box p { color: #7c5b20; line-height: 1.45; }
footer { padding: 18px 8px 0; color: var(--muted); text-align: center; font-size: 12px; }
.narrow { max-width: 460px; padding-top: 10vh; }
.login-card form { gap: 16px; }
.login-error { display: none; color: var(--danger); font-weight: 700; }
.login-error.visible { display: block; }
.operator-shell { width: min(1180px, 100%); margin: 0 auto; padding: 24px 18px 60px; }
.operator-header { display: flex; justify-content: space-between; align-items: center; }
.operator-header .brand { margin-bottom: 18px; }
.lookup-card { max-width: 680px; }
.lookup-form { display: grid; grid-template-columns: 1fr 150px; gap: 10px; }
.lookup-form input { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.operator-report { margin-top: 28px; }
.report-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.report-heading h2 { margin: 4px 0 0; font-size: clamp(22px, 4vw, 30px); }
.report-meta { color: var(--muted); font-size: 13px; text-align: right; }
.operator-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.operator-grid .card { border-radius: 14px; box-shadow: 0 10px 30px rgba(16,42,67,.06); }
.operator-grid .wide { grid-column: 1 / -1; }
.operator-grid h3 { margin-top: 0; }
dl { display: grid; grid-template-columns: minmax(110px, .7fr) 1.5fr; gap: 9px 14px; margin: 0; font-size: 14px; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.operator-table { overflow-x: auto; }
.operator-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; min-width: 520px; border-top: 1px solid var(--line); }
.operator-row:first-child { border-top: 0; }
.operator-row span { padding: 11px 8px; }
.operator-row.header { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
@media (max-width: 520px) {
  .card { padding: 22px 17px; border-radius: 17px; }
  .field-row, .checks { grid-template-columns: 1fr; }
  .comparison-row { grid-template-columns: 1fr auto; }
  .comparison-row .before { display: none; }
  .lookup-form { grid-template-columns: 1fr; }
  .operator-grid { grid-template-columns: 1fr; }
  .operator-grid .wide { grid-column: auto; }
  .report-heading { display: block; }
  .report-meta { margin-top: 8px; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation-duration: .01ms !important; } }
