:root {
  color-scheme: light;
  --ink: #17233b;
  --muted: #68758e;
  --muted-dark: #506078;
  --line: #e5eaf2;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --primary: #2756c7;
  --primary-dark: #1d429f;
  --primary-soft: #edf2ff;
  --teal: #087c6d;
  --teal-soft: #e5f6f2;
  --red: #b4233b;
  --red-soft: #fff0f2;
  --amber: #9b5c04;
  --amber-soft: #fff5df;
  --shadow: 0 18px 42px rgba(32, 54, 93, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
  line-height: 1.5;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(39, 86, 199, 0.28);
  outline-offset: 2px;
}

.page-shell {
  width: min(100% - 32px, 1080px);
  margin: 0 auto;
  padding: 56px 0 32px;
}

.hero {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 30px;
}

.hero-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid #c9d7ff;
  border-radius: 16px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.eyebrow,
.section-kicker {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 700px;
  margin-bottom: 10px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lookup-panel {
  padding: clamp(24px, 4vw, 38px);
}

.results-panel {
  min-height: 390px;
  margin-top: 22px;
  padding: clamp(24px, 4vw, 38px);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.secure-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.secure-note span {
  font-size: 9px;
}

.field-label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.token-field {
  position: relative;
}

textarea,
input {
  display: block;
  width: 100%;
  min-height: 58px;
  resize: none;
  padding: 16px 78px 16px 17px;
  border: 1px solid #cbd4e3;
  border-radius: 13px;
  color: var(--ink);
  background: #fbfcfe;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea::placeholder,
input::placeholder {
  color: #8994a8;
}

textarea:focus,
input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(39, 86, 199, 0.1);
  outline: none;
}

textarea.invalid,
input.invalid {
  border-color: var(--red);
}

.visibility-button {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 9px;
  border: 1px solid #d6deeb;
  border-radius: 7px;
  color: var(--muted-dark);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
}

.visibility-button:hover {
  color: var(--primary);
  border-color: #b9c8ed;
}

.field-help {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.field-error {
  min-height: 20px;
  margin: 6px 0 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 650;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 750;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button-primary {
  color: white;
  background: var(--primary);
  box-shadow: 0 7px 14px rgba(39, 86, 199, 0.2);
}

.button-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.button-secondary {
  color: var(--muted-dark);
  border-color: #d6deeb;
  background: var(--surface);
}

.button-secondary:hover:not(:disabled) {
  color: var(--primary);
  border-color: #b9c8ed;
}

.button-spinner {
  display: none;
  width: 15px;
  height: 15px;
  margin-left: 9px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.is-loading .button-spinner {
  display: inline-block;
}

.privacy-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 27px;
  padding: 13px 15px;
  border: 1px solid #d9e5ff;
  border-radius: 11px;
  color: #445978;
  background: #f6f8ff;
  font-size: 13px;
}

.privacy-callout p {
  margin: 0;
}

.privacy-callout strong {
  color: var(--ink);
}

.callout-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  color: var(--primary);
  background: #dce6ff;
  font-size: 12px;
  font-weight: 800;
}

.token-guide {
  margin-top: 18px;
  padding: 15px 17px;
  border: 1px solid #dfe5ef;
  border-radius: 12px;
  color: var(--muted-dark);
  background: #fbfcfe;
  font-size: 13px;
}

.token-guide summary {
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
}

.token-guide ol {
  margin: 14px 0 10px;
  padding-left: 22px;
}

.token-guide li {
  margin: 7px 0;
}

.token-guide a {
  color: var(--primary-dark);
  font-weight: 700;
}

.token-guide code,
.token-guide kbd {
  padding: 2px 5px;
  border: 1px solid #d7deea;
  border-radius: 4px;
  color: var(--ink);
  background: #f1f4f9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.guide-warning {
  margin: 0;
  color: var(--amber);
}

.results-heading {
  margin-bottom: 20px;
}

.updated-at {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 252px;
  padding: 26px;
  border: 1px dashed #ced7e6;
  border-radius: 15px;
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  border-radius: 13px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 22px;
  font-weight: 700;
}

.empty-state h3 {
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 17px;
}

.empty-state p {
  max-width: 380px;
  margin-bottom: 0;
  font-size: 14px;
}

.empty-state.is-error {
  border-color: #f0bec8;
  background: #fffafa;
}

.empty-state.is-error .empty-icon {
  color: var(--red);
  background: var(--red-soft);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.summary-card {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfe;
}

.summary-card-total {
  border-color: #d6e0fb;
  background: #f6f8ff;
}

.summary-card-pass {
  border-color: #c7e9e1;
  background: #f3fbf9;
}

.summary-card-fail {
  border-color: #f1d1d7;
  background: #fff8f9;
}

.summary-card-enrolled {
  border-color: #f0ddba;
  background: #fffaf0;
}

.summary-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.summary-value {
  display: block;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.summary-value-text {
  font-size: 15px;
  line-height: 1.25;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: #f8faff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  color: var(--muted-dark);
  font-size: 14px;
}

td:first-child {
  width: 90px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

td:nth-child(2),
td:nth-child(4) {
  width: 120px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
}

td:nth-child(3) {
  min-width: 330px;
  color: var(--ink);
  font-weight: 700;
}

td:nth-child(5) {
  min-width: 210px;
}

td:nth-child(7),
td:nth-child(8),
td:nth-child(9) {
  min-width: 150px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  min-width: 86px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.result-badge.pass {
  color: var(--teal);
  background: var(--teal-soft);
}

.result-badge.fail {
  color: var(--red);
  background: var(--red-soft);
}

.result-badge.pending {
  color: var(--amber);
  background: var(--amber-soft);
}

.page-footer {
  display: flex;
  justify-content: center;
  gap: 9px;
  padding: 24px 0 0;
  color: #8792a5;
  font-size: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 22px, 600px);
    padding-top: 30px;
  }

  .hero {
    gap: 13px;
    margin-bottom: 22px;
  }

  .hero-mark {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .hero-copy {
    font-size: 15px;
  }

  .section-heading {
    display: block;
  }

  .secure-note {
    margin-top: 13px;
  }

  .updated-at {
    margin-top: 10px;
  }

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 470px) {
  .lookup-panel,
  .results-panel {
    padding: 20px 16px;
    border-radius: 17px;
  }

  h1 {
    font-size: 30px;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .summary-grid {
    gap: 8px;
  }

  .summary-card {
    min-height: 84px;
    padding: 13px;
  }

  .summary-label {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .summary-value {
    font-size: 23px;
  }

  .page-footer {
    flex-wrap: wrap;
    text-align: center;
  }
}
