/* ============================================================
   VEHICLE INTELLIGENCE TERMINAL
   The centrepiece. A real instrument, not a decoration.
   ============================================================ */

.vit {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-deep) 100%);
  box-shadow: var(--shadow-lg);
  /* visible so manual <select> dropdowns are not clipped by the shell */
  overflow: visible;
  isolation: isolate;
}

/* Terminal chrome — desktop: lights | title+brand | online (right).
   Mobile: lights + title tight, brand never clipped; online on the row below. */
.vit__chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface-2) 80%, transparent);
  backdrop-filter: blur(8px);
  overflow: hidden;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.vit__lights {
  display: flex;
  gap: 6px;
  flex: none;
}
.vit__lights i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: block;
}
.vit__lights i:nth-child(1) {
  background: #fb5f57;
}
.vit__lights i:nth-child(2) {
  background: #fbbe2e;
}
.vit__lights i:nth-child(3) {
  background: #2ac840;
}
.vit__title {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-3);
  line-height: 1.2;
}
.vit__title-txt {
  min-width: 0;
  flex: 0 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vit__title-brand {
  flex: none;
  white-space: nowrap;
  color: var(--text-2);
}
.vit__title-brand::before {
  content: '· ';
  color: var(--text-3);
}
.vit__online {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ok);
  flex: none;
  white-space: nowrap;
  line-height: 1;
}
@media (max-width: 799.98px) {
  .vit__chrome {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      'lights title'
      'online online';
    column-gap: 2px;
    row-gap: 4px;
    align-items: center;
    overflow: hidden;
    padding: 10px 12px 10px 10px;
  }
  .vit__lights {
    grid-area: lights;
  }
  .vit__title {
    grid-area: title;
    letter-spacing: 0.01em;
    font-size: 10px;
    gap: 4px;
  }
  .vit__online {
    grid-area: online;
    margin-left: 0;
    justify-self: start;
  }
}

/* Scanline + glow */
.vit::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 70% 50% at 20% 0%, var(--accent-glow), transparent 65%);
  pointer-events: none;
}
.vit__scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 140px;
  z-index: 1;
  pointer-events: none !important;
  background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--accent) 12%, transparent), transparent);
  opacity: 0;
  top: -140px;
}
.vit.scanning .vit__scan {
  animation: scanSweep 1.35s var(--ease-io) infinite;
  opacity: 1;
}
@keyframes scanSweep {
  0% {
    top: -140px;
  }
  100% {
    top: 100%;
  }
}

/* ---------- Body layout ---------- */

.vit__body {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 980px) {
  .vit__body {
    grid-template-columns: 372px 1fr;
  }
}

/* ---------- Left: input console ---------- */

.vit__console {
  position: relative;
  z-index: 5;
  padding: clamp(var(--space-5), 2.4vw, var(--space-8));
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  background: color-mix(in oklab, var(--surface) 55%, transparent);
  overflow: visible;
}
@media (min-width: 980px) {
  .vit__console {
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }
}

