/* ============================================================
   Home page, set like a 1960s printed manual: warm stock, ink
   rules, a condensed display serif, Franklin gothic labels, and
   pen-and-ink plates. The shared header, date picker, and menus
   live with their components; everything here is scoped
   to the home route.
   ============================================================ */

body[data-route="/"] {
  --manual-max: 1180px;
}

/* ---- Home-page frame for the shared header and colophon ----- */
body[data-route="/"] .header-container {
  max-width: calc(var(--manual-max) + 2 * var(--page-gutter));
}

body[data-route="/"] .footer-content {
  max-width: var(--manual-max);
}

/* ============================================================
   Page frame
   ============================================================ */
.manual {
  width: 100%;
  max-width: calc(var(--manual-max) + 2 * var(--page-gutter));
  margin: 0 auto;
  padding: clamp(0.25rem, 1.5vw, 1rem) var(--page-gutter) clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3rem);
  font-family: var(--font-family-text);
  color: var(--manual-ink);
}

.manual a {
  color: inherit;
}

.manual :focus-visible {
  outline: 2px solid var(--manual-rust);
  outline-offset: 3px;
}

/* ---- Section heads: a label set between two rules ---------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  border-top: 2px solid var(--manual-ink);
  border-bottom: 1px solid var(--manual-rule);
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-family: var(--font-family-label);
  font-size: var(--font-size-sm);
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--manual-rust-ink);
}

.section-no {
  font-variant-numeric: tabular-nums;
}

.section-no::after {
  content: " /";
  white-space: pre;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--touch-target);
  font-family: var(--font-family-text);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--manual-ink);
  text-decoration: none;
  background-image: linear-gradient(currentcolor, currentcolor);
  background-size: 0% 1px;
  background-position: 0 calc(50% + 0.7em);
  background-repeat: no-repeat;
  transition:
    background-size var(--transition-normal),
    color var(--transition-fast);
}

.section-link:hover,
.section-link:focus-visible {
  color: var(--manual-rust-ink);
  background-size: 100% 1px;
}

/* ---- Captions ------------------------------------------------ */
.plate-caption {
  font-family: var(--font-family-text);
  font-size: var(--font-size-xs);
  font-style: italic;
  line-height: var(--line-height-snug);
  color: var(--manual-ink-faint);
}

/* ============================================================
   Title page
   ============================================================ */
.manual-title {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: end;
  gap: clamp(1rem, 3vw, 3rem);
  padding-top: clamp(0.5rem, 2vw, 1.5rem);
}

.manual-title-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-bottom: clamp(0.5rem, 3vw, 2.5rem);
  min-width: 0;
}

.manual-kicker {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  font-family: var(--font-family-label);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--manual-rust-ink);
}

.manual-kicker-rule {
  flex: 1 1 2rem;
  min-width: 1.5rem;
  border-top: 1px solid var(--manual-rule);
}

.manual-headline {
  margin: 0;
  font-family: var(--font-family-display);
  font-size: var(--font-size-5xl);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: var(--tracking-display);
  color: var(--manual-ink);
  text-wrap: balance;
}

.manual-area {
  margin: var(--space-1) 0 0;
  max-width: 34ch;
  font-family: var(--font-family-text);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-snug);
  color: var(--manual-ink);
  font-variant-numeric: lining-nums tabular-nums;
}

.manual-area strong {
  font-weight: var(--font-weight-bold);
}

.manual-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-2);
  font-family: var(--font-family-label);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--manual-ink-soft);
}

.manual-status:empty {
  display: none;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

.status-label.status-on {
  display: none;
}

#live-indicator.active ~ .status-off {
  display: none;
}

#live-indicator.active ~ .status-on {
  display: inline;
  color: var(--manual-rust-ink);
}

.live-dot {
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--manual-ink-soft);
  border-radius: 50%;
  flex: 0 0 auto;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.live-dot.active {
  border-color: var(--manual-rust);
  background: var(--manual-rust);
  animation: manualLivePulse 2.4s ease-in-out infinite;
}

