/* Kerbside — design system.
   Deliberately not the default "AI site" look: no purple gradient, no cream +
   serif editorial styling, no Inter. Ink navy, warm grey paper, one confident
   green that is only ever used for money and forward motion. */

:root {
  --ink:        #101820;
  --ink-2:      #2B3742;
  --ink-3:      #5A6773;
  --ink-4:      #8B96A0;
  --line:       #DEDAD3;
  --line-2:     #EAE7E1;
  --paper:      #F6F4F0;
  --paper-2:    #FFFFFF;
  --green:      #00874C;
  --green-2:    #00A85E;
  --green-pale: #E6F3EC;
  --amber:      #A8620A;
  --amber-pale: #FBF0E2;
  --red:        #A32020;
  --red-pale:   #FBEBEB;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 32, .06), 0 8px 24px rgba(16, 24, 32, .06);
  --shadow-lg: 0 2px 4px rgba(16, 24, 32, .08), 0 20px 48px rgba(16, 24, 32, .12);
  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }
a  { color: var(--green); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 740px; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.tiny  { font-size: .8125rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* ------------------------------------------------------------- header --- */
.site-header {
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 60;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 66px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
  color: #fff;
  text-decoration: none;
}
.logo-mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--green-2);
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.site-nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.site-nav a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 500;
}
.site-nav a:hover { color: #fff; }
.site-nav .phone { font-variant-numeric: tabular-nums; font-weight: 700; color:#fff; }
@media (max-width: 720px) {
  .site-nav a:not(.phone) { display: none; }
}

/* --------------------------------------------------------------- hero --- */
.hero {
  background:
    radial-gradient(1100px 420px at 78% -8%, rgba(0,168,94,.16), transparent 62%),
    var(--ink);
  color: #fff;
  padding: 64px 0 76px;
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lede {
  font-size: 1.1875rem;
  color: rgba(255,255,255,.78);
  max-width: 46ch;
  margin-bottom: 28px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 40px 0 48px; }
}

.trust-row {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  margin-top: 26px; padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.14);
}
.trust-row span {
  font-size: .875rem; color: rgba(255,255,255,.72);
  display: flex; align-items: center; gap: 7px;
}
.trust-row svg { flex: 0 0 auto; }

/* -------------------------------------------------------- reg capture --- */
.reg-card {
  background: var(--paper-2);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}
.reg-card h2 { font-size: 1.25rem; margin-bottom: 4px; }

/* The UK numberplate. Recognisable enough that people know what to type. */
.plate {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--ink);
  border-radius: 9px;
  overflow: hidden;
  background: #FFD400;
  margin: 14px 0 12px;
  transition: box-shadow .15s;
}
.plate:focus-within { box-shadow: 0 0 0 4px rgba(0,135,76,.24); }
.plate-flag {
  width: 46px;
  background: #0B3C8C;
  color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  font-size: .6875rem; font-weight: 700; letter-spacing: .06em;
  flex: 0 0 auto;
}
.plate input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font-family: var(--mono);
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px 8px;
  color: #101820;
  min-height: 68px;
}
.plate input::placeholder { color: rgba(16,24,32,.34); }

/* ------------------------------------------------------------ buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 0; border-radius: var(--r);
  padding: 15px 26px;
  font: inherit; font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  transition: background .14s, transform .06s, box-shadow .14s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-2); }
.btn-primary:disabled { background: var(--ink-4); cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-lg { padding: 17px 30px; font-size: 1.0625rem; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink-4); background: var(--paper-2); }
.btn-dark { background: var(--ink); color: #fff; }

/* -------------------------------------------------------------- cards --- */
.card {
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 26px;
}
.card + .card { margin-top: 18px; }
.card-tight { padding: 18px; }

.section { padding: 64px 0; }
.section-tint { background: var(--paper-2); border-block: 1px solid var(--line-2); }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 26px;
  counter-reset: step;
}
.step { counter-increment: step; }
.step::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--ink); color: #fff;
  font-weight: 700; font-size: 1rem;
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--ink-3); margin: 0; font-size: .9375rem; }

/* --------------------------------------------------------- valuation --- */
.value-layout {
  display: grid;
  grid-template-columns: 1fr 348px;
  gap: 32px;
  align-items: start;
  padding: 34px 0 72px;
}
@media (max-width: 940px) {
  .value-layout { grid-template-columns: 1fr; }
  .offer-rail { position: static !important; order: -1; }
}