.vit__h {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.vit__h h3 {
  font-size: var(--text-lg);
  letter-spacing: -0.028em;
}
.vit__h p {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.5;
}
.vit__plate-lead {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

/* Mode tabs */
.vit__tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.vit__tab {
  padding: 8px 4px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: all 0.18s var(--ease);
}
.vit__tab:hover {
  color: var(--text);
}
.vit__tab[aria-selected='true'] {
  background: var(--surface-3);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.vit__pane {
  display: none;
  flex-direction: column;
  gap: var(--space-4);
}
.vit__pane.on {
  display: flex;
}

/* ---------- The Dutch licence plate ---------- */

.plate {
  display: flex;
  align-items: stretch;
  height: 62px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--plate);
  border: 2px solid #0000;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 6px 20px -8px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: box-shadow 0.2s var(--ease);
  position: relative;
}
.plate__caret {
  position: absolute;
  left: calc(40px + 18%);
  top: 50%;
  width: 2px;
  height: 1.35em;
  margin-top: -0.68em;
  background: color-mix(in oklab, var(--plate-ink) 45%, transparent);
  pointer-events: none;
  animation: plateCaret 1.05s steps(2) infinite;
  z-index: 2;
}
.plate__caret[hidden],
.plate:focus-within .plate__caret,
.plate.is-filled .plate__caret {
  display: none;
}
@keyframes plateCaret {
  0%, 49% { opacity: 0.55; }
  50%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .plate__caret { animation: none; opacity: 0.4; }
}
.plate:focus-within {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 0 0 4px var(--accent-glow), 0 6px 20px -8px rgba(0, 0, 0, 0.7);
}
.plate__eu {
  width: 40px;
  flex: none;
  background: var(--plate-blue);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-block: 8px;
}
.plate__stars {
  width: 18px;
  height: 18px;
}
.plate__eu b {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}
.plate input {
  flex: 1;
  min-width: 0;
  background: transparent;
  color: var(--plate-ink);
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  padding-inline: var(--space-2);
}
.plate input:focus {
  outline: none;
}
.plate input::placeholder {
  color: rgba(23, 18, 3, 0.34);
}

.hintline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.hintline b {
  color: var(--accent);
  font-weight: 450;
}

/* VIN input */
.vin-box {
  position: relative;
}
.vin-box input {
  width: 100%;
  height: 56px;
  padding: 0 var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--bg-deep);
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 3.4vw, 1.15rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  transition: border-color 0.16s, box-shadow 0.16s;
}
.vin-box input:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.vin-box input::placeholder {
  color: var(--text-3);
  letter-spacing: 0.14em;
}
.vin-meter {
  display: flex;
  gap: 3px;
  margin-top: var(--space-3);
}
.vin-meter i {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--surface-3);
  transition: background-color 0.2s var(--ease);
}
.vin-meter i.on {
  background: var(--accent);
}

/* Manual selects — stay above scanline / glow layers */
.vit__manual {
  display: grid;
  gap: var(--space-3);
  position: relative;
  z-index: 6;
}
.vit__manual select.inp {
  pointer-events: auto;
  position: relative;
  z-index: 6;
  cursor: pointer;
}
.vit__manual .series-acc-value[hidden] {
  display: none;
}
.series-acc {
  display: grid;
  gap: 6px;
}
.series-acc__hint,
.series-acc__status {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-3);
}
.series-acc__g {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.series-acc__g summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  font-size: 13px;
  color: var(--text);
}
.series-acc__g summary::-webkit-details-marker { display: none; }
.series-acc__g summary::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 1.6px solid var(--text-3);
  border-bottom: 1.6px solid var(--text-3);
  transform: rotate(-45deg);
  flex: none;
}
.series-acc__g[open] summary::after {
  transform: rotate(45deg);
}
.series-acc__g summary i {
  margin-left: auto;
  margin-right: 8px;
  font-style: normal;
  font-size: 11px;
  color: var(--text-3);
}
.series-acc__list {
  display: grid;
  gap: 2px;
  padding: 0 6px 8px;
}
.series-acc__item {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  padding: 8px 10px;
  cursor: pointer;
  font-size: 12.5px;
}
.series-acc__item:hover {
  background: var(--surface);
  color: var(--text);
}
.series-acc__item.is-on {
  color: var(--accent);
  background: var(--accent-glow);
}

/* Demo plate chips — 2×2 grid (2 left, 2 right) */
.demos {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.demos__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
.demo-chip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  padding: 5px 9px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  transition: all 0.16s;
  text-align: left;
  min-width: 0;
}
.demo-chip:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.vit__meta {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.vit__meta span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---------- Right: output screen ---------- */

.vit__screen {
  position: relative;
  z-index: 2;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  background: repeating-linear-gradient(
      180deg,
      transparent 0 3px,
      color-mix(in oklab, var(--accent) 2%, transparent) 3px 4px
    ),
    var(--bg-deep);
}
@media (min-width: 980px) {
  .vit__chrome {
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }
  .vit__console {
    border-radius: 0 0 0 var(--r-xl);
  }
  .vit__screen {
    border-radius: 0 0 var(--r-xl) 0;
  }
}
[data-theme='light'] .vit__screen {
  background: var(--surface-2);
}

.vit__stage {
  padding: clamp(var(--space-5), 2.4vw, var(--space-8));
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Idle state */
.vit-idle {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-6);
  text-align: left;
}
.vit-idle__art {
  width: 100%;
  max-width: 300px;
  color: var(--border-strong);
}
.vit-idle h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 450;
}
.vit-idle p {
  font-size: var(--text-sm);
  color: var(--text-2);
  max-width: 46ch;
  line-height: 1.6;
}
.vit-idle__list {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.vit-idle__list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
}
.vit-idle__list li::before {
  content: '›';
  color: var(--accent);
}

