/*
 * CarbScope design system: the shared components, as the app draws them (KEV-1318).
 * Loaded after tokens.css by the dashboard, both sites and the design previews, and
 * before each surface's own stylesheet, so a surface's rules win ties. Colours, type and spacing come
 * from the tokens; nothing in here is a raw colour. Each block is a component named in design/README.md; the
 * sites' pieces (site bar, link buttons, badges, notes, doc cards, prose) follow the dashboard's.
 */

/* ---- focus ---- */

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

/* ---- text utilities ---- */

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
  line-height: 1.45;
}

.block {
  display: block;
}

.num {
  font-family: var(--font-num);
}

.strong {
  font-weight: 600;
}

.label {
  font-family: var(--font-cond);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.title {
  font: 600 20px/1.3 var(--font-sans);
}

.empty {
  padding: var(--space-3);
  text-align: center;
}

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

button {
  font: inherit;
  font-weight: 600;
  color: inherit;
  min-height: var(--size-touch);
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.primary {
  background: var(--accent);
  color: var(--on-accent);
  border: 0;
}

.quiet {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.danger {
  color: var(--lean);
}

.big {
  min-height: 56px;
  font-size: 17px;
}

.small-btn {
  min-height: 36px;
  padding: 0 var(--space-3);
  font-size: 14px;
}

input[type='number'],
input[type='text'],
input[type='password'] {
  min-height: var(--size-touch);
  width: 100%;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: 500 16px var(--font-num);
}

.select {
  position: relative;
  display: block;
}

input[type='text'],
input[type='password'],
input[type='email'],
textarea {
  font: 500 16px var(--font-sans);
}

input[type='email'],
textarea {
  min-height: var(--size-touch);
  width: 100%;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

textarea {
  padding: var(--space-2) var(--space-3);
  line-height: 1.5;
  resize: vertical;
}

.link-btn {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-text);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: var(--size-touch);
  padding: 0 40px 0 var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.select::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}

/* ---- status icon ---- */

/* The link in the app bar (KEV-1582): a chip with the 22px connection icon and its word (Connect, Live, Replay; Demo
   after a dot), in a 48px tap target. The icon's shape says the transport and the state; data-state colours it. */
.status-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: var(--size-touch);
  min-height: var(--size-touch);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

/* The chip itself sits inside the tap target, 36px tall. */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px 0 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.status-icon:hover .status-chip {
  border-color: var(--ink);
}

.status-word {
  font: 600 14px/1 var(--font-sans);
  color: var(--ink);
  white-space: nowrap;
}

.status-word:empty,
.status-word[hidden] {
  display: none;
}

/* In a demo the word is Demo, after a dot in the OK colour while it's streaming; recording, Rec and its time after
   a dot in the lean colour. */
.status-icon:is([data-demo], [data-rec]) .status-word {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-num);
}

.status-icon:is([data-demo], [data-rec]) .status-word::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.status-icon[data-demo][data-state='live'] .status-word::before {
  background: var(--ok);
}

/* The dot keeps the Demo tag's beacon (V2): a ring spreads from it while the demo streams, as one spread from the
   tag. Recording, it blinks like Record's own dot. Both stop under reduced motion (motion, below). */
.status-icon[data-demo][data-state='live']:not([data-rec]) .status-word::before {
  animation: demo-ring var(--duration-beacon) var(--ease-out) infinite;
}

.status-icon[data-rec] .status-word::before {
  animation: blink var(--duration-blink) steps(1) infinite;
}

@keyframes demo-ring {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 70%, transparent);
  }

  70%,
  100% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 0%, transparent);
  }
}

/* Recording wins over the demo's dot, however the demo's state is set. */
.status-icon[data-rec]:is([data-state], [data-demo]) .status-word::before {
  background: var(--lean);
}

.status-icon[data-rec] .status-word {
  font-variant-numeric: tabular-nums;
}

/* Not connected: the chip asks, in the accent. */
.status-icon[data-state='idle']:not([data-icon='history']) .status-chip {
  border-color: var(--accent);
}

.status-icon[data-state='idle']:not([data-icon='history']) :is(.status-glyph, .status-word) {
  color: var(--accent-text);
}

.status-glyph {
  display: inline-flex;
}

.status-glyph svg {
  width: 20px;
  height: 20px;
}

.status-icon[data-state='live'] .status-glyph {
  color: var(--afr);
}

