/* KhLabs — Konsole
 *
 * A tool, not a page. Three things follow from that and shape everything here:
 *
 * 1. It is looked at every day, so it is quiet. No colour that is not carrying
 *    information, no animation on a path the keyboard can take. The brand's
 *    three contour colours are used only for status, where they mean something.
 * 2. It shows dense data, so District Supply does not set it. That face is a
 *    display cut and shouts at one volume below 16px — the site's own README
 *    says so. It sets the mark and the headings; a system UI face sets the
 *    rest, and tabular numerals line the money up.
 * 3. Every row is reachable from the keyboard, so focus is always visible and
 *    never animated. Motion on a keyboard path reads as lag.
 */

:root {
  --paper:      #FFFFFF;
  --sunk:       #F7F7F5;   /* table heads, quiet panels */
  --lift:       #FBFBFA;   /* row hover */
  --ink:        #1C1B18;
  --ash:        #5C5C56;
  --faint:      #8A8A83;

  --green:  #278E43;
  --yellow: #C98A00;       /* the brand yellow is unreadable as text; darkened */
  --red:    #C8201F;       /* likewise the red, for AA against paper */

  --rule:   color-mix(in srgb, var(--ink) 13%, transparent);
  --rule-2: color-mix(in srgb, var(--ink) 7%, transparent);

  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "District Supply Clean", var(--ui);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --bar-h: 52px;
  --pad: clamp(16px, 2.6vw, 30px);
}

@font-face {
  font-family: "District Supply Clean";
  src: url("../../assets/fonts/DistrictSupply-Regular.woff2") format("woff2");
  font-display: swap;
}

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

/* Must come before anything that sets display. `[hidden]` is only a UA rule at
   the very bottom of the cascade, so any `.gate { display: grid }` beats it and
   the element stays on screen — which is how the sign-in card ended up sitting
   under every page. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* Never animated: it has to be instantly true, and it is mostly seen while
   moving through a list with the keyboard. */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 3px; }

.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ bar --- */

.bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 22px;
  height: var(--bar-h);
  padding: 0 var(--pad);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
/* the V2 Kh. mark, the same file the public site uses */
.bar__mark { display: flex; align-items: center; padding: 4px 2px; border-radius: 6px; }
.bar__mark img { display: block; height: 18px; width: auto; }
.bar__mark:focus-visible { outline-offset: 1px; }
.bar__nav { display: flex; gap: 2px; margin-right: auto; }
.bar__nav a {
  position: relative;
  white-space: nowrap;          /* the count must not wrap under its label */
  padding: 6px 11px;
  border-radius: 7px;
  color: var(--ash);
  transition: color 120ms var(--ease), background-color 120ms var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .bar__nav a:hover { color: var(--ink); background: var(--sunk); }
}
.bar__nav a[aria-current] { color: var(--ink); background: var(--sunk); }

.pip {
  display: inline-block;
  min-width: 17px; height: 17px;
  margin-left: 7px; padding: 0 5px;
  border-radius: 9px;
  background: var(--ink); color: var(--paper);
  font-size: 11px; line-height: 17px; text-align: center;
  font-variant-numeric: tabular-nums;
}

.bar__end { display: flex; align-items: center; gap: 4px; }
.bar__help, .bar__cog {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 7px;
  color: var(--faint);
  transition: color 120ms var(--ease), background-color 120ms var(--ease);
}
.bar__help:hover, .bar__cog:hover { color: var(--ink); background: var(--sunk); }
.bar__out {
  margin-left: 6px; padding: 5px 10px;
  border-radius: 7px;
  color: var(--ash); font-size: 13px;
}
.bar__out:hover { color: var(--ink); background: var(--sunk); }

/* ----------------------------------------------------------------- page --- */

main { padding: clamp(20px, 3vw, 34px) var(--pad) 90px; max-width: 1180px; }
main:focus { outline: none; }

