:root {
  --paper: oklch(0.96 0.01 95);
  --paper-deep: oklch(0.91 0.012 95);
  --paper-light: oklch(0.985 0.004 95);
  --ink: oklch(0.23 0.02 248);
  --ink-2: oklch(0.36 0.016 248);
  --ink-dim: oklch(0.55 0.012 248);
  --ink-faint: oklch(0.72 0.01 248);
  --forest: oklch(0.45 0.07 180);
  --terracotta: oklch(0.62 0.1 40);
  --ochre: oklch(0.74 0.09 86);
  --panel: oklch(0.99 0.004 95 / 0.8);
  --panel-strong: oklch(0.985 0.004 95 / 0.94);
  --rule: oklch(0.23 0.02 248 / 0.16);
  --rule-soft: oklch(0.23 0.02 248 / 0.1);
  --shadow-lg: 0 28px 70px -28px oklch(0.23 0.02 248 / 0.22);
  --shadow-md: 0 16px 40px -24px oklch(0.23 0.02 248 / 0.18);
  --valid-bg: #e5f2eb;
  --valid-border: #9bcab0;
  --warning-bg: #fff0dc;
  --danger-bg: #fde6e2;
  --danger-border: #ebb0a5;
  --danger: #a83a2a;
  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, oklch(0.9 0.03 190 / 0.4), transparent 28%),
    radial-gradient(circle at 85% 12%, oklch(0.88 0.025 75 / 0.42), transparent 22%),
    linear-gradient(180deg, oklch(0.98 0.004 95) 0%, var(--paper) 46%, oklch(0.94 0.008 95) 100%);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.24;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 1600px;
  margin: 0 auto;
}

nav,
footer {
  width: calc(100% - 96px);
  margin: 24px auto 0;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  background: var(--panel);
  border: 1px solid oklch(1 0 0 / 0.58);
  border-radius: 24px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-md);
}

footer {
  margin: 0 auto 24px;
  padding: 16px 24px 18px;
  font-size: 13px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 26px;
  color: var(--ink);
  text-decoration: none;
}

.brand .dot {
  width: 26px;
  height: 18px;
  position: relative;
}

.brand .dot svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.brand .dot svg path,
.brand .dot svg rect {
  fill: var(--forest);
}

.brand .dot .arch {
  fill: none;
  stroke: var(--forest);
  stroke-width: 2;
  stroke-linecap: round;
}

.brand em {
  font-style: italic;
  color: var(--forest);
}

.nav-center {
  display: flex;
  gap: 32px;
  justify-content: center;
  color: var(--ink-2);
}

.nav-center a {
  color: inherit;
  text-decoration: none;
  padding: 10px 0;
  font-weight: 500;
}

.nav-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--ink-dim);
  font-size: 13px;
}

.clock {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
}

.clock em {
  font-style: italic;
  color: var(--ink-dim);
  font-size: 14px;
  margin-left: 6px;
}

.main-shell {
  padding: 32px 48px 56px;
}

.hero-panel,
.panel,
.result-panel {
  background:
    linear-gradient(135deg, oklch(1 0 0 / 0.72), oklch(1 0 0 / 0.44)),
    linear-gradient(180deg, oklch(0.99 0.004 95 / 0.82), oklch(0.97 0.006 95 / 0.92));
  border: 1px solid oklch(1 0 0 / 0.62);
  border-radius: 32px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.hero-panel {
  width: 100%;
  min-width: 0;
  min-height: 420px;
  padding: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.68fr);
  gap: 30px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 18px;
  padding: 9px 16px 9px 10px;
  border: 1px solid var(--rule-soft);
  border-radius: 999px;
  background: var(--panel-strong);
  box-shadow: 0 10px 30px -24px oklch(0.23 0.02 248 / 0.24);
}

.eyebrow .pip {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--forest);
  box-shadow: inset 0 0 0 4px oklch(0.96 0.01 95 / 0.45);
}

.eyebrow em {
  font-style: italic;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
}

h1,
.panel h2,
.result-panel h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.3rem, 4.6vw, 5.4rem);
  line-height: 0.9;
  max-width: 880px;
  text-wrap: balance;
}

.panel h2,
.result-panel h2 {
  font-size: clamp(1.65rem, 2vw, 2.35rem);
  line-height: 1;
}

.lede {
  margin: 18px 0 0;
  max-width: 620px;
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.48;
  color: var(--ink-2);
}

.lookup-card {
  min-width: 0;
  padding: 24px;
  border-radius: 28px;
  background: var(--panel-strong);
  border: 1px solid oklch(1 0 0 / 0.62);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.5), var(--shadow-md);
  display: grid;
  gap: 14px;
}

