/* barlow-semi-condensed-latin-500-normal */
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/vehicle-fonts/barlow-semi-condensed-latin-500-normal.woff2) format('woff2'), url(/vehicle-fonts/barlow-semi-condensed-latin-500-normal.woff) format('woff');
}
/* barlow-semi-condensed-latin-600-normal */
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/vehicle-fonts/barlow-semi-condensed-latin-600-normal.woff2) format('woff2'), url(/vehicle-fonts/barlow-semi-condensed-latin-600-normal.woff) format('woff');
}
/*
 * Look of the screen. The tokens, type and rules come from DESIGN_SPEC.md
 * (read its "Rules of Engagement" before changing anything here).
 */
:root {
  --surface: oklch(97.6% 0.004 91);
  --surface-raised: oklch(95.9% 0.011 85);
  --line: oklch(88.9% 0.023 78);
  --line-quiet: oklch(93.1% 0.007 89);
  --line-strong: oklch(61.8% 0.016 85);
  --text: oklch(23.1% 0.006 157);
  --muted: oklch(48.3% 0.009 152);
  --accent: oklch(28.4% 0.039 162);
  --accent-hover: oklch(35% 0.045 162);
  --accent-fg: oklch(97.6% 0.004 91);
  --ok-bg: oklch(92.9% 0.026 117);
  --ok-text: oklch(34.7% 0.051 139);
  --warn-bg: oklch(96% 0.01 49);
  --warn-text: oklch(45.7% 0.116 34);
  --chrome: oklch(21.6% 0.021 185);
  --disabled-bg: oklch(60% 0.019 188);
  --focus: oklch(55.9% 0.141 46);

  --font-ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "Meiryo",
    sans-serif;
  --font-latin: "Barlow Semi Condensed", var(--font-ja);

  --radius-card: 10px;
  --radius-control: 8px;
  --radius-chip: 6px;
}

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-ja);
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: 0.02em;
  /* Typed values come back in notes and errors; a long one must wrap, not widen the page. */
  overflow-wrap: anywhere;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}
a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  /* Drawn outside the control so it sits on the page background (4.6:1), never on the green. */
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* ---- Site header and the three tools ---- */

.site-header {
  padding: 20px 0 0;
}
.eyebrow {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}
.title {
  margin: 2px 0 16px;
  font-size: 1.375rem;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.01em;
}
/* The site's name on the static pages: a link home, not a heading (each page's own title is its h1). */
.site-home {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-right: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.site-home:hover {
  color: var(--accent-hover);
}
/* The site's name and, under it, what the site does first (the app header only). */
.site-brand .title {
  margin-bottom: 2px;
}
.site-lead {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--muted);
}
.views {
  /* Four equal tabs in two named groups (適合 / 車検の物差し), so all four still fit at 320px without a hidden scroll. */
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  border-bottom: 1px solid var(--line);
}
.view-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.views-shaken {
  border-left: 1px solid var(--line);
}
.view-group-name {
  padding: 0 4px;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}
.view-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}
.view-list > li {
  display: flex;
  min-width: 0;
}
.view-list .view-link {
  flex: 1;
}
.view-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.3;
  min-height: 48px;
  padding: 0 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 700;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.view-link:hover {
  color: var(--text);
}
.view-link[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* この車: a button in the header of every screen; its form opens under the header. */
.my-car-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin: 0 0 12px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  color: var(--text);
  text-align: start;
  cursor: pointer;
}
.my-car-button:hover {
  border-color: var(--accent);
}
.my-car-button.is-empty {
  border-color: var(--accent);
  color: var(--accent);
}
.my-car-button > svg {
  flex: none;
}
.my-car-text {
  flex: 1;
  display: grid;
  min-width: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.my-car-text strong {
  font-size: 0.9375rem;
}
.my-car-button[aria-expanded="true"] .my-car-chevron {
  transform: rotate(180deg);
}
.my-car-pick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  column-gap: 12px;
}
select:disabled {
  color: var(--muted);
  cursor: not-allowed;
}
.my-car .confirm {
  margin: 8px 0 16px;
}
.my-car .field .hint {
  margin: 0;
  font-weight: 400;
}
.my-car-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 16px;
}

/* ---- First registration: the year and the month side by side ---- */