.status-icon[data-state='warn'] .status-glyph {
  color: var(--caution);
}

/* ---- status pill ---- */

/* The worded state, read-only: the connection sheet's heading. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: 700 11px/1.2 var(--font-cond);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}

.pill[data-state='idle'] {
  color: var(--muted);
}

.pill[data-state='live'] .dot {
  background: var(--afr);
  border-color: var(--afr);
}

.pill[data-state='warn'] .dot {
  background: var(--caution);
  border-color: var(--caution);
}

/* ---- notice, panel, legend ---- */

.notice {
  margin-bottom: var(--space-3);
  padding: var(--space-3) 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--raised);
}

/* A notice that asks: its buttons under the words. */
.notice-actions {
  margin-top: var(--space-3);
}

/* A notice about a reading that can't be trusted: the caution rule. */
.notice[data-tone='caution'] {
  border-color: var(--caution);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 13px;
  color: var(--muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.key {
  display: inline-block;
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: var(--muted);
}

.key.afr {
  background: var(--afr);
}

.key.rpm {
  background: var(--rpm);
}

.key.vac {
  background: var(--vac);
}

.key.mark {
  width: 2px;
  height: 10px;
  background: var(--mark);
}

/* ---- zone tags ---- */

/* The Tag's 24px box, so the two line up side by side (a session's verdict and its Demo tag). */
.zone {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--radius-xs);
  border: 1px solid currentColor;
  font: 700 11px/1 var(--font-cond);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
}

.zone:empty {
  display: none;
}

.zone[data-zone='ok'] {
  color: var(--afr);
}

.zone[data-zone='rich'] {
  color: var(--rich);
}

.zone[data-zone='lean'] {
  color: var(--on-lean);
  background: var(--lean);
  border-color: var(--lean);
}

.zone[data-zone='warn'] {
  color: var(--caution);
}

/* A Pro AI suggestion: caution, with a dashed rule so it never reads as the report's own Check. */
.zone[data-zone='caution'] {
  color: var(--caution);
  border-style: dashed;
}

/* ---- glyphs and lamps (design/README.md, Iconography; web/src/icons.ts) ---- */

.glyph {
  flex: none;
  display: inline-flex;
  width: 1.25em;
  height: 1.25em;
}

.glyph svg,
.lamp svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* A telltale: unlit is fine, tinted is worth a look, lit needs you now. Its colour comes from the role it shows. */
.lamp {
  flex: none;
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  color: var(--line-strong);
}

.lamp[data-lamp='tint'] {
  color: var(--lamp, currentColor);
  border-color: var(--lamp, currentColor);
  background: color-mix(in srgb, var(--lamp, currentColor) 16%, transparent);
}

.lamp[data-lamp='lit'] {
  color: var(--on-lean);
  border-color: var(--lamp, currentColor);
  background: var(--lamp, currentColor);
}

.zone[data-zone='none'] {
  border-color: var(--line-strong);
}

/* 24px high with its border, the word centred, as the app redesign canvas draws it. */
.tag {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font: 700 11px/1 var(--font-cond);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Loud: filled in `caution`, for a qualifier that must not be missed on any screen: Demo while the app shows the
   demo's made-up readings. One per screen at most. */
.tag.loud {
  border-color: var(--caution);
  background: var(--caution);
  color: var(--surface);
  animation: ring var(--duration-beacon) var(--ease-out) infinite;
}

/* The app bar's dot is the screen's Demo beacon (V2); filled Demo tags in a card or a row hold still beside it, so
   only one thing on the screen loops. */
.tag.loud.still {
  animation: none;
}

/* A ring spreads from it every two seconds, so it reads as a mode that's on rather than a label; not a blink,
   which is the lean alarm's. */
@keyframes ring {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--caution) 70%, transparent);
  }

  70%,
  100% {
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--caution) 0%, transparent);
  }
}

/* ---- lean alarm ---- */

/* The lean alarm sits on the AFR gauge (KEV-1638): while it sounds, the gauge's card fills `lean` and its note says
   so in `on-lean`, in a place the card already keeps for it, so nothing on the screen moves when it starts or clears.
   What the gauge draws in its own colours (zones, ticks, the needle, the reading) turns on-lean inside the card, so
   nothing red is lost on the red; `--alarm-fill` is the fill as the card sees it, for whatever inside needs it. */