@keyframes manualLivePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(var(--manual-ink-rgb) / 0%);
  }

  50% {
    box-shadow: 0 0 0 4px rgb(var(--manual-ink-rgb) / 12%);
  }
}

.weather-chip {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.status-chip + .weather-chip:not([hidden])::before {
  content: "\00B7";
  margin-right: var(--space-4);
  color: var(--manual-ink-faint);
}

.manual-plate {
  margin: 0;
  min-width: 0;
}

.manual-plate-hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-right: calc(var(--page-gutter) * -0.35);
}

.plate-caption {
  align-self: flex-end;
  text-align: right;
}

/* ============================================================
   Range totals: a mileage ledger printed straight onto the page
   ============================================================ */
.manual-log .section-head {
  margin-bottom: 0;
}

.ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr);
  border-bottom: 1px solid var(--manual-ink);
}

.ledger-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--space-3);
  min-width: 0;
  padding: clamp(1rem, 2vw, 1.5rem) clamp(1rem, 2vw, 1.75rem);
}

.ledger-cell.snapshot-figure {
  justify-content: space-between;
}

.ledger-cell + .ledger-cell {
  border-left: 1px solid var(--manual-rule);
}

.ledger-cell:first-child {
  padding-left: 0;
}

.snapshot-label,
.record-eyebrow {
  font-family: var(--font-family-label);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--manual-ink);
}

.snapshot-readout {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  min-width: 0;
}

.snapshot-value,
.record-value {
  font-family: var(--font-family-display);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: var(--tracking-tight);
  color: var(--manual-ink);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}

.snapshot-value {
  font-size: var(--font-size-4xl);
}

.snapshot-unit {
  font-family: var(--font-family-text);
  font-size: var(--font-size-xl);
  color: var(--manual-ink-soft);
}

.snapshot-figure.is-loading .snapshot-value {
  opacity: 0.4;
}

.snapshot-figure.is-loading .snapshot-label::after {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-left: var(--space-2);
  border: 1.5px solid currentcolor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: manualSpin 0.8s linear infinite;
  vertical-align: -0.05rem;
}

/* The personal record rotates on click; it reads as the ledger's
   margin entry rather than a button. */
.snapshot-record {
  gap: var(--space-2);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.snapshot-record:hover {
  background: rgb(var(--manual-ink-rgb) / 4%);
}

.snapshot-record.is-loading {
  cursor: wait;
  pointer-events: none;
}

.snapshot-record.is-loading .record-value,
.snapshot-record.is-loading .record-title,
.snapshot-record.is-loading .record-date {
  opacity: 0.5;
}

.record-eyebrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--manual-navy);
}

.record-count {
  font-family: var(--font-family-text);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-regular);
  text-transform: none;
  letter-spacing: var(--tracking-normal);
  color: var(--manual-ink-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.record-count:not(:empty)::after {
  content: " \21BB";
  display: inline-block;
  margin-left: var(--space-1);
  transition: transform var(--transition-normal);
}

.snapshot-record:hover .record-count::after {
  transform: rotate(120deg);
}

.record-value {
  margin-top: var(--space-1);
  font-size: var(--font-size-3xl);
}

.record-title {
  font-family: var(--font-family-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-snug);
  color: var(--manual-ink);
}

.record-date {
  font-family: var(--font-family-text);
  font-size: var(--font-size-xs);
  color: var(--manual-ink-faint);
}

/* ============================================================
   01 / Coverage: survey scales
   ============================================================ */
.manual-spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(1.5rem, 3.5vw, 3.5rem);
}

.manual-vignette {
  width: clamp(7.5rem, 12vw, 10.5rem);
  align-self: end;
}

.manual-vignette-pines {
  width: clamp(10rem, 17vw, 14rem);
}

.manual-vignette-pump {
  width: clamp(5.5rem, 8vw, 7rem);
}

.home-index .manual-spread {
  align-items: center;
}

.survey {
  --survey-cols: minmax(7rem, 11rem) minmax(0, 1fr) 5.25rem 7.5rem;

  margin: 0;
  min-width: 0;
}