.first-reg {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}
.first-reg legend {
  padding: 0 0 6px;
  font-size: 0.9375rem;
  font-weight: 700;
}
.first-reg-selects {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 8px;
}
.first-reg p {
  margin: 6px 0 0;
}
/* Side by side, the Japanese year of 2019 is cut on a phone. */
@media (max-width: 30rem) {
  .first-reg-selects {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- Where the VIN is found ---- */

.vin-places {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.vin-places-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 0 24px;
}
.vin-places-list {
  margin: 12px 0;
  padding-inline-start: 1.5em;
}
.vin-places-list li {
  margin-bottom: 12px;
}
.figure-number circle {
  fill: var(--accent);
}
.figure-number text {
  fill: var(--accent-fg);
  font-family: var(--font-latin);
  font-size: 22px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: central;
}

/* ---- Panels and headings ---- */

.panel {
  padding-top: 24px;
}
.section-title {
  margin: 0 0 12px;
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 700;
}
.sub-title {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  line-height: 1.35;
  font-weight: 700;
}
.hint {
  margin: 8px 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted);
  /* Fewer lonely words on the last line where the browser supports it. */
  text-wrap: pretty;
}
.status-line {
  margin: 16px 0;
  font-weight: 700;
}

/* ---- Entrances (segmented) ---- */

.entrances {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 4px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.entrance {
  min-height: 48px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.3;
  font-weight: 700;
  cursor: pointer;
}
.entrance:hover {
  color: var(--text);
}
.entrance[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-fg);
}

.entrance-body {
  margin-top: 20px;
}

/* ---- Form controls ---- */

input,
select,
button {
  font: inherit;
  max-width: 100%;
}
.field {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
  font-size: 0.9375rem;
  font-weight: 700;
}
.field > span:first-child {
  line-height: 1.5;
}
select,
input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  background: oklch(99% 0.002 91);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  font-weight: 400;
}
input[type="text"] {
  font-family: var(--font-latin);
  font-weight: 500;
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
input[aria-invalid="true"] {
  border-color: var(--warn-text);
}
.field-error {
  color: var(--warn-text);
  font-size: 0.875rem;
  font-weight: 700;
}

.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-control);
  font-weight: 700;
  cursor: pointer;
}
.primary {
  width: 100%;
  border: 0;
  background: var(--accent);
  color: var(--accent-fg);
}
.primary:hover {
  background: var(--accent-hover);
  color: var(--accent-fg);
}
.primary:active {
  transform: translateY(1px);
}
.primary:disabled {
  background: var(--disabled-bg);
  cursor: progress;
}
/* A link to a screen that needs JavaScript: not shown when scripts do not run (the static entry page). */
@media (scripting: none) {
  .needs-script {
    display: none;
  }
}
.secondary {
  min-height: 48px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
}
.secondary:hover {
  background: var(--surface-raised);
}
.secondary:disabled {
  border-color: var(--line-strong);
  color: var(--muted);
  cursor: not-allowed;
}
.link-button {
  min-height: 48px; /* DESIGN_SPEC: every tap target 48px or more */
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.link-button.is-danger {
  color: var(--warn-text);
}

/* The photo entrance: the whole box is the picker. */
.file-pick {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px 16px;
  background: var(--surface-raised);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-card);
  text-align: center;
  font-weight: 700;
  cursor: pointer;
}
.file-pick:hover {
  border-color: var(--accent);
}
.file-pick.is-dragging {
  border-style: solid;
  border-color: var(--accent);
  background: var(--ok-bg);
}
.file-pick-sub {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted);
}
.file-pick:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.file-pick-icon {
  color: var(--accent);
}
.file-pick-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.9375rem;
}
.file-pick input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 48px;
  margin: 8px 0 16px;
  font-weight: 700;
}
.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 3px 0 0;
  accent-color: var(--accent);
}