.alarm-gauge[data-alarm] {
  --alarm-fill: var(--lean);
  background: var(--alarm-fill);
  border-color: var(--alarm-fill);
  box-shadow: var(--shadow-alarm);
  color: var(--on-lean);
}

.alarm-gauge[data-alarm] > * {
  --ink: var(--on-lean);
  --muted: var(--on-lean);
  --rich: var(--on-lean);
  --afr: var(--on-lean);
  --ok: var(--on-lean);
  --lean: var(--on-lean);
  --line: color-mix(in srgb, var(--on-lean) 35%, var(--alarm-fill));
  --line-strong: color-mix(in srgb, var(--on-lean) 55%, var(--alarm-fill));
  --raised: color-mix(in srgb, var(--on-lean) 22%, var(--alarm-fill));
  --surface: var(--alarm-fill);
}

/* The note: what it is and what to do on one line, then the readings that tripped it. The line shortens to "Lean ·
   Ease off" where the long one wouldn't fit (a 320px phone), and the readings size to the card, so neither wraps. */
.alarm-note {
  container-type: inline-size;
  margin: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  text-align: center;
  color: var(--on-lean);
}

.alarm-note > * {
  margin: 0;
  max-width: 100%;
}

.alarm-gauge[data-alarm] .alarm-note {
  animation: pulse var(--duration-pulse) var(--ease-in-out) infinite;
}

.alarm-gauge:not([data-alarm]) .alarm-note > * {
  visibility: hidden;
}

.alarm-note-say {
  font: 500 min(17px, 5cqi)/1.15 var(--font-sans);
  white-space: nowrap;
}