.survey-scale {
  display: grid;
  grid-template-columns: var(--survey-cols);
  column-gap: var(--space-5);
  padding-bottom: var(--space-1);
}

.survey-scale-track {
  grid-column: 2;
  position: relative;
  height: 1.1rem;
  font-family: var(--font-family-label);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--manual-ink-faint);
  font-variant-numeric: tabular-nums;
}

.survey-scale-track span {
  position: absolute;
  bottom: 0;
  left: calc(var(--at) * 1%);
  transform: translateX(-50%);
}

.survey-scale-track span:first-child {
  transform: none;
}

.survey-scale-track span:last-child {
  transform: translateX(-72%);
}

.coverage-register {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--manual-rule-faint);
}

.coverage-register-row {
  border-bottom: 1px solid var(--manual-rule-faint);
}

.coverage-register-link {
  display: grid;
  grid-template-columns: var(--survey-cols);
  align-items: center;
  column-gap: var(--space-5);
  min-height: calc(var(--touch-target) + var(--space-4));
  padding: var(--space-2) 0;
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-fast);
}

.coverage-register-link:hover {
  background: rgb(var(--manual-ink-rgb) / 4%);
}

.coverage-register-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-family-text);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--manual-ink);
  transition: color var(--transition-fast);
}

.coverage-register-link:hover .coverage-register-name {
  color: var(--manual-rust-ink);
}

.coverage-register-row.is-complete .survey-fill {
  border-right: 0;
}

.coverage-register-pct {
  position: relative;
  justify-self: end;
  font-family: var(--font-family-display);
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--manual-ink);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}

.pencil-ring {
  position: absolute;
  top: -0.5rem;
  left: -0.75rem;
  width: calc(100% + 1.5rem);
  height: calc(100% + 1rem);
  overflow: visible;
  fill: none;
  stroke: var(--manual-rust);
  stroke-width: 1.6;
  stroke-linecap: round;
  pointer-events: none;
}

.pencil-ring path {
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: manualPencilDraw 900ms 700ms cubic-bezier(0.5, 0, 0.3, 1) forwards;
}

@keyframes manualPencilDraw {
  to {
    stroke-dashoffset: 0;
  }
}

.coverage-register.is-settled .survey-fill {
  transition: none;
}

.coverage-register.is-settled .pencil-ring path {
  animation: none;
  stroke-dashoffset: 0;
}

.coverage-register-left {
  font-family: var(--font-family-text);
  font-size: var(--font-size-sm);
  color: var(--manual-ink-soft);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}

/* ============================================================
   Primary actions: two illustrated manual entries
   ============================================================ */
.manual-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid var(--manual-ink);
  border-bottom: 1px solid var(--manual-ink);
}

.manual-action {
  position: relative;
  display: grid;
  grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  padding: clamp(1rem, 2.4vw, 1.75rem) clamp(0.75rem, 2vw, 1.5rem)
    clamp(1rem, 2.4vw, 1.75rem) 0;
  text-decoration: none;
  color: var(--manual-ink);
  transition: background var(--transition-fast);
}

.manual-action + .manual-action {
  border-left: 1px solid var(--manual-ink);
  padding-left: clamp(0.75rem, 2vw, 1.5rem);
}

.manual-action:hover {
  background: rgb(var(--manual-ink-rgb) / 4%);
}

.action-art {
  display: block;
  min-width: 0;
}

.action-art .plate {
  transition: transform var(--transition-normal);
  transform-origin: 50% 80%;
}

.manual-action:hover .action-art .plate {
  transform: rotate(-1.5deg) scale(1.03);
}

.action-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  padding-bottom: var(--space-1);
}

.action-title {
  font-family: var(--font-family-display);
  font-size: var(--font-size-3xl);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: var(--tracking-display);
  color: var(--manual-ink);
}

.action-sub {
  max-width: 30ch;
  font-family: var(--font-family-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-snug);
  color: var(--manual-ink-soft);
}

