/* CheckFair — UK private-buyer vehicle check (demo) */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --brand: #0b6e4f;
  --brand-dark: #085540;
  --brand-soft: #e6f5ef;
  --accent: #1d4ed8;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --ok: #047857;
  --ok-bg: #ecfdf5;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.06);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--brand); }

img { max-width: 100%; }

.container {
  width: min(960px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Demo banner */
.demo-banner {
  background: #1e293b;
  color: #f8fafc;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.demo-banner span {
  color: #fbbf24;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.15rem;
}
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--brand), #14966c);
  color: white;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(11, 110, 79, 0.35);
}
.header-tag {
  font-size: 0.8rem;
  color: var(--muted);
  display: none;
}
@media (min-width: 640px) {
  .header-tag { display: block; }
}

/* Hero */
.hero {
  padding: 2.25rem 0 1.5rem;
}
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem 1.5rem;
  overflow: hidden;
  position: relative;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), #22c55e 60%, #38bdf8);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}
.hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero-lead {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 38rem;
}

/* Check form */
.check-form {
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 640px) {
  .check-form {
    grid-template-columns: 1.2fr 0.9fr auto;
    align-items: end;
  }
}
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.field input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 1.05rem;
  font-family: inherit;
  background: #fafbfc;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 110, 79, 0.15);
  background: white;
}
.field input.reg-input {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 1.15rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand);
  color: white;
  width: 100%;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.btn-secondary:hover { background: #d2eee3; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: #f8fafc; color: var(--ink); }

.form-hint {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Demo chips */
.demo-regs {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px dashed var(--border);
}
.demo-regs h2 {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  appearance: none;
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.chip:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.chip strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
  margin-right: 0.35rem;
}
.chip span { color: var(--muted); }

/* Value props */
.features {
  display: grid;
  gap: 0.85rem;
  padding: 1.5rem 0 2rem;
}
@media (min-width: 700px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.1rem;
}
.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  margin-bottom: 0.65rem;
  background: var(--brand-soft);
}
.feature h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}
.feature p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Report page */
.report-wrap { padding: 1.25rem 0 2.5rem; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.back-link:hover { color: var(--brand); }

.plate {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f7c948;
  color: #111;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 1.35rem;
  padding: 0.45rem 0.85rem 0.45rem 0.55rem;
  border-radius: 6px;
  border: 2px solid #111;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.plate-gb {
  background: #003399;
  color: white;
  font-size: 0.65rem;
  letter-spacing: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 0.35rem 0.15rem;
  border-radius: 3px;
  font-weight: 700;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.identity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.2rem;
  margin-bottom: 1rem;
}
.identity-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.identity-card h1 {
  margin: 0.35rem 0 0.15rem;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  letter-spacing: -0.02em;
}
.identity-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}
@media (min-width: 640px) {
  .spec-grid { grid-template-columns: repeat(3, 1fr); }
}
.spec {
  background: #f8fafc;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
}
.spec dt {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}
.spec dd {
  margin: 0.15rem 0 0;
  font-weight: 700;
  font-size: 0.98rem;
}

.generated-note {
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}

.section-title {
  margin: 1.35rem 0 0.7rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.cards {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 700px) {
  .cards.two { grid-template-columns: 1fr 1fr; }
}

.status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
}
.status-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-flag { background: var(--danger-bg); color: var(--danger); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.status-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.status-card .extra {
  margin-top: 0.55rem;
  font-size: 0.85rem;
  color: var(--ink);
}

.mot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}
.mot-table th,
.mot-table td {
  text-align: left;
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid var(--border);
}
.mot-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
}

/* Fairness */
.fairness-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.15rem;
  margin-top: 0.25rem;
}
.verdict-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.verdict-pill {
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
}
.verdict-cheap { background: #dbeafe; color: #1e40af; }
.verdict-fair { background: var(--ok-bg); color: var(--ok); }
.verdict-dear { background: var(--warn-bg); color: var(--warn); }
.band-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.band {
  text-align: center;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.4rem;
}
.band .label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}
.band .value {
  display: block;
  font-weight: 800;
  font-size: 1.05rem;
  margin-top: 0.2rem;
}
.band.ask {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.reasons {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.reasons li { margin-bottom: 0.35rem; }

.price-prompt {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: end;
  margin-top: 0.5rem;
}
.price-prompt .field { flex: 1 1 160px; }

/* Message assist */
.message-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  margin-top: 0.25rem;
}
.message-card p.lead {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.message-box {
  width: 100%;
  min-height: 220px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
  resize: vertical;
  background: #fafbfc;
  color: var(--ink);
}
.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: center;
}
.copy-toast {
  font-size: 0.85rem;
  color: var(--ok);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
}
.copy-toast.show { opacity: 1; }

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.25rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.site-footer p { margin: 0 0 0.4rem; }
.site-footer strong { color: var(--ink); }

.error-box {
  background: var(--danger-bg);
  border: 1px solid #fecaca;
  color: var(--danger);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

.hidden { display: none !important; }