/* Log stream */
.vit-log {
  display: grid;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
}
.vit-log li {
  display: grid;
  grid-template-columns: 62px 14px 1fr;
  gap: var(--space-2);
  color: var(--text-2);
  opacity: 0;
  animation: logIn 0.3s var(--ease) forwards;
}
@keyframes logIn {
  to {
    opacity: 1;
  }
}
.vit-log .t {
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.vit-log .s {
  color: var(--accent);
}
.vit-log li.ok .s {
  color: var(--ok);
}
.vit-log li.err .s,
.vit-log li.err .m {
  color: var(--danger);
}
.vit-log li.warn .s {
  color: var(--warn);
}
.vit-log .m {
  color: var(--text-2);
}
.vit-log .m b {
  color: var(--text);
  font-weight: 500;
}
.caret::after {
  content: '▊';
  color: var(--accent);
  animation: blink 1s steps(2) infinite;
  margin-left: 3px;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ---------- Vehicle identity ---------- */

.vid {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  animation: fadeUp 0.5s var(--ease) both;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.vid__acts {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}
.oem-btn {
  white-space: normal;
  height: auto;
  min-height: 36px;
  padding-block: 6px;
  text-align: center;
  line-height: 1.25;
  max-width: min(280px, 100%);
  overflow-wrap: anywhere;
}
.oem-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin: 0 0 var(--space-4);
  padding: 10px 14px;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--border));
  border-radius: var(--r-md);
  background: color-mix(in oklab, var(--accent-soft) 70%, transparent);
  text-decoration: none;
  color: inherit;
}
.oem-banner:hover {
  border-color: var(--accent);
}
.oem-banner__k {
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.oem-banner__s {
  font-size: 0.95rem;
}
/* Feature categories collapse by default. Expanded, the ~56 unlockable
   functions pushed the basket and the WhatsApp action off the bottom of the
   phone screen, so each heading is now a disclosure with its own item count. */
.feat-cats {
  display: grid;
  gap: var(--space-2);
}
.feat-cat {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  overflow: hidden;
}
.feat-cat__btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 48px;
  padding: 12px var(--space-3);
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  list-style: none;
}
.feat-cat__btn::-webkit-details-marker {
  display: none;
}
.feat-cat__btn::marker {
  content: '';
  display: none;
}
.feat-cat__btn:hover .feat-cat__h,
.feat-cat.open .feat-cat__h {
  color: var(--accent);
}
.feat-cat__h {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s var(--ease);
}
.feat-cat__n {
  flex: 0 0 auto;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-transform: none;
}
.feat-cat.open .feat-cat__n {
  background: var(--accent);
  color: var(--accent-ink);
}
.feat-cat__chev {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border-strong);
  transition: transform 0.28s var(--ease), color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.feat-cat__chev svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}