.alarm-note-say b {
  font: 700 min(19px, 5.6cqi)/1.1 var(--font-cond);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.alarm-note-short {
  display: none;
}

@container (max-width: 260px) {
  .alarm-note-long {
    display: none;
  }

  .alarm-note-short {
    display: inline;
  }
}

.alarm-note-detail {
  font: 500 min(14px, 4.6cqi)/1.3 var(--font-num);
  white-space: nowrap;
}

/* Off, it keeps its line, so turning on adds nothing. */
.alarm-note-detail:empty::before {
  content: '\00a0';
}

/* With no AFR gauge on screen, the app bar's status chip carries it: filled lean, Lean in place of the link's word,
   and a tap goes to the gauge (live.ts paintAlarmChip). */
.status-lean {
  display: none;
}

.status-icon[data-lean][data-state] .status-chip {
  border-color: var(--lean);
  background: var(--lean);
  animation: pulse var(--duration-pulse) var(--ease-in-out) infinite;
}

.status-icon[data-lean] .status-chip > :not(.status-lean) {
  display: none;
}

.status-icon[data-lean] .status-lean {
  display: contents;
  color: var(--on-lean);
}

.status-lean-glyph {
  display: inline-flex;
  color: var(--on-lean);
}

.status-lean-glyph svg {
  width: 20px;
  height: 20px;
}

.status-lean-word {
  font: 700 14px/1 var(--font-sans);
  color: var(--on-lean);
  white-space: nowrap;
}

@keyframes pulse {
  50% {
    opacity: 0.7;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ---- readout ---- */

.readout {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.readout .label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.readout .value {
  font: 600 26px/1.1 var(--font-num);
  font-variant-numeric: tabular-nums;
}

.readout .sub {
  font: 500 12px/1.4 var(--font-num);
  color: var(--muted);
  min-height: 1.4em;
}

/* ---- hint ---- */

.hint {
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--raised);
  color: var(--muted);
}

/* ---- icon button ---- */

.icon-btn {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: var(--size-touch);
  height: var(--size-touch);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.icon-btn:hover {
  color: var(--ink);
}

/* ---- data tables ---- */

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

/* The bordered table for specs, pinouts and tune reports; .table-wrap scrolls it sideways. */
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data thead tr {
  background: var(--raised);
}

table.data th,
table.data td {
  padding: 11px var(--space-3);
  text-align: left;
}

table.data thead th {
  font: 600 13px/1.2 var(--font-cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

table.data tbody tr {
  border-top: 1px solid var(--line);
}

table.data tbody th {
  font-weight: 600;
}

table.data .r {
  text-align: right;
}

/* ---- fields ---- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fields {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.field-name {
  font-weight: 600;
  color: var(--ink);
}

.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.mini {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: 13px;
  color: var(--muted);
}

.switch-row {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.switch-row input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--accent);
}

/* A setting that's on or off: a 48 × 28 track with a knob, `accent` when on. Consent checkboxes stay checkboxes. */
input[type='checkbox'].toggle {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 48px;
  height: 28px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--raised);
  cursor: pointer;
}

input[type='checkbox'].toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
}

input[type='checkbox'].toggle:checked {
  background: var(--accent);
  border-color: var(--accent);
}

input[type='checkbox'].toggle:checked::after {
  transform: translateX(20px);
  background: var(--on-accent);
}

input[type='checkbox'].toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input[type='checkbox'].toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---- row list: a panel of rows, each a name and its value; a row can open its editor in place ---- */

.rows {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.rows .row {
  box-sizing: border-box;
  min-height: var(--row-h, 52px);
  padding: var(--space-2) 14px var(--space-2) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--ink);
  text-decoration: none;
}

/* A row's name is a step lighter than a field's label. */
.rows .row .field-name {
  font-weight: 500;
}

.rows > * + * {
  border-top: 1px solid var(--line);
}

/* A row that opens wears the rule above it on its details, outside its summary: one pixel less keeps the 52px pitch. */
.rows > * + .row-edit > summary.row {
  min-height: calc(var(--row-h, 52px) - 1px);
}

.rows .switch-row {
  padding-bottom: var(--space-2);
  border-bottom: 0;
}

.row-value {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  color: var(--muted);
  text-align: right;
}

/* A row that opens: a chevron after the value, turned down while open. */
.row-edit > summary {
  list-style: none;
  cursor: pointer;
}

.row-edit > summary::-webkit-details-marker {
  display: none;
}

/* The chevron is Lucide's chevron-right at 16px, drawn as two sides of a turned square: 1.5px lines, 4px by 8px. */
.row-edit > summary .row-value::after,
a.row .row-value::after {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  margin: 0 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
}

.row-edit[open] > summary .row-value::after {
  transform: rotate(45deg);
}

.row-edit[open] > summary {
  border-bottom: 1px solid var(--line);
}

/* While its editor is open, the value it's changing is in ink. */
.row-edit[open] > summary .row-value {
  color: var(--ink);
}

.row-editor {
  padding: 12px var(--space-4) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--raised);
}

.row-editor > .row-done {
  align-self: flex-start;
}

/* ---- segmented control and combobox ---- */

/* A 52px bar: 44px options 3px inside a line-strong edge, as the app redesign canvas draws it. */
.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.segmented label {
  position: relative;
}

.segmented input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
}

.segmented span {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
}

.segmented input:checked + span {
  background: var(--accent);
  color: var(--on-accent);
}

.segmented input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Five theme options: wrap to two rows on a phone rather than squeeze. */
.segmented-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Two options, e.g. round or square. */
.segmented-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ---- thumbnail radio (KEV-1452) ---- */

/* A radio group whose choices are pictures with their words under them: three to a row, or as many small ones as fit. */
.thumb-radios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.thumb-radios-small {
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: var(--space-2);
}

/* Each choice is a card in a line border; the small ones (faces) have none until chosen. */
.thumb-radio {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--size-touch);
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
}

.thumb-radio input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.thumb {
  display: block;
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px var(--line);
}

.thumb-radios-small .thumb {
  width: 48px;
  height: 48px;
  box-shadow: none;
}

.thumb-radios-small .thumb svg {
  display: block;
  width: 100%;
  height: 100%;
}

.thumb-radios-small .thumb-radio {
  min-height: 84px;
  padding: 6px 2px;
  gap: var(--space-1);
  border-color: transparent;
  font: 600 12px/1.15 var(--font-cond);
  letter-spacing: 0.02em;
}

/* Checked: the choice on surface in a 2px accent ring, its border and an inset line, so nothing moves. */
.thumb-radio:has(input:checked) {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.thumb-radio:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/*
 * The theme miniature: Live in little, straight on the theme's background (an accent pill and an AFR dot for the app
 * bar, "AFR" over a big reading, and the zone scale under it), drawn from the tokens of the data-theme it sits in.
 * Device stacks a Light and a Dark one and shows the Dark one's right half.
 */
.theme-mini {
  container-type: inline-size;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 84px;
  padding: 6px;
  background: var(--bg);
  color: var(--ink);
}

.theme-mini + .theme-mini {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 50%);
}

.theme-mini-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 6px;
}

.theme-mini-bar i {
  width: 16px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--accent);
}