.head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.head h1 {
  font-family: var(--display);
  font-size: clamp(21px, 2.4vw, 27px);
  letter-spacing: -.012em;
  line-height: 1.15;
}
.head__count { color: var(--faint); font-size: 13px; }
.head__end { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.section { margin-bottom: 34px; }
.section__head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--rule);
}
.section__head h2 {
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
}
.section__head .more { margin-left: auto; font-size: 13px; color: var(--ash); }
.section__head .more:hover { color: var(--ink); }

/* ---------------------------------------------------------------- lists --- */
/* A row is a button you can walk to. The selected row is marked with a rule on
   the left rather than a fill, so it survives on top of a hover. */

.rows { border-bottom: 1px solid var(--rule-2); }
.row {
  display: grid;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 11px 12px 11px 16px;
  border-top: 1px solid var(--rule-2);
  text-align: left;
  cursor: pointer;
}
.rows .row:first-child { border-top: 0; }
@media (hover: hover) and (pointer: fine) {
  .row:hover { background: var(--lift); }
}
.row[data-on] { background: var(--lift); box-shadow: inset 3px 0 0 var(--ink); }
.row:focus-visible { outline-offset: -2px; }

.row__main { min-width: 0; }
.row__title {
  display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row__sub {
  display: block;
  margin-top: 2px;
  font-size: 12.5px; color: var(--faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row__end { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }

.no { color: var(--faint); font-family: var(--mono); font-size: 12px; letter-spacing: -.02em; }
.when { color: var(--faint); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------------------------------------------------------------- tasks --- */
/* First block on the dashboard, because it is the only one that asks
   something of you. Overdue is the one place red appears unprompted. */

.task {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: start;
  padding: 12px 12px 12px 16px;
  border-top: 1px solid var(--rule-2);
}
.tasks .task:first-child { border-top: 0; }
/* box-shadow rather than a border: two borders meeting at a corner draw a
   mitre, which breaks the coloured edge at every row boundary. */
.task[data-late] { box-shadow: inset 3px 0 0 var(--red); }
.task[data-on] { background: var(--lift); box-shadow: inset 3px 0 0 var(--ink); }
.task[data-late][data-on] { box-shadow: inset 3px 0 0 var(--red); background: var(--lift); }

.tick {
  width: 19px; height: 19px;
  margin-top: 1px;
  border: 1.5px solid var(--rule);
  border-radius: 5px;
  display: grid; place-items: center;
  color: transparent;
  transition: border-color 120ms var(--ease), background-color 120ms var(--ease),
              color 120ms var(--ease), transform 120ms var(--ease);
}
.tick:hover { border-color: var(--ink); }
.tick:active { transform: scale(0.92); }
.tick svg { width: 11px; height: 11px; }
.task[data-done] .tick { background: var(--green); border-color: var(--green); color: #fff; }

.task__title { display: block; }
.task__sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--faint); }
.task__due { font-size: 12.5px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.task[data-late] .task__due { color: var(--red); }

/* --------------------------------------------------------------- status --- */
/* A dot and a word. A filled pill for every state turns the list into
   confetti; the dot carries the colour and the word carries the meaning. */

.st { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12.5px; }
.st::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--faint); flex: none;
}
.st[data-tone="wait"]::before { background: var(--yellow); }
.st[data-tone="good"]::before { background: var(--green); }
.st[data-tone="stop"]::before { background: var(--red); }
.st[data-tone="live"]::before {
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent);
}

.score {
  font-family: var(--mono); font-size: 11.5px;
  padding: 1px 6px; border-radius: 5px;
  background: var(--sunk); color: var(--ash);
}
.score[data-high] { background: color-mix(in srgb, var(--red) 10%, transparent); color: var(--red); }

.tag {
  font-size: 11.5px; padding: 1px 7px;
  border: 1px solid var(--rule); border-radius: 5px; color: var(--ash);
}

/* -------------------------------------------------------------- buttons --- */

.btn {
  padding: 7px 13px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 13px;
  background: var(--paper);
  transition: border-color 120ms var(--ease), background-color 120ms var(--ease),
              transform 120ms var(--ease);
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: scale(0.97); }
.btn--go { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--go:hover { background: #000; }
.btn--quiet { border-color: transparent; color: var(--ash); }
.btn--quiet:hover { border-color: var(--rule); color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }
.btn--sm { padding: 4px 9px; font-size: 12.5px; }

/* ---------------------------------------------------------------- tabs ---- */

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin-bottom: 20px; }
.tabs button {
  padding: 8px 13px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--ash);
  font-size: 13.5px;
  transition: color 120ms var(--ease), border-color 120ms var(--ease);
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

/* --------------------------------------------------------------- detail --- */

.kv { display: grid; grid-template-columns: 128px 1fr; gap: 7px 16px; font-size: 13.5px; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; }

.panel {
  border: 1px solid var(--rule);
  border-radius: 11px;
  padding: 17px 18px;
  background: var(--paper);
}
.panel + .panel { margin-top: 14px; }
.panel__h { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 11px; }

.split { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* the money block on an offer */
.sums { border-top: 1px solid var(--rule); margin-top: 12px; padding-top: 12px; }
.sums div { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13.5px; }
.sums div:last-child { font-size: 15px; margin-top: 5px; padding-top: 8px; border-top: 1px solid var(--rule-2); }

/* the event log reads as a column of times, so they line up */
.log { font-size: 13px; }
.log li { display: grid; grid-template-columns: 116px 1fr; gap: 14px; padding: 5px 0; }
.log time { color: var(--faint); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- forms --- */

.f { display: grid; gap: 5px; margin-bottom: 13px; }
.f > span { font-size: 12.5px; color: var(--ash); }
.f input, .f select, .f textarea {
  padding: 8px 11px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  transition: border-color 120ms var(--ease);
}
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent); }

.search {
  padding: 7px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  width: 260px;
  background: var(--paper);
}
.search:focus { outline: none; border-color: var(--ink); }

/* ----------------------------------------------------------------- gate --- */

.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--sunk); }
.gate__card {
  width: min(340px, 100%);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 30px 28px 26px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 34px -14px rgba(0,0,0,.14);
}
.gate__mark { margin-bottom: 2px; }
.gate__mark img { display: block; height: 34px; width: auto; }
.gate__lede { color: var(--faint); font-size: 13px; margin-bottom: 22px; }
.gate .btn--go { width: 100%; padding: 10px; margin-top: 6px; }
.gate__note { margin-top: 12px; font-size: 12.5px; color: var(--red); }