.offer-rail { position: sticky; top: 90px; }
.offer-box {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.offer-label {
  font-size: .8125rem; text-transform: uppercase;
  letter-spacing: .09em; font-weight: 700;
  color: rgba(255,255,255,.62);
}
.offer-figure {
  font-size: clamp(1.9rem, 5.4vw, 2.6rem);
  font-weight: 800; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin: 6px 0 4px;
  line-height: 1.05;
}
.offer-blurb { font-size: .875rem; color: rgba(255,255,255,.7); margin: 0; }

.confidence { margin-top: 18px; }
.confidence-track {
  height: 7px; border-radius: 99px;
  background: rgba(255,255,255,.16);
  overflow: hidden;
}
.confidence-fill {
  height: 100%; border-radius: 99px;
  background: var(--green-2);
  transition: width .45s cubic-bezier(.2,.7,.2,1);
}
.confidence-note {
  font-size: .8125rem; color: rgba(255,255,255,.66); margin-top: 9px;
}

/* -------------------------------------------------- condition sliders --- */
.condition-item + .condition-item {
  margin-top: 12px; padding-top: 26px; border-top: 1px solid var(--line-2);
}
.condition-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin-bottom: 12px;
}
.condition-head h3 { margin: 0; font-size: 1.0625rem; }
.grade-pill {
  font-size: .8125rem; font-weight: 700;
  padding: 3px 11px; border-radius: 99px;
  background: var(--paper); color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.grade-pill[data-tone="good"] { background: var(--green-pale); color: var(--green); border-color: transparent; }
.grade-pill[data-tone="poor"] { background: var(--amber-pale); color: var(--amber); border-color: transparent; }

/* The stage is capped and centred rather than run full-bleed, so the square
   photograph sizes the box instead of floating in the middle of a wide one. */
.condition-stage {
  background: linear-gradient(180deg, #F0EEEA, #E4E1DB);
  border-radius: var(--r);
  border: 1px solid var(--line);
  padding: 10px;
  display: grid; place-items: center;
  min-height: 176px;
  max-width: 460px;
  margin-inline: auto;
}
.condition-stage svg { width: 100%; max-width: 340px; height: auto; display: block; }

/* Photo stage. The five frames are stacked and cross-faded, so the seller sees
   one picture change rather than five pictures flicker. */
.condition-stage.is-photo {
  padding: 0;
  overflow: hidden;
  background: #DDD9D3;
  min-height: 0;
}
/* Fills the stage edge to edge — capping the stack instead of the stage left a
   grey bar down each side of every photograph. */
.photo-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}
.photo-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity .22s ease;
}
.photo-frame.is-on { opacity: 1; }
/* Without this the browser paints nothing until a frame loads, and the stage
   collapses to a grey box on a slow connection. */
.photo-stack::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #E8E5E0, #D6D2CB);
}

/* Damage layers are always present; the grade decides which are visible. */
.dmg { opacity: 0; transition: opacity .28s ease; }
[data-grade="4"] .dmg-4,
[data-grade="3"] .dmg-4, [data-grade="3"] .dmg-3,
[data-grade="2"] .dmg-4, [data-grade="2"] .dmg-3, [data-grade="2"] .dmg-2,
[data-grade="1"] .dmg-4, [data-grade="1"] .dmg-3, [data-grade="1"] .dmg-2,
[data-grade="1"] .dmg-1 { opacity: 1; }

.slider-row { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.slider-row .end { font-size: .75rem; color: var(--ink-4); font-weight: 600; white-space: nowrap; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 34px; background: transparent; cursor: grab; margin: 0;
}
input[type="range"]:active { cursor: grabbing; }
input[type="range"]::-webkit-slider-runnable-track {
  height: 7px; border-radius: 99px;
  background: linear-gradient(90deg, var(--amber) 0%, var(--line) 42%, var(--green-2) 100%);
}
input[type="range"]::-moz-range-track {
  height: 7px; border-radius: 99px;
  background: linear-gradient(90deg, var(--amber) 0%, var(--line) 42%, var(--green-2) 100%);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px; height: 30px; margin-top: -11.5px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--ink);
  box-shadow: 0 2px 8px rgba(16,24,32,.24);
}
input[type="range"]::-moz-range-thumb {
  width: 30px; height: 30px;
  border-radius: 50%; background: #fff;
  border: 2.5px solid var(--ink);
  box-shadow: 0 2px 8px rgba(16,24,32,.24);
}
input[type="range"]:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }

.grade-caption {
  margin-top: 10px; font-size: .9375rem; color: var(--ink-2);
  min-height: 2.9em;
}

/* -------------------------------------------------------------- forms --- */
label { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: 6px; }
.field + .field { margin-top: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

input[type="text"], input[type="email"], input[type="tel"],
input[type="number"], select, textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: var(--paper-2);
  font: inherit; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,135,76,.16);
}
.hint { font-size: .8125rem; color: var(--ink-3); margin-top: 5px; }
.error { color: var(--red); font-size: .875rem; margin-top: 6px; }