.plate-label,
.section-kicker {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.plate-wrap {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: 54px 1fr;
  min-height: 104px;
  border-radius: 18px;
  overflow: hidden;
  border: 3px solid oklch(0.19 0.02 248);
  box-shadow: 0 18px 42px -28px oklch(0.23 0.02 248 / 0.55);
}

.plate-band {
  display: grid;
  place-items: center;
  background: #174fbb;
  color: white;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0;
}

.plate-input,
.display-plate {
  min-width: 0;
  width: 100%;
  border: 0;
  background: #ffd92e;
  color: #171717;
  font-family: var(--mono);
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: clamp(2.1rem, 4.4vw, 4rem);
}

.plate-input:focus {
  outline: 4px solid oklch(0.45 0.07 180 / 0.32);
  outline-offset: -4px;
}

.btn {
  padding: 15px 22px 15px 24px;
  border-radius: 18px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--ink), oklch(0.28 0.025 235));
  color: var(--paper-light);
  box-shadow: 0 18px 32px -18px oklch(0.23 0.02 248 / 0.48);
}

.btn-primary:disabled {
  cursor: wait;
  opacity: 0.75;
}

.btn .arrow {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper-light);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 13px;
}

.status-chip {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid var(--rule-soft);
  background: var(--panel-strong);
}

.status-chip.good {
  color: var(--forest);
}

.status-chip.warn {
  color: var(--terracotta);
}

.dot-state {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: currentColor;
}

.content-grid,
.details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
  gap: 22px;
  margin-top: 22px;
}

.panel,
.result-panel {
  padding: 26px;
}

.service-copy,
.muted {
  color: var(--ink-dim);
}

.service-copy {
  margin: 1rem 0 0;
  line-height: 1.62;
}

.result-panel {
  margin-top: 22px;
}

.vehicle-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.38fr);
  gap: 24px;
  align-items: center;
}

.display-plate {
  display: grid;
  place-items: center;
  min-height: 96px;
  border: 3px solid oklch(0.19 0.02 248);
  border-radius: 18px;
  padding: 6px 16px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.status-card,
.detail-list div {
  padding: 16px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid oklch(1 0 0 / 0.56);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.54);
}

.status-card strong {
  display: block;
  font-size: clamp(1.25rem, 2vw, 2rem);
  line-height: 1.05;
  color: var(--ink);
}

.status-card.state-valid {
  background: var(--valid-bg);
  border-color: var(--valid-border);
}

.status-card.state-overdue {
  background: var(--danger-bg);
  border-color: var(--danger-border);
}

.status-card.state-unknown {
  background: var(--warning-bg);
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 1rem 0 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: minmax(130px, 0.5fr) 1fr;
  gap: 16px;
}

.detail-list dt {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.detail-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  text-align: right;
}

.error-text {
  margin: 0;
  color: var(--danger);
  font-weight: 700;
}

footer .left,
footer .right {
  color: var(--ink-2);
}

footer .right {
  justify-self: end;
}

footer .ticker {
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

footer .ticker-track {
  display: inline-flex;
  gap: 36px;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink-2);
  animation: tick 34s linear infinite;
}

footer .ticker-track em {
  font-style: italic;
  color: var(--forest);
}

footer .ticker-track .sep {
  color: var(--ink-faint);
}

@keyframes tick {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .hero-panel,
  .content-grid,
  .details-grid,
  .vehicle-hero {
    grid-template-columns: 1fr;
  }

  .status-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  nav,
  footer {
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 14px;
    gap: 10px;
  }

  .nav-center {
    gap: 18px;
    overflow-x: auto;
    width: 100%;
    justify-content: flex-start;
  }

  .nav-right,
  footer .right {
    justify-self: start;
  }

  .main-shell {
    padding: 18px 12px 34px;
    overflow: hidden;
  }

  .hero-panel,
  .panel,
  .result-panel {
    padding: 18px;
    border-radius: 24px;
  }

  .hero-panel {
    display: block;
    max-width: calc(100vw - 24px);
    min-height: 0;
  }

  .lookup-card {
    width: 100%;
    max-width: 100%;
    margin-top: 22px;
    justify-items: center;
  }

  .lede {
    max-width: 28ch;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 2.75rem);
  }

  .lookup-card {
    padding: 16px;
  }

  .plate-wrap {
    width: min(100%, 294px);
    grid-template-columns: 40px minmax(0, 1fr);
    min-height: 82px;
    border-width: 2px;
  }

  .lookup-card .btn {
    width: min(100%, 294px);
  }

  .plate-input,
  .display-plate {
    font-size: clamp(1.55rem, 8vw, 2.15rem);
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .detail-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .detail-list dd {
    text-align: left;
  }

  footer .ticker {
    display: none;
  }
}