fieldset {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
legend {
  padding: 0 6px;
  font-weight: 700;
  font-size: 0.9375rem;
}

/* ---- Facts (term / value pairs) ---- */

.facts {
  display: grid;
  grid-template-columns: minmax(6.5em, max-content) minmax(0, 1fr);
  gap: 0;
  margin: 12px 0;
  font-size: 0.9375rem;
}
.facts dt,
.facts dd {
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid var(--line-quiet);
}
.facts dt {
  padding-right: 16px;
  color: var(--muted);
}
.facts dd {
  font-weight: 700;
}
/* Enlarged text on a phone: the name goes above the value, so the value keeps its width. */
@media (max-width: 15rem) {
  .facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .facts dt {
    padding-bottom: 0;
  }
  .facts dd {
    border-top: 0;
    padding-top: 2px;
  }
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.mono {
  font-family: var(--font-latin);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

/* ---- QR confirmation ---- */

.confirm {
  margin-top: 20px;
  padding: 20px 16px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

/* ---- Result ---- */

.result {
  margin-top: 28px;
  animation: result-in 150ms ease-out both;
}
@keyframes result-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .result {
    animation: none;
  }
}
.result-status {
  margin: 0 0 16px;
  font-size: 1.375rem;
  line-height: 1.35;
  font-weight: 700;
}
.result-status.is-unsettled {
  color: var(--warn-text);
}
.network {
  margin: -8px 0 16px;
  font-size: 0.875rem;
  color: var(--muted);
}
.network:not(.network-ok) {
  padding: 10px 12px;
  background: var(--warn-bg);
  color: var(--warn-text);
  border-radius: var(--radius-control);
  font-weight: 700;
}

.candidates {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.candidate {
  padding: 20px 16px 8px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.candidate-label {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 700;
}
.candidate-name {
  margin: 0;
  display: grid;
  gap: 2px;
}
.car-name {
  font-family: var(--font-latin);
  font-weight: 600;
  font-size: clamp(2.25rem, 9vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0;
}
.years {
  font-family: var(--font-latin);
  font-weight: 500;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
}
.identity {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin: 14px 0 4px;
  padding: 2px 10px;
  border-radius: var(--radius-chip);
  font-size: 0.9375rem;
  font-weight: 700;
}
.identity-confirmed .identity {
  background: var(--accent);
  color: var(--accent-fg);
}
.identity-probable .identity {
  background: var(--ok-bg);
  color: var(--ok-text);
}
.identity-check .identity {
  background: var(--warn-bg);
  color: var(--warn-text);
  outline: 1px solid color-mix(in oklch, var(--warn-text) 35%, transparent);
}
/* 灯火: neither 合う nor 合わない, so neither green nor warm. */
.identity-ask .identity {
  background: var(--line-quiet);
  color: var(--text);
}
.count-unit {
  white-space: nowrap;
}
/* 灯火: the label of a group stands clear of its first item. */
h4.identity + .part-row {
  padding-top: 12px;
}
/* 灯火: the colour itself next to its name, lit on a dark ground. A guide: a screen is no measure of a light. */
.swatch {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 32px;
  margin-right: 12px;
  vertical-align: middle;
  border-radius: var(--radius-chip);
  background: var(--text);
}
.swatch::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--lit);
}
.swatch-white {
  --lit: oklch(98% 0.004 100);
}
.swatch-pale_yellow {
  --lit: oklch(91% 0.14 102);
}
.swatch-orange {
  --lit: oklch(74% 0.17 58);
}
.swatch-red {
  --lit: oklch(60% 0.23 27);
}
.swatch-bluish_purple {
  --lit: oklch(56% 0.22 285);
}
/* 灯火: the answer stands apart from the buttons and the notes around it. */
.answer {
  padding: 16px;
  background: var(--surface-raised);
  border: 2px solid var(--accent);
  border-radius: var(--radius-card);
}
.answer-title {
  margin: 4px 0 8px;
  font-size: 1.375rem;
  line-height: 1.35;
  font-weight: 700;
}
.answer > p {
  margin: 0;
  font-size: 0.9375rem;
}
.answer > .candidate-label {
  font-size: 0.8125rem;
}
.answer > .facts {
  margin: 12px 0;
}
/* 灯火: how many of each, and where to read them. */
.counts,
.open-answers {
  margin: 8px 0 12px;
  padding: 0;
  list-style: none;
}
.counts li {
  border-top: 1px solid var(--line);
}
.count-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
}
.count-row strong {
  flex: none;
  font-size: 1.25rem;
}
button.count-row {
  cursor: pointer;
}
button.count-row:hover .count-action {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.count-action {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 400;
}
.result-group {
  margin-top: 24px;
  scroll-margin-top: 16px;
}
.open-answers li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line-quiet);
}
.open-answers p {
  margin: 0;
}
.item-list {
  margin: 0 0 12px;
  padding-left: 1.2em;
}
.ask-sentence {
  margin: 12px 0;
  padding: 12px 16px;
  background: var(--surface-raised);
  border-radius: var(--radius-control);
}
.ask-sentence .candidate-label {
  display: block;
}
.list-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
}
.answer > .counts-rest {
  margin-top: 16px;
}
.answer > .link-button {
  display: block;
  text-align: left;
}
/* 灯火: details the first reading does not need. */
.fold {
  margin: 8px 0;
}
.fold > summary {
  min-height: 48px;
  padding: 12px 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
}
.fold > summary:hover {
  color: var(--accent-hover);
}
.fold > summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.fold > summary .identity {
  margin: 0 0 0 4px;
}
.fold > img {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  border-radius: var(--radius-control);
}
/* 灯火: pictures of an imaginary car. The measuring lines are drawn here, not in the picture. */
.figure {
  margin: 12px 0;
  max-width: 30rem;
}
.figure svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.figure-lines {
  fill: none;
  stroke: var(--focus);
  stroke-width: 2.5px;
}
.figure-lines > * {
  vector-effect: non-scaling-stroke;
}
.figure-lens {
  stroke-width: 1.5px;
}
.figure-lens.is-drawn {
  fill: var(--surface);
}
.figure-centre {
  stroke-dasharray: 6 4;
}
.figure-lines > .figure-word {
  fill: var(--text);
  stroke: var(--surface);
  stroke-width: 4px;
  paint-order: stroke;
  font-weight: 700;
}
/* 灯火: the picture sits beside the words, so the kinds fit on one slide. */
.check > span:has(> .choice-picture) {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(88px, 28%, 132px);
  grid-template-rows: auto 1fr;
  column-gap: 12px;
}
.choice-picture {
  display: block;
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 100%;
  height: auto;
  border-radius: var(--radius-chip);
}
/* A short answer is one line over its condition and its picture. */
.check > span:has(> .choice-note):has(> .choice-picture) > .choice-label {
  grid-column: 1 / -1;
}
.check > span:has(> .choice-note):has(> .choice-picture) > .choice-picture {
  grid-row: 2;
  margin-top: 4px;
}
/* 灯火: a moving example of an option. Opacity only, slower than 1 flash a second, and it can be stopped. */
.check > span:has(> .example) {
  grid-template-columns: minmax(0, 1fr) clamp(96px, 32%, 144px);
}
.example {
  position: relative;
  align-self: start;
  overflow: hidden;
}
.example svg {
  display: block;
}
.example > svg {
  width: 100%;
  height: auto;
}
.example-tags {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: flex;
  gap: 2px;
}
.example-tags > span {
  padding: 2px 4px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  border-radius: var(--radius-chip);
  background: var(--surface);
  color: var(--text);
}
/* The colours of the picture itself: the bumper around the fog lamp, the front around the strip. */
.example-none {
  fill: oklch(36.9% 0.054 156);
}
.example-none.is-round {
  fill: oklch(54.5% 0.049 154);
}
.example-off {
  fill: oklch(52% 0.012 157);
  stroke: oklch(28% 0.03 160);
  stroke-width: 4px;
}
.example-night {
  fill: oklch(20% 0.03 162);
  opacity: 0.55;
}
.example-light {
  fill: oklch(98% 0.01 95);
}
.example-light.is-yellow {
  fill: oklch(89% 0.15 97);
}
.example-light.is-orange {
  fill: oklch(74% 0.17 58);
}
.example-light.is-green {
  fill: oklch(80% 0.2 145);
}
/* The background of the picture from above, which the light goes beyond. */
.example-ground {
  fill: var(--surface);
}
.example-beam {
  fill: oklch(95% 0.07 97);
  opacity: 0.85;
}
.example-halo {
  opacity: 0.28;
}
.example-blink {
  animation: example-blink 1.4s step-end infinite;
}
.example-blink-other {
  animation: example-blink 1.4s step-end -0.7s infinite;
}
.example-pulse {
  animation: example-pulse 2.8s ease-in-out infinite;
}
.example-fade {
  animation: example-fade 4s ease-in-out infinite;
}
.example-by-hand {
  animation: example-by-hand 4.2s step-end infinite;
}
@keyframes example-blink {
  50% {
    opacity: 0;
  }
}
@keyframes example-pulse {
  50% {
    opacity: 0.45;
  }
}
@keyframes example-fade {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}
@keyframes example-by-hand {
  0% {
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  45% {
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
}
/* Stopped: the moment the other light is on, so the two options do not look alike. */
.is-still .example g {
  animation: none;
}
.is-still .example .example-blink-other {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .example g {
    animation: none;
  }
  .example .example-blink-other {
    opacity: 0;
  }
  .example-note .example-stop {
    display: none;
  }
}
.example-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.block-title {
  margin: 20px 0 6px;
  font-size: 0.9375rem;
  font-weight: 700;
}
.reasons {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.9375rem;
}
.sources {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}
.sources li {
  border-top: 1px solid var(--line-quiet);
}
.sources a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 0;
  font-family: var(--font-latin);
  font-weight: 500;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}
.sources a svg {
  flex: none;
}

.notice-warn {
  margin-top: 20px;
  padding: 16px;
  background: var(--warn-bg);
  border-radius: var(--radius-control);
}
.notice-warn .block-title {
  margin-top: 0;
  color: var(--warn-text);
}
.notes {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ---- Alerts ---- */

.alert {
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  font-size: 0.9375rem;
}
.alert p {
  margin: 0 0 6px;
}
.alert ul {
  margin: 0;
  padding-left: 1.2em;
}
.alert-error {
  background: var(--warn-bg);
  border-color: transparent;
  color: var(--warn-text);
}

/* ---- Structural checker ---- */

.part-row {
  padding: 16px 0;
  border-top: 1px solid var(--line-quiet);
}
.part-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.part-row-title {
  margin: 0 0 8px;
  font-family: var(--font-latin);
  font-weight: 600;
  font-size: 1.125rem;
}
.condition-text {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--muted);
}
.item-notes {
  margin: 0 0 12px;
  padding-left: 1.2em;
  font-size: 0.8125rem;
  color: var(--muted);
}
.aspect {
  padding: 16px;
  margin-bottom: 12px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.verdict {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
}
.verdict-not_exempt .verdict {
  color: var(--warn-text);
}
.verdict-undetermined .verdict {
  color: var(--muted);
}
.disclaimer {
  margin: 16px 0 8px;
  padding: 14px 16px;
  background: var(--warn-bg);
  color: var(--warn-text);
  border-radius: var(--radius-control);
  font-size: 0.875rem;
  font-weight: 700;
}
.sources-line {
  font-size: 0.875rem;
}
.sources-line a {
  overflow-wrap: anywhere;
}

/* ---- Structural checker: one question per screen ---- */

.wizard-status {
  margin: 16px 0 24px;
}
/*
 * Steps (report S55E-BPXX): every stage is the same box on one baseline. Passed ones
 * carry a check and are buttons (no underline; hover and focus show they can be
 * pressed); the current one has the green bar; the ones ahead are muted.
 */
.wizard-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.wizard-progress li {
  display: flex;
}
.wizard-step {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  margin-bottom: -1px;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  white-space: nowrap;
}
.wizard-progress .is-done .wizard-step {
  color: var(--text);
}
.wizard-progress .is-done .wizard-step svg {
  color: var(--ok-text);
}
.wizard-progress button.wizard-step {
  cursor: pointer;
}
.wizard-progress button.wizard-step:hover {
  color: var(--accent);
  border-bottom-color: var(--line-strong);
  background: var(--surface-raised);
}
.wizard-progress .is-current .wizard-step {
  color: var(--text);
  font-weight: 700;
  border-bottom-color: var(--accent);
}
/* Six stages with five checks still fit one line at 390px. */
@media (max-width: 480px) {
  .wizard-progress {
    gap: 0;
  }
  .wizard-step {
    gap: 2px;
    padding: 0 5px;
    font-size: 0.8125rem;
  }
}
/* 灯火・構造変更: one question is one slide. The stage cuts what comes in from the side, with room for a focus ring. */
.wizard-stage {
  margin-inline: -8px;
  padding-inline: 8px;
  overflow-x: clip;
}
.wizard-slide.is-forward {
  animation: slide-in 260ms ease-out both;
  --slide-from: 35%;
}
.wizard-slide.is-back {
  animation: slide-in 260ms ease-out both;
  --slide-from: -35%;
}
/* Also 戻る, 次へ and the dots: a double tap there moves one question, not two. */
.wizard-slide.is-arriving,
.wizard-stage:has(> .is-arriving) + .slide-nav {
  pointer-events: none;
}
.wizard-slide > .result {
  animation: none;
}
/* Up and down scrolls; sideways is ours. */
.wizard-slide > * {
  touch-action: pan-y pinch-zoom;
}
/* Enlarged: every direction moves around in the page. */
.wizard-slide.is-zoomed > * {
  touch-action: auto;
}
/* Room to swipe on a short question, so the dots move less from one slide to the next. */
.wizard-slide > .wizard-question {
  min-height: 24rem;
}
.wizard-slide .wizard-title {
  scroll-margin-top: 16px;
}
.slide-nav {
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
  align-items: center;
  min-height: 48px;
  margin: 16px 0 24px;
}
.slide-dots {
  grid-column: 2;
  grid-row: 1;
  display: flex;
}
/* The mark is small, the place to press is 24 by 48. The same step back is also 戻る and the swipe. */
.slide-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 48px;
  padding: 0;
  border: 0;
  background: none;
}
.slide-dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
}
.slide-dot.is-past::before {
  border-color: var(--line-strong);
  background: var(--line-strong);
}
.slide-dot.is-current::before {
  width: 14px;
  height: 14px;
  border-color: var(--accent);
  background: var(--accent);
}
.slide-dot.is-more::before {
  width: 6px;
  height: 6px;
}
button.slide-dot {
  cursor: pointer;
}
button.slide-dot:hover::before {
  border-color: var(--accent);
  background: var(--accent);
}
.slide-back {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}
.slide-count {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
}
.slide-next {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}
/* Enlarged text on a phone: the dots get a row of their own. */
@media (max-width: 15rem) {
  .slide-nav {
    grid-template-columns: 1fr auto;
  }
  .slide-dots {
    grid-column: 1 / -1;
    justify-self: center;
  }
  .slide-back,
  .slide-next {
    grid-row: 2;
  }
  .slide-next {
    grid-column: 2;
  }
  .slide-count {
    grid-row: 3;
  }
}
@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(var(--slide-from));
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .wizard-slide.is-forward,
  .wizard-slide.is-back {
    animation: none;
  }
}
.wizard-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}
.wizard-legend {
  padding: 0;
}
.wizard-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 700;
}
/* The heading takes the focus only so a screen reader reads the new question; it is not a control, so no ring. */
.wizard-title:focus,
.wizard-title:focus-visible {
  outline: none;
}
.choices {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}
.choices .check {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: oklch(99% 0.002 91);
  font-weight: 400;
  cursor: pointer;
}
.choices .check:hover {
  border-color: var(--line-strong);
}
.choices .check:has(input:checked) {
  border-color: var(--accent);
  background: var(--surface-raised);
  font-weight: 700;
}
.choices .check:has(input:disabled) {
  color: var(--muted);
  cursor: not-allowed;
}
.choice-note {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted);
}
.choice-group {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}
.choice-group-title {
  margin: 8px 0 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
}
.change-amount {
  margin: 4px 0 8px 32px;
}
.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
.wizard-actions .primary {
  width: auto;
  /* Never wider than the column, even with large text at 320px. */
  min-width: min(10rem, 100%);
  max-width: 100%;
}
.wizard-list {
  margin-top: 28px;
}
.choice-with-field {
  display: grid;
  gap: 4px;
}
.wizard-parts {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.wizard-parts li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line-quiet);
  font-weight: 700;
}
.wizard-part-actions {
  display: flex;
  gap: 16px;
  flex: none;
}
/*
 * The confirm list: three columns every row shares (report JMCX-RU5E), so names,
 * answers and 編集 line up. The name never wraps inside a word. On a phone the name
 * takes its own line above the answer and 編集.
 */
