/* Circuvelo coach. Palette from the Dutch bike-path sign; type from road signage. */
:root {
  --sign-blue: #1F4E9A;
  --sign-blue-dark: #163A74;
  --ink: #26303A;
  --muted: #5B6672;
  --paper: #FFFFFF;
  --ground: #F3F5F7;
  --line: #D5DBE1;
  --good: #2E8B57;
  --good-bg: #E6F3EC;
  --warn: #F5C518;
  --warn-ink: #6B5300;
  --warn-bg: #FFF7D6;
  --bad: #B3261E;
  --bad-bg: #FBE9E7;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;

  --gap: 16px;
  --radius-s: 6px;
  --radius-m: 12px;
  --bar-h: 76px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.5 var(--body);
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px var(--gap) calc(var(--bar-h) + 32px + env(safe-area-inset-bottom));
}

h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0; }
h1 { font-size: 2.6rem; letter-spacing: -0.01em; }
p { margin: 0; }

.brand {
  font: 700 1.05rem/1 var(--display);
  letter-spacing: 0.02em;
  color: var(--sign-blue);
  margin-bottom: 18px;
}
.brand::before {
  content: "";
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.4em;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.05em;
}

.intro { margin-bottom: 28px; }
.intro p { margin-top: 8px; color: var(--muted); max-width: 34em; }
.muted { color: var(--muted); }
.section-title { font-size: 1.7rem; margin-top: 36px; }

:focus-visible { outline: 3px solid var(--sign-blue); outline-offset: 2px; }

/* The route: a dashed bike path linking the shots, sign markers at each stop. */
.route { list-style: none; margin: 0; padding: 0; counter-reset: stop; }

.stop {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding-bottom: 28px;
  counter-increment: stop;
}

.stop::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 44px;
  bottom: 0;
  border-left: 3px dashed var(--line);
}
.stop:last-child::before { display: none; }
.stop[data-state="good"]::before { border-left-color: var(--good); border-left-style: solid; }

.marker {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sign-blue);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px var(--sign-blue);
  color: var(--paper);
  display: grid;
  place-items: center;
  font: 700 1.3rem/1 var(--display);
}
.marker::after { content: counter(stop); }

.stop[data-state="checking"] .marker { animation: pulse 1.2s ease-in-out infinite; }
.stop[data-state="good"] .marker { background: var(--good); box-shadow: 0 0 0 2px var(--good); }
.stop[data-state="good"] .marker::after { content: "✓"; }
.stop[data-state="fair"] .marker { background: var(--warn); color: var(--ink); box-shadow: 0 0 0 2px var(--warn); }
.stop[data-state="retake"] .marker { background: var(--bad); box-shadow: 0 0 0 2px var(--bad); }
.stop[data-state="retake"] .marker::after { content: "!"; }

@keyframes pulse { 50% { transform: scale(0.9); opacity: 0.7; } }

.stop-title { font-size: 1.45rem; padding-top: 8px; }
.stop-hint { color: var(--muted); margin-top: 2px; }
.stop.optional .stop-title::after {
  content: "optioneel";
  font: 400 0.85rem var(--body);
  color: var(--muted);
  margin-left: 8px;
  vertical-align: middle;
}

.shot {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  margin-top: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 10px;
}
.thumb { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-s); background: var(--ground); }
.feedback { display: grid; gap: 4px; align-content: start; font-size: 0.95rem; }
.status { font-weight: 700; }
.stop[data-state="good"] .status { color: var(--good); }
.stop[data-state="fair"] .status { color: var(--warn-ink); }
.stop[data-state="retake"] .status { color: var(--bad); }
.readings { color: var(--muted); }
.readings:empty, .tip:empty { display: none; }

.stop-actions { display: flex; align-items: center; gap: 16px; margin-top: 12px; }

.camera { position: relative; display: inline-flex; }
.camera input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.camera-label {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--sign-blue);
  color: var(--sign-blue);
  font-weight: 700;
  background: var(--paper);
}
.camera:focus-within .camera-label { outline: 3px solid var(--sign-blue); outline-offset: 2px; }
.stop[data-state="empty"] .stop-actions .camera-label { background: var(--sign-blue); color: var(--paper); }
.stop.optional[data-state="empty"] .stop-actions .camera-label { background: var(--paper); color: var(--sign-blue); }

button { font: inherit; cursor: pointer; }
.link { background: none; border: 0; padding: 4px 0; color: var(--muted); text-decoration: underline; }

/* Step 2 */
.verdict-card {
  background: var(--paper);
  border-left: 6px solid var(--sign-blue);
  border-radius: var(--radius-s);
  padding: 18px;
}
.summary { font-size: 1.25rem; font-weight: 700; }
.identified { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 14px 0 0; font-size: 0.95rem; }
.identified dt { color: var(--muted); }
.identified dd { margin: 0; }
.identified .unsure { color: var(--muted); }

.confirm { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.choice {
  padding: 10px 16px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}
.choice[aria-pressed="true"] { border-color: var(--sign-blue); background: var(--sign-blue); color: var(--paper); }

.field { display: grid; gap: 6px; margin-top: 16px; }
.field > span { font-weight: 700; }
textarea, input[type="text"], input[type="number"] {
  font: inherit;
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--paper);
  color: var(--ink);
}
textarea:focus, input:focus { border-color: var(--sign-blue); outline: none; }

.questions { display: grid; gap: 22px; margin-top: 16px; }
.question legend, .question .q-label { font-weight: 700; padding: 0; }
.question { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.question .why { color: var(--muted); font-size: 0.9rem; margin-top: -4px; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }

/* Step 3 */
.listing { background: var(--paper); border-radius: var(--radius-m); padding: 20px; border: 1px solid var(--line); }
.listing h2 { font-size: 1.8rem; }
.listing .meta { color: var(--muted); margin-top: 4px; }
.specs { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.95rem; }
.specs th { text-align: left; font-weight: 400; color: var(--muted); padding: 6px 12px 6px 0; vertical-align: top; width: 42%; }
.specs td { padding: 6px 0; border-bottom: 1px solid var(--ground); }
.specs .unsure { color: var(--warn-ink); }
.description { white-space: pre-line; }
.listing h3 { font: 700 1.25rem var(--display); margin: 20px 0 6px; }
.listing ul { margin: 0; padding-left: 20px; }
.notice { margin-top: 18px; padding: 12px; background: var(--warn-bg); border-radius: var(--radius-s); font-size: 0.95rem; }
.copied { color: var(--good); font-weight: 700; margin-top: 10px; }

.error { margin-top: 20px; padding: 12px 14px; background: var(--bad-bg); color: var(--bad); border-radius: var(--radius-s); }

/* Sticky action bar within thumb reach */
.actionbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 12px var(--gap) calc(12px + env(safe-area-inset-bottom));
  background: rgba(243, 245, 247, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.actionbar > * { max-width: 560px; }
.primary {
  flex: 1;
  min-height: 52px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--sign-blue);
  color: var(--paper);
  font: 700 1.35rem var(--display);
  letter-spacing: 0.01em;
}
.primary:hover:not(:disabled) { background: var(--sign-blue-dark); }
.primary:disabled { background: var(--line); color: var(--muted); cursor: default; }
.secondary {
  min-height: 52px;
  padding: 0 18px;
  border-radius: var(--radius-m);
  border: 2px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .stop[data-state="checking"] .marker { animation: none; opacity: 0.6; }
}