.choice-grid { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: var(--paper-2);
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.choice:hover { border-color: var(--ink-4); }
.choice input { margin: 3px 0 0; accent-color: var(--green); flex: 0 0 auto; }
.choice-body { flex: 1; }
.choice strong { display: block; font-weight: 600; }
.choice span { font-size: .875rem; color: var(--ink-3); }
.choice.is-on { border-color: var(--green); background: var(--green-pale); }

/* ------------------------------------------------------------- diary --- */
.day-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.day-tab {
  flex: 0 0 auto;
  padding: 11px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: var(--paper-2);
  cursor: pointer; font: inherit; font-weight: 600;
  white-space: nowrap;
  text-align: center;
}
.day-tab .d-sub { display: block; font-size: .75rem; font-weight: 500; color: var(--ink-3); }
.day-tab.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.day-tab.is-on .d-sub { color: rgba(255,255,255,.7); }

.slot-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 9px; margin-top: 18px;
}
.slot {
  padding: 13px 6px; text-align: center;
  border: 1.5px solid var(--line); border-radius: var(--r);
  background: var(--paper-2); cursor: pointer; font: inherit;
  font-weight: 650; font-variant-numeric: tabular-nums;
}
.slot:hover { border-color: var(--green); }
.slot.is-on { background: var(--green); color: #fff; border-color: var(--green); }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 99px;
  font-size: .75rem; font-weight: 700; letter-spacing: .02em;
}
.badge-green { background: var(--green-pale); color: var(--green); }
.badge-amber { background: var(--amber-pale); color: var(--amber); }
.badge-red   { background: var(--red-pale); color: var(--red); }
.badge-grey  { background: var(--paper); color: var(--ink-3); border: 1px solid var(--line); }

.notice {
  padding: 14px 16px; border-radius: var(--r);
  border-left: 4px solid var(--amber);
  background: var(--amber-pale);
  font-size: .9375rem;
}
.notice-info { border-left-color: var(--green); background: var(--green-pale); }

/* --------------------------------------------------------- assistant --- */
.assist-launch {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  display: flex; align-items: center; gap: 10px;
  padding: 13px 20px 13px 16px;
  border: 0; border-radius: 99px;
  background: var(--ink); color: #fff;
  font: inherit; font-weight: 650; cursor: pointer;
  box-shadow: var(--shadow-lg);
}
.assist-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: min(400px, calc(100vw - 40px));
  height: min(560px, calc(100vh - 40px));
  background: var(--paper-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  display: none; flex-direction: column; overflow: hidden;
}
.assist-panel.is-open { display: flex; }
.assist-head {
  background: var(--ink); color: #fff;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
}
.assist-head strong { font-size: .9375rem; }
.assist-head .close {
  margin-left: auto; background: transparent; border: 0;
  color: rgba(255,255,255,.7); cursor: pointer; font-size: 1.4rem;
  line-height: 1; padding: 0 4px;
}
.assist-log { flex: 1; overflow-y: auto; padding: 16px; }
.msg { margin-bottom: 14px; font-size: .9375rem; line-height: 1.55; }
.msg-user { text-align: right; }
.msg-user span {
  display: inline-block; background: var(--ink); color: #fff;
  padding: 9px 14px; border-radius: 14px 14px 3px 14px; max-width: 85%;
  text-align: left;
}
.msg-bot span {
  display: inline-block; background: var(--paper);
  border: 1px solid var(--line-2);
  padding: 9px 14px; border-radius: 14px 14px 14px 3px; max-width: 92%;
  white-space: pre-wrap;
}
.msg-tool { font-size: .75rem; color: var(--ink-4); font-style: italic; }
.assist-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line-2); }
.assist-form input { flex: 1; padding: 11px 13px; }
.assist-form button {
  border: 0; background: var(--green); color: #fff;
  border-radius: var(--r); padding: 0 16px; cursor: pointer; font-weight: 650;
}
.assist-note {
  padding: 8px 16px; font-size: .75rem; color: var(--ink-4);
  border-top: 1px solid var(--line-2); background: var(--paper);
}

/* -------------------------------------------------------------- table --- */
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
td.num { font-variant-numeric: tabular-nums; text-align: right; }
.table-scroll { overflow-x: auto; }

.kv { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 8px 20px; font-size: .9375rem; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 600; }

.breakdown { font-size: .9375rem; }
.breakdown-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--line-2);
}
.breakdown-row:last-child { border-bottom: 0; font-weight: 700; }
.breakdown-row .b-detail { color: var(--ink-3); font-size: .8125rem; display: block; font-weight: 400; }
.breakdown-row .b-value { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------------ footer --- */
.site-footer {
  background: var(--ink); color: rgba(255,255,255,.68);
  padding: 44px 0 32px; margin-top: 64px; font-size: .875rem;
}
.site-footer a { color: rgba(255,255,255,.86); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }

.spinner {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.is-hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