.theme-mini-bar b {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--afr);
}

.theme-mini-hero {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.theme-mini-hero small {
  font: 600 7px/1 var(--font-cond);
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Smaller in a narrow miniature, so the reading stays inside it. */
.theme-mini-hero b {
  font: 600 clamp(12px, 24cqi, 22px)/1 var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.theme-mini-hero i {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--rich) 0 36%, var(--afr) 36% 50%, var(--lean) 50%);
}

/* Vehicle: a field that takes a suggestion or your own value (combobox.ts). Its list opens under it, in the page. */
.combo {
  display: grid;
  gap: var(--space-1);
  color: var(--ink);
  font-size: 15px;
}

/* A native select behind its pick-list (web/src/app/select-picker.ts): still the field, never shown. */
.picker-source {
  display: none !important;
}

/* A pick-list at the screen's foot (the replay bar) opens above its field, over what's there. */
.combo-up {
  position: relative;
}

.combo-up .combo-list {
  position: absolute;
  bottom: calc(100% + var(--space-1));
  left: 0;
  min-width: 100%;
  z-index: 10;
}

.combo-box {
  position: relative;
}

.combo-box input[type='text'] {
  padding-right: 44px;
}

.combo-box.has-lead input[type='text'] {
  padding-left: 52px;
}

.pick-only input[type='text'] {
  cursor: pointer;
  caret-color: transparent;
}

/* A colour's swatch, inside the field: tap it to pick the exact shade. */
.combo-box input[type='color'] {
  position: absolute;
  left: 5px;
  top: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: none;
  cursor: pointer;
}

.combo-box input[type='color']::-webkit-color-swatch-wrapper {
  padding: 0;
}

.combo-box input[type='color']::-webkit-color-swatch {
  border: 0;
  border-radius: 50%;
}

.combo-box input[type='color']::-moz-color-swatch {
  border: 0;
  border-radius: 50%;
}

.combo-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
}

.combo-toggle::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}

.combo-box:has(+ .combo-list:not([hidden])) .combo-toggle::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}

.combo-list {
  margin: 0;
  padding: var(--space-1) 0;
  list-style: none;
  max-height: 336px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--raised);
  box-shadow: var(--shadow-pop);
}

.combo-list [role='option'] {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--size-touch);
  padding: 4px var(--space-3);
  box-sizing: border-box;
  cursor: pointer;
}

.combo-list [role='option'].active {
  background: color-mix(in srgb, var(--ink) 9%, transparent);
}

.combo-list [aria-selected='true'] .combo-label {
  font-weight: 600;
}

/* The option that's set: a check at its end. */
.combo-list [aria-selected='true']::after {
  content: '';
  flex: none;
  width: 5px;
  height: 10px;
  margin: -3px 4px 0 2px;
  border-right: 2px solid var(--accent-text);
  border-bottom: 2px solid var(--accent-text);
  transform: rotate(45deg);
}

.combo-label {
  flex: 1;
  min-width: 0;
  display: grid;
}

/* A note nobody has written yet takes no room between fields. */
.fields p.small:empty {
  display: none;
}

.combo-label b {
  font-weight: 700;
}

.combo-label small {
  font-size: 13px;
  color: var(--muted);
}

.combo-aside {
  flex: none;
  font: 500 13px var(--font-num);
  color: var(--muted);
}

.combo-swatch {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
}

.combo-group {
  padding: var(--space-2) var(--space-3) var(--space-1);
  font: 700 11px/1.2 var(--font-cond);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.combo-sep {
  height: 1px;
  margin: var(--space-1) 0;
  background: var(--line);
}

.combo-typed .combo-label {
  color: var(--accent-text);
}

/* ---- extra legend keys ---- */

.key.spd {
  background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 6px);
}

.key.batt {
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px);
}

/* ---- chips ---- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}

.chip[aria-pressed='true'] {
  border-color: var(--ink);
  background: var(--raised);
  color: var(--ink);
}

.chip[aria-pressed='false'] .key {
  opacity: 0.35;
}

.chip-all:disabled {
  opacity: 0.4;
}

/* ---- sites: skip link, site bar, link buttons, eyebrow, badge, status note ---- */

.skip-link {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 10;
  background: var(--surface);
  color: var(--ink);
  padding: 12px;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 12px;
}