.action-arrow {
  width: 44px;
  height: 16px;
  margin-bottom: var(--space-2);
  fill: none;
  stroke: var(--manual-ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition:
    transform var(--transition-normal),
    stroke var(--transition-fast);
}

.manual-action:hover .action-arrow,
.manual-action:focus-visible .action-arrow {
  transform: translateX(6px);
  stroke: var(--manual-rust);
}

/* A pencilled tick marks the entries used most often (set by JS). */
.manual-action.tile-frequent .action-title::after,
.index-row.tile-frequent .index-title::after {
  content: "\2713";
  display: inline-block;
  margin-left: var(--space-2);
  font-family: var(--font-family-label);
  font-size: 0.7em;
  font-weight: 800;
  color: var(--manual-rust);
}

/* ============================================================
   02 / Index: a table of contents with dotted leaders
   ============================================================ */
.index-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  column-gap: clamp(2rem, 5vw, 4.5rem);
  background-image: linear-gradient(var(--manual-rule), var(--manual-rule));
  background-size: 1px 100%;
  background-position: 50% 0;
  background-repeat: no-repeat;
}

.index-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  min-height: var(--touch-target);
  padding: var(--space-2) 0;
  text-decoration: none;
  color: inherit;
}

.index-no {
  flex: 0 0 auto;
  min-width: 2ch;
  font-family: var(--font-family-label);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-wide);
  color: var(--manual-ink-faint);
  font-variant-numeric: tabular-nums;
}

.index-title {
  flex: 0 0 auto;
  font-family: var(--font-family-text);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--manual-ink);
  transition: color var(--transition-fast);
}

.index-leader {
  flex: 1 1 auto;
  min-width: 1.5rem;
  border-bottom: 2px dotted rgb(var(--manual-ink-rgb) / 42%);
  transform: translateY(-0.3em);
  transition: border-color var(--transition-fast);
}

.index-meta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-1);
  white-space: nowrap;
}

.index-meta[hidden] {
  display: none;
}

.index-meta .meta-value {
  font-family: var(--font-family-text);
  font-size: var(--font-size-sm);
  color: var(--manual-ink);
  font-variant-numeric: lining-nums tabular-nums;
}

.index-meta .meta-label {
  font-family: var(--font-family-label);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--manual-ink-soft);
}

.index-row:hover .index-title,
.index-row:focus-visible .index-title {
  color: var(--manual-rust-ink);
}

.index-row:hover .index-leader,
.index-row:focus-visible .index-leader {
  border-bottom-color: var(--manual-rust);
}

/* ============================================================
   03 / Recent trips: a driver's logbook
   ============================================================ */
.activity-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--manual-rust);
  animation: manualLivePulse 2.4s ease-in-out infinite;
}

.logbook {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-family-text);
  font-variant-numeric: lining-nums tabular-nums;
}

.logbook th,
.logbook td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  vertical-align: baseline;
}

.logbook th:first-child,
.logbook td:first-child {
  padding-left: 0;
}

.logbook thead th {
  padding-top: 0;
  padding-bottom: var(--space-2);
  border-bottom: 1.5px solid var(--manual-ink);
  font-family: var(--font-family-label);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--manual-ink-soft);
  white-space: nowrap;
}

.logbook tbody td {
  border-bottom: 1px solid var(--manual-rule-faint);
}

.logbook tbody td + td,
.logbook thead th + th {
  border-left: 1px solid var(--manual-rule-faint);
}

/* The margin rule of a ruled logbook, after the date column. */
.logbook tbody td:first-child,
.logbook thead th:first-child {
  box-shadow: inset -1px 0 0 var(--manual-rust);
}

.logbook .logbook-num {
  text-align: right;
}

.logbook-row {
  position: relative;
  transition: background var(--transition-fast);
}

.logbook-row:hover {
  background: rgb(var(--manual-ink-rgb) / 4%);
}

.logbook-date {
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
}

.logbook-time,
.logbook-duration {
  white-space: nowrap;
}

.logbook tbody .logbook-time,
.logbook tbody .logbook-duration {
  font-size: var(--font-size-sm);
  color: var(--manual-ink-soft);
}

.logbook-dest {
  width: 100%;
  max-width: 0;
}

.logbook-dest a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--font-size-md);
  text-decoration: none;
  color: var(--manual-ink);
}