.confirm-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) auto;
  /* No column gap: the gap would cut each row's line between the columns. The space is padding. */
  column-gap: 0;
  margin: 16px 0 0;
  font-size: 0.9375rem;
}
.confirm-row {
  display: contents;
}
.confirm-facts dt,
.confirm-facts dd {
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid var(--line-quiet);
  align-self: stretch;
  display: flex;
  align-items: center;
}
.confirm-facts dt {
  padding-right: 24px;
  color: var(--muted);
  white-space: nowrap;
}
.confirm-answer {
  padding-right: 16px;
  font-weight: 700;
  min-width: 0;
}
.confirm-answer:has(> .choice-note) {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.confirm-edit {
  justify-content: flex-end;
}
@media (max-width: 30rem) {
  .confirm-facts {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .confirm-facts dt {
    grid-column: 1 / -1;
    padding-bottom: 0;
    white-space: normal;
  }
  .confirm-facts dd {
    border-top: 0;
    padding-top: 2px;
  }
}

/* 編集: an icon and a word, quieter than a button, clearer than a bare underline. */
.edit-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 48px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.edit-button:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ---- Designated parts list ---- */

.parts-toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 8px 24px;
  margin: 20px 0 8px;
  padding: 16px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.parts-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.parts-toc .link-button {
  text-align: left;
}
.parts-toc-count {
  color: var(--muted);
  font-family: var(--font-latin);
  font-weight: 500;
  text-decoration: none;
}
.parts-section {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  scroll-margin-top: 16px;
}
.parts-section .sub-title {
  margin-bottom: 12px;
  font-size: 1.0625rem;
}
.parts-section .sub-title:focus {
  outline: none;
}
.parts-section-group {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}
/* Items in columns where there is room; each keeps its condition under its name. */
.parts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.parts-list li {
  padding: 8px 0;
  border-top: 1px solid var(--line-quiet);
}
.parts-list .condition-text {
  display: block;
  margin: 2px 0 0;
  font-size: 0.8125rem;
}
.parts-notes {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--surface-raised);
  border-radius: var(--radius-control);
}
.parts-notes .block-title {
  margin: 0 0 4px;
  font-size: 0.8125rem;
}
.parts-notes .item-notes {
  margin: 0;
}
.part-name {
  font-weight: 700;
}
.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: var(--radius-chip);
  background: var(--line-quiet);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}