.feat-cat.open .feat-cat__chev {
  transform: rotate(180deg);
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.feat-cat__pane {
  overflow: hidden;
}
.feat-cat__pane .chiprow {
  padding: 0 var(--space-3) var(--space-3);
}
@media (prefers-reduced-motion: reduce) {
  .feat-cat__pane,
  .feat-cat__chev {
    transition: none;
  }
}
.vid__head {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
}
.vid__name {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  flex: 1 1 12rem;
}
.vid__name .mono {
  color: var(--accent);
}
.vid__name h4 {
  font-size: clamp(1.25rem, 3.6vw, 1.75rem);
  font-weight: 560;
  letter-spacing: -0.032em;
  line-height: 1.1;
  text-transform: uppercase;
}
.vid__plate {
  flex: none;
  display: inline-flex;
  align-items: stretch;
  height: 34px;
  padding: 0;
  overflow: hidden;
  border-radius: 5px;
  background: var(--plate);
  color: var(--plate-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.vid__plate__eu {
  width: 26px;
  flex: none;
  background: var(--plate-blue);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding-block: 3px;
}
.vid__plate__eu .plate__stars {
  width: 12px;
  height: 12px;
}
.vid__plate__eu b {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}
.vid__plate__num {
  display: inline-flex;
  align-items: center;
  padding-inline: var(--space-3);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

/* Spec table */
.spec {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 620px) {
  .spec {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1240px) {
  .spec {
    grid-template-columns: repeat(4, 1fr);
  }
}
.spec > div {
  background: var(--surface);
  padding: var(--space-3) var(--space-4);
  display: grid;
  gap: 3px;
  min-width: 0;
}
.spec dt {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.spec dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spec dd.hi {
  color: var(--accent);
}

/* ---------- Digital twin — power bars ---------- */

.twin {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}
.twin__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--divider);
  flex-wrap: wrap;
}
.twin__head .mono {
  color: var(--text-3);
}
.twin__head .chip {
  margin-left: auto;
}
.twin__body {
  padding: var(--space-5) var(--space-4);
  display: grid;
  gap: var(--space-5);
}
.twin__grid {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 560px) {
  .twin__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.gauge {
  display: grid;
  gap: var(--space-3);
}
.gauge__lab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 5px 11px 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.gauge__lab .mono {
  color: inherit;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.gauge__dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: currentColor;
}
.gauge__lab--hp {
  color: var(--accent);
  border-color: color-mix(in oklab, var(--accent) 42%, var(--border));
  background: color-mix(in oklab, var(--accent) 10%, var(--surface));
  box-shadow: 0 0 14px color-mix(in oklab, var(--accent) 22%, transparent);
}
.gauge__lab--hp .gauge__dot {
  box-shadow: 0 0 8px color-mix(in oklab, var(--accent) 70%, transparent);
}
.gauge__lab--nm {
  color: var(--warn);
  border-color: color-mix(in oklab, var(--warn) 42%, var(--border));
  background: color-mix(in oklab, var(--warn) 10%, var(--surface));
  box-shadow: 0 0 14px color-mix(in oklab, var(--warn) 20%, transparent);
}
.gauge__lab--nm .gauge__dot {
  box-shadow: 0 0 8px color-mix(in oklab, var(--warn) 70%, transparent);
}
.gauge--hp .grow__v small {
  color: var(--accent);
  font-weight: 600;
}
.gauge--nm .grow__v small {
  color: var(--warn);
  font-weight: 600;
}
.gauge__rows {
  display: grid;
  gap: var(--space-3);
}
.grow {
  display: grid;
  grid-template-columns: 58px 1fr 96px;
  gap: var(--space-3);
  align-items: center;
}
.grow__n {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-3);
}
.grow__bar {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-3);
  overflow: hidden;
  position: relative;
}
.grow__fill {
  height: 100%;
  border-radius: 4px;
  width: 0;
  transition: width 1.05s var(--ease);
  position: relative;
  overflow: hidden;
}
.grow__fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-100%);
  animation: sheen 2.4s var(--ease-io) infinite;
}
@keyframes sheen {
  60%,
  100% {
    transform: translateX(100%);
  }
}
.grow--stock .grow__fill {
  background: var(--text-3);
}
.grow--s1 .grow__fill {
  background: var(--accent);
}
.grow--s2 .grow__fill {
  background: linear-gradient(90deg, var(--accent), #3d7cff);
  box-shadow: 0 0 12px rgba(0, 212, 240, 0.35);
}
.grow--s3 .grow__fill {
  background: linear-gradient(90deg, #2fd68a, #00d4f0);
  box-shadow: 0 0 14px rgba(47, 214, 138, 0.45);
}
.grow__v--glow {
  text-shadow: 0 0 10px rgba(0, 212, 240, 0.35);
}

/* Stage rows this engine cannot reach on software alone. They keep their slot
   so both gauges stay row-aligned, but read as deliberately empty rather than
   as a value that failed to load. */
.grow--na .grow__n,
.grow__v--na {
  color: var(--text-3);
}
.grow--na .grow__bar {
  background: repeating-linear-gradient(
    -45deg,
    var(--surface-3) 0 4px,
    transparent 4px 8px
  );
  opacity: 0.7;
}
.grow__v--na {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.twin__na {
  border-left: 2px solid var(--warn);
  padding: 8px 0 8px 10px;
  color: var(--text-2);
  font-size: var(--text-sm);
  line-height: 1.55;
  max-width: 68ch;
}
.twin__factory {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--text-3);
  line-height: 1.5;
  margin-top: -8px;
}
.grow__v {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text);
}
.grow__v em {
  font-style: normal;
  color: var(--ok);
  font-size: 10.5px;
  margin-left: 5px;
}
.grow__v small {
  color: var(--text-3);
  font-size: 9.5px;
  margin-left: 2px;
}

.twin__note {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--text-3);
  line-height: 1.6;
  border-top: 1px solid var(--divider);
  padding-top: var(--space-3);
  text-transform: uppercase;
}

/* ---------- Matched jobs (the money list) ---------- */

.jobs {
  display: grid;
  gap: var(--space-3);
}
.jobs__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.jobs__head .mono {
  color: var(--text-3);
}

.job {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: stretch;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: left;
  width: 100%;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
  position: relative;
}
.job:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.job.sel {
  border-color: var(--accent-dim);
  background: color-mix(in oklab, var(--accent) 6%, var(--surface));
}
.job__box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  background: var(--surface-3);
  display: grid;
  place-items: center;
  margin-top: 1px;
  transition: all 0.18s var(--ease);
  flex: none;
}
.job__box svg {
  width: 11px;
  height: 11px;
  color: var(--accent-ink);
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.18s var(--ease);
}
.job.sel .job__box {
  background: var(--accent);
  border-color: var(--accent);
}
.job.sel .job__box svg {
  opacity: 1;
  transform: none;
}
.job__m {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.job__t {
  font-size: var(--text-sm);
  font-weight: 560;
  letter-spacing: -0.014em;
  overflow-wrap: anywhere;
}
.job__d {
  font-size: var(--text-xs);
  color: var(--text-2);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.job__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.job__meta {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.job__p {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  text-align: left;
  flex: none;
}
.job__p small {
  display: inline;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-right: 5px;
}

.jobs .svc-more-wrap {
  margin-top: var(--space-4);
}
.jobs__list {
  display: grid;
  gap: var(--space-3);
}

/* Basket / total */
.basket {
  position: sticky;
  bottom: 0;
  margin-top: var(--space-2);
  border: 1px solid var(--accent-dim);
  border-radius: var(--r-md);
  background: color-mix(in oklab, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.basket__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.basket__l {
  display: grid;
  gap: 3px;
}
.basket__l .mono {
  color: var(--text-3);
  font-size: 9.5px;
}
.basket__t {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.basket__acts {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 1fr;
}
@media (min-width: 520px) {
  .basket__acts {
    grid-template-columns: 1.4fr 1fr;
  }
}

/* Report actions row */
.repacts {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding-top: var(--space-2);
}

/* Error state */
.vit-err {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-left: 2px solid var(--warn);
  border-radius: var(--r-md);
  background: var(--surface);
  animation: fadeUp 0.4s var(--ease) both;
}
.vit-err h4 {
  font-size: var(--text-base);
}
.vit-err p {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.55;
  max-width: 52ch;
}
.vit-err__acts {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Skeleton */
.skel {
  display: grid;
  gap: var(--space-4);
}
.skel i {
  display: block;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 240% 100%;
  animation: shimmer 1.5s linear infinite;
}
.skel i:nth-child(1) {
  width: 42%;
  height: 26px;
}
.skel i:nth-child(2) {
  width: 78%;
}
.skel i:nth-child(3) {
  width: 60%;
}
.skel i:nth-child(4) {
  width: 88%;
  height: 60px;
}
@keyframes shimmer {
  to {
    background-position: -240% 0;
  }
}

/* ============================================================
   DTC LOOKUP
   ============================================================ */

.dtc {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.dtc__in {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-5);
  border-bottom: 1px solid var(--divider);
  flex-wrap: wrap;
  align-items: center;
  background: var(--surface-2);
}
.dtc__in input {
  flex: 1 1 200px;
  height: 50px;
  padding-inline: var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--bg-deep);
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  min-width: 0;
}
/* Light mode: soften the bright white “database” panel so it is easier on the eyes */
[data-theme='light'] #foutcodes .dtc {
  background: color-mix(in oklab, var(--bg-deep) 72%, var(--surface));
  border-color: color-mix(in oklab, var(--border) 80%, var(--border-strong));
  box-shadow: none;
}
[data-theme='light'] #foutcodes .dtc__in {
  background: color-mix(in oklab, var(--bg-deep) 55%, var(--surface-3));
}
[data-theme='light'] #foutcodes .dtc__out {
  background: color-mix(in oklab, var(--bg-deep) 40%, transparent);
}
[data-theme='light'] #foutcodes .dtc-hit {
  background: color-mix(in oklab, var(--surface-2) 65%, var(--bg-deep));
  border-color: color-mix(in oklab, var(--border) 70%, var(--border-strong));
}
[data-theme='light'] .dtc__in input,
[data-theme='light'] #foutcodes .dtc__in input {
  background: color-mix(in oklab, var(--surface-2) 70%, var(--bg-deep));
}
.dtc__in input:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.dtc__in input::placeholder {
  color: var(--text-3);
}
.dtc__out {
  padding: var(--space-6) var(--space-5);
  min-height: 190px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.dtc__hits {
  display: grid;
  gap: var(--space-3);
}
.dtc-hit {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  animation: fadeUp 0.35s var(--ease) both;
}
.dtc-hit__top {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.dtc-hit__c {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.dtc-hit__sys {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
}
.dtc-hit h3,
.dtc-hit h4 {
  font-size: var(--text-sm);
}
.dtc-hit p {
  font-size: var(--text-xs);
  color: var(--text-2);
  line-height: 1.6;
}
.dtc-hit ul {
  display: grid;
  gap: 5px;
}
.dtc-hit li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-2);
}
.dtc-hit li::before {
  content: '›';
  color: var(--accent);
  font-family: var(--font-mono);
}
.dtc-hit__acts {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding-top: var(--space-1);
}
.dtc-cats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.empty .dtc-cats {
  justify-content: center;
  max-width: 42ch;
}
.dtc__samples {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--divider);
}
.dtc__sample-grid {
  display: grid;
  gap: var(--space-3);
}
@media (min-width: 800px) {
  .dtc__sample-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.dtc-sample {
  display: grid;
  gap: var(--space-2);
  align-content: start;
  width: 100%;
  text-align: left;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: inherit;
  cursor: pointer;
}
.dtc-sample:hover,
.dtc-sample:focus-visible {
  border-color: var(--accent);
  outline: none;
}
.dtc-sample strong {
  font-size: var(--text-sm);
  line-height: 1.35;
}
.dtc-sample > span:last-child {
  font-size: var(--text-xs);
  color: var(--text-2);
  line-height: 1.55;
}
[data-theme='light'] .dtc-sample {
  background: color-mix(in oklab, var(--surface-2) 65%, var(--bg-deep));
}

.dtc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: inherit;
  cursor: pointer;
}
.dtc-row span:nth-child(2) {
  min-width: 0;
  flex: 1;
  font-size: var(--text-xs);
  color: var(--text-2);
}
.dtc-row svg {
  flex: none;
  width: 16px;
  height: 16px;
  opacity: 0.55;
}
.dtc-row:hover {
  border-color: var(--accent);
}
.seo-embed {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.dtc-popular {
  display: none;
}
.dtc-popular__h {
  font-size: 1.05rem;
  margin: 0;
  letter-spacing: -0.02em;
}
.dtc-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line, rgba(255,255,255,.08));
  border-radius: 12px;
  overflow: hidden;
}
.dtc-item {
  border-bottom: 1px solid var(--line, rgba(255,255,255,.08));
}
.dtc-item:last-child { border-bottom: 0; }
.dtc-item > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 1rem;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 13px;
}
.dtc-item > summary::-webkit-details-marker { display: none; }
.dtc-item > *:not(summary) {
  margin: 0;
  padding: 0 1rem 0.85rem;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted, inherit);
}

/* Wide screens: terminal breathes */
@media (min-width: 1400px) {
  .vit__body {
    grid-template-columns: 400px 1fr;
  }
}
