* {
  box-sizing: border-box;
}

:root {
  --bg: #070a0f;
  --panel: #10161f;
  --panel-2: #151d28;
  --line: #2a3442;
  --text: #f3f6fa;
  --muted: #8e9bad;
  --accent: #f2c94c;
  --danger: #ff5a5f;
  --success: #51d88a;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(242, 201, 76, 0.08), transparent 32rem),
    linear-gradient(180deg, #0a0e14 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

.page-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 28px 18px 40px;
}

.scanner-card {
  border: 1px solid var(--line);
  background: rgba(16, 22, 31, 0.96);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.agency-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.seal {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: .05em;
}

.eyebrow {
  color: var(--accent);
  font-size: .73rem;
  letter-spacing: .18em;
  font-weight: 800;
}

h1 {
  margin: 4px 0 0;
  font-size: clamp(1.65rem, 5vw, 2.5rem);
}

h2 {
  margin: 14px 0 8px;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  background: #0b1017;
  color: var(--muted);
  font-size: .88rem;
  border-bottom: 1px solid var(--line);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgba(81, 216, 138, .65);
}

.screen {
  display: none;
  padding: 30px 22px;
  text-align: center;
}

.screen.active {
  display: block;
}

.equipment-icon {
  font-size: 4.2rem;
}

.data-panel {
  margin: 24px auto;
  max-width: 520px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel-2);
  text-align: left;
}

.data-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}

.data-row:last-child {
  border-bottom: 0;
}

.data-row span {
  color: var(--muted);
}

.warning-text {
  color: var(--accent);
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  font-weight: 900;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}

.primary-button {
  background: var(--accent);
  color: #121212;
}

.secondary-button {
  background: #263244;
  color: var(--text);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.fine-print {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.5;
}

.scanner-animation {
  width: 150px;
  height: 150px;
  margin: 10px auto 24px;
  position: relative;
  display: grid;
  place-items: center;
}

.scan-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid #263244;
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}

.scan-core {
  width: 102px;
  height: 102px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #0b1017;
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 1.7rem;
  font-weight: 900;
}

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

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 99px;
  overflow: hidden;
  background: #05080c;
  border: 1px solid var(--line);
  margin: 22px 0;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width .35s ease;
}

.scan-log {
  text-align: left;
  max-width: 560px;
  margin: 0 auto;
  min-height: 150px;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  color: #aeb9c8;
  font-size: .83rem;
  line-height: 1.7;
}

.log-line::before {
  content: "> ";
  color: var(--accent);
}

.result-badge {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 90, 95, .13);
  color: var(--danger);
  border: 1px solid rgba(255, 90, 95, .35);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .1em;
}

.score-wrap {
  margin: 24px 0 8px;
}

.score-label {
  display: block;
  color: var(--muted);
  font-size: .73rem;
  letter-spacing: .16em;
  font-weight: 800;
}

.score {
  display: inline-block;
  font-size: clamp(4.5rem, 18vw, 7rem);
  line-height: 1;
  font-weight: 950;
}

.score-out-of {
  color: var(--muted);
  font-weight: 700;
}

.result-text {
  max-width: 560px;
  margin: 0 auto 22px;
  color: #c6ced9;
  line-height: 1.6;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 24px 0;
}

.metric-card {
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent);
}

.metric-label {
  margin-top: 5px;
  color: var(--muted);
  font-size: .72rem;
}

.citation-box {
  text-align: left;
  margin: 26px 0;
  padding: 17px;
  border-left: 4px solid var(--accent);
  background: #0b1017;
}

.citation-label {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.citation-box p {
  margin-bottom: 0;
  line-height: 1.55;
}

.button-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

footer {
  color: #667386;
  text-align: center;
  font-size: .76rem;
  padding: 20px 10px 0;
}

@media (max-width: 560px) {
  .metrics {
    grid-template-columns: 1fr;
  }

  .agency-row {
    align-items: flex-start;
  }

  .seal {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
  }
}