/* --------------------------------------------------------------- empties -- */

.empty { padding: 30px 4px; color: var(--faint); font-size: 13.5px; }
.empty strong { display: block; color: var(--ash); font-weight: 400; margin-bottom: 3px; }

.skel { padding: 30px 4px; color: var(--faint); font-size: 13.5px; }

/* ---------------------------------------------------------------- keys ---- */

.keys {
  border: 0; border-radius: 13px; padding: 24px 26px;
  max-width: 330px;
  box-shadow: 0 20px 50px -18px rgba(0,0,0,.35);
}
.keys::backdrop { background: rgba(18,18,16,.4); }
.keys h2 { font-size: 15px; margin-bottom: 15px; }
.keys dl { display: grid; grid-template-columns: 92px 1fr; gap: 8px 14px; font-size: 13px; }
.keys dt { color: var(--ash); }
.keys .btn { margin-top: 20px; }
kbd {
  font-family: var(--mono); font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--rule); border-bottom-width: 2px;
  border-radius: 5px; background: var(--sunk);
}

/* -------------------------------------------------------------- toasts ---- */
/* Rare and brief, so they may animate. Enter from where they live, exit the
   same way, so it reads as one object rather than two. */

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: grid; gap: 8px; }
.toast {
  padding: 10px 15px;
  border-radius: 9px;
  background: var(--ink); color: var(--paper);
  font-size: 13px;
  box-shadow: 0 10px 28px -10px rgba(0,0,0,.4);
  opacity: 1; transform: translateY(0);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}
