:root {
  --navy: #0b2545;
  --navy-soft: #17385f;
  --ink: #172033;
  --muted: #60708a;
  --line: #d6e0ec;
  --surface: #ffffff;
  --background: #f4f7fb;
  --emerald: #087a5b;
  --emerald-soft: #eaf8f3;
  --gold: #b4740f;
  --gold-soft: #fff7e7;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --shadow: 0 20px 48px rgba(16, 33, 56, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #edf3f9 0, var(--background) 360px, #f8fafc 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.public-header { color: white; background: var(--navy); }
.header-inner {
  width: min(1120px, calc(100% - 36px));
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--navy);
  background: white;
  font-weight: 900;
  letter-spacing: -.05em;
}
.eyebrow, .section-kicker {
  margin: 0;
  color: #b8c9df;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.public-header h1 { margin: 2px 0 0; font-size: clamp(1.35rem, 3vw, 1.8rem); line-height: 1.2; }
.public-label {
  margin-left: auto;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  color: #dce8f6;
  font-size: .82rem;
  font-weight: 750;
}

.public-shell { width: min(1120px, calc(100% - 36px)); margin: 34px auto 64px; }
.lookup-card, .list-card, .result-card, .process-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.lookup-card { padding: 26px 30px; }
.list-card { padding: 24px 26px 18px; margin-bottom: 18px; }
.list-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.list-heading h2 { margin: 4px 0 4px; color: var(--navy); font-size: 1.4rem; line-height: 1.25; }
.list-heading p:not(.section-kicker) { margin: 0; color: var(--muted); font-size: .9rem; }
.submission-list { margin-top: 19px; display: grid; gap: 9px; }
.submission-row {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(150px, .85fr) minmax(115px, .62fr) 125px;
  gap: 12px;
  align-items: center;
  background: #fbfcfe;
}
.submission-row:hover { border-color: #a9c1da; background: #f8fbff; }
.submission-company { min-width: 0; }
.submission-company strong, .submission-company small { display: block; overflow-wrap: anywhere; }
.submission-company strong { color: var(--navy); font-size: .95rem; }
.submission-company small { margin-top: 2px; color: var(--navy-soft); font-size: .8rem; letter-spacing: .03em; }
.submission-meta { min-width: 0; display: grid; gap: 1px; }
.submission-meta span { color: var(--muted); font-size: .76rem; }
.submission-meta strong { overflow-wrap: anywhere; color: var(--ink); font-size: .86rem; font-weight: 750; }
.submission-status { justify-self: start; padding: 6px 9px; border-radius: 999px; color: var(--emerald); background: var(--emerald-soft); font-size: .76rem; font-weight: 850; line-height: 1.2; }
.submission-action { min-height: 40px; padding: 8px 10px; border: 0; border-radius: 11px; color: var(--navy); background: #e9eff6; font-size: .84rem; font-weight: 850; }
.submission-action:hover { background: #dce8f4; }
.list-state { margin: 0; padding: 18px 12px; color: var(--muted); text-align: center; }
.list-state.error { color: var(--danger); }
.lookup-card .section-kicker, .result-card .section-kicker { color: var(--gold); }
.lookup-card h2 { margin: 4px 0 7px; color: var(--navy); font-size: clamp(1.3rem, 3vw, 1.75rem); line-height: 1.25; }
.lookup-copy { max-width: 760px; margin: 0; color: var(--muted); }
.lookup-form { margin-top: 22px; display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 12px; align-items: end; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span { color: #344054; font-size: .9rem; font-weight: 850; }
.field b { color: var(--danger); }
input {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 13px;
  color: var(--ink);
  background: white;
  outline: none;
  text-transform: uppercase;
  transition: border-color .18s, box-shadow .18s;
}
input:focus { border-color: #4b77a8; box-shadow: 0 0 0 4px rgba(75,119,168,.13); }
.primary-button, .refresh-button {
  min-height: 50px;
  border: 0;
  border-radius: 13px;
  font-weight: 850;
  transition: filter .18s, transform .18s, opacity .18s;
}
.primary-button { padding: 12px 18px; color: white; background: var(--emerald); }
.refresh-button { padding: 8px 14px; min-height: 40px; color: var(--navy); background: #eef3f8; font-size: .86rem; }
.primary-button:hover, .refresh-button:hover { filter: brightness(1.06); }
.primary-button:active, .refresh-button:active { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: .62; }
.form-error { margin: 16px 0 0; padding: 12px 14px; border: 1px solid #f5c2bc; border-radius: 13px; color: var(--danger); background: var(--danger-soft); }

.result-card { margin-top: 18px; padding: 28px 30px 30px; }
.result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.result-actions { display: flex; align-items: center; gap: 10px; }
.result-heading h2 { margin: 4px 0 3px; color: var(--navy); font-size: clamp(1.45rem, 3.8vw, 2rem); line-height: 1.2; }
.reference-line { margin: 0; color: var(--muted); font-size: 1.05rem; }
.reference-line strong { color: var(--navy-soft); letter-spacing: .04em; }
.status-badge { padding: 9px 15px; border-radius: 999px; color: var(--emerald); background: var(--emerald-soft); font-size: .88rem; font-weight: 900; white-space: nowrap; }
.process-card { margin-top: 26px; padding: 24px 22px 20px; box-shadow: none; }
.process-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.process-heading h3 { margin: 3px 0 0; color: var(--navy); font-size: 1.35rem; }
.stage-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stage-grid article {
  min-width: 0;
  min-height: 126px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: var(--muted);
  background: #fbfcfe;
}
.stage-number { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; color: #667085; background: #e9eef5; font-weight: 900; }
.stage-grid strong, .stage-grid small { display: block; }
.stage-grid strong { color: var(--ink); font-size: .98rem; line-height: 1.35; }
.stage-grid small { margin-top: 5px; font-size: .82rem; line-height: 1.42; }
.stage-grid article.complete { border-color: #bce7d9; background: var(--emerald-soft); }
.stage-grid article.complete .stage-number { color: white; background: var(--emerald); }
.stage-grid article.active { border-color: #edc56f; background: var(--gold-soft); }
.stage-grid article.active .stage-number { color: white; background: var(--gold); }
.result-footer { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.last-update { margin: 0; color: var(--muted); font-size: .86rem; }
.privacy-note { margin: 0; color: var(--muted); font-size: .8rem; text-align: right; }
footer { padding: 0 18px 30px; color: #718096; font-size: .86rem; text-align: center; }

@media (max-width: 900px) {
  .stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  body { font-size: 15px; }
  .header-inner, .public-shell { width: min(100% - 22px, 1120px); }
  .header-inner { min-height: 78px; }
  .public-label { display: none; }
  .lookup-card, .list-card, .result-card { padding: 20px; border-radius: 18px; }
  .lookup-form { grid-template-columns: 1fr; }
  .lookup-form .primary-button { width: 100%; }
  .list-heading, .result-heading, .process-heading, .result-footer { align-items: stretch; flex-direction: column; }
  .result-actions { align-items: stretch; flex-direction: column-reverse; }
  .submission-row { grid-template-columns: 1fr; gap: 8px; }
  .submission-status { justify-self: start; }
  .submission-action { width: 100%; }
  .status-badge { width: fit-content; }
  .process-card { padding: 18px 14px 15px; border-radius: 16px; }
  .stage-grid { grid-template-columns: 1fr; gap: 9px; }
  .stage-grid article { min-height: 0; padding: 14px; }
  .privacy-note { text-align: left; }
  .refresh-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