.meta {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

/* ---- Footer ---- */

.site-footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
}
.site-footer p {
  margin: 0 0 6px;
}

/* ---- Wide screens: the dark top band and a two-column result ---- */

@media (min-width: 1024px) {
  .page {
    max-width: 68rem;
    padding: 0 32px 64px;
  }
  .site-header {
    display: grid;
    grid-template-columns: auto minmax(0, 17rem) minmax(max-content, 1fr);
    align-items: center;
    column-gap: 24px;
    min-height: 64px;
    padding: 0;
    color: var(--accent-fg);
    background: var(--chrome);
    /* Full-bleed band while the header stays in the page column. */
    box-shadow: 0 0 0 100vmax var(--chrome);
    clip-path: inset(0 -100vmax);
  }
  .eyebrow {
    display: none;
  }
  .title {
    margin: 0;
    font-size: 1.0625rem;
  }
  /* On the dark band: light on dark, and one line each so the band keeps its height. */
  .my-car-button {
    min-height: 48px;
    margin: 0;
    padding: 2px 12px;
    border-color: oklch(80% 0.01 185);
    background: none;
    color: var(--accent-fg);
  }
  .my-car-button:hover {
    border-color: var(--accent-fg);
  }
  .my-car-button.is-empty {
    border-color: var(--accent-fg);
    background: var(--accent-fg);
    color: var(--accent);
  }
  .my-car-text > * {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .my-car {
    max-width: 40rem;
    padding-top: 16px;
  }
  .site-home,
  .site-home:hover {
    color: var(--accent-fg);
  }
  /* On the band the line would wrap into three; the tool's own heading under the band says the same. */
  .site-lead {
    display: none;
  }
  .views {
    display: flex;
    gap: 16px;
    border-bottom: 0;
    justify-content: flex-end;
  }
  .view-group {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  .views-shaken {
    padding-left: 16px;
    border-left-color: oklch(45% 0.02 185);
  }
  .view-group-name {
    padding: 0;
    color: oklch(80% 0.01 185);
  }
  .view-list {
    display: flex;
    gap: 8px;
  }
  .view-link {
    min-height: 64px;
    padding: 0 12px;
    color: oklch(80% 0.01 185);
  }
  .view-link:hover,
  .view-link[aria-current="page"] {
    color: var(--accent-fg);
    border-bottom-color: var(--accent-fg);
  }
  .panel {
    max-width: 56rem;
    padding-top: 40px;
  }
  .candidate {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 32px;
    padding: 24px;
  }
  .candidate > * {
    grid-column: 1;
  }
  .candidate > .identity {
    justify-self: start;
  }
  .candidate > .candidate-aside {
    grid-column: 2;
    grid-row: 1 / span 6;
  }
}