@starting-style { .toast { opacity: 0; transform: translateY(8px); } }
.toast[data-out] { opacity: 0; transform: translateY(8px); }
.toast[data-bad] { background: var(--red); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 720px) {
  .bar { gap: 12px; }
  .bar__nav { overflow-x: auto; scrollbar-width: none; }
  .bar__nav::-webkit-scrollbar { display: none; }
  .bar__nav a { padding: 6px 8px; font-size: 13px; }
  .pip { margin-left: 5px; }
  .bar__out { display: none; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; }
}

/* ------------------------------------------------------------- the editor ---
   Type on the left, see the document on the right. The preview is rendered by
   the same function that freezes it at send time, so it is not a lookalike —
   it is the document. */

.editor { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1080px) { .editor { grid-template-columns: 1fr; } }

.editor__form { display: grid; gap: 14px; }
.editor__preview { position: sticky; top: calc(var(--bar-h) + 20px); }
.preview {
  display: block; width: 100%;
  height: calc(100dvh - var(--bar-h) - 90px);
  border: 1px solid var(--rule);
  border-radius: 11px;
  background: var(--paper);
}

.hint { font-size: 12.5px; color: var(--faint); margin: -4px 0 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* one position: a grid so every row's numbers line up down the column */
.items { display: grid; gap: 6px; margin-bottom: 4px; }
.item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 48px 88px 76px 72px auto;
  grid-template-areas:
    "grip title qty  unit price sum  acts"
    ".    desc  desc desc desc  desc desc";
  gap: 3px 8px;
  align-items: center;
  padding: 8px 8px 9px 4px;
  border: 1px solid transparent;
  border-radius: 9px;
}
.item__grip { grid-area: grip; }
.item__title { grid-area: title; }
.item__desc { grid-area: desc; }
.item__qty { grid-area: qty; }
.item__unit { grid-area: unit; }
.item__price { grid-area: price; }
.item__sum { grid-area: sum; }
.item__acts { grid-area: acts; }
.item:hover { border-color: var(--rule-2); background: var(--lift); }
.item:focus-within { border-color: var(--rule); background: var(--lift); }
.item[data-inc] :is(.item__qty, .item__unit, .item__price) { opacity: .4; }

.item__grip { color: var(--faint); font-size: 11px; letter-spacing: -2px; user-select: none; }
.item input, .item select {
  border: 1px solid transparent; border-radius: 6px;
  padding: 4px 7px; background: transparent; width: 100%;
}
.item input:hover, .item select:hover { border-color: var(--rule-2); }
.item input:focus, .item select:focus { outline: none; border-color: var(--ink); background: var(--paper); }
.item__title { font-size: 14px; }
.item__desc { font-size: 12.5px; color: var(--ash); }
.item__qty, .item__price { text-align: right; font-variant-numeric: tabular-nums; }
.item__sum { font-size: 13.5px; text-align: right; white-space: nowrap; }

.item__acts { display: flex; gap: 2px; }
.item__inc, .item__del {
  width: 26px; height: 26px; border-radius: 6px;
  display: grid; place-items: center;
  font-size: 11px; color: var(--faint);
  transition: color 120ms var(--ease), background-color 120ms var(--ease), transform 120ms var(--ease);
}
.item__inc { width: auto; padding: 0 7px; }
.item__inc:hover, .item__del:hover { color: var(--ink); background: var(--sunk); }
.item__inc:active, .item__del:active { transform: scale(0.92); }
.item__inc[aria-pressed="true"] { color: var(--paper); background: var(--ink); }
.item__del:hover { color: var(--red); }

.excl-edit { display: grid; gap: 5px; }
.excl-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; }
.excl-row input {
  border: 1px solid transparent; border-radius: 6px; padding: 5px 8px;
  background: transparent; width: 100%; font-size: 13.5px;
}
.excl-row input:hover { border-color: var(--rule-2); }
.excl-row input:focus { outline: none; border-color: var(--ink); background: var(--paper); }

.editor textarea {
  width: 100%; border: 1px solid var(--rule); border-radius: 8px;
  padding: 9px 11px; resize: vertical; font: inherit; line-height: 1.55;
}
.editor textarea:focus { outline: none; border-color: var(--ink); }