/* Stretch the destination link across its row. */
.logbook-dest a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.logbook-row:hover .logbook-dest a {
  color: var(--manual-rust-ink);
}

.logbook-miles {
  font-family: var(--font-family-display);
  font-size: var(--font-size-lg);
  font-weight: 800;
  white-space: nowrap;
}

.logbook tfoot th,
.logbook tfoot td {
  padding-top: var(--space-3);
  border-top: 3px double var(--manual-ink);
}

.logbook .logbook-total-label {
  text-align: right;
  font-family: var(--font-family-label);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--manual-ink-soft);
}

.logbook-total {
  font-family: var(--font-family-display);
  font-size: var(--font-size-xl);
  font-weight: 800;
  white-space: nowrap;
}

.logbook tbody .logbook-placeholder td,
.logbook tbody .logbook-empty td {
  padding: var(--space-8) 0;
  text-align: center;
  font-style: italic;
  color: var(--manual-ink-faint);
  box-shadow: none;
}

.loading-pulse {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--manual-rule);
  border-radius: 50%;
  animation: manualLoadingPulse 1.6s ease-in-out infinite;
}

@keyframes manualLoadingPulse {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.5;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes manualSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- The engraved car, laid over the hero plate --------------
   Alpha masks from scripts/engrave_landing_car.py take the page's
   inks: paper under the car and ink lines by day, a solid ground
   and cream highlight lines by night, rust for the lamps. The page
   script (features/landing/car.js) drives it along the road. */
.plate-hero-art {
  position: relative;
  overflow: hidden;
}

/* The road runs off the bottom of the plate; keep it inside the frame. */
.plate-hero {
  overflow: hidden;
}

.plate-car {
  position: absolute;
  aspect-ratio: 600 / 408;
  pointer-events: none;
  transform-origin: 54% 93%;
}

/* Hidden until the script drives it in; shown anyway if it never runs. */
.plate-car:not(.is-ready) {
  opacity: 0;
  animation: plateCarShow 0s 2.5s forwards;
}

@keyframes plateCarShow {
  to {
    opacity: 1;
  }
}

.plate-car.is-moving {
  will-change: transform, opacity;
}

.plate-car.is-interactive {
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.plate-car-body {
  position: absolute;
  inset: 0;
  transform-origin: 54% 93%;
}

.plate-car-body > span {
  position: absolute;
  inset: 0;
  mask-position: 0 0;
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
}

.plate-car-base {
  background-color: var(--manual-solid);
  mask-image: url("../../images/landing/murano-silhouette.webp");
}

.plate-car-ink {
  background-color: var(--manual-ink);
  mask-image: url("../../images/landing/murano-highlight.webp");
}

.plate-car-lamps {
  background-color: var(--manual-rust);
  mask-image: url("../../images/landing/murano-lamps.webp");
}

html.light-mode .plate-car-base {
  background-color: var(--manual-paper);
}

html.light-mode .plate-car-ink {
  mask-image: url("../../images/landing/murano-ink.webp");
}

.plate-car-shadow {
  position: absolute;
  left: 2%;
  top: 83%;
  width: 104%;
  height: 20%;
  overflow: visible;
  transform: rotate(-9deg);
}

.plate-car-shadow ellipse {
  fill: var(--manual-solid);
  opacity: 0.55;
}

html.light-mode .plate-car-shadow ellipse {
  opacity: 0.22;
}

/* A little rev of the engine when the pointer rests on the car. */
.plate-car.is-interactive:hover .plate-car-body {
  animation: plateCarRev 420ms ease-out;
}

@keyframes plateCarRev {
  0%,
  100% {
    transform: none;
  }

  20% {
    transform: translateY(-0.7%) rotate(-0.5deg);
  }

  45% {
    transform: translateY(0.35%) rotate(0.35deg);
  }

  70% {
    transform: translateY(-0.2%);
  }
}

/* Exhaust, drawn as small ink clouds that drift back and fade. */
.plate-puff {
  position: absolute;
  width: var(--puff-size, 5%);
  aspect-ratio: 44 / 30;
  pointer-events: none;
  opacity: 0;
  transform: translate(-85%, -55%) scale(0.3);
  animation: platePuff 1.7s cubic-bezier(0.2, 0.6, 0.3, 1) forwards;
}

.plate-puff svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.plate-puff-cloud {
  fill: var(--manual-paper);
  stroke: var(--manual-ink);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.plate-puff-curl {
  fill: none;
  stroke: var(--manual-ink);
  stroke-width: 1.1;
  stroke-linecap: round;
  opacity: 0.7;
}

@keyframes platePuff {
  0% {
    opacity: 0.95;
    transform: translate(-85%, -55%) scale(0.3);
  }

  100% {
    opacity: 0;
    transform: translate(-200%, -30%) scale(1.4);
  }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (width <= 1100px) {
  .manual-vignette-transit,
  .manual-vignette-pump {
    display: none;
  }

  .manual-spread:has(.manual-vignette-transit),
  .manual-spread:has(.manual-vignette-pump) {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (width <= 960px) {
  .manual-title {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
  }

  .manual-title-copy {
    padding-bottom: 0;
  }

  .manual-plate-hero {
    margin-right: 0;
  }

  .ledger {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .snapshot-record {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--manual-rule);
    padding-left: 0;
  }

  .ledger-cell + .ledger-cell.snapshot-record {
    border-left: 0;
  }

  .manual-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .manual-action {
    grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr) auto;
    padding-right: 0;
  }

  .manual-action + .manual-action {
    border-left: 0;
    border-top: 1px solid var(--manual-ink);
    padding-left: 0;
  }

  .manual-vignette-pines {
    display: none;
  }

  .manual-spread {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (width <= 720px) {
  .manual {
    gap: var(--space-8);
  }

  .manual-area {
    font-size: var(--font-size-lg);
  }

  .ledger-cell {
    padding: var(--space-4) var(--space-3);
  }

  .ledger-cell:first-child,
  .snapshot-record {
    padding-left: 0;
  }

  .snapshot-label {
    letter-spacing: var(--tracking-caps);
  }

  .snapshot-value {
    font-size: var(--font-size-2xl);
  }

  .snapshot-unit {
    font-size: var(--font-size-md);
  }

  .record-value {
    font-size: var(--font-size-2xl);
  }

  .survey {
    --survey-cols: minmax(0, 1fr) auto;
  }

  .survey-scale {
    display: none;
  }

  .coverage-register {
    border-top: 0;
  }

  .coverage-register-link {
    grid-template-areas:
      "name pct"
      "bar bar"
      "left left";
    row-gap: var(--space-2);
    padding: var(--space-3) 0;
  }

  .coverage-register-name {
    grid-area: name;
  }

  .survey-bar {
    grid-area: bar;
  }

  .coverage-register-pct {
    grid-area: pct;
  }

  .coverage-register-left {
    grid-area: left;
  }

  .manual-action {
    grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  }

  .action-title {
    font-size: var(--font-size-2xl);
  }

  .index-columns {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-flow: row;
    background-image: none;
  }

  .logbook-time,
  .logbook-duration {
    display: none;
  }

  .logbook th,
  .logbook td {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }
}

@media (width <= 400px) {
  .manual-action {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }

  .action-arrow {
    display: none;
  }

  .snapshot-value {
    font-size: var(--font-size-xl);
  }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .live-dot.active,
  .activity-live-dot,
  .loading-pulse,
  .snapshot-figure.is-loading .snapshot-label::after {
    animation: none;
  }

  .pencil-ring path {
    animation: none;
    stroke-dashoffset: 0;
  }

  .survey-fill,
  .action-arrow,
  .action-art .plate,
  .record-count::after {
    transition: none;
  }

  .plate-car:not(.is-ready) {
    opacity: 1;
    animation: none;
  }

  .plate-car.is-interactive:hover .plate-car-body,
  .plate-puff {
    animation: none;
  }

  .manual-action:hover .action-art .plate,
  .manual-action:hover .action-arrow,
  .manual-action:focus-visible .action-arrow {
    transform: none;
  }
}