.site-bar {
  padding: var(--space-4) max(var(--space-6), calc((100vw - 1280px) / 2));
  display: flex;
  gap: var(--space-5);
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

/* ---- brand: the mark, then CARB bold and SCOPE regular (design/assets/Logos/README.md) ---- */
.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font: 400 22px/1 var(--font-cond);
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand b {
  font-weight: 700;
}

/* The mark (web/public/mark.svg, one colour, served at the site root) as a mask in `brand-orange`, the same on Dark
   and Light, with the C and the bolt holes showing the ground. */
.brand::before {
  content: '';
  flex: none;
  width: 22px;
  height: 22px;
  margin-right: 10px;
  background: var(--brand-orange);
  -webkit-mask: url('/mark.svg') center / contain no-repeat;
  mask: url('/mark.svg') center / contain no-repeat;
}

/* A section after the name: "Internal". */
.brand span {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  font: 500 15px/1 var(--font-cond);
}

/* The hero form: the app icon (web/public/icon.svg) at 48px, the name at 40px, the company line under it. */
.brand-lg {
  font-size: 40px;
}

.brand-lg::before {
  width: 48px;
  height: 48px;
  margin-right: 14px;
  background: url('/icon.svg') center / contain no-repeat;
  -webkit-mask: none;
  mask: none;
}

.brand-by {
  margin: 0;
  font: 500 14px/1.45 var(--font-sans);
  color: var(--muted);
}

.site-bar nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-5);
  font-size: 14px;
}

.site-bar nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.site-bar nav a:hover {
  color: var(--ink);
}

.site-bar nav [aria-current] {
  color: var(--ink);
  font-weight: 600;
  border-color: var(--accent);
}

.site-bar nav .app-link {
  margin-left: var(--space-3);
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 600;
}

.site-bar nav .app-link:hover {
  background: var(--raised);
}

/* The theme button: as tall as the app link, with the glyph of the theme a press switches to, the sun in Dark and the moon in Light. */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--raised);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .moon,
[data-theme='light'] .theme-toggle .sun {
  display: none;
}

[data-theme='light'] .theme-toggle .moon {
  display: block;
}

/* A link drawn as a button: the quiet button's look, or .primary. */
.button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--size-touch);
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font: 600 15px/1.2 var(--font-sans);
  text-decoration: none;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.button.big {
  min-height: 52px;
  font-size: 17px;
}

/* On a pointer, quiet buttons and link buttons lift to raised; the primary brightens a touch and keeps its fill
   (raised under a primary link's on-accent text hid its label, KEV-1580). */
@media (hover: hover) {
  .button:not(.primary):hover,
  .quiet:hover {
    background: var(--raised);
  }

  .primary:hover {
    filter: brightness(1.06);
  }
}

.eyebrow {
  color: var(--accent-text);
  font: 600 12px/1.2 var(--font-cond);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* A page's status word: cyan by default; proposals and prototypes on note; archived on raised. */
.badge {
  display: inline-block;
  padding: 4px 7px;
  color: var(--afr);
  box-shadow: inset 0 0 0 1px currentColor;
  border-radius: var(--radius-xs);
  font: 700 11px/1 var(--font-cond);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge[data-status='Prototype'],
.badge[data-status='Proposal'],
.badge[data-status='Not implemented'],
.badge[data-status='Bench diagnostic'],
.badge[data-status='Design mockups'],
.badge[data-status='Research'] {
  color: var(--ink); background: var(--note); box-shadow: inset 0 0 0 1px var(--accent);
}

.badge[data-status='Archived'] {
  color: var(--muted);
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line);
}

.status-note {
  padding: var(--space-4) var(--space-5);
  background: var(--note);
  border-radius: var(--radius-sm);
  box-shadow: inset 4px 0 0 var(--accent);
  font-size: 15px;
  line-height: 1.6;
}

.status-note[data-status='Archived'] {
  box-shadow: inset 4px 0 0 var(--lean);
}

/* ---- docs: side nav, doc cards, prose, code ---- */

.sidebar {
  position: sticky;
  top: var(--space-5);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding-right: var(--space-3);
  font-size: 14px;
  line-height: 1.4;
}

.guide-menu summary {
  font: 600 13px/1.2 var(--font-cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  padding: var(--space-2) 0 var(--space-4);
}

.library-link {
  display: block;
  margin-bottom: var(--space-5);
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}

.nav-group {
  margin-bottom: var(--space-5);
}

.nav-group p {
  color: var(--accent-text);
  font: 600 12px/1.2 var(--font-cond);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 var(--space-2) 12px;
}

.nav-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 2px;
}

.nav-group a {
  display: block;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--muted);
}