/* the positions, read-only, in the order's Angebot tab */
.items-view { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.items-view td { padding: 9px 0; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
.items-view td:first-child span { display: block; }
.items-view td:not(:first-child) { text-align: right; padding-left: 16px; white-space: nowrap; }
.items-view tr[data-inc] td { color: var(--faint); }

/* --- link, PIN and the mail that carries them ------------------------------
   The PIN is shown large and grouped in fours: it gets read off this screen
   and typed into a mail, or read aloud on the phone. */
.kv__label { font-size: 12px; color: var(--faint); margin-top: 12px; }
.access__link { font-size: 12.5px; word-break: break-all; line-height: 1.45; margin-top: 2px; }
.access__pin {
  font-family: var(--mono);
  font-size: 22px; letter-spacing: .14em;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  user-select: all;
}
.access__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.access__mail { margin-top: 14px; font-size: 13px; }
.access__mail summary { cursor: pointer; color: var(--ash); }
.access__mail summary:hover { color: var(--ink); }
.access__mail pre {
  white-space: pre-wrap; font: 12.5px/1.55 var(--ui);
  background: var(--sunk); padding: 12px 14px; border-radius: 8px; margin-top: 8px;
}

/* The document hash. Sixty-four characters that only mean something compared
   against another sixty-four, so it is shown whole rather than trimmed. */
.hash {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
  word-break: break-all;
  color: var(--ash);
  background: var(--sunk);
  padding: 8px 10px;
  border-radius: 7px;
  user-select: all;
}

/* ------------------------------------------------------------- the table ---
   Used where rows are scanned down a column rather than read one at a time —
   the site list, where the question is "is anything red?". */

.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.grid th {
  text-align: left; font-weight: 400;
  font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint);
  padding: 0 14px 8px 0; border-bottom: 1px solid var(--rule); white-space: nowrap;
}
.grid td { padding: 11px 14px 11px 0; border-bottom: 1px solid var(--rule-2); vertical-align: middle; }
.grid th:last-child, .grid td:last-child { padding-right: 0; }
.grid .r { text-align: right; }
.grid .num { font-variant-numeric: tabular-nums; }
.grid .quiet { color: var(--faint); }
@media (hover: hover) and (pointer: fine) { .grid tbody tr:hover { background: var(--lift); } }
.grid tr[data-off] td { opacity: .45; }

.site__url {
  padding-bottom: 1px;
  background: var(--underline, none) no-repeat 0 100% / 0 2px;
  transition: background-size 140ms var(--ease);
}
.grid tr:hover .site__url {
  background-image: linear-gradient(90deg, var(--green) 0 33.33%,
                    var(--yellow) 33.33% 66.66%, var(--red) 66.66%);
  background-size: 100% 2px;
}
.site__url + .tag { margin-left: 8px; }

.pip--warn { background: var(--red); }

@media (max-width: 820px) {
  /* the columns that answer "is it up?" stay; the rest goes */
  .grid th:nth-child(2), .grid td:nth-child(2),
  .grid th:nth-child(4), .grid td:nth-child(4),
  .grid th:nth-child(7), .grid td:nth-child(7) { display: none; }
}

/* ----------------------------------------------------------------- funnel --
   Bars rather than a chart: five values in one dimension, and the eye reads a
   drop between two bars faster than it reads two numbers. */

.funnel { display: grid; gap: 7px; }
.funnel__row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 52px 60px;
  gap: 12px; align-items: center;
  font-size: 13.5px;
}
.funnel__label { color: var(--ash); }
.funnel__bar { height: 22px; background: var(--sunk); border-radius: 5px; overflow: hidden; }
.funnel__fill {
  display: block; height: 100%;
  background: var(--ink);
  border-radius: 5px;
  transition: width 320ms var(--ease);
}
.funnel__n { text-align: right; font-variant-numeric: tabular-nums; }
.funnel__drop {
  text-align: right; font-size: 12.5px; color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.funnel__drop[data-bad] { color: var(--red); }

@media (max-width: 640px) {
  .funnel__row { grid-template-columns: 110px minmax(0, 1fr) 42px 50px; gap: 8px; font-size: 12.5px; }
}
