/*
 * ForecourtIQ.
 *
 * The palette is the brand's own, taken from the ForecourtIQ site: navy chrome,
 * lime as the one loud colour, cyan alongside it. Everything else is quiet, on
 * purpose — this gets read on a phone in daylight at a sale, so contrast
 * matters more than personality and the recommendation should be the only thing
 * on the page that shouts.
 *
 * One thing the brand cannot do unaltered: lime on white is about 1.5:1, which
 * is fine behind dark text on a button and unreadable as text or a link. So
 * lime is a surface here and never a foreground, and the olive beside it —
 * --accent — is what carries links, active states and figures.
 */

:root {
  /* Read back by a tiny inline script so the pages can notice they are being
     styled by a cached copy of an older release and say so, rather than just
     looking broken. Bump alongside Assets::CSS_VERSION. */
  --sp-css: 101;

  /* The brand, as the site uses them. Surfaces and marks — never text. */
  --navy: #07131d;
  --navy-2: #0b202c;
  --navy-3: #102936;
  --lime: #c8f35b;
  --cyan: #59d9ec;

  --ink: #10212a;
  --ink-soft: #43545c;
  --ink-faint: #6b7b82;
  --line: #dbe3e5;
  --line-strong: #c2cfd2;
  --page: #f2f6f5;
  --panel: #ffffff;

  /* The readable half of the lime. Every link, every active state, every
     figure that needs to be brand-coloured rather than merely dark. */
  --accent: #5c7a0b;
  --accent-dark: #47600a;
  --accent-wash: #f4fae0;

  /* The buy tiers. These are the only strong colours in the product. */
  --strong-buy: #157f4a;
  --strong-buy-wash: #eaf8f0;
  --worth-a-look: #a8620a;
  --worth-a-look-wash: #fdf6e7;
  --avoid: #b3271e;
  --avoid-wash: #fdf1f0;

  /* The map. Land and sea are quiet; the enquiry blue is the one colour the
     product did not already have, and it has to sit beside the strong-buy
     green without either of them looking like a tier. */
  --sea: #cfdfe4;
  --land: #fdfefd;
  --land-far: #eef3f2;
  --coast: #8ea6ab;
  --cm-enq: #1d4ed8;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(7, 19, 29, .05), 0 10px 30px -14px rgba(7, 19, 29, .22);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* The dark theme is the brand's own hero, which is where it started. Lime
       is legible on navy, so here it can be the accent it is on the site. */
    --ink: #e8f1f2;
    --ink-soft: #b9cad0;
    --ink-faint: #8ba0a8;
    --line: #17303c;
    --line-strong: #2b4652;
    --page: #07131d;
    --panel: #0b202c;
    --accent: #c8f35b;
    --accent-dark: #d9f88f;
    --accent-wash: #162a1c;
    --strong-buy: #5ddc9a;
    --strong-buy-wash: #0c2a20;
    --worth-a-look: #f3c04b;
    --worth-a-look-wash: #2b2110;
    --avoid: #f28b84;
    --avoid-wash: #2c1614;

    --sea: #03090f;
    --land: #12303f;
    --land-far: #0a1d28;
    --coast: #3a5d6b;
    --cm-enq: #7aa5ff;
  }
}

/* Every text size in here is a rem, and this is what a rem is worth. The
   reader sets --sp-text from the A-/A+ control in the header and it is put
   back on the root before the first paint, so the whole product gets
   bigger together rather than one page at a time.

   Sizes, not spacing: a dealer who cannot read 12px wants bigger words,
   not a card that has grown past the screen with the same small print in
   the middle of it. */
html { font-size: calc(16px * var(--sp-text, 1)); }

* { box-sizing: border-box; }

/* Inter where the machine already has it, the system stack where it does not.
   Named rather than fetched: a webfont request from a dealer's phone on auction
   wi-fi buys a slightly different "e" at the cost of the page appearing at all. */
body { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
       "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }

/* --- Navigation -----------------------------------------------------------
   Sticky, because a dealer working a 300-lot sale scrolls a long way and
   should never have to go back to the top to reach anything. */

/* The header.
   One row, and it stays one row. It used to be a wrapping flex box, so on any
   screen narrower than the nine links "Sign out" dropped onto a line of its own
   underneath — which is what a header looks like when nobody has looked at it.
   The links scroll sideways instead; a row that scrolls reads as a row, and a
   row that wraps reads as a mistake. */
.nav { position: sticky; top: 0; z-index: 50; color: #fff;
       background: linear-gradient(135deg, var(--navy), var(--navy-2) 70%, #0a2630);
       border-bottom: 1px solid rgba(255, 255, 255, .09); }
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 0 20px;
             display: flex; align-items: stretch; gap: 22px; min-height: 56px; }

.nav-brand { display: flex; align-items: center; gap: 10px; flex: none;
             font-weight: 700; font-size: 1.0625rem; letter-spacing: -.03em;
             text-decoration: none; color: #fff; }
.nav-brand b { color: var(--lime); font-weight: 700; }
.brand-mark { width: 30px; height: 30px; flex: none; }

/* Sideways where it has to be, and without a scrollbar cutting through the
   underline of the page you are on. */
.nav-links { display: flex; align-items: stretch; gap: 2px; flex: 1 1 auto;
             overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.nav-links::-webkit-scrollbar { display: none; }

.nav-link { display: flex; align-items: center; font-size: 0.875rem; text-decoration: none;
            color: rgba(255, 255, 255, .72); padding: 0 12px; white-space: nowrap;
            border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0; }
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.nav-link--on { color: var(--lime); border-bottom-color: var(--lime); font-weight: 600; }

.nav-out { flex: none; margin: 0; display: flex; align-items: center; }

/* Keyboard users get to see where they are. The outline sits inside the header
   rather than being clipped by it. */
.nav-link:focus-visible, .nav-brand:focus-visible {
  outline: 2px solid var(--lime); outline-offset: -3px; border-radius: 6px;
}

/* On the navy, the quiet button has to be quiet against navy. */
.nav-out button { background: transparent; color: rgba(255, 255, 255, .8);
                  border-color: rgba(255, 255, 255, .22); }
.nav-out button:hover { background: rgba(255, 255, 255, .1); color: #fff;
                        border-color: rgba(255, 255, 255, .35); }

/* Straight past nine links to the page itself. Off-screen until it is focused,
   which is the one time anybody wants it. */
.skip { position: absolute; left: -9999px; top: 0; z-index: 100;
        background: var(--accent); color: #fff; padding: 10px 16px;
        border-radius: 0 0 8px 0; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.skip:focus { left: 0; }

/* Narrow enough that the row is certainly scrolling, so the last link fades out
   rather than being sliced down the middle. Only here: a fade applied at every
   width would dim the final link on a screen with room to spare, which says
   "there is more" when there is not. */
@media (max-width: 1100px) {
  .nav-links {
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
}

/* The mark carries the brand on its own once the row gets tight. Nine links
   and a wordmark do not both fit, and the links are what the header is for. */
/* Eleven links, a wordmark, a platform link and a sign-out do not fit on a
   laptop. The mark carries the brand on its own from here down. */
@media (max-width: 1280px) {
  .nav-brand span { display: none; }
}

@media (max-width: 720px) {
  .nav-inner { gap: 12px; padding: 0 14px; min-height: 52px; }
  .nav-link { padding: 0 10px; font-size: 0.84375rem; }
}

/* The page heading.
   The page, not the product: the tab, the header and the address bar have all
   said ForecourtIQ already, and the thing the dealer clicked on was in grey at
   14px beside it. */
.page-head { margin-bottom: 22px; }
.page-brand { margin: 0 0 8px; font-size: 1.375rem; font-weight: 700; letter-spacing: -.03em;
              color: var(--ink); }
.page-brand b { color: var(--accent); font-weight: 700; }
.page-head h1 { font-size: 1.625rem; margin: 0; letter-spacing: -.022em; line-height: 1.2; }
.page-lede { margin: 5px 0 0; color: var(--ink-faint); font-size: 0.90625rem; max-width: 60ch; }

/* Settings. */
/* Settings.
   One row per figure, label and explanation on the left, the box on the right.
   It was a table with the field in a 42% column, which on a wide screen put a
   pound sign and an input an inch and a half from the words they belonged to. */
.settings { display: flex; flex-direction: column; }
.setting { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 24px;
           padding: 15px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; padding-bottom: 0; }
.setting-label { flex: 1 1 300px; min-width: 0; }
.setting-label label { display: block; margin: 0; font-weight: 600; font-size: 0.90625rem; }
.setting .hint { display: block; margin-top: 3px; font-weight: 400; font-size: 0.8125rem;
                 line-height: 1.5; color: var(--ink-faint); max-width: 62ch; }

/* The unit sits inside the box. A pound sign beside a field reads as part of
   the label; inside it, it reads as part of the number. */
/* Every box the same width and the same right edge, whether it has a pound
   sign in front or "months" after. A column of inputs that each start
   somewhere different reads as a form nobody laid out. */
/* The field is a row: the box, then any unit after it. The unit used to be
   hung outside the box with absolute positioning, which put it past the
   panel's edge once the page went full width beside the menu. It now takes
   its own room; every box still shares one right edge because the unit
   column is a fixed width whether or not a row uses it. */
.setting-field { position: relative; flex: none; display: flex; align-items: center; gap: 8px; }
.setting-field input { margin: 0; width: 150px; text-align: right; padding-left: 26px;
                       font-variant-numeric: tabular-nums; }
.setting-unit { position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
                color: var(--ink-faint); font-weight: 600; pointer-events: none; }
.setting-suffix { flex: 0 0 60px; min-width: 60px; width: 60px; font-size: 0.8125rem; color: var(--ink-faint); white-space: nowrap; }
.setting-field:not(:has(.setting-suffix)) { padding-right: 68px; }

/* The one setting on the page that is not a number. An email address in a
   150px box right-aligned reads as a mistake, so it gets room and reads
   left to right like the text it is. */
.setting-field--wide input { width: 300px; max-width: 100%; text-align: left; padding-left: 11px; }
.setting-field--wide:not(:has(.setting-suffix)) { padding-right: 68px; }

@media (max-width: 600px) {
  .setting-field--wide { width: 100%; }
}

/* Testing the email.
   The three facts first — who it goes as, how, and where to — because half the
   time reading those is the whole diagnosis and nothing needs sending. */
.mail-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px;
              margin: 0 0 16px; font-size: 0.84375rem; }
.mail-facts dt { color: var(--ink-faint); }
.mail-facts dd { margin: 0; font-weight: 600; word-break: break-all; }

.mail-test { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mail-test label { font-size: 0.84375rem; color: var(--ink-soft); margin: 0; }
.mail-test input { margin: 0; flex: 1 1 240px; min-width: 0; }
.mail-test button { flex: none; }

textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
           font-size: 0.8125rem; line-height: 1.7; resize: vertical; }

/* Auction cards. The one actually held is marked, because every fee on the buy
   list depends on which it is. */
.cards { display: grid; gap: 12px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
        background: var(--panel); }
.card--on { border-color: var(--strong-buy); border-left-width: 4px; }
.card-head { display: flex; gap: 12px; align-items: center; justify-content: space-between;
             flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 0.9375rem; }
.card-cost { margin: 10px 0 0; font-size: 0.875rem; color: var(--ink-soft); }
.card-cost--better { color: var(--strong-buy); }
.card-cost--worse { color: var(--ink-faint); }
.card details { margin-top: 12px; }
.card summary { cursor: pointer; font-size: 0.8125rem; font-weight: 600; color: var(--accent); }
.card .reasons { margin-top: 10px; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); }

.wrap { max-width: 780px; margin: 0 auto; padding: 32px 20px 64px; }
.wrap--wide { max-width: 1180px; }

.brand { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.brand h1 { font-size: 1.5rem; margin: 0; letter-spacing: -.02em; }
.brand span { color: var(--ink-faint); font-size: 0.875rem; }

.lede { color: var(--ink-soft); margin: 0 0 28px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.panel h2 { font-size: 1.0625rem; margin: 0 0 4px; }
.panel h2 + p { margin-top: 0; color: var(--ink-faint); font-size: 0.875rem; }

.steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; }
.steps li {
  font-size: 0.8125rem; color: var(--ink-faint);
  border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; background: var(--panel);
}
.steps li[data-state="done"] { color: var(--strong-buy); border-color: var(--strong-buy); }
.steps li[data-state="current"] { color: var(--panel); background: var(--accent); border-color: var(--accent); }

label { display: block; font-weight: 600; font-size: 0.875rem; margin: 16px 0 6px; }
label .hint { display: block; font-weight: 400; color: var(--ink-faint); font-size: 0.8125rem; margin-top: 2px; }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}

.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1 1 220px; }

/* Lime with dark text on it, which is how the brand does a button. Lime cannot
   carry white text — it is a pale colour — so the pairing is the other way
   round from most of the product and the text goes dark. */
button, .button {
  display: inline-block; margin-top: 22px; padding: 11px 20px;
  font: inherit; font-weight: 700; text-decoration: none;
  /* Literal, not the ink token: lime is a light surface in both themes, so its
     text must not follow the theme. Tokenised, the label turned pale on pale
     the moment the page went dark. */
  color: #10212a;
  background: var(--lime); border: 1px solid var(--lime); border-radius: 8px; cursor: pointer;
}
button:hover, .button:hover { background: #b9e845; border-color: #b9e845; }
button:focus-visible, .button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.button--quiet { background: transparent; color: var(--accent); border-color: var(--line-strong); }
.button--quiet:hover { background: var(--accent-wash); border-color: var(--accent); }

/* The tier buttons keep white on a strong colour, which the base rule no
   longer provides now that it is dark-on-lime. */
.mini--buy, .button--buy, .mini--buy:hover, .button--buy:hover { color: #fff; }

.note { border-radius: 8px; padding: 12px 14px; font-size: 0.875rem; margin: 0 0 18px; border: 1px solid; }
.note--bad { background: var(--avoid-wash); border-color: var(--avoid); color: var(--avoid); }
.note--warn { background: var(--worth-a-look-wash); border-color: var(--worth-a-look); color: var(--worth-a-look); }
.note--good { background: var(--strong-buy-wash); border-color: var(--strong-buy); color: var(--strong-buy); }
.note--info { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-dark); }
.note strong { display: block; margin-bottom: 2px; }

.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks .mark { flex: none; width: 20px; font-weight: 700; }
.checks .ok .mark { color: var(--strong-buy); }
.checks .warn .mark { color: var(--worth-a-look); }
.checks .bad .mark { color: var(--avoid); }
.checks .name { font-weight: 600; font-size: 0.875rem; }
.checks .detail, .checks .fix { font-size: 0.8125rem; color: var(--ink-faint); margin-top: 2px; }
/* The catalogue rows carry live controls — change the auction, delete the sale
   — and a flex form is block-level, so without this each one drops onto its own
   line and a list of four sales runs a screen deep. */
.checks .detail { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.checks .detail form { display: inline-flex; gap: 6px; align-items: center; }
.checks .fix { color: var(--ink-soft); }

pre {
  background: var(--page); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px; overflow-x: auto; font-size: 0.8125rem; line-height: 1.5;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.tier { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: .02em;
        padding: 3px 9px; border-radius: 99px; border: 1px solid; }
.tier--strong { color: var(--strong-buy); background: var(--strong-buy-wash); border-color: var(--strong-buy); }
.tier--look { color: var(--worth-a-look); background: var(--worth-a-look-wash); border-color: var(--worth-a-look); }
.tier--avoid { color: var(--avoid); background: var(--avoid-wash); border-color: var(--avoid); }

.foot { color: var(--ink-faint); font-size: 0.8125rem; margin-top: 28px; }

/* The column-mapping table. */
table.map { width: 100%; border-collapse: collapse; }
table.map th {
  text-align: left; font-size: 0.875rem; font-weight: 600; vertical-align: top;
  padding: 12px 14px 12px 0; width: 46%; border-bottom: 1px solid var(--line);
}
table.map td { padding: 10px 0; border-bottom: 1px solid var(--line); }
table.map select { width: 100%; }
table.map .hint { display: block; font-weight: 400; color: var(--ink-faint); font-size: 0.8125rem; margin-top: 3px; }

/* Wide content scrolls inside its own box; the page never scrolls sideways. */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.preview { border-collapse: collapse; font-size: 0.8125rem; white-space: nowrap; }
table.preview th, table.preview td {
  padding: 7px 12px; border-bottom: 1px solid var(--line); text-align: left;
}
table.preview th { font-weight: 600; color: var(--ink-faint); background: var(--page); position: sticky; top: 0; }

label input[type=radio], label input[type=checkbox] { margin-right: 8px; }
input[type=file] {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--panel); border: 1px dashed var(--line-strong); border-radius: 8px;
}

/* A card that leads somewhere, used for the dashboard's next steps. */
.cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.cta p { margin: 0; }
.cta .button { margin-top: 0; }

/* Headline figures. */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 22px; }
.stat-value { display: block; font-size: 1.875rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.stat-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--ink-soft); margin-top: 2px; }
.stat-note { display: block; font-size: 0.8125rem; color: var(--ink-faint); margin-top: 6px; }

.sweet { font-size: 1.125rem; font-weight: 600; margin: 0 0 22px; color: var(--ink); }

.band-heading { font-size: 0.875rem; font-weight: 600; color: var(--ink-soft); margin: 22px 0 10px; }
.bands { display: grid; gap: 7px; }
.band { display: grid; grid-template-columns: minmax(120px, 26%) 1fr minmax(84px, auto); gap: 12px; align-items: center; }
.band-label { font-size: 0.8125rem; color: var(--ink-soft); }
.band-track { background: var(--page); border-radius: 99px; height: 20px; overflow: hidden; }
.bar { display: block; height: 100%; border-radius: 99px; background: var(--line-strong); }
/* The dealer's best band is the only bar that gets a colour. */
.bar--best { background: var(--strong-buy); }
.bar--thin { background: repeating-linear-gradient(45deg, var(--line-strong) 0 5px, transparent 5px 10px); }
.band-value { font-size: 0.8125rem; font-weight: 600; text-align: right; }
.band-units { display: block; font-weight: 400; color: var(--ink-faint); font-size: 0.75rem; }
.thin-note { font-size: 0.75rem; color: var(--ink-faint); font-weight: 400; }

.panel-sub { margin: -2px 0 16px; color: var(--ink-faint); font-size: 0.875rem; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
.tab {
  font-size: 0.8125rem; line-height: 1.2; text-decoration: none; color: var(--ink-soft);
  border: 1px solid var(--line-strong); border-radius: 99px; padding: 7px 14px;
  background: var(--panel); white-space: nowrap;
}
.tab:hover { border-color: var(--accent); color: var(--accent); }
.tab--on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.tab--on:hover { color: #fff; }

table.league {
  width: 100%; border-collapse: collapse; font-size: 0.875rem;
  /* Digits line up in columns, which is the whole point of a table of money. */
  font-variant-numeric: tabular-nums;
}
table.league th, table.league td {
  padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line);
}
table.league thead th {
  vertical-align: bottom; border-bottom: 2px solid var(--line-strong);
  padding-bottom: 9px; font-weight: 600;
}
table.league .col-label { display: block; font-size: 0.8125rem; color: var(--ink); }
table.league .col-note { display: block; font-size: 0.75rem; font-weight: 400; color: var(--ink-faint); margin-top: 2px; }
table.league td.num, table.league th.num { text-align: right; white-space: nowrap; }
table.league th.rank, table.league td.rank {
  width: 34px; padding-right: 0; color: var(--ink-faint); font-size: 0.75rem; text-align: right;
}
table.league td.model { font-weight: 600; white-space: nowrap; }
/* The column the table is sorted by, so the order is never a mystery. */
table.league .col--on { background: var(--accent-wash); font-weight: 700; }
table.league thead .col--on { color: var(--accent-dark); }
table.league tbody tr:hover td { background: var(--page); }
table.league tbody tr:hover td.col--on { background: var(--accent-wash); }
table.league tbody tr:last-child td { border-bottom: 0; }

/* --- The buy list ---------------------------------------------------------
   The tier is the only thing allowed to shout. Everything else stays quiet so
   the recommendation reads first. */

.wrap--buylist { max-width: 1000px; }

.buylist-head { display: flex; gap: 18px; align-items: flex-end; justify-content: space-between;
                flex-wrap: wrap; margin-bottom: 18px; }
.buylist-title { font-size: 1.25rem; margin: 0; }
.switcher label { margin: 0; font-size: 0.8125rem; color: var(--ink-faint); }
.switcher select { min-width: 220px; margin-top: 4px; }

.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin: 0 0 6px; }
.filters label { margin: 0; flex: 1 1 150px; font-size: 0.8125rem; }
.filters input { margin-top: 4px; }
.filters button { margin-top: 0; flex: 0 0 auto; }

.choices { display: grid; gap: 10px; margin: 8px 0 4px; }
.choice { display: block; margin: 0; padding: 12px 14px; border: 1px solid var(--line-strong);
          border-radius: 8px; font-weight: 400; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.choice strong { font-weight: 700; }
.choice .hint { display: block; margin-top: 4px; }

.lots { display: grid; gap: 14px; }

.lot { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line-strong);
       border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.lot--strong { border-left-color: var(--strong-buy); }
.lot--look { border-left-color: var(--worth-a-look); }
.lot--avoid { border-left-color: var(--avoid); opacity: .82; }

.lot-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; }
.lot-id h3 { margin: 7px 0 3px; font-size: 1.0625rem; }
.derivative { font-weight: 400; color: var(--ink-faint); font-size: 0.875rem; }
.lot-facts { margin: 0; font-size: 0.8125rem; color: var(--ink-faint); }

.lot-score { text-align: right; flex: none; }
.score { display: block; font-size: 1.6875rem; font-weight: 700; line-height: 1; letter-spacing: -.02em;
         font-variant-numeric: tabular-nums; }
.score-label { display: block; font-size: 0.75rem; color: var(--ink-faint); margin-top: 3px; }

.lot-headline { margin: 13px 0; font-size: 0.875rem; color: var(--ink-soft); }

.lot-money { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px;
             padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.money-label { display: block; font-size: 0.75rem; color: var(--ink-faint); }
.money { display: block; font-size: 1.1875rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 1px; }
.money--good { color: var(--strong-buy); }
.money--bad { color: var(--avoid); }
.money-note { display: block; font-size: 0.75rem; color: var(--ink-faint); margin-top: 2px; }

/* MOT, service history, DVSA record — the checks made before bidding. Facts,
   not judgements, so they sit quietly until one is worth looking at: a red
   MOT should be findable while scrolling without reading a word. */
.lot-condition { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 13px;
                 font-size: 0.78125rem; color: var(--ink-soft); }
.fact { display: inline-flex; align-items: baseline; gap: 5px; }
.fact b { font-weight: 600; }
.fact span { color: var(--ink-faint); }
.fact--warn, .fact--warn b { color: var(--worth-a-look); }
.fact--bad, .fact--bad b { color: var(--avoid); }
.fact--warn, .fact--bad { padding: 1px 8px; border-radius: 4px; }
.fact--warn { background: var(--worth-a-look-wash); }
.fact--bad { background: var(--avoid-wash); }
.fact--warn span, .fact--bad span { color: inherit; opacity: .85; }
.fact--kit { color: var(--ink-faint); }

@media (prefers-color-scheme: dark) {
  /* The tier reds and ambers are set for headings and chips, and at 12.5px on
     their own wash they fall just under 4.5:1. Lightened here only, rather than
     shifting the shared tokens and every tier colour with them. */
  .fact--bad, .fact--bad b { color: #fca5a5; }
  .fact--warn, .fact--warn b { color: #fcd34d; }
}

/* Attached inspection reports.
   The point of the block is the faults, not the filenames: a dealer scrolling a
   sale should be able to see that a car has a poor previous repair on the front
   bumper without opening anything. So the document is a quiet line and the
   findings are the loud part, coloured the way BCA colour them. */
.reports { margin-top: 13px; border-top: 1px dashed var(--line); padding-top: 11px;
           display: flex; flex-direction: column; gap: 11px; }
.report { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
          background: var(--page); }
.report-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px;
               font-size: 0.78125rem; color: var(--ink-faint); }
.report-name { font-weight: 700; color: var(--ink); font-size: 0.8125rem; }
.report-grade { font-weight: 600; color: var(--ink-soft); border: 1px solid var(--line-strong);
                border-radius: 4px; padding: 0 6px; }
.report-note { color: var(--worth-a-look); }

.report-flaws { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-top: 8px; font-size: 0.78125rem; }
.flaw { display: inline-flex; align-items: baseline; gap: 5px; padding: 1px 8px; border-radius: 4px; }
.flaw b { font-weight: 600; }
.flaw span { opacity: .85; }
.flaw--warn { background: var(--worth-a-look-wash); color: var(--worth-a-look); }
/* Solid, not a wash. On BCA's own reports this is a red exclamation in a
   filled circle, and a car with an engine smoking mark on it should be the
   thing a dealer's eye lands on when the card comes into view. */
.flaw--bad { background: var(--avoid); color: #fff; font-weight: 500; }
.flaw--bad b { color: #fff; }

.report-tread { margin-top: 9px; font-size: 0.78125rem; color: var(--ink-soft); }
.tread-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .06em;
               color: var(--ink-faint); font-weight: 600; }
.tread { display: inline-flex; gap: 5px; padding: 1px 7px; border-radius: 4px; }
.tread b { font-weight: 600; }
.tread--warn { background: var(--worth-a-look-wash); color: var(--worth-a-look); }
.tread--bad { background: var(--avoid); color: #fff; }

/* The prep list. Set apart from everything else on the card on purpose: it is
   the one block of money on the page that is an estimate rather than a
   calculation, and it has to look it. */
.read--prep { border-left: 3px solid var(--worth-a-look); padding-left: 12px; }
.prep { list-style: none; margin: 6px 0 0; padding: 0; font-size: 0.8125rem; }
.prep li { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0;
           border-bottom: 1px dotted var(--line); }
.prep li:last-child { border-bottom: 0; }
.prep li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.prep-total { margin: 7px 0 0; font-weight: 700; }
.prep-verdict { margin: 5px 0 0; }

/* Bought cars. The other half of the buy list: that page is a judgement made
   before a sale, this is the record of what happened, and the green edge says
   which one you are looking at without reading a word. */
.lot--bought { border-left: 4px solid var(--strong-buy); }
.lot--bought .lot-head { align-items: flex-start; }

/* Money that is worked out rather than typed — the VAT, chiefly. Quieter than
   the figures either side of it so it does not read as something to argue with. */
.money--soft { opacity: .72; }

/* The invoice against what was typed. Only ever shown once an invoice has been
   attached and read, so it is always saying something. */
.invoice-check { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px;
                 margin-top: 12px; padding: 10px 12px; border-radius: var(--radius);
                 background: var(--page); border: 1px solid var(--line); }
.invoice-check .money { font-size: 1.0625rem; font-weight: 700; }
.invoice-check .hint { flex: 1 1 220px; font-size: 0.75rem; color: var(--ink-faint); }
.hint--warn { color: var(--worth-a-look); }

/* The bill, on the report card itself.
   Bigger than anything else on the card because it is the only figure in the
   product that is a fact rather than an estimate. */
.invoice-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
                 margin-top: 10px; }
.invoice-figure { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }

/* Emailed on to the document import. Said on the card so nobody forwards it twice
   by hand, which is exactly the work this was meant to save. */
.report-sent { font-size: 0.75rem; font-weight: 600; color: var(--strong-buy);
               background: var(--strong-buy-wash); padding: 2px 8px; border-radius: 999px; }

/* A note that is a warning rather than a fact: an expired MOT, or a list of
   checks the inspector never carried out. Silence about those reads as a
   pass, which is the one thing a report must never do. */
.report-note--warn { color: var(--avoid); font-weight: 600; }

/* People — on a dealership, and waiting on an invitation.
   One list rather than two, because "who can get in" is one question and
   splitting it into members and pending invitations makes you ask it twice. */
.people { list-style: none; margin: 14px 0 0; padding: 0; }
.people li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
             gap: 8px 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.people li:last-child { border-bottom: 0; }
.people .who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.people .who b { font-size: 0.90625rem; }
.people .who .foot { margin: 0; }
.people .what { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* The row that adds somebody. Deliberately a form and not a modal: a dealer
   principal adding their buyer should not have to find a button first. */
.invite-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; margin: 14px 0 0; }
.invite-row label { margin: 0; flex: 1 1 190px; max-width: 280px; font-size: 0.75rem;
                    text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint);
                    font-weight: 600; }
.invite-row label .hint { text-transform: none; letter-spacing: 0; font-size: 0.75rem; }
.invite-row input, .invite-row select { margin-top: 3px; }
.invite-row button { margin: 0; }

/* The invitation link, shown once and never again — only its hash is kept.
   Big, selectable, and impossible to mistake for decoration. */
.panel--link { border-color: var(--accent); }
.invite-link { margin: 8px 0 0; padding: 12px 14px; border: 1px dashed var(--line-strong);
               border-radius: 8px; background: var(--page); font-family: ui-monospace,
               SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125rem;
               word-break: break-all; user-select: all; }

.dealer-head { display: flex; flex-wrap: wrap; align-items: flex-start;
               justify-content: space-between; gap: 10px 18px; }
.dealer-head h2 { margin: 0; }

/* A dealership's standing. The two that let somebody work read calm; the three
   that do not read as something to act on. */
.tier--ACTIVE { color: var(--strong-buy); border-color: var(--strong-buy); }
.tier--TRIALING { color: var(--accent); border-color: var(--accent); }
.tier--PAST_DUE { color: var(--worth-a-look); border-color: var(--worth-a-look); }
.tier--SUSPENDED, .tier--CANCELLED { color: var(--avoid); border-color: var(--avoid); }

/* The platform link. Outside the scrolling run of links and beside Sign out,
   because it belongs to whoever runs ForecourtIQ rather than to the dealership
   whose pages those are. */
.nav-platform { flex: none; display: flex; align-items: center; padding: 0 12px;
                font-size: 0.84375rem; font-weight: 600; text-decoration: none;
                color: var(--lime); border-bottom: 2px solid transparent; white-space: nowrap; }
.nav-platform:hover { background: rgba(255, 255, 255, .07); }
.nav-platform--on { border-bottom-color: var(--lime); }

@media (max-width: 720px) {
  /* The mark says which one it is; at this width the word is what has to go. */
  .nav-platform { font-size: 0; padding: 0 8px; }
  .nav-platform:after { content: "\2699"; font-size: 1.0625rem; }
}
/* The retail panel — rating, days to sell, how the model moves.
   Laid out like the block Auto Trader print on an advert, because that is the
   shape a dealer already reads without thinking about it. What is inside it is
   this dealership's own trading record, and the panel says so. */
.retail-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
                background: var(--page); flex: 1 1 100%; margin-top: 4px; }
.retail-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.retail-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .06em;
                color: var(--ink-faint); font-weight: 700; }
.retail-score { font-size: 1.3125rem; font-weight: 700; line-height: 1; }
.retail-score span { font-size: 0.75rem; font-weight: 400; color: var(--ink-faint); }
.retail-none { font-size: 0.78125rem; color: var(--ink-faint); }

/* Five segments rather than one bar: a continuous fill makes 61 and 68 look
   like the same number, and they are not the same car. */
.rate-bar { display: flex; gap: 3px; margin-top: 8px; }
.rate-seg { flex: 1; height: 9px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rate-fill { display: block; height: 100%; background: var(--strong-buy); }

.retail-grid { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 12px;
               padding-top: 11px; border-top: 1px solid var(--line); }
.retail-cell { flex: 1 1 190px; display: flex; flex-direction: column; gap: 3px; }
.retail-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .05em;
                color: var(--ink-faint); font-weight: 600; }
.retail-figure { font-size: 1.1875rem; font-weight: 700; line-height: 1.1; }
.retail-figure span { font-size: 0.75rem; font-weight: 400; color: var(--ink-faint); }
.retail-figure--none { color: var(--ink-faint); font-weight: 400; }
.retail-note { font-size: 0.75rem; color: var(--ink-soft); }

/* Where the model sits against the rest of the book. Left is slow, right is
   quick, the same direction as every other scale on the card. */
.gauge { position: relative; display: block; height: 9px; margin: 4px 0 2px; }
.gauge-track { position: absolute; inset: 0; border-radius: 3px;
               background: linear-gradient(to right, var(--avoid), var(--worth-a-look), var(--strong-buy)); }
.gauge-pin { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px;
             background: #000; box-shadow: 0 0 0 1.5px #fff; border-radius: 1px; }
.gauge--empty { height: 9px; border-radius: 3px; background: var(--line); }

.retail-trend { font-size: 0.75rem; color: var(--ink-faint); }
.retail-trend--good { color: var(--strong-buy); }
.retail-trend--bad { color: var(--worth-a-look); }
.retail-panel .foot { margin-top: 10px; }

@media (prefers-color-scheme: dark) {
  .retail-trend--bad { color: #fcd34d; }
  /* The dark-theme tier greens are pale enough to want dark text on them, the
     same way the lime button does. */
  .mini--buy, .button--buy, .mini--buy:hover, .button--buy:hover { color: #06231a; }
}
/* Over the stock limit. The count is shown on every card whatever it is —
   knowing you already have two before buying a third is worth as much as being
   stopped at the fourth — and only turns red when it is a problem. */
.retail-figure--over { color: var(--avoid); }
.retail-note--over { color: var(--avoid); font-weight: 600; }

/* Scales: battery state of health, and tyre tread.
   Both say the same thing the same way — a coloured run of bands with a marker
   on it — because a dealer should not have to learn two visual languages on
   one card. Left is bad, right is good, on both. */
.scale-row { display: flex; align-items: center; gap: 9px; margin-top: 7px; font-size: 0.78125rem; }
.scale-label { min-width: 52px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .05em;
               color: var(--ink-faint); font-weight: 600; }
.scale-figure { min-width: 46px; font-weight: 700; font-variant-numeric: tabular-nums; }
.scale { position: relative; flex: 1 1 120px; min-width: 110px; height: 12px; }
.scale-bands { position: absolute; inset: 0; display: flex; border-radius: 3px; overflow: hidden; }
.scale-band { display: flex; align-items: center; justify-content: center; }
.scale-band b { font-size: 0.75rem; color: #fff; font-weight: 700; opacity: .9; letter-spacing: .04em; }
/* The marker is a notch through the bands rather than a dot on top of them, so
   it stays readable whichever colour it lands on. Solid black with a white
   collar either side: on a dark green band a grey line at three pixels is
   nearly invisible, and this is the one part of the scale anybody looks at. */
.scale-pin { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px;
             background: #000; box-shadow: 0 0 0 1.5px #fff; border-radius: 1px; }
.scale-note { color: var(--ink-faint); font-size: 0.75rem; }
.scale-note--said { color: var(--avoid); font-weight: 600; }

.report-grade--battery { color: #fff; border: 0; font-weight: 700; }

@media (max-width: 620px) {
  /* On a phone the bar is the first thing to lose. The figure and its colour
     carry the meaning on their own. */
  .scale { display: none; }
  .scale-row { gap: 7px; }
}
.report-clear, .report-unread { margin: 8px 0 0; font-size: 0.78125rem; color: var(--ink-faint); }
.report-unread { color: var(--worth-a-look); }

.report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 9px; }
.report-open { font-size: 0.78125rem; }
.report-remove { display: inline-flex; }
/* A button that has to read as a link: removing a report is destructive enough
   to want the confirmation a form gives, and small enough that a button beside
   "Open the PDF" would shout. */
.linkish { background: none; border: 0; padding: 0; margin: 0; font: inherit; font-size: 0.78125rem;
           color: var(--ink-faint); text-decoration: underline; cursor: pointer; }
.linkish:hover { color: var(--avoid); }

.report-attach { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.report-file { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 600;
               font-size: 0.78125rem; }
.report-file input[type=file] { font-size: 0.75rem; max-width: 230px; }
.report-attach .hint { flex: 1 1 240px; font-size: 0.75rem; color: var(--ink-faint); font-weight: 400; }

@media (prefers-color-scheme: dark) {
  /* The dark red is light enough to take dark text, which keeps the solid
     badge as loud as it is in daylight without glaring. */
  .flaw--bad, .flaw--bad b, .tread--bad { background: #b91c1c; color: #fff; }
  .flaw--warn, .tread--warn, .report-note, .report-unread { color: #fcd34d; }
  /* Black on a dark page disappears; the marker inverts rather than fades. */
  .scale-pin, .gauge-pin { background: #fff; box-shadow: 0 0 0 1.5px #111; }
}
/* Two real trading periods side by side, and the month in progress beside them
   so its small number reads as "nine days in" rather than as a collapse. */
.periods { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px;
           margin-top: 18px; }
.period { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
          background: var(--page); }
.period h3 { margin: 0 0 2px; font-size: 0.875rem; }
.period h4 { margin: 14px 0 5px; font-size: 0.75rem; text-transform: uppercase;
             letter-spacing: .06em; color: var(--ink-faint); font-weight: 600; }
.period .panel-sub { margin: 0; font-size: 0.8125rem; }
.tally { list-style: none; margin: 0; padding: 0; font-size: 0.8125rem; }
.tally li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0;
            color: var(--ink-soft); }
.tally li.muted { color: var(--ink-faint); }

/* One section of the read on a car. Headed, so the report can be skimmed for
   the part that matters rather than read end to end. */
.read { margin-top: 14px; padding-left: 12px; border-left: 2px solid var(--line); }
.read h4 { margin: 0 0 3px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .06em;
           color: var(--ink-faint); font-weight: 600; }
.read p { margin: 0; font-size: 0.875rem; color: var(--ink-soft); }
.read--watch { border-left-color: var(--worth-a-look); }
.read--watch h4 { color: var(--worth-a-look); }

/* A read shown inside a buy list card rather than on its own page. Set apart,
   because everything else on the card is computed and this is an opinion. */
.ai-inline { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius);
             border: 1px solid var(--accent); background: var(--accent-wash); }
.ai-inline .lot-headline { margin-top: 0; }
.ai-inline .read { border-left-color: var(--accent); }
.ai-done { margin: 12px 0 0; font-size: 0.78125rem; color: var(--ink-faint); }

/* The real figures, on the card, under the estimate. Laid out to be filled in
   one-handed on a phone at a sale — which is where these numbers are actually
   known, and where a week-late entry becomes a guess. */
.actual-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px;
              margin: 0; padding: 12px 0 2px; }
.actual-row label { margin: 0; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .06em;
                    color: var(--ink-faint); font-weight: 600; flex: 1 1 120px; max-width: 170px; }
.actual-row label .hint { text-transform: none; letter-spacing: 0; font-size: 0.75rem; margin-top: 1px; }
.actual-row input { margin-top: 3px; padding: 7px 10px; font-size: 0.9375rem;
                    font-variant-numeric: tabular-nums; }
.actual-row button { margin: 0; }
.actual-margin { flex: 1 1 110px; }
.actual-margin .money-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .06em;
                              font-weight: 600; }
.actual-margin .money { font-size: 1.1875rem; }
/* A margin worked out with the standing fees figure rather than this car's own.
   Drawn lighter and with the reason under it, because the difference between it
   and the real thing is six hundred pounds and no visible clue. */
.actual-margin .money--soft { opacity: .72; }
.actual-margin .hint { display: block; font-size: 0.75rem; line-height: 1.3; margin-top: 2px;
                       color: var(--ink-faint); font-weight: 400; }

/* The VAT the margin scheme takes out, under the margin rather than inside it.
   The dealer works in the figure above; this is what is left once HMRC have
   had their sixth of the gap between the sale and the purchase. */
.margin-vat { display: block; font-size: 0.75rem; line-height: 1.35; margin-top: 3px;
              color: var(--ink-soft); font-weight: 400; }
.margin-vat b { font-weight: 700; color: var(--ink); }

/* Scoring a sale again, offered where the sale is being read rather than
   three pages away in Settings. */
.rescore-bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px;
               margin: 10px 0 0; }
.rescore-bar .foot { margin: 0; flex: 1 1 320px; }

/* Clearing out the hidden pile. The one destructive control in the product,
   so it is red, it asks first, and it only exists on the view where the
   dealer is already looking at what they have dismissed. */
.remove-bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px;
              margin: 10px 0 0; }
.remove-bar .foot { margin: 0; flex: 1 1 320px; }
.lot-pick { display: inline-flex; align-items: center; gap: 6px; float: right;
            font-size: 0.75rem; color: var(--ink-faint); margin: 0 0 0 10px; }
.lot-pick input { margin: 0; width: 16px; height: 16px; accent-color: var(--avoid); }
.mini--danger { color: var(--avoid); border-color: var(--avoid); }
.mini--danger:hover { background: var(--avoid-wash); }
.pick-all { float: none; margin: 0; font-size: 0.8125rem; color: var(--ink-soft); }
.remove-bar button[disabled] { opacity: .5; cursor: default; }

/* The two ends, under the typical figure. Small and grey: it is context for
   the number above it, not a number of its own. */
/* A heading that sits inside a disclosure summary and does not push it onto a
   line of its own. */
.inline-h2 { display: inline; font-size: 1.0625rem; }
details > summary { cursor: pointer; }

.spread { display: block; font-size: 0.75rem; font-weight: 400; color: var(--ink-faint);
          font-variant-numeric: tabular-nums; margin-top: 1px; }
.actual-empty { display: block; font-size: 1.1875rem; font-weight: 700; color: var(--ink-faint); margin-top: 1px; }

/* The retail rating and how long it really took. A second line under the money
   because they are recorded at a different time — the rating when appraising,
   the days once it has gone. */
.actual-extra { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px;
                flex-basis: 100%; padding-top: 6px; }
.actual-extra label { flex: 0 1 150px; }

/* Drawn but never judged: no threshold here decides what a good rating is,
   because that is Auto Trader's scale and not ours. */
.rating { flex: 1 1 150px; display: flex; align-items: center; gap: 9px; padding-bottom: 6px; }
.rating-track { flex: 1 1 auto; height: 9px; border-radius: 99px; background: var(--line);
                overflow: hidden; }
.rating-fill { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.rating-value { font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums;
                white-space: nowrap; }
.rating-value span { font-size: 0.75rem; font-weight: 400; color: var(--ink-faint); }
.rating-note { font-size: 0.75rem; color: var(--ink-faint); white-space: nowrap; }

/* Only on a button that destroys something, and only after a confirmation
   page that has already said what goes. */
.button--danger { background: var(--avoid); border-color: var(--avoid); }
.button--danger:hover { background: var(--avoid); border-color: var(--avoid); filter: brightness(.9); }

.actual-link { flex: 1 1 220px; max-width: none; }
.source-link { margin-top: 0; margin-bottom: 6px; white-space: nowrap; }

/* The valuation itself. The one figure on the page a dealer came for, so it is
   allowed to be the size it is — everything around it is the working. */
.valuation { margin: 6px 0 2px; font-size: 2.5rem; font-weight: 700; letter-spacing: -.02em;
             line-height: 1.1; font-variant-numeric: tabular-nums; }

/* The invoice disagreeing with the boxes. Not an error — the dealer may well
   be the one who is right — so it offers rather than warns. */
/* A tick box that reads as one: the box beside the words, not above them. */
.tick { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px;
        font-size: 0.9375rem; font-weight: 500; cursor: pointer; }
.tick input { width: 17px; height: 17px; margin: 2px 0 0; flex: none; }
.tick .hint { display: block; font-weight: 400; color: var(--ink-faint);
              font-size: 0.8125rem; margin-top: 2px; }

.invoice-offer {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 11px 14px; border-radius: 10px;
  background: var(--accent-wash); border: 1px solid var(--accent);
  font-size: 0.875rem; color: var(--ink-soft);
}
.invoice-offer b { color: var(--ink); }
.invoice-offer form { margin: 0; }

.print-bar { margin: 10px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.print-bar .button { margin-top: 0; }
.print-bar .foot { margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.chip { font-size: 0.75rem; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line-strong);
        color: var(--ink-soft); background: var(--page); }
.chip--warn { border-color: var(--worth-a-look); color: var(--worth-a-look); background: var(--worth-a-look-wash); }
.chip--bad { border-color: var(--avoid); color: var(--avoid); background: var(--avoid-wash); }

.lot-why { margin-top: 13px; }
.lot-why summary { cursor: pointer; font-size: 0.8125rem; font-weight: 600; color: var(--accent); }
.lot-why ul { margin: 11px 0 0; padding-left: 20px; font-size: 0.875rem; color: var(--ink-soft); }
.lot-why li { margin-bottom: 5px; }
.lot-why .foot { margin-top: 11px; }

.lot-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
               margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }

.mini { margin-top: 0; padding: 6px 13px; font-size: 0.8125rem; font-weight: 600; border-radius: 7px; }
/* A dropdown sitting in a row of buttons, not filling a form column: the base
   select rule is width:100%, which pushes everything beside it onto its own
   line. */
select.mini { width: auto; padding: 5px 9px; font-weight: 500; }
.mini--quiet { background: transparent; color: var(--ink-faint); border-color: var(--line-strong); }
.mini--quiet:hover { background: var(--page); color: var(--ink); border-color: var(--line-strong); }
.mini--buy, .button--buy { background: var(--strong-buy); border-color: var(--strong-buy); }
.mini--buy:hover, .button--buy:hover { background: #036349; border-color: #036349; }

.decided { font-size: 0.8125rem; font-weight: 700; padding: 5px 12px; border-radius: 99px; border: 1px solid; }
.decided--shortlisted { color: var(--accent); background: var(--accent-wash); border-color: var(--accent); }
.decided--bought { color: var(--strong-buy); background: var(--strong-buy-wash); border-color: var(--strong-buy); }
.decided--hidden { color: var(--ink-faint); background: var(--page); border-color: var(--line-strong); }

/* The lot detail page. */
table.ledger { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.ledger th { text-align: left; font-weight: 600; font-size: 0.875rem; padding: 10px 0; }
table.ledger td { padding: 10px 0; }
table.ledger td.num { text-align: right; font-weight: 700; font-size: 1rem; white-space: nowrap; }
table.ledger td.why { padding-left: 16px; font-size: 0.8125rem; color: var(--ink-faint); font-weight: 400;
                      text-align: right; width: 45%; }
table.ledger tr.subtotal th, table.ledger tr.subtotal td { border-top: 1px solid var(--line); }
table.ledger tr.total th, table.ledger tr.total td { border-top: 2px solid var(--line-strong); font-size: 1.0625rem; }
table.ledger tr.total td.num { font-size: 1.25rem; }

ul.reasons { margin: 0; padding-left: 20px; font-size: 0.875rem; color: var(--ink-soft); }
ul.reasons li { margin-bottom: 7px; }

.decision-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.decision-buttons button { margin-top: 0; }

/* Anything generated rather than computed is visually separated, on purpose.
   A dealer must never have to wonder which numbers came from their own sales. */
.panel--ai { border-style: dashed; border-color: var(--line-strong); background: var(--page); }
.ai-tag { font-size: 0.75rem; font-weight: 700; letter-spacing: .06em; vertical-align: middle;
          padding: 2px 7px; border-radius: 99px; margin-left: 6px;
          color: var(--ink-faint); background: var(--panel); border: 1px solid var(--line-strong); }
.ai-body { font-size: 0.875rem; color: var(--ink-soft); }
.ai-body p { margin: 0 0 10px; }
.ai-body .band-heading { margin-top: 16px; }

/* The narrower filters, folded away until wanted and opened whenever any is in
   use — a filtered list that looks unfiltered is how a dealer concludes half
   the sale is missing. */
.more-filters { flex-basis: 100%; margin-top: 4px; border-top: 1px solid var(--line);
                padding-top: 12px; }
.more-filters summary { cursor: pointer; font-size: 0.8125rem; font-weight: 600; color: var(--accent);
                        list-style: none; }
.more-filters summary::-webkit-details-marker { display: none; }
.more-filters summary::before { content: "▸ "; }
.more-filters[open] summary::before { content: "▾ "; }
.more-filters summary span { font-weight: 400; color: var(--ink-faint); }
.more-filters button { margin-top: 14px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
               gap: 0 14px; margin-top: 4px; }
.filter-grid label { margin-top: 12px; }
.filter-grid .hint { display: inline; margin-left: 4px; }


/* --- Text size ------------------------------------------------------------
   Someone reading a 300-lot sale on a phone in a saleroom, and someone whose
   eyes are not what they were, want the same thing: bigger words. This is that
   control, and it stays put at every size because it is sized in px on purpose
   — a button that grows as you press it walks out from under the finger. */

.nav-text { display: flex; align-items: center; gap: 4px; flex: none; }

.nav-text button {
  width: 30px; height: 30px; padding: 0; flex: none;
  display: flex; align-items: center; justify-content: center;
  font: 700 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: rgba(255, 255, 255, .8); background: transparent;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 7px; cursor: pointer;
}
.nav-text button:hover:not(:disabled) {
  background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .35);
}
.nav-text button:disabled { opacity: .35; cursor: default; }
.nav-text button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* The smaller of the two reads smaller, so which is which is obvious without
   reading either. */
.nav-text button[data-step="-1"] { font-size: 11px; /* fixed on purpose */ }
.nav-text button[data-step="1"] { font-size: 16px; /* fixed on purpose */ }

/* Said once, when it changes, and then it goes. Somebody pressing A+ wants to
   know what they are at without a permanent readout in the header. */
.text-said {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200;
  background: var(--navy); color: #fff; padding: 9px 16px; border-radius: 999px;
  font: 600 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  box-shadow: var(--shadow); pointer-events: none;
}

@media (max-width: 720px) {
  .nav-text button { width: 28px; height: 28px; }
}
/* --- The customer map -----------------------------------------------------
   Two series and they never swap sides: the olive left half of a circle is a
   car sold, the blue right half is an enquiry that never became one. Sea and
   land are quiet on purpose — they are there so a dealer can find the Fylde
   coast, not to be looked at. */

/* Two maps drawn at 330 and 620 units wide, shown at no more than about one
   and a half times that. Left to scale with the window, the close-up filled
   whatever a wide monitor had spare — 1,700 pixels, labels three times their
   size — beside a country map pinned at a thumbnail. */
.cm-pair {
  display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.8fr); gap: 18px;
  margin-bottom: 16px; align-items: start;
}
.cm--uk { max-width: 480px; }
.cm--patch { max-width: 880px; }
@media (max-width: 820px) { .cm-pair { grid-template-columns: 1fr; } }

.cm-panel { min-width: 0; }
.cm-title { font-weight: 600; font-size: 0.9375rem; margin: 0 0 1px; }
.cm-sub { margin: 0 0 8px; font-size: 0.8125rem; color: var(--ink-faint); }

.cm {
  display: block; width: 100%; height: auto;
  background: var(--sea); border: 1px solid var(--line); border-radius: 10px;
}

.cm-land { fill: var(--land); stroke: var(--coast); stroke-width: .6; stroke-linejoin: round; }
.cm-land--far { fill: var(--land-far); }

.cm-sold { fill: var(--strong-buy); fill-opacity: .62; stroke: var(--strong-buy); stroke-width: .6; }
.cm-enq { fill: var(--cm-enq); fill-opacity: .5; stroke: var(--cm-enq); stroke-width: .6; }

/* A halo, so a label over the Preston and Blackpool pile-up is still readable. */
.cm-label {
  font: 700 8.5px Inter, system-ui, sans-serif; fill: var(--ink); text-anchor: middle;
  paint-order: stroke; stroke: var(--sea); stroke-width: 2.6px; stroke-linejoin: round;
  pointer-events: none;
}

.cm-key { fill: none; stroke: var(--ink-faint); stroke-width: .8; }
.cm-keynum {
  font: 600 8px Inter, system-ui, sans-serif; fill: var(--ink-faint); text-anchor: middle;
  paint-order: stroke; stroke: var(--sea); stroke-width: 2.5px;
}

.cm-legend {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  margin: 12px 0 0; font-size: 0.8125rem; color: var(--ink-soft);
}
.cm-key-item { display: inline-flex; align-items: center; gap: 6px; }
.cm-legend .foot { margin: 0; }
.cm-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.cm-dot--sold { background: var(--strong-buy); }
.cm-dot--enq { background: var(--cm-enq); }

.cm-caveat {
  margin: 12px 0 0; padding: 11px 14px; border-radius: 10px;
  background: var(--worth-a-look-wash); border-left: 3px solid var(--worth-a-look);
  font-size: 0.8125rem; color: var(--ink-soft);
}
.cm-caveat b { color: var(--ink); }

.cm-code {
  display: inline-block; min-width: 34px; text-align: center;
  font-weight: 700; font-size: 0.75rem; padding: 3px 7px; border-radius: 6px;
  background: var(--strong-buy-wash); color: var(--strong-buy);
}
.cm-bar { display: block; height: 9px; border-radius: 3px; background: var(--strong-buy); }
.bar-cell { min-width: 110px; }

/* ---------- Main navigation down the left (signed in) ----------
   The header row became a column on the left once the links passed eleven:
   a row that scrolls hides the page you are on, a column shows all of them.
   Below 820px it goes back to being a row, because a 190px column on a phone
   leaves nothing for the page. */
body.with-sidebar { display: flex; align-items: flex-start; min-height: 100vh; }
body.with-sidebar .nav { position: sticky; top: 0; width: 190px; flex: 0 0 190px; height: 100vh;
                         overflow-y: auto; border-bottom: 0; border-right: 1px solid rgba(255,255,255,.09); }
body.with-sidebar .nav-inner { flex-direction: column; align-items: stretch; gap: 14px;
                               padding: 18px 12px; max-width: none; margin: 0; min-height: 100%; }
body.with-sidebar .nav-links { flex-direction: column; overflow: visible; gap: 2px; }
body.with-sidebar .nav-link { padding: 9px 12px; border-bottom: 0; border-left: 3px solid transparent;
                              border-radius: 0 8px 8px 0; white-space: normal; }
body.with-sidebar .nav-link--on { border-left-color: var(--lime); background: rgba(255,255,255,.08); }
body.with-sidebar .nav-platform { padding: 9px 12px; border-radius: 8px; }
body.with-sidebar .nav-out { margin-top: auto; }
body.with-sidebar .wrap, body.with-sidebar .wrap--wide, body.with-sidebar .wrap--buylist {
  flex: 1; min-width: 0; margin: 0; max-width: none; padding: 24px 22px 64px; }

/* The icon beside each label, and the button that shrinks the menu to icons */
.nav-ico { display: none; width: 1.4rem; text-align: center; font-size: 1.05rem; flex: none; }
body.with-sidebar .nav-ico { display: inline-block; margin-right: .55rem; }
.nav-shrink { display: none; }
body.with-sidebar .nav-shrink { display: inline-flex; align-self: flex-end; background: transparent;
  border: 1px solid rgba(255,255,255,.22); color: rgba(255,255,255,.8); border-radius: 6px;
  padding: .1rem .5rem; font: inherit; font-size: .9rem; cursor: pointer; margin: -6px 0 -4px; }
body.with-sidebar .nav-shrink:hover { background: rgba(255,255,255,.1); color: #fff; }
body.with-sidebar .nav-shrink:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
body.with-sidebar.nav-compact .nav { width: 64px; flex-basis: 64px; }
body.with-sidebar.nav-compact .nav-inner { padding: 14px 8px; align-items: center; }
body.with-sidebar.nav-compact .nav-label { display: none; }
/* The text-size control is three buttons wide; it does not fit a 64px strip. */
body.with-sidebar.nav-compact .nav-text { display: none; }
body.with-sidebar.nav-compact .nav-link { justify-content: center; padding: 9px 6px; border-radius: 8px; border-left: 0; }
body.with-sidebar.nav-compact .nav-link--on { background: rgba(255,255,255,.14); }
body.with-sidebar.nav-compact .nav-ico { margin-right: 0; }
body.with-sidebar.nav-compact .nav-shrink { align-self: center; }
body.with-sidebar.nav-compact .nav-platform { padding: 9px 6px; font-size: 0; }
body.with-sidebar.nav-compact .nav-platform::before { content: "🏢"; font-size: 1.05rem; }
body.with-sidebar.nav-compact .nav-out button { font-size: 0; padding: 6px; }
body.with-sidebar.nav-compact .nav-out button::before { content: "⏻"; font-size: 1rem; }

/* Narrow screens: back to one row across the top, icons hidden, labels scroll */
@media (max-width: 820px) {
  body.with-sidebar, body.with-sidebar.nav-compact { display: block; }
  body.with-sidebar .nav, body.with-sidebar.nav-compact .nav { position: sticky; width: auto; flex-basis: auto; height: auto;
    overflow: visible; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.09); }
  body.with-sidebar .nav-inner, body.with-sidebar.nav-compact .nav-inner { flex-direction: row; align-items: stretch; padding: 0 20px; min-height: 56px; }
  body.with-sidebar .nav-links { flex-direction: row; overflow-x: auto; }
  body.with-sidebar .nav-link, body.with-sidebar.nav-compact .nav-link { border-left: 0; border-bottom: 2px solid transparent;
    border-radius: 6px 6px 0 0; white-space: nowrap; padding: 0 12px; justify-content: flex-start; }
  body.with-sidebar .nav-link--on, body.with-sidebar.nav-compact .nav-link--on { border-bottom-color: var(--lime); background: none; }
  body.with-sidebar .nav-ico { display: none; }
  body.with-sidebar.nav-compact .nav-label, body.with-sidebar.nav-compact .nav-text { display: initial; }
  body.with-sidebar .nav-shrink { display: none; }
  body.with-sidebar .nav-out { margin-top: 0; }
  body.with-sidebar.nav-compact .nav-out button { font-size: inherit; padding: 6px 10px; }
  body.with-sidebar.nav-compact .nav-out button::before { content: none; }
  body.with-sidebar.nav-compact .nav-platform { font-size: inherit; padding: 0 12px; }
  body.with-sidebar.nav-compact .nav-platform::before { content: none; }
  body.with-sidebar .wrap { padding: 24px 16px 48px; }
}

/* ---------- Buy list filter bar ----------
   Three rows of pills used to sit one above the other with nothing to say
   which was which. Now each row is named, the counts sit lighter than the
   words, and the block reads as one control rather than three lists. */
.filterbar { display: grid; gap: 10px; margin: 0 0 18px; padding: 12px 14px;
             background: var(--page); border: 1px solid var(--line); border-radius: 12px; }
.fgroup { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; }
.fgroup-label { font-size: 0.6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
                color: var(--ink-faint); }
.filterbar .tabs { margin: 0; gap: 6px; }
.filterbar .tab { padding: 6px 12px; }
.tab-n { font-weight: 400; opacity: .7; font-variant-numeric: tabular-nums; }
.tab--on .tab-n { opacity: .85; }
@media (max-width: 600px) {
  .fgroup { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- The admin side ----------
   Same chrome as the dealer app, a different menu: the platform's sections.
   Counts, chips and lists; never a dealership's trading data. */
.nav-section { margin: 4px 0 -6px; padding: 0 12px; font-size: .6875rem; font-weight: 700; letter-spacing: .1em;
               text-transform: uppercase; color: var(--cyan); }
.nav-back { display: flex; align-items: center; padding: 9px 12px; color: rgba(255,255,255,.72);
            text-decoration: none; font-size: .875rem; border-radius: 8px; }
.nav-back:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-back .nav-ico { display: inline-block; width: 1.4rem; text-align: center; margin-right: .55rem; }
body.with-sidebar .nav-back { margin-top: auto; }
body.with-sidebar .nav-back + .nav-text, body.with-sidebar .nav-back ~ .nav-out { margin-top: 10px; }
body.with-sidebar.nav-compact .nav-section { display: none; }
body.with-sidebar.nav-compact .nav-back { justify-content: center; padding: 9px 6px; }
body.with-sidebar.nav-compact .nav-back .nav-ico { margin-right: 0; }
@media (max-width: 820px) { .nav-section { display: none; } .nav-back { padding: 0 12px; white-space: nowrap; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat .k { display: block; font-size: .75rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }
.stat .v { display: block; font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin-top: 4px;
           font-variant-numeric: tabular-nums; }
.stat .d { display: block; font-size: .8125rem; color: var(--ink-soft); margin-top: 4px; }
.stat .d.up { color: var(--accent); } .stat .d.warn { color: #9a4b00; }

.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.cols > div > .panel:last-child { margin-bottom: 0; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

table.list { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.list th { text-align: left; font-weight: 600; color: var(--ink-faint); font-size: .75rem; text-transform: uppercase;
                letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); }
table.list td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.list a { font-weight: 600; text-decoration: none; }
table.list .sub { display: block; color: var(--ink-faint); font-size: .8125rem; margin-top: 2px; font-weight: 400; }
table.list form.inline { display: inline-flex; gap: 4px; align-items: center; margin: 0; }
table.list select.mini, table.list input.mini { min-height: 30px; font-size: .8125rem; padding: 2px 6px; }
.tablewrap { overflow-x: auto; }

.st { display: inline-block; font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 99px;
      background: var(--page); color: var(--ink-soft); border: 1px solid var(--line-strong); white-space: nowrap; }
.st--active { background: #e7f3e2; color: #2f6a20; border-color: #cfe5c6; }
.st--trial { background: #e6f2f6; color: #1f5f70; border-color: #c9e2ea; }
.st--due { background: #fbf1dc; color: #8a5a00; border-color: #efdcb0; }
.st--off { background: #f3e9e8; color: #8d3333; border-color: #e6cbc9; }
.st--demo { background: #ece6f7; color: #4b2f8a; border-color: #d9cdee; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin: 0 0 14px; }
.toolbar label { display: grid; gap: 4px; font-size: .75rem; font-weight: 600; color: var(--ink-soft); margin: 0; }
.toolbar input, .toolbar select { min-height: 36px; width: auto; }
.toolbar .grow { flex: 1 1 220px; } .toolbar .grow input { width: 100%; }
.toolbar .spacer { flex: 1; }
.toolbar button, .toolbar .button { margin: 0; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: .875rem; margin: 0; }
.kv dt { color: var(--ink-faint); } .kv dd { margin: 0; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .875rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline time { color: var(--ink-faint); font-variant-numeric: tabular-nums; font-size: .8125rem; }
.timeline code, table.list code { font-size: .8125rem; background: var(--page); padding: 1px 5px; border-radius: 4px; }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; cursor: pointer; margin: 0; font-weight: 400; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { width: 34px; height: 20px; border-radius: 99px; background: var(--line-strong); position: relative; display: inline-block; flex: none; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .12s; }
.switch input:checked + i { background: var(--accent); } .switch input:checked + i::after { left: 16px; }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.plan h3 { margin: 0; font-size: 1.0625rem; }
.plan .price { font-size: 1.5rem; font-weight: 700; margin: 6px 0 2px; }
.plan .price small { font-size: .8125rem; font-weight: 400; color: var(--ink-faint); }
.plan ul { margin: 10px 0 12px; padding-left: 18px; font-size: .875rem; color: var(--ink-soft); }
.plan .actions { display: flex; gap: 8px; align-items: center; }
.plan--off { opacity: .6; }

.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .875rem; }
.check:last-child { border-bottom: 0; }
.check .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.check .dot.ok { background: #3f8a2f; } .check .dot.warn { background: #d59a2b; } .check .dot.bad { background: #c9372c; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; align-items: center; }
.actions-row form { margin: 0; }
.logtail { font-family: Consolas, monospace; font-size: .75rem; white-space: pre-wrap; word-break: break-all;
           background: var(--page); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; max-height: 260px; overflow: auto; margin: 0; }
.pager { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-size: .875rem; }

@media (prefers-color-scheme: dark) {
  .st--active { background: #173321; color: #9bd88a; border-color: #23482f; }
  .st--trial { background: #14293d; color: #8fc9dc; border-color: #1f3f57; }
  .st--due { background: #3a2c12; color: #e2b25a; border-color: #563f16; }
  .st--off { background: #3a1a17; color: #f07a6e; border-color: #56261f; }
  .st--demo { background: #26203b; color: #c2b0ee; border-color: #3a3157; }
  .stat .d.warn { color: #e2b25a; }
}

/* ---------- Sign-up ---------- */
.hidden-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.plan-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 8px 0 16px; }
.plan-pick { display: block; margin: 0; cursor: pointer; }
.plan-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.plan-pick span { display: grid; gap: 2px; padding: 12px 14px; border: 2px solid var(--line-strong); border-radius: 10px; background: var(--panel); }
.plan-pick strong { font-size: 1rem; }
.plan-pick em { font-style: normal; font-weight: 600; color: var(--accent); }
.plan-pick small { color: var(--ink-faint); font-size: .8125rem; line-height: 1.4; }
.plan-pick input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,243,91,.35); }
.plan-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent-row { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; margin: 4px 0 16px; font-weight: 400; font-size: .9375rem; }
.consent-row input { width: 18px; height: 18px; margin: 3px 0 0; }
.signup .wide { grid-column: 1 / -1; }

/* A platform admin signed in as somebody else: say so on every page */
.impersonating { margin: 0 0 18px; padding: 10px 14px; border-radius: 8px; background: #2b1f4d; color: #fff; font-size: .875rem; }
.impersonating a { color: var(--lime); font-weight: 700; margin-left: 8px; }
.plan--chosen { border-color: var(--accent); }

/* ---------- Automation Hub (ported from the dev copy, 4.26 work) ---------- */
.hub-shell { display: flex; gap: 1.5rem; align-items: flex-start; }
.hub-side { flex: 0 0 220px; position: sticky; top: 1rem; }
.hub-main { flex: 1; min-width: 0; }
.hub-runner { font-size: .85rem; padding: .6rem .7rem; border: 1px solid var(--line, #d9dee3); border-radius: 10px; margin-bottom: .8rem; background: #fff; }
.hub-group { margin-bottom: .6rem; }
.hub-group-name { display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #6b7680; padding: .4rem .5rem .2rem; }
.hub-link { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .35rem .6rem; border-radius: 8px; text-decoration: none; color: inherit; font-size: .92rem; }
.hub-link:hover { background: #eef2f5; }
.hub-link--on { background: #102936; color: #fff; font-weight: 600; }
.hub-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: #9aa5ad; margin-right: .3rem; }
.hub-dot--ok { background: #2e7d43; }
.hub-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin: .8rem 0 1.2rem; }
.hub-card { background: #fff; border: 1px solid #d9dee3; border-radius: 12px; padding: .8rem 1rem; }
.hub-card .stat-label { display: block; font-size: .8rem; color: #6b7680; }
.hub-card .stat-value { display: block; font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.hub-card .foot { display: block; font-size: .78rem; margin-top: .3rem; }
.hub-table { width: 100%; border-collapse: collapse; background: #fff; font-size: .9rem; }
.hub-table th, .hub-table td { padding: .5rem .6rem; text-align: left; border-bottom: 1px solid #e5e9ed; vertical-align: top; }
.hub-table th { background: #f3f5f7; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.hub-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.hub-table tr.flag td { background: #fff4f2; }
.hub-table tr.good td { background: #f1fbf3; }
.hub-table td .sub { display: block; color: #6b7680; font-size: .78rem; }
.hub-scroll { overflow-x: auto; border: 1px solid #d9dee3; border-radius: 10px; }
.chip--ok { background: #e2f5e7; color: #1f6b33; }
.hub-approval { background: #fff; border: 1px solid #d9dee3; border-radius: 12px; padding: .8rem 1rem; margin-bottom: .7rem; }
.hub-approval-head { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.hub-approval-body { margin: .4rem 0; font-size: .92rem; }
.hub-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.hub-timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid #d9dee3; }
.hub-timeline li { padding: .3rem 0 .3rem 1rem; position: relative; font-size: .9rem; }
.hub-timeline li::before { content: ""; position: absolute; left: -.42rem; top: .7rem; width: .65rem; height: .65rem; border-radius: 50%; background: #2e7d43; border: 2px solid #fff; }
.hub-timeline li.warn::before { background: #d9a441; } .hub-timeline li.bad::before { background: #ab2b2b; }
.hub-timeline time { color: #6b7680; font-size: .78rem; margin-right: .5rem; }
.hub-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.2rem; }
.hub-two--narrow { grid-template-columns: 320px 1fr; }
.hub-toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .6rem 0 1rem; }
.hub-toolbar .spacer { flex: 1; }
.hub-mode { display: inline-flex; border: 1px solid #d9dee3; border-radius: 8px; overflow: hidden; }
.hub-mode button { border: 0; background: #fff; padding: .2rem .55rem; font: inherit; font-size: .8rem; cursor: pointer; }
.hub-mode button.on { background: #102936; color: #fff; font-weight: 600; }
.hub-bar { height: .5rem; background: #e5e9ed; border-radius: 999px; overflow: hidden; min-width: 6rem; }
.hub-bar i { display: block; height: 100%; background: #102936; }
.hub-bar.ok i { background: #2e7d43; } .hub-bar.warn i { background: #d9a441; } .hub-bar.bad i { background: #ab2b2b; }
.hub-bar i.w0{width:0}.hub-bar i.w10{width:10%}.hub-bar i.w20{width:20%}.hub-bar i.w30{width:30%}.hub-bar i.w40{width:40%}.hub-bar i.w50{width:50%}.hub-bar i.w60{width:60%}.hub-bar i.w70{width:70%}.hub-bar i.w80{width:80%}.hub-bar i.w90{width:90%}.hub-bar i.w100{width:100%}
.hub-list { list-style: none; margin: 0; padding: 0; } .hub-list li { display: flex; gap: .6rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid #e5e9ed; font-size: .9rem; } .hub-list .grow { flex: 1; min-width: 0; } .hub-list small { display: block; color: #6b7680; }
.hub-mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; width: 100%; }
.hub-small { font-size: .8rem; color: #6b7680; }
@media (max-width: 820px) { .hub-shell { flex-direction: column; } .hub-side { position: static; flex: none; width: 100%; } .hub-two--narrow { grid-template-columns: 1fr; } }

/* Hub sections as a row of tabs above the page */
.hub-shell { display: block; }
.hub-top { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: flex-start; margin-bottom: 1rem; }
.hub-top .hub-runner { margin: 0; }
.hub-tabs { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; }
.hub-tabs .hub-group { display: flex; align-items: center; gap: .2rem; margin: 0; }
.hub-tabs .hub-group-name { padding: 0 .3rem 0 0; }
.hub-tabs .hub-link { padding: .3rem .6rem; }

/* Hub sidebar, as the mock-up: beside the main menu, grouped, with icons */
.hub-shell { display: flex; gap: 1.5rem; align-items: flex-start; }
.hub-side { flex: 0 0 230px; position: sticky; top: 1rem; background: #f4f6f8; border: 1px solid #e1e6ea; border-radius: 12px; padding: .7rem .5rem; }
.hub-side .hub-runner { margin: 0 .2rem .6rem; }
.hub-side .hub-group { display: block; margin: 0 0 .5rem; }
.hub-side .hub-group-name { display: block; padding: .6rem .7rem .2rem; }
.hub-side .hub-link { display: flex; align-items: center; gap: .5rem; padding: .4rem .7rem; font-size: .93rem; }
.hub-side .hub-link .hub-ico { width: 1.3rem; text-align: center; flex: none; }
.hub-side .hub-link .hub-label { flex: 1; }
.hub-side .hub-link .chip { margin-left: auto; }
.hub-side .hub-link--on { background: #e3e8ec; color: #102936; }
@media (max-width: 1100px) { .hub-shell { flex-direction: column; } .hub-side { position: static; flex: none; width: 100%; } .hub-side nav { display: flex; flex-wrap: wrap; gap: .4rem 1rem; } }

/* Widths: main menu 190px, hub sidebar 215px, so the hub keeps its sidebar down to 760px wide */
.hub-side { flex-basis: 215px; }
@media (min-width: 761px) { .hub-shell { flex-direction: row; } .hub-side { position: sticky; flex: 0 0 215px; width: auto; } .hub-side nav { display: block; } }
@media (max-width: 760px) { .hub-shell { flex-direction: column; } .hub-side { position: static; flex: none; width: 100%; } .hub-side nav { display: flex; flex-wrap: wrap; gap: .4rem 1rem; } }
table.list tr.row--off td { opacity: .6; }

/* Dashboard.
   The trade at a glance, the month in progress, the dealer's own figures
   against Auto Trader's, the sales on file and where they had got to on them.
   Bar widths and heights are classes in 5% steps (.dw5 … .dh100) rather than
   inline styles, worked out by DashboardSummary::step() and ::tierWidths(). */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: -6px 0 18px; }
.dash-hello { margin: 0; font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; }
.dash-meta { margin: 2px 0 0; color: var(--ink-faint); font-size: 0.875rem; }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dash-actions .button { margin-top: 0; }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.kpi-v { display: block; font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-v small { font-size: 0.9375rem; font-weight: 500; color: var(--ink-faint); margin-left: 4px; }
.kpi-l { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); margin-top: 4px; }
.kpi-n { display: block; font-size: 0.75rem; color: var(--ink-faint); margin-top: 6px; }
.kpi-n--up { color: var(--strong-buy); }
.kpi-n--down { color: var(--avoid); }

.dash-grid { display: grid; gap: 20px; margin-bottom: 20px; align-items: start; }
.dash-grid--32 { grid-template-columns: 3fr 2fr; }
.dash-grid--11 { grid-template-columns: 1fr 1fr; }
.dash-grid .panel { margin-bottom: 0; min-width: 0; }
.dash-stack { display: grid; gap: 20px; }
.ph { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ph h2 { margin-bottom: 2px; }
.ph .more { font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.dash-h3 { font-size: 0.9375rem; margin: 20px 0 2px; }
.dash-dim { color: var(--ink-faint); }
.dash-warn { color: var(--worth-a-look); font-weight: 600; font-size: 0.75rem; white-space: nowrap; }
.dash-flag { display: inline-block; font-size: 0.625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
             color: var(--accent); background: var(--accent-wash); border-radius: 99px; padding: 1px 7px; margin-left: 6px; vertical-align: 2px; }

/* Trade by month. */
.dash-chart { display: grid; grid-template-columns: repeat(13, 1fr); gap: 6px; align-items: end; height: 150px; margin: 24px 0 26px; }
.dash-bar { position: relative; background: var(--navy-3); border-radius: 5px 5px 2px 2px; min-height: 2px; }
.dash-bar--best { background: var(--accent); }
.dash-bar--part { background: repeating-linear-gradient(45deg, var(--line-strong) 0 5px, transparent 5px 10px); }
.dash-bar b { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 0.6875rem; font-weight: 600; color: var(--ink-soft); }
.dash-bar i { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 0.6875rem; font-style: normal; color: var(--ink-faint); white-space: nowrap; }
.dash-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.75rem; color: var(--ink-faint); }
.dash-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--navy-3); }
.dash-legend--best::before { background: var(--accent) !important; }
.dash-legend--part::before { background: repeating-linear-gradient(45deg, var(--line-strong) 0 3px, transparent 3px 6px) !important; }

/* The month in progress. */
.dash-big { font-size: 2.5rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: 8px 0 6px; }
.dash-big small { font-size: 0.9375rem; font-weight: 600; color: var(--ink-soft); margin-left: 8px; letter-spacing: 0; }
.dash-years { display: grid; grid-template-columns: 48px 1fr 36px; gap: 8px 10px; align-items: center; font-size: 0.8125rem; margin: 6px 0 12px; }
.dash-years .y { color: var(--ink-soft); }
.dash-years .t { height: 10px; background: var(--page); border-radius: 99px; overflow: hidden; }
.dash-years .t i { display: block; height: 100%; background: var(--line-strong); border-radius: 99px; }
.dash-years .t i.me { background: var(--accent); }
.dash-years b { text-align: right; font-variant-numeric: tabular-nums; }

/* You against Auto Trader. */
.dash-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.dash-vs h3 { font-size: 0.875rem; margin: 0 0 10px; color: var(--ink-soft); }
.dash-bands { display: grid; grid-template-columns: 56px minmax(70px, 1fr) 40px 48px 60px; gap: 8px 10px; align-items: center; font-size: 0.8125rem; }
.dash-bands .hd { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); font-weight: 600; }
.dash-bands .hd.num, .dash-bands b, .dash-bands .g { text-align: right; }
.dash-bands small { display: block; font-size: 0.6875rem; color: var(--ink-faint); }
.dash-bands .t { height: 12px; background: var(--page); border-radius: 99px; overflow: hidden; }
.dash-bands .t i { display: block; height: 100%; border-radius: 99px; background: var(--cyan); }
.dash-bands .t i.slow { background: var(--worth-a-look); }
.dash-bands b, .dash-bands .g { font-variant-numeric: tabular-nums; }
.dash-bands .g { color: var(--ink-soft); }
.dash-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dash-pair div { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.dash-pair .v { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dash-pair .v small { font-size: 0.875rem; font-weight: 500; color: var(--ink-faint); margin-left: 3px; }
.dash-pair .l { display: block; font-size: 0.75rem; color: var(--ink-faint); margin-top: 2px; }
.dash-insight { margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--accent-wash); color: var(--accent-dark); font-size: 0.875rem; }

/* The price book, the forecourt, the shortlist. */
.dash-stat3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin: 4px 0 6px; }
.dash-stat3--two { grid-template-columns: 1fr 1fr; }
.dash-stat3 .v { display: block; font-size: 1.375rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dash-stat3 .l { display: block; font-size: 0.75rem; color: var(--ink-faint); }
.dash-rows { list-style: none; margin: 6px 0 0; padding: 0; }
.dash-rows li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; align-items: center; }
.dash-rows li:last-child { border-bottom: 0; }
.dash-rows .dash-dim { font-size: 0.8125rem; white-space: nowrap; }

/* Auction stock. */
.dash-scroll { overflow-x: auto; }
.dash-sales { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.dash-sales th, .dash-sales td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dash-sales th { font-weight: 600; color: var(--ink-faint); font-size: 0.75rem; text-transform: uppercase; letter-spacing: .05em; }
.dash-sales tr:last-child td { border-bottom: 0; }
.dash-sales th.num, .dash-sales td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-sales td a.name { font-weight: 700; color: var(--ink); text-decoration: none; }
.dash-sales td a.name:hover { color: var(--accent); text-decoration: underline; }
.dash-sales td small { display: block; color: var(--ink-faint); font-size: 0.75rem; }
.tierbar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--page); min-width: 140px; }
.tierbar i { display: block; height: 100%; }
.tierbar .t-strong { background: var(--strong-buy); }
.tierbar .t-look { background: var(--worth-a-look); }
.tierbar .t-avoid { background: var(--avoid); }
.dash-tc { display: block; font-size: 0.75rem; color: var(--ink-faint); margin-top: 5px; white-space: nowrap; }
.dash-tc b { font-weight: 600; }
.dash-tc .c-strong { color: var(--strong-buy); }
.dash-tc .c-look { color: var(--worth-a-look); }
.dash-tc .c-avoid { color: var(--avoid); }
.picks { list-style: none; margin: 8px 0 0; padding: 0; }
.picks li { display: grid; grid-template-columns: 58px 1fr auto auto 130px; gap: 14px; align-items: center;
            padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; }
.picks li:last-child { border-bottom: 0; }
.picks .lotno { color: var(--ink-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.picks .car a { font-weight: 700; color: var(--ink); text-decoration: none; }
.picks .car a:hover { color: var(--accent); text-decoration: underline; }
.picks .car small { display: block; color: var(--ink-faint); font-size: 0.75rem; }
.picks .score { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.picks .score small { font-weight: 400; color: var(--ink-faint); }
.picks .margin { color: var(--ink-soft); text-align: right; font-size: 0.8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* What is loaded, as a strip. */
.dash-loaded { display: flex; gap: 26px; flex-wrap: wrap; font-size: 0.8125rem; color: var(--ink-faint); padding: 4px 4px 0; }
.dash-loaded b { color: var(--ink-soft); }
.dash-loaded .ok::before { content: "✓ "; color: var(--strong-buy); font-weight: 700; }
.dash-loaded .no::before { content: "– "; color: var(--worth-a-look); font-weight: 700; }

/* Bar sizes, in 5% steps. */
.dw0{width:0}.dw5{width:5%}.dw10{width:10%}.dw15{width:15%}.dw20{width:20%}.dw25{width:25%}.dw30{width:30%}.dw35{width:35%}.dw40{width:40%}.dw45{width:45%}.dw50{width:50%}.dw55{width:55%}.dw60{width:60%}.dw65{width:65%}.dw70{width:70%}.dw75{width:75%}.dw80{width:80%}.dw85{width:85%}.dw90{width:90%}.dw95{width:95%}.dw100{width:100%}
.dh0{height:0}.dh5{height:5%}.dh10{height:10%}.dh15{height:15%}.dh20{height:20%}.dh25{height:25%}.dh30{height:30%}.dh35{height:35%}.dh40{height:40%}.dh45{height:45%}.dh50{height:50%}.dh55{height:55%}.dh60{height:60%}.dh65{height:65%}.dh70{height:70%}.dh75{height:75%}.dh80{height:80%}.dh85{height:85%}.dh90{height:90%}.dh95{height:95%}.dh100{height:100%}

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-grid--32, .dash-grid--11, .dash-vs { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .dash-chart { grid-template-columns: repeat(13, 1fr); gap: 3px; }
  .dash-bar b { display: none; }
  .dash-bar i { font-size: 0.5625rem; }
  .dash-pair { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .picks li { grid-template-columns: 50px 1fr auto; }
  .picks .score, .picks .margin { display: none; }
}

/* A district with only one or two cars or enquiries on the close-up map. On a
   book of 1,700 sales there were 745 districts and 441 of them held a single
   entry; drawn as split circles they buried the shape of the trade. A dot
   still marks the place; the tooltip still says what it was. */
.cm-one { fill: var(--ink-faint); fill-opacity: .4; stroke: none; }
.cm-dot--one { background: var(--ink-faint); width: 7px; height: 7px; margin: 0 2px; }

/* Switch panels in the console: one heading per group of switches. */
.switch-group { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin: 18px 0 4px; }
.switch-group:first-child { margin-top: 4px; }

/* The console's dealership page: engagement beside each person, and the one
   panel whose button cannot be undone. */
.engagement { font-size: 0.8125rem; }
.engagement b { font-weight: 600; }
.trail { display: block; font-size: 0.75rem; color: var(--ink-faint); margin-top: 3px; }
.panel--danger { border-color: var(--avoid); }
.panel--danger h2 { color: var(--avoid); }

/* A plan on offer: the list price struck through beside the offer price. */
.plan .price .was { text-decoration: line-through; color: var(--ink-faint); font-weight: 400; font-size: 0.75em; margin-right: 8px; }
.plan .offer-tag { display: block; margin-top: 4px; font-size: 0.6875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-dark); }

/* Enquiry sources: a wide ranked table that scrolls inside its panel on a phone. */
.table-scroll { overflow-x: auto; }
table.sources td.rank { width: 2.25rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
table.sources th.num { text-align: right; }
table.sources td.num { font-weight: 600; font-size: 0.9375rem; }
table.sources td.neg { color: var(--avoid); }
table.sources tr.total td { font-weight: 700; }

/* Badges: a maker or an enquiry channel as a small disc before its name, so a
   ranked table can be scanned. Real logos in assets/badges/ replace the disc. */
.badge { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
  margin-right: 8px; vertical-align: middle; font-size: 0.6875rem; font-weight: 800; letter-spacing: -.01em; color: #fff;
  background: #6b7b82; flex: 0 0 auto; text-decoration: none; }
.badge--small { font-size: 0.5625rem; }
.badge--tiny { font-size: 0.4375rem; letter-spacing: 0; }
.badge--img { background: transparent; object-fit: contain; border-radius: 4px; }
td.model { white-space: nowrap; }
.badge--h0 { background: #b3271e; } .badge--h1 { background: #c2410c; } .badge--h2 { background: #a16207; }
.badge--h3 { background: #4d7c0f; } .badge--h4 { background: #15803d; } .badge--h5 { background: #0f766e; }
.badge--h6 { background: #0369a1; } .badge--h7 { background: #1d4ed8; } .badge--h8 { background: #4338ca; }
.badge--h9 { background: #7e22ce; } .badge--h10 { background: #be185d; } .badge--h11 { background: #334155; }
.badge--autotrader { background: #e2001a; }
.badge--motors { background: #6d28d9; }
.badge--cargurus { background: #1c64f2; }
.badge--facebook { background: #1877f2; }
.badge--instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.badge--tiktok { background: #111; }
.badge--google { background: #fff; color: #1a73e8; border: 1px solid var(--line-strong); }
.badge--bing { background: #008373; }
.badge--ebay { background: #fff; color: #e53238; border: 1px solid var(--line-strong); font-size: 0.875rem; }
.badge--gumtree { background: #72ef36; color: #1f2937; }
.badge--zuto { background: #ff5a1f; }
.badge--carfinance { background: #0b3d91; }
.badge--aa { background: #ffd200; color: #111; }
.badge--cinch { background: #5b21b6; }
.badge--heycar { background: #1c1c1e; }
.badge--pistonheads { background: #0d0d0d; }
.badge--website { background: #0e7490; }
.badge--walkin { background: #374151; }
.badge--neutral { background: #9ca3af; }
.cols--even { grid-template-columns: 1fr 1fr; margin-bottom: 16px; }
.cols--even > .panel { margin-bottom: 0; }
@media (max-width: 900px) { .cols--even { grid-template-columns: 1fr; } }

/* Stock history */
.drop { color: var(--strong-buy); font-weight: 700; } .rise { color: var(--avoid); font-weight: 700; }
.rows-list { list-style: none; margin: 6px 0 0; padding: 0; }
.rows-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .875rem; }
.rows-list li:last-child { border-bottom: 0; }
.rows-list form { margin: 0; }
table.sources th.num, table.sources td.num { padding-left: 12px; }

.dash-bands b.theirs { color: var(--ink-faint); font-weight: 600; }
.dash-pair--speed { margin-top: 8px; }

/* Order notes on the dashboard's month box */
.dash-orders { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.dash-orders summary { cursor: pointer; font-weight: 600; font-size: .875rem; color: var(--accent-dark); }
.dash-order-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin-top: 10px; align-items: end; }
.dash-order-form label { margin: 0; font-size: .75rem; }
.dash-order-form input { width: 100%; padding: 7px 9px; font-size: .875rem; }
.dash-order-form button { grid-column: 1 / -1; justify-self: start; }
.dash-order-list { list-style: none; margin: 10px 0 0; padding: 0; }
.dash-order-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .8125rem; }
.dash-order-list li:last-child { border-bottom: 0; }
.dash-order-list form { margin: 0; }
.mode-pick label { display: block; margin: 8px 0; }
.mode-pick .confirm-replace { margin-left: 22px; color: var(--avoid); }

/* You against the market */
.plain { list-style: none; margin: 8px 0 0; padding: 0; }
.plain li { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; line-height: 1.5; }
.plain li:last-child { border-bottom: 0; }
.plain .tier { justify-self: start; margin-top: 2px; }
.stat .v.good { color: var(--strong-buy); } .stat .v.bad { color: var(--avoid); }
.drop-good { color: var(--strong-buy); font-weight: 700; } .rise-bad { color: var(--avoid); font-weight: 700; }
table.detail td, table.detail th { white-space: nowrap; }
.region-bars { list-style: none; margin: 6px 0 0; padding: 0; }
.region-bars li { display: grid; grid-template-columns: 150px 1fr 70px; gap: 10px; align-items: center; padding: 6px 0; font-size: .8125rem; }
.region-bars .bar { height: 10px; background: var(--page); border-radius: 99px; overflow: hidden; }
.region-bars .bar i { display: block; height: 100%; width: var(--w); background: var(--line-strong); border-radius: 99px; }
.region-bars .bar i.me { background: var(--accent); }
.region-bars b { text-align: right; font-variant-numeric: tabular-nums; }
.fgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; }
.fgrid label { display: block; font-size: .8125rem; font-weight: 600; }
.fgrid input, .fgrid textarea { width: 100%; }
.fgrid .wide { grid-column: 1 / -1; }
.panel h3 { font-size: .9375rem; margin: 18px 0 6px; }
.inline-choice { display: inline-flex; align-items: center; gap: 6px; margin: 8px 14px 0 0; font-weight: 500; font-size: .875rem; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.profile-grid label { font-size: .75rem; font-weight: 600; }
.profile-grid input { width: 100%; }
@media (max-width: 800px) { .plain li { grid-template-columns: 1fr; } .fgrid { grid-template-columns: 1fr 1fr; } }table.sources .weight { padding-left: 16px; white-space: nowrap; }
table.detail th:last-child, table.detail td:last-child { padding-left: 16px; }

/* The three-sided price book card */
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin: 10px 0 6px; }
.side { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.side .k { display: block; font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); font-weight: 700; }
.side .v { display: block; font-size: 1.875rem; font-weight: 800; letter-spacing: -.03em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.side .v.blank { color: var(--line-strong); }
.side .e { display: block; font-size: .75rem; color: var(--ink-faint); }
.side .e b { color: var(--ink-soft); }
.side--pay { border-top: 3px solid var(--navy-3, #102936); } .side--list { border-top: 3px solid var(--cyan, #59d9ec); } .side--make { border-top: 3px solid var(--strong-buy); }
.side .from { font-size: .75rem; color: var(--ink-soft); margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
@media (max-width: 800px) { .three { grid-template-columns: 1fr; } }
/* The lot card's "if you buy it at Auto Trader's trade price" ledger, and the
   Bought page's sale headings. */
.ledger-title { font-size: 0.875rem; font-weight: 600; color: var(--ink-soft); margin: 0 0 8px; }
.bought-sale { margin-top: 26px; }
.bought-sale .foot { font-weight: 400; margin-left: 6px; }

/* The bulk bar, once anything is ticked: pinned to the bottom of the screen
   so the buttons are in reach from anywhere in a long sale. */
.remove-bar--live { position: sticky; bottom: 0; z-index: 5; background: var(--panel); border: 1px solid var(--line);
                    border-radius: 10px; padding: 10px 14px; box-shadow: 0 -6px 24px -12px rgba(7, 19, 29, .35); }

/* A car this dealership has seen at an earlier sale, beside the buy tier.
   It pulses so it is noticed among three hundred cards; red when the mileage
   has gone down since, which is a clock. Still where it is without motion. */
.seen-flag { display: inline-block; margin-left: 8px; padding: 3px 10px; border-radius: 99px; border: 1px solid;
             font-size: 0.75rem; font-weight: 700; letter-spacing: .01em; vertical-align: 1px;
             animation: seen-pulse 1.6s ease-in-out infinite; }
.seen-flag--warn { color: var(--worth-a-look); background: var(--worth-a-look-wash); border-color: var(--worth-a-look); }
.seen-flag--bad { color: #fff; background: var(--avoid); border-color: var(--avoid); }
@keyframes seen-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .seen-flag { animation: none; } }

/* The lot number, first thing on a buy list card. Solid so it is found at a
   glance on a tablet at the sale; larger again on a shortlisted car, which is
   the one being listened for. Ink on panel, so it inverts with the theme. */
.lot-no { display: inline-block; margin-right: 8px; padding: 3px 11px; border-radius: 7px;
          background: var(--ink); color: var(--panel); border: 1px solid var(--ink);
          font-size: 0.9375rem; font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums;
          vertical-align: -1px; }
.lot-no--short { font-size: 1.25rem; padding: 4px 14px; vertical-align: -3px; }
.lot-no--none { background: transparent; color: var(--ink-faint); border-style: dashed; border-color: var(--line-strong);
                font-size: 0.75rem; font-weight: 700; vertical-align: 1px; }

/* ============================================================================
   Photos — the AI Photo Renamer.

   Cards rather than rows, because the thing being judged is a picture and a
   filename beside a 40px thumbnail is a filename beside nothing. The
   thumbnail is a separate small copy; the original is never drawn, never
   touched, and goes out byte for byte under the new name. */

.photos-vehicle-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 16px; align-items: flex-start; }
.photos-vehicle-head h2 { margin: 0; }
.photos-vehicle-head .panel-sub { margin-bottom: 0; }
.photos-colour { font-weight: 400; color: var(--ink-faint); }
.photos-vehicle-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.photos-vehicle-actions .mini { margin: 0; }
/* Quiet, with a red edge: the one destructive action on the page should not
   wear the lime the primary buttons do. */
.photos-vehicle-actions .mini--danger { background: transparent; }
.photos-vehicle-actions .mini--danger:hover { background: var(--avoid-wash); }
.photos-edit { margin-top: 14px; }
.photos-edit summary { font-size: .8125rem; font-weight: 600; color: var(--accent); }
.photos-example { font-size: .875rem; color: var(--ink-soft); margin: 12px 0 0; }

/* The stock search on the start screen: results as a list of buttons under
   the box, each one a car. Plain buttons, not the lime ones — a list of
   eight lime slabs reads as eight things to do, not eight cars to pick. */
.photos-stock { position: relative; }
.photos-stock input[type=search] { width: 100%; padding: 10px 12px; font: inherit; color: var(--ink);
                                   background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; }
.photos-stock-results { border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel);
                        margin-top: 6px; overflow: hidden; box-shadow: var(--shadow); }
.photos-stock-results button { display: block; width: 100%; margin: 0; padding: 9px 12px; text-align: left;
                               font: inherit; font-size: .875rem; font-weight: 400; color: var(--ink);
                               background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; cursor: pointer; }
.photos-stock-results button:last-child { border-bottom: 0; }
.photos-stock-results button:hover, .photos-stock-results button:focus-visible { background: var(--accent-wash); outline: none; }
.photos-stock-results b { font-variant-numeric: tabular-nums; letter-spacing: .04em; margin-right: 6px; }
.photos-stock-results .foot { margin: 0; padding: 9px 12px; }
.photos-stock-picked { font-size: .875rem; margin: 8px 0 0; color: var(--ink-soft); }

/* The drop zone. A dashed box is the one shape everybody reads as "put files
   here"; it lights up on the way in so a dropped folder of forty photos is
   never in doubt about where it landed. */
.photos-drop { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 26px 18px; text-align: center;
               background: var(--page); transition: border-color .12s, background .12s; }
.photos-drop.is-over, .photos-drop:focus-visible { border-color: var(--accent); background: var(--accent-wash); outline: none; }
.photos-drop p { margin: 0 0 10px; }
.photos-pick { margin-top: 0; }
.photos-progress { font-size: .8125rem; color: var(--ink-faint); min-height: 1.2em; margin: 12px 0 0 !important; }

.photos-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.photos-toolbar .mini { margin: 0; }
.photos-status { font-size: .8125rem; color: var(--ink-soft); flex: 1 1 200px; }
.photos-counts { font-size: .8125rem; color: var(--ink-faint); margin-left: auto; white-space: nowrap; }
.is-bad { color: var(--avoid) !important; }
.is-warn { color: var(--worth-a-look) !important; }
.is-good { color: var(--strong-buy) !important; }
.photos-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; padding: 10px 12px;
               border: 1px solid var(--accent); border-radius: 8px; background: var(--accent-wash); font-size: .8125rem; }
.photos-bulk .mini, .photos-bulk select { margin: 0; width: auto; }
.photos-hint { margin-top: 10px; }

.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 14px; }
.photos-empty { color: var(--ink-faint); font-size: .875rem; text-align: center; padding: 20px 0 6px; }

.photo-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden;
              display: flex; flex-direction: column; box-shadow: var(--shadow); cursor: grab; }
.photo-card.is-dragging { opacity: .45; }
.photo-card.is-over { outline: 2px solid var(--accent); outline-offset: -2px; }
.photo-card--excluded { opacity: .55; }
.photo-card--review { border-color: var(--worth-a-look); }
.photo-card--selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-wash); }
.photo-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--page); cursor: zoom-in; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-badge { position: absolute; left: 8px; bottom: 8px; font-size: .6875rem; font-weight: 700; letter-spacing: .04em;
               text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: rgba(7,19,29,.72); color: #fff; }
.photo-badge--warn { background: var(--worth-a-look); }
.photo-badge--bad { background: var(--avoid); }
.photo-badge--good { background: var(--strong-buy); }
.photo-badge--ai { background: var(--navy-3); }
.photo-badge--busy { background: var(--lime); color: #10212a; }
.photo-pick { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; margin: 0; cursor: pointer; accent-color: var(--accent); }
.photo-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.photo-name { font-weight: 700; font-size: .8125rem; word-break: break-all; font-variant-numeric: tabular-nums; }
.photo-from { font-size: .75rem; color: var(--ink-faint); word-break: break-all; }
.photo-view { width: 100%; padding: 7px 10px; font-size: .8125rem; }
.photo-card--review .photo-view { border-color: var(--worth-a-look); background: var(--worth-a-look-wash); }
.photo-reason { font-size: .75rem; color: var(--ink-faint); font-style: italic; }
.photo-dup { font-size: .75rem; color: var(--worth-a-look); font-weight: 600; }
.photo-error { font-size: .75rem; color: var(--avoid); }
.photo-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.photo-actions .mini { margin: 0; padding: 5px 9px; font-size: .75rem; }
.photo-remove:hover { color: var(--avoid); border-color: var(--avoid); }

.photos-export .button { margin-top: 0; }
.photos-export .is-disabled { opacity: .5; pointer-events: none; }

.photos-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(7,19,29,.9); display: flex; flex-direction: column;
                   align-items: center; justify-content: center; padding: 24px; }
.photos-lightbox[hidden] { display: none; }
.photos-lightbox img { max-width: 100%; max-height: 82vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.photos-lightbox-name { color: #e8f1f2; font-size: .875rem; margin: 12px 0 0; text-align: center; font-variant-numeric: tabular-nums; }
.photos-lightbox-close { position: absolute; top: 14px; right: 18px; margin: 0; padding: 4px 14px; font-size: 1.5rem; line-height: 1;
                         background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
.photos-lightbox-close:hover { background: rgba(255,255,255,.12); border-color: #fff; }

@media (max-width: 600px) {
  .photos-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .photos-counts { margin-left: 0; white-space: normal; }
}
/* 4.47: the examiner and ordering tool. Position numbers, the cover, the
   recommendation panel, the preview strip, held photos, compare. */
.photos-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.photos-settings label { font-size: .8125rem; font-weight: 600; }
.photos-settings select { width: 100%; margin-top: 4px; }
.photos-blocks { grid-column: 1 / -1; }
.photos-blocks ol { list-style: decimal inside; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.photos-blocks li { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: .8125rem; }
.photos-blocks li .mini { margin: 0; padding: 2px 6px; font-size: .7rem; }
.photos-toolbar--gallery { justify-content: space-between; }
.photos-toolbar--gallery h2 { margin: 0; }
.photos-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.photos-filter .mini { margin: 0; }
.photos-filter .mini.is-on { background: var(--navy-3); color: #fff; border-color: var(--navy-3); }
.photos-filter b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.photos-strip { display: flex; gap: 6px; overflow-x: auto; padding: 10px 2px 8px; margin-top: 8px; scrollbar-width: thin; }
.photos-strip-item { flex: 0 0 auto; position: relative; width: 84px; height: 63px; margin: 0; padding: 0; border: 2px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--page); cursor: pointer; }
.photos-strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos-strip-item.is-cover { border-color: var(--lime); }
.photos-strip-item:hover, .photos-strip-item:focus-visible { border-color: var(--accent); outline: none; }
.photos-strip-num { position: absolute; left: 3px; bottom: 3px; font-size: .625rem; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: rgba(7,19,29,.8); color: #fff; font-variant-numeric: tabular-nums; }
.photos-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.photo-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.photo-card--cover { border-color: var(--lime); box-shadow: 0 0 0 2px rgba(174,219,64,.35); }
.photo-card--held { border-style: dashed; }
.photo-pos { position: absolute; top: 8px; left: 8px; font-size: .9375rem; font-weight: 800; letter-spacing: .04em; padding: 3px 9px; border-radius: 6px; background: rgba(7,19,29,.85); color: #fff; font-variant-numeric: tabular-nums; }
.photo-badge--cover { left: auto; right: 8px; bottom: 8px; background: var(--lime); color: #10212a; }
.photo-card--cover .photo-pick { top: 8px; }
.photo-thumb .photo-badge:not(.photo-badge--cover) { left: 8px; bottom: 8px; }
.photo-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.photo-chip { font-size: .6875rem; padding: 2px 7px; border-radius: 999px; background: var(--page); border: 1px solid var(--line); color: var(--ink-soft); }
.photo-chip--tag { background: var(--worth-a-look-wash); border-color: var(--worth-a-look); color: var(--ink); }
.photo-chip--flag { background: var(--avoid-wash); border-color: var(--avoid); color: var(--ink); }
.photo-order { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.photo-order .mini { margin: 0; padding: 5px 9px; font-size: .75rem; }
.photos-recommendation { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.photos-recommendation h3 { margin: 0 0 8px; font-size: 1rem; }
.photos-recommendation h4 { margin: 12px 0 6px; font-size: .8125rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.photos-rec-grid { display: grid; grid-template-columns: minmax(260px, 1.2fr) minmax(220px, 1fr); gap: 18px; }
.photos-rec-cover img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 3px solid var(--lime); cursor: zoom-in; display: block; }
.photos-rec-cover .mini { margin-top: 6px; }
.photos-rec-alts { margin-top: 6px; }
.photos-rec-alt { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: start; margin-top: 8px; }
.photos-rec-alt img { width: 110px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; cursor: zoom-in; display: block; }
.photos-rec-alt .mini { margin: 6px 6px 0 0; }
.photos-coverage { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.photos-coverage li { font-size: .75rem; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); }
.photos-coverage li.is-present { background: var(--strong-buy-wash, #e8f5e0); border-color: var(--strong-buy); cursor: pointer; }
.photos-coverage li.is-missing { background: var(--avoid-wash); border-color: var(--avoid); }
.photos-retakes { margin: 0; padding-left: 18px; font-size: .8125rem; }
.photos-retakes li { margin: 3px 0; }
.photos-rec-dups, .photos-rec-advice { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.photos-dup-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; padding: 10px; margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; }
.photos-dup-group.is-decided { opacity: .75; }
.photos-dup-group figure { margin: 0; width: 140px; }
.photos-dup-group figure img { width: 140px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; border: 3px solid transparent; cursor: zoom-in; display: block; }
.photos-dup-group figure.is-preferred img { border-color: var(--lime); }
.photos-dup-group figcaption { font-size: .6875rem; word-break: break-all; margin-top: 3px; color: var(--ink-faint); }
.photos-dup-actions { flex: 1 1 220px; }
.photos-dup-actions .mini { margin: 6px 6px 0 0; }
.photos-rec-advice ul { margin: 0; padding-left: 18px; font-size: .8125rem; }
.photos-rec-advice.is-over ul { color: var(--avoid); }
.photos-unverified { font-style: italic; }
.photos-mini-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.photos-mini-row img { width: 72px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; cursor: zoom-in; }
.photo-warning { border: 1px solid var(--worth-a-look); background: var(--worth-a-look-wash); border-radius: 8px; padding: 8px 10px; font-size: .8125rem; }
.photo-warning-text { font-weight: 600; }
.photo-warning-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.photo-warning-actions .mini, .photos-warning-row .mini { margin: 0; }
.photo-warning-yes { border-color: var(--worth-a-look); }
.photo-warning-yes:hover { background: var(--worth-a-look); color: #10212a; }
.photos-rec-warnings { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.photos-warning-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: start; padding: 10px; margin-top: 8px; border: 1px solid var(--worth-a-look); background: var(--worth-a-look-wash); border-radius: 8px; }
.photos-warning-row img { width: 140px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; cursor: zoom-in; display: block; }
.photos-warning-row .mini { margin-top: 6px; }
.photos-held { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.photos-held h3 { margin: 0 0 4px; }
.photos-lightbox-pair { display: flex; gap: 16px; align-items: flex-start; justify-content: center; width: 100%; max-width: 100%; padding: 0 24px; box-sizing: border-box; }
.photos-lightbox-pair figure { margin: 0; text-align: center; min-width: 0; flex: 0 1 auto; }
.photos-lightbox-pair img { max-width: 100%; max-height: 82vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.photos-lightbox.is-pair .photos-lightbox-pair figure { flex: 1 1 0; }
.photos-lightbox.is-pair .photos-lightbox-pair img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; }
.photos-lightbox figcaption { color: #e8f1f2; font-size: .875rem; margin: 12px 0 0; text-align: center; font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .photos-rec-grid { grid-template-columns: 1fr; }
  .photos-lightbox.is-pair .photos-lightbox-pair { flex-direction: column; }
  .photos-lightbox.is-pair .photos-lightbox-pair img { max-width: 100%; max-height: 40vh; }
}


/* --- Buy list v79: short cards, detail on demand (23/10/2026) -------------------
   Each card is the decision; everything to type into or read about one car is
   behind "Figures, condition and reports" and fetched when it is opened. */
.lot-more { margin-top: 12px; border-top: 1px solid var(--line); }
.lot-more > summary { list-style: none; display: flex; align-items: center; gap: 8px;
  min-height: 44px; font-size: 0.875rem; font-weight: 600; color: var(--accent); }
.lot-more > summary::-webkit-details-marker { display: none; }
.lot-more > summary::before { content: "▸"; display: inline-block; transition: transform .15s ease; }
.lot-more[open] > summary::before { transform: rotate(90deg); }
.lot-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.lot-more-body { padding: 4px 0 6px; }
.lot-more-wait { margin: 6px 0; }
.actual-more { flex: 1 1 100%; margin-top: 4px; }
.actual-more > summary { min-height: 36px; display: inline-flex; align-items: center;
  font-size: 0.8125rem; font-weight: 600; color: var(--accent); }
.actual-more .actual-extra { margin-top: 8px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 18px 0 6px; }
.pager .button { min-height: 44px; display: inline-flex; align-items: center; }
.pager-where { font-size: 0.875rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .lot-more > summary::before { transition: none; } }
.mini:disabled { opacity: .55; cursor: not-allowed; }

/* --- v80: line icons, grouped menu, touch targets (Phase 3, 24/10/2026) ----------
   One icon set drawn in the text colour (src/Support/Icons.php) in place of
   emoji; the menu in three groups; and every control at least 44px tall on a
   touch screen, because the buy list is worked on a tablet at the sale. */
.ico { width: 20px; height: 20px; flex: none; }
.nav-ico { align-items: center; justify-content: center; }
body.with-sidebar .nav-ico { display: inline-flex; width: 22px; height: 22px; margin-right: .6rem; }
.nav-ico .ico { width: 19px; height: 19px; }
body.with-sidebar .nav-link { min-height: 40px; }
.nav-group { margin: 14px 0 2px; padding: 0 12px 0 15px; font-size: .6875rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.46); }
.nav-links .nav-group:first-child { margin-top: 0; }
body.with-sidebar .nav-platform { display: flex; align-items: center; min-height: 40px; }
.nav-signout { display: inline-flex; align-items: center; gap: 0; }
body.with-sidebar .nav-signout .nav-ico { margin-right: .45rem; }
body.with-sidebar .nav-signout .ico { width: 16px; height: 16px; }
/* Compact: the icons now carry the platform link and sign-out, so the old
   emoji stand-ins drawn with ::before go. */
body.with-sidebar.nav-compact .nav-platform { font-size: inherit; justify-content: center; }
body.with-sidebar.nav-compact .nav-platform::before,
body.with-sidebar.nav-compact .nav-out button::before { content: none; }
body.with-sidebar.nav-compact .nav-out button { font-size: inherit; padding: 8px; }
body.with-sidebar.nav-compact .nav-platform .nav-ico,
body.with-sidebar.nav-compact .nav-signout .nav-ico { margin-right: 0; }
body.with-sidebar.nav-compact .nav-group { display: none; }
@media (max-width: 820px) {
  .nav-group { display: none; }
  body.with-sidebar .nav-signout .nav-ico, body.with-sidebar .nav-platform .nav-ico { display: none; }
}

/* Money and counts line up in columns everywhere they appear. */
.money, .stat .v, td.num, .tab-n, .lot-no, .score { font-variant-numeric: tabular-nums; }

/* Touch screens: nothing to tap smaller than a fingertip. */
@media (pointer: coarse) {
  .mini, .button, button, .tab, select, input[type="text"], input[type="number"], input[type="email"],
  input[type="password"], .nav-link, summary { min-height: 44px; }
  .mini { padding: 10px 14px; }
  .inline, .lot-actions .inline { gap: 10px; }
}

/* The buying steps (src/Support/Workflow.php): one row, the current step in
   the accent, counts beside each. Scrolls sideways on a phone rather than
   wrapping into a tower. */
.flow { margin: -6px 0 20px; }
.flow ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto;
  scrollbar-width: thin; padding-bottom: 2px; }
.flow li { flex: 1 0 auto; }
.flow-step { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  color: var(--ink-soft); text-decoration: none; white-space: nowrap;
  transition: border-color .15s ease, background-color .15s ease; }
.flow-step:hover { border-color: var(--line-strong); color: var(--ink); }
.flow-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.flow-step--on { border-color: var(--accent); background: var(--accent-wash); color: var(--ink); }
.flow-ico { display: inline-flex; color: var(--ink-faint); }
.flow-step--on .flow-ico { color: var(--accent); }
.flow-ico .ico { width: 18px; height: 18px; }
.flow-text { display: flex; flex-direction: column; line-height: 1.15; }
.flow-label { font-size: .8125rem; font-weight: 600; }
.flow-n { display: inline-block; min-width: 1.1em; font-size: .6875rem; color: var(--ink-faint);
  font-variant-numeric: tabular-nums; }
.flow-count { font-size: 1rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .flow-step { transition: none; } }
/* Laptop widths: the icons go first so all eight steps fit on one line. */
@media (max-width: 1440px) { .flow-ico { display: none; } .flow-step { padding: 6px 10px; } }
@media (max-width: 1180px) { .flow-n { display: none; } .flow-label { font-size: .75rem; } }

/* Phones: the menu folds behind a button; four quick links sit along the
   bottom under the thumb. On wider screens the panel is see-through to the
   layout (display: contents) and the sidebar behaves exactly as before. */
.nav-panel { display: contents; }
.nav-menu, .tabbar { display: none; }
@media (max-width: 820px) {
  body.with-sidebar .nav-ico { display: none; }
  body.with-sidebar .nav-inner, body.with-sidebar.nav-compact .nav-inner {
    flex-wrap: wrap; align-items: center; padding: 6px 16px; min-height: 56px; }
  .nav-menu { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; min-height: 44px;
    padding: 8px 14px; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.25);
    border-radius: 10px; font-weight: 600; }
  .nav-menu:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
  .nav-panel { display: none; }
  body.nav-open .nav-panel { display: flex; flex-direction: column; gap: 4px; width: 100%;
    padding: 10px 0 14px; max-height: calc(100vh - 140px); overflow-y: auto; }
  body.nav-open .nav-links { flex-direction: column; overflow: visible; }
  body.nav-open .nav-link { min-height: 44px; border-bottom: 0; border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0; padding: 0 12px; }
  body.nav-open .nav-link--on { border-left-color: var(--lime); background: rgba(255,255,255,.08); }
  body.nav-open .nav-ico { display: inline-flex; margin-right: .6rem; }
  body.nav-open .nav-group { display: block; margin-top: 12px; }
  body.nav-open .nav-platform, body.nav-open .nav-out { margin: 6px 0 0; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--navy); border-top: 1px solid rgba(255,255,255,.12);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .tab-item { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; min-height: 52px; color: rgba(255,255,255,.72); text-decoration: none; font-size: .75rem;
    font-weight: 600; border-radius: 10px; }
  .tab-item .ico { width: 22px; height: 22px; }
  .tab-item--on { color: var(--lime); background: rgba(255,255,255,.08); }
  .tab-item:focus-visible { outline: 2px solid var(--lime); outline-offset: -2px; }
  body.with-sidebar .wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  /* The tick-box bar sticks above the tab bar, not under it. */
  .remove-bar--live { bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* Buying profile (profile.php): wide text boxes and tick chips in the same
   setting rows as Settings. */
.setting-field .setting-wide, select.setting-wide { width: min(420px, 100%); text-align: left; padding-left: 12px; }
.choice-chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; max-width: 520px; }
.choice-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); cursor: pointer;
  font-weight: 500; font-size: .875rem; margin: 0; }
.choice-chip input { width: auto; margin: 0; accent-color: var(--accent); }
.choice-chip:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.choice-chip:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.profile-form .panel h2 { margin-bottom: 8px; }
.setting-field .setting-wide, .setting-field select.setting-wide { width: 420px; max-width: calc(100vw - 64px); }

/* --- v81: the buying decision (Phase 6, 24/10/2026) ----------------------------
   Five bands, a confidence chip, the bid limit as the biggest number on the
   card, and the workings behind it. Colour is never the only signal: every
   band says what it is in words. */
.band { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border-radius: 999px;
  font-size: .8125rem; font-weight: 700; border: 1px solid transparent; margin-right: 6px; }
.band--strong_buy { background: var(--strong-buy); color: #fff; }
.band--buy { background: var(--strong-buy-wash); color: var(--strong-buy); border-color: var(--strong-buy); }
.band--inspect { background: var(--worth-a-look-wash); color: var(--worth-a-look); border-color: var(--worth-a-look); }
.band--watch { background: var(--accent-wash); color: var(--ink-soft); border-color: var(--line-strong); }
.band--avoid { background: var(--avoid-wash); color: var(--avoid); border-color: var(--avoid); }
.confidence { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 9px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; color: var(--ink-soft); border: 1px dashed var(--line-strong); margin-right: 6px; }
.confidence--high { border-style: solid; color: var(--strong-buy); border-color: var(--strong-buy); }
.confidence--low { color: var(--worth-a-look); border-color: var(--worth-a-look); }
.money--bid { font-size: 1.5rem; color: var(--ink); }
.bid-cell .money-note { max-width: 24ch; }
.decision-workings { margin: 6px 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--page); }
.decision-workings .ledger-title { margin-top: 0; }
.scenarios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0; }
.scenario { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.scenario--main { border-color: var(--accent); }
.decision-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 8px; }
.decision-workings h5 { margin: 6px 0 4px; font-size: .8125rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.decision-workings ul { margin: 0 0 6px; padding-left: 18px; font-size: .875rem; color: var(--ink-soft); }
.fit-list { list-style: none; padding-left: 0 !important; }
.fit { padding-left: 20px; position: relative; }
.fit::before { position: absolute; left: 0; font-weight: 700; }
.fit--pass::before { content: "✓"; color: var(--strong-buy); }
.fit--fail::before { content: "✕"; color: var(--avoid); }
.fit--unknown::before { content: "?"; color: var(--ink-faint); }
.decision-missing ul { color: var(--worth-a-look); }
@media (max-width: 600px) { .scenarios { grid-template-columns: 1fr; } }

/* Extras (v81+): the bid ladder and the what-if slider. */
.bid-ladder .ledger td, .bid-ladder .ledger th { padding-top: 5px; padding-bottom: 5px; }
.rung-limit td { font-weight: 700; background: var(--accent-wash); }
.rung-short { color: var(--worth-a-look); }
.what-if { margin: 10px 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.what-if label { display: flex; justify-content: space-between; gap: 10px; margin: 0; font-size: .9375rem; }
.what-if output { font-variant-numeric: tabular-nums; font-weight: 700; }
.what-if input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--accent); }
.what-if-result { margin: 4px 0 0; font-size: 1rem; }
.what-if-result b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }

/* Reading between the MOT tests (extra) */
.mot-patterns { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); }
.mot-patterns ul { list-style: none; margin: 6px 0 0; padding: 0; }
.mot-pattern { padding: 7px 0 7px 12px; border-left: 3px solid var(--line-strong); margin: 6px 0; font-size: 0.875rem; line-height: 1.45; }
.mot-pattern b { display: block; }
.mot-pattern--bad { border-left-color: var(--avoid); }
.mot-pattern--bad b { color: var(--avoid); }
.mot-pattern--warn { border-left-color: var(--worth-a-look); }
.mot-pattern--warn b { color: var(--worth-a-look); }

/* Wanted list (extra) */
.chip--good { border-color: var(--strong-buy); color: var(--strong-buy); background: var(--strong-buy-wash); text-decoration: none; }
.wanted-card h3 { margin: 0; font-size: 1rem; }
.wanted-matches { margin: 8px 0; padding-left: 18px; }
.wanted-matches li { margin: 4px 0; }

/* Back again (extra): the car on one line, what happened and when under it */
.dash-rows--stack li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
.dash-rows--stack li > :first-child { grid-column: 1 / -1; }