.nav-group a:hover {
  color: var(--ink);
  background: var(--raised);
}

.nav-group [aria-current] {
  color: var(--ink);
  background: var(--raised);
  box-shadow: inset 3px 0 0 var(--accent);
  font-weight: 600;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.doc-card {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: var(--space-2);
  padding: var(--space-5);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-decoration: none;
}

.doc-card:hover {
  border-color: var(--line-strong);
}

.doc-card h3 {
  margin: var(--space-1) 0 0;
  font: 600 20px/1.3 var(--font-sans);
}

.doc-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 var(--space-2);
}

.read-guide {
  font: 600 14px/1 var(--font-sans);
  color: var(--link);
  margin-top: auto;
  padding-top: var(--space-2);
}

.doc-card:hover .read-guide {
  color: var(--ink);
}

.on-this-page {
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin: var(--space-5) 0;
  font-size: 14px;
}

.on-this-page summary {
  font: 600 13px/1.2 var(--font-cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 0;
}

.on-this-page ul {
  list-style: none;
  padding-left: 0;
  margin: var(--space-2) 0 0;
  display: grid;
  gap: 4px;
}

.on-this-page .depth-3 {
  padding-left: var(--space-4);
}

/* Rendered Markdown. Headings' sizes are each site's; everything inside them is the system's. */
.prose {
  overflow-wrap: anywhere;
}

.prose p,
.prose ul,
.prose ol {
  margin: var(--space-4) 0;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li {
  margin: 6px 0;
}

.prose img,
.prose video {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* A phone-screen clip shows at about a phone's size, not the column's width. */
.prose video.clip {
  width: 100%;
  max-width: 22rem;
}

.prose strong {
  font-weight: 600;
}

.prose h4 {
  font: 600 13px/1.2 var(--font-cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: var(--space-5) 0 var(--space-2);
}

.prose blockquote {
  padding: 4px var(--space-5);
  margin: var(--space-5) 0;
  box-shadow: inset 3px 0 0 var(--accent);
  color: var(--muted);
}

.prose .table-wrap {
  margin: var(--space-5) 0;
}

/* Not .prose's "anywhere": in a table it lets a column shrink to one letter. Words stay whole; .table-wrap scrolls. */
.prose table {
  overflow-wrap: normal;
}

.heading-link {
  margin-left: 10px;
  font-size: 0.75em;
  color: var(--muted);
  text-decoration: none;
  opacity: 0;
}

h2:hover .heading-link,
h3:hover .heading-link,
.heading-link:focus-visible {
  opacity: 1;
}

/* Code: num-code in the running text, and a raised block that scrolls sideways rather than wrapping. */
code {
  font: 400 0.85em/1.6 var(--font-num);
}

:not(pre) > code {
  background: var(--raised);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-xs);
}

.prose pre {
  max-width: 100%;
  overflow-x: auto;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  line-height: 1.6;
}

@media (max-width: 850px) {
  .site-bar {
    padding: var(--space-4) var(--space-5);
    flex-wrap: wrap;
    gap: var(--space-3);
  }

  .sidebar {
    position: static;
    max-height: none;
    padding: 0;
  }
}

@media (max-width: 520px) {
  .site-bar nav {
    font-size: 13px;
    gap: 0 var(--space-4);
  }

  .site-bar nav .app-link {
    margin-left: 0;
  }

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

  .doc-card {
    padding: var(--space-4);
  }
}

/* Keep short numeric runs on one line. */
.readout .sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* From 900px: the readouts grow with the page. */
@media (min-width: 900px) {
  .readout {
    padding: var(--space-4);
    gap: 6px;
  }

  .readout .value {
    font-size: 44px;
    line-height: 1.05;
    letter-spacing: -0.01em;
  }

  .readout .sub {
    margin-top: auto;
    font-size: 14px;
  }
}

/* ---- motion (design/README.md, Motion) ----
 * Short and quiet: opacity and small transforms, eased out, in the motion tokens; nothing bounces, and only the alarm,
 * the Demo tag and the app bar's status dot (its Demo beacon, its recording blink) loop. Everything new sits inside no-preference, so under prefers-reduced-motion none of it exists.
 * Never on what's safety: the lean alarm appears at once with its own pulse, Live never fades in, and readings, the
 * needle and the chart change the moment data arrives. Nothing waits for an animation: no rule here delays a
 * control or hides what's under it, and no code listens for one to end.
 */

@media (prefers-reduced-motion: reduce) {
  .alarm-gauge[data-alarm] .alarm-note,
  .status-icon[data-lean][data-state] .status-chip,
  .tag.loud {
    animation: none;
  }

  .status-icon .status-word::before {
    animation: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Taps: a control dips while it's pressed and its colours ease between states. */
  button,
  .button,
  .thumb-radio,
  .segmented span,
  input[type='checkbox'],
  input[type='checkbox'].toggle::after,
  .nav-group a {
    transition:
      transform var(--duration-fast) var(--ease-out),
      background-color var(--duration-fast) var(--ease-out),
      border-color var(--duration-fast) var(--ease-out),
      box-shadow var(--duration-fast) var(--ease-out),
      color var(--duration-fast) var(--ease-out),
      filter var(--duration-fast) var(--ease-out);
  }

  button:not(:disabled):active,
  .button:active,
  .thumb-radio:active,
  .segmented input:not(:disabled):active + span {
    transform: scale(var(--motion-press));
  }

  input[type='checkbox']:not(.toggle, :disabled):active {
    transform: scale(var(--motion-press-small));
  }

  input[type='checkbox'].toggle:not(:disabled):active::after {
    transform: scale(var(--motion-press-small));
  }

  input[type='checkbox'].toggle:checked:not(:disabled):active::after {
    transform: translateX(20px) scale(var(--motion-press-small));
  }

  /* Things that appear: a notice, a status note, a menu, or a card marked .appear (the first-drive card) fades in
     as it travels a few pixels into place. The menu opens downward, so everything comes from above. */
  .notice,
  .status-note,
  .combo-list,
  .appear,
  .guide-menu[open] > nav {
    animation: appear var(--duration-base) var(--ease-out);
  }

  /* A screen (.screen in the app: Tune, the problem page, the Logbook's list, preview and drive pages, each Settings page) and a docs
     page beside the side nav fade in. Opacity only: a transform would move the fixed bars inside them. Live has
     no .screen, so the alarm and the readings are there at full strength the moment it opens. */
  .screen,
  .sidebar ~ main {
    animation: screen-in var(--duration-base) var(--ease-out);
  }

  /* A state that changes: the status pill and a readout's zone tag take their new colour and word at once, and a
     ring in the new colour fades from around them, so the change is seen without a jump. Each state has its own
     keyframes because a new animation name is what starts it again. */
  .pill,
  .readout .zone {
    position: relative;
  }

  .pill::after,
  .readout .zone::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid currentColor;
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
    animation: none var(--duration-slow) var(--ease-out);
  }

  .readout .zone::after {
    border-radius: calc(var(--radius-xs) + 4px);
  }

  .pill[data-state='idle']::after {
    animation-name: changed-idle;
    border-color: var(--muted);
  }

  .pill[data-state='live']::after {
    animation-name: changed-live;
    border-color: var(--afr);
  }

  .pill[data-state='warn']::after {
    animation-name: changed-warn;
    border-color: var(--caution);
  }

  .readout .zone[data-zone='ok']::after {
    animation-name: changed-ok;
  }

  .readout .zone[data-zone='rich']::after {
    animation-name: changed-rich;
  }

  .readout .zone[data-zone='lean']::after {
    animation-name: changed-lean;
    border-color: var(--lean);
  }

  .readout .zone[data-zone='warn']::after {
    animation-name: changed-warn;
  }
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(calc(-1 * var(--motion-shift)));
  }
}

@keyframes screen-in {
  from {
    opacity: 0;
  }
}

@keyframes changed-idle {
  from {
    opacity: 0.9;
    transform: scale(0.94);
  }
}

@keyframes changed-live {
  from {
    opacity: 0.9;
    transform: scale(0.94);
  }
}

@keyframes changed-warn {
  from {
    opacity: 0.9;
    transform: scale(0.94);
  }
}

@keyframes changed-ok {
  from {
    opacity: 0.9;
    transform: scale(0.94);
  }
}

@keyframes changed-rich {
  from {
    opacity: 0.9;
    transform: scale(0.94);
  }
}

@keyframes changed-lean {
  from {
    opacity: 0.9;
    transform: scale(0.94);
  }
}
