/*
    Site stylesheet.

    Palette taken from the logo: logo blue (cobalt), navy ink, white paper. The
    coral swoosh, darkened to --action, marks only what you click to act. No greys, no greens - tints are
    made from the blue.
    Type: Barlow Condensed for display (road-sign / plate lettering), Barlow for
    text. Both self-hosted in /assets/fonts because the CSP blocks third parties.
*/

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
    --cobalt: #0a5cf0;
    --cobalt-deep: #00307f;
    --cobalt-soft: #a3c0ff;
    --sky: #eaf1ff;
    --ink: #021227;
    --ink-soft: #3a4a66;
    --paper: #ffffff;
    --accent: #f85a44;
    --accent-soft: #ffe8e3;
    /* "Click me". The logo coral, darkened until white text passes AA (4.7:1). */
    --action: #d63a24;
    --action-deep: #ad2a15;
    --tax: #ff9a88;
    --line: #c9d8f5;
    --tap: 2.75rem;
    --alarm: #c4161c;
    --alarm-soft: #ffe1e1;

    --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
    --text: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --shell: 70rem;
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --rule: 2px solid var(--ink);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--text);
    font-size: 1.0625rem;
    line-height: 1.6;
}

img, svg { max-width: 100%; }

a { color: var(--cobalt); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); }

p { margin: 0 0 1rem; max-width: 68ch; }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip { position: absolute; left: -999rem; top: 0; background: var(--accent); color: var(--ink); padding: 0.75rem 1rem; font-weight: 600; z-index: 10; }
.skip:focus { left: 0; }

/* ---------- Masthead ---------- */

.masthead { border-bottom: 1px solid var(--line); background: var(--paper); }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 2rem; flex-wrap: wrap; padding-block: 0.75rem; }

.brand { display: flex; align-items: center; min-height: var(--tap); line-height: 0; flex: 0 1 auto; }
.brand img { display: block; height: 3.25rem; width: auto; max-width: 100%; }
@media (max-width: 30rem) { .brand img { height: 2.5rem; } }

.nav { display: flex; gap: 0 0.5rem; }
.nav__link {
    display: flex; align-items: center; justify-content: center; min-height: var(--tap); padding-inline: 0.75rem;
    color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; text-align: center; line-height: 1.2;
}
.nav__link:hover { color: var(--cobalt); border-bottom-color: var(--cobalt-soft); }
.nav__link[aria-current="page"] { color: var(--cobalt); border-bottom-color: var(--cobalt); }
/* Phones: three equal tabs in one row under the logo, never wrapping. */
@media (max-width: 47.99rem) {
    .masthead__inner { padding-bottom: 0; }
    .nav { order: 2; width: calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); border-top: 1px solid var(--line); gap: 0; }
    .nav__link { flex: 1 1 0; min-height: 3rem; padding-inline: 0.25rem; font-size: 0.9375rem; }
    .nav__link + .nav__link { border-left: 1px solid var(--line); }
    .nav__more { display: none; }
}

/* ---------- Type ---------- */

.title {
    font-family: var(--display); font-weight: 700;
    font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); line-height: 1.05;
    margin: 0 0 1rem; max-width: 22ch; text-wrap: balance;
}

.fineprint { font-size: 0.9375rem; color: var(--ink-soft); margin-top: 1.25rem; }
.fineprint a { display: inline-block; padding-block: 0.65rem; font-weight: 600; }

.link { display: inline-flex; align-items: center; gap: 0.4em; min-height: var(--tap); font-weight: 600; }
.link::after { content: "\2192"; text-decoration: none; display: inline-block; transition: transform 120ms ease; }
.link:hover::after { transform: translateX(3px); }

/* ---------- Buttons ---------- */

.button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 3rem;
    font: inherit; font-weight: 600; line-height: 1.2; text-align: center;
    background: var(--cobalt); color: var(--paper); text-decoration: none;
    border: 2px solid var(--cobalt); border-radius: 4px; padding: 0.7rem 1.4rem; cursor: pointer;
}
.button:hover { background: var(--cobalt-deep); border-color: var(--cobalt-deep); color: var(--paper); }
.button--primary { background: var(--action); border-color: var(--action); font-size: 1.0625rem; min-height: 3.25rem; }
.button--primary:hover { background: var(--action-deep); border-color: var(--action-deep); }
.button--block { display: flex; width: 100%; }
@media (max-width: 30rem) { .split__text > .button, .vinform .button, .reveal .button { width: 100%; } }

/* ---------- Hero ---------- */

.hero { background: var(--cobalt-deep); color: var(--paper); }
.hero__inner { padding-block: clamp(2rem, 6vw, 4.5rem); }
.hero__grid { display: grid; gap: 2rem clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 60rem) { .hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.hero--home .hero__title { font-size: clamp(2.5rem, 1.5rem + 4.5vw, 4.75rem); }
.hero--home .hero__lead { margin-bottom: 1.5rem; }
.trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.75rem; font-weight: 600; color: var(--cobalt-soft); font-size: 0.9375rem; }
.trust li { display: flex; align-items: center; gap: 0.5rem; }
.trust li::before { content: ""; width: 0.45rem; height: 0.45rem; background: var(--accent); flex: none; }
.hero__title {
    font-family: var(--display); font-weight: 700;
    font-size: clamp(2.75rem, 1.4rem + 6.5vw, 6rem); line-height: 0.95;
    letter-spacing: -0.005em; margin: 0 0 1.25rem; max-width: 14ch; text-wrap: balance;
}
.hero__lead { font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem); max-width: 56ch; margin-bottom: 2rem; }
.hero__kicker { font-weight: 600; margin: 0 0 0.75rem; }
.hero__car { font-family: var(--display); font-weight: 700; font-size: clamp(1.75rem, 1.2rem + 2.5vw, 3rem); line-height: 1.05; margin: 1.75rem 0 0; }
.hero__demo { margin: 1.25rem 0 0; }
.hero a { color: var(--paper); }
.hero .quick a { color: var(--cobalt); }
.hero a:hover { color: var(--accent-soft); }
.hero--result .hero__inner { padding-block: clamp(2rem, 5vw, 3.5rem); }

/* ---------- VIN form ---------- */

.vinform { max-width: 46rem; }
.vinform__label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.vinform__row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.vinform__plate { position: relative; flex: 1 1 20rem; }
.vinform__input {
    width: 100%; font-family: var(--display); font-weight: 700;
    font-size: clamp(1.5rem, 1rem + 2.6vw, 2.25rem); letter-spacing: 0.08em; line-height: 1.2;
    text-transform: uppercase; color: var(--ink); background: var(--paper);
    border: 2px solid var(--paper); border-radius: 4px; padding: 0.55rem 4.25rem 0.6rem 0.9rem;
}
.vinform__input:focus-visible { outline: 3px solid var(--paper); outline-offset: 2px; box-shadow: none; }
.vinform__input[aria-invalid="true"] { border-color: var(--alarm); box-shadow: inset 0 -6px 0 var(--alarm); }
.vinform__count {
    position: absolute; right: 0.9rem; top: 50%; transform: translateY(-50%);
    font-weight: 600; font-size: 0.9375rem; color: var(--ink); font-variant-numeric: tabular-nums;
}
.vinform .button { font-size: 1.125rem; padding-inline: 1.75rem; }
.vinform__hint { font-size: 1rem; margin: 0.75rem 0 0; max-width: 52ch; }
.vinform__error { background: var(--alarm-soft); color: var(--alarm); font-weight: 600; padding: 0.6rem 0.9rem; margin: 0.75rem 0 0; border: 1px solid var(--alarm); border-radius: 4px; }

/* On a white background (404 page) the form needs dark text. */
.pagehead .vinform { margin-block: 1.5rem; }
.pagehead .vinform__input { border-color: var(--ink); }

/* ---------- Quick start form (home hero) ---------- */

.quick { background: var(--paper); color: var(--ink); border-radius: 6px; padding: clamp(1.25rem, 3vw, 1.75rem); display: grid; gap: 1.1rem; }
.quick__title { font-family: var(--display); font-weight: 700; font-size: 1.625rem; line-height: 1.1; margin: 0; }
.quick__label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.quick__optional { font-weight: 400; color: var(--ink-soft); }
.quick__money { position: relative; }
.quick__input {
    width: 100%; font-family: var(--display); font-weight: 700;
    font-size: 1.75rem; line-height: 1.2; letter-spacing: 0.03em;
    color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 4px;
    padding: 0.45rem 0.9rem; min-height: 3.5rem; text-transform: uppercase;
}
.quick__money .quick__input { padding-right: 4.25rem; }
.quick__input--vin { font-size: 1.375rem; letter-spacing: 0.06em; }
.quick__input:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; box-shadow: none; }
.quick__unit { position: absolute; right: 0.9rem; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--ink-soft); pointer-events: none; }
.quick__hint { font-size: 0.9375rem; color: var(--ink-soft); margin: 0.4rem 0 0; }

/* ---------- "Fill in from VIN" (calculator) ---------- */

.fromvin { margin-top: 1.5rem; max-width: 34rem; }
.fromvin__label { display: block; font-weight: 500; margin-bottom: 0.35rem; }
.fromvin__row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.fromvin__input { flex: 1 1 14rem; width: auto; text-transform: uppercase; letter-spacing: 0.05em; }
.fromvin .button { min-height: var(--tap); padding-block: 0.5rem; }
.fromvin__error { color: var(--alarm); font-weight: 600; margin: 0.4rem 0 0; }

/* ---------- Annotated VIN plate ---------- */

.plate { display: flex; flex-wrap: wrap; gap: 0.5rem clamp(0.3rem, 1vw, 0.6rem); }
.plate__cells { display: flex; gap: 2px; }
.plate__cell {
    display: grid; place-items: center;
    width: clamp(1.05rem, 4.6vw, 3rem); height: clamp(1.9rem, 7vw, 4.25rem);
    background: var(--paper); color: var(--ink);
    font-family: var(--display); font-weight: 700; font-size: clamp(1.2rem, 4.4vw, 2.75rem); line-height: 1;
}
.plate__group--check .plate__cell,
.plate__group--year .plate__cell,
.plate__group--plant .plate__cell { background: var(--accent-soft); }
.legend { margin: 1.75rem 0 0; display: grid; gap: 0.5rem 2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); max-width: 58rem; font-size: 0.9375rem; }
.legend__row { display: grid; grid-template-columns: 5.25rem minmax(0, 1fr); gap: 0.75rem; align-items: baseline; border-top: 1px solid rgb(163 192 255 / 0.45); padding-top: 0.5rem; }
.legend dt, .legend dd { margin: 0; }
.legend dd strong { display: block; color: var(--paper); font-weight: 600; }
.legend__chars { font-family: var(--display); font-weight: 700; font-size: 1.125rem; letter-spacing: 0.06em; background: var(--paper); color: var(--ink); padding: 0 0.35rem; }

/* ---------- Bands ---------- */

.band { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.band--sky { background: var(--sky); }
.band--cobalt { background: var(--cobalt-deep); color: var(--paper); }

.split { display: grid; gap: 2rem clamp(2rem, 5vw, 4rem); }
.split__text > .button { margin-top: 0.5rem; }
.plain { list-style: none; margin: 1.25rem 0 1.5rem; padding: 0; max-width: 60ch; }
.plain li { padding: 0.6rem 0; border-top: 1px solid var(--line); }
.split__more { margin: 0.75rem 0 0; }
/* Home example: on phones the receipt follows the intro straight away. */
.example { display: grid; gap: 1.5rem clamp(2rem, 5vw, 4rem); }
.example__intro p:last-child { margin-bottom: 0; }
.example__more .plain { margin-top: 0; }
@media (max-width: 30rem) { .example__more > .button { width: 100%; } }
@media (min-width: 58rem) {
    .example { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); grid-template-areas: "intro receipt" "more receipt"; align-items: start; }
    .example__intro { grid-area: intro; }
    .example__receipt { grid-area: receipt; }
    .example__more { grid-area: more; }
    .example__more .plain { margin-top: 0.25rem; }
}
@media (min-width: 58rem) { .split--receipt { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: start; } }
@media (min-width: 56rem) {
    .split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
    .split--even { grid-template-columns: 1fr 1fr; }
}

/* ---------- Origin examples ---------- */

.origins { max-width: 40rem; }
.origins--inline { margin-block: 1.5rem 2rem; }
.origins__head { display: flex; justify-content: space-between; margin: 0; padding: 0 0.75rem 0.4rem; font-size: 0.875rem; font-weight: 600; color: var(--ink-soft); border-bottom: 2px solid var(--ink); max-width: none; }
.origins__list { list-style: none; margin: 0; padding: 0; }
.origins__list li { border-bottom: 1px solid var(--line); }
.origin {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.1rem 1rem; align-items: center;
    min-height: 4rem; padding: 0.7rem 0.75rem; color: var(--ink); text-decoration: none;
}
.origin::after { content: "\203A"; grid-column: 3; grid-row: 1 / span 2; font-size: 1.75rem; line-height: 1; color: var(--cobalt); }
.origin:hover { background: var(--paper); color: var(--ink); }
.band:not(.band--sky) .origin:hover { background: var(--sky); }
.origin__vin { font-family: var(--display); font-weight: 600; font-size: clamp(1.2rem, 1rem + 1.2vw, 1.6rem); letter-spacing: 0.05em; line-height: 1.15; overflow-wrap: anywhere; }
.origin__vin b { color: var(--cobalt); font-weight: 700; }
.origin__car { grid-column: 1; font-size: 0.9375rem; color: var(--ink-soft); }
.origin__duty { grid-column: 2; grid-row: 1 / span 2; font-family: var(--display); font-weight: 700; font-size: 1.75rem; white-space: nowrap; }
.origin__duty--0 { color: var(--cobalt); }
.origin__duty--10 { color: var(--alarm); }

/* ---------- Duty verdict ---------- */

.verdict { display: grid; gap: 1.5rem clamp(1.5rem, 5vw, 4rem); align-items: center; }
@media (min-width: 48rem) { .verdict { grid-template-columns: auto minmax(0, 1fr); } }
.verdict__rate {
    font-family: var(--display); font-weight: 700; font-size: clamp(5rem, 3rem + 12vw, 11rem); line-height: 0.8;
    margin: 0; max-width: none; display: flex; align-items: flex-end; gap: 0.12em;
}
.verdict__rate span { font-size: 0.22em; line-height: 1.1; padding-bottom: 0.35em; }
.verdict__rate--zero { color: var(--cobalt); }
.verdict__rate--ten { color: var(--alarm); }
.verdict__rate--unknown { color: var(--ink-soft); }
.verdict__text .title { max-width: 26ch; }

/* ---------- Notices ---------- */

/* Boxes are outlined all round: no coloured stripe down the left edge. */
.notice, .flash { border: 1px solid var(--line); border-radius: 4px; background: var(--sky); padding: 0.9rem 1.1rem; margin: 1.5rem 0; max-width: 62rem; }
.band--sky .notice { background: var(--paper); }
.notice--alarm, .flash--error { border-color: #f0b4b4; background: var(--alarm-soft); }
.notice--accent { border-color: #f6c2b8; background: var(--accent-soft); }

/* ---------- Facts ---------- */

.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); column-gap: clamp(1.5rem, 4vw, 3rem); max-width: 62rem; }
.facts { align-items: start; }
.facts__row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 0.75rem; padding-block: 0.6rem; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 600; }

/* ---------- Auction lots ---------- */

.lot { border-top: 1px solid var(--line); padding-block: 1.5rem 2rem; }
.lot__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1.5rem; }
.lot__title { font-family: var(--display); font-weight: 700; font-size: 1.75rem; line-height: 1.1; margin: 0; }
.lot__date { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.lot__facts { display: flex; flex-wrap: wrap; gap: 0.75rem 2.25rem; margin: 1rem 0 1.25rem; }
.lot__facts dt { font-size: 0.875rem; color: var(--ink-soft); }
.lot__facts dd { margin: 0; font-weight: 600; }

.photos { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); }
.photos__item a { display: block; background: var(--sky); }
.photos__item img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.photos__item a:hover img { opacity: 0.85; }

.reveal { border: 1px solid var(--line); border-radius: 6px; background: var(--sky); padding: 1.25rem 1.4rem 1.4rem; margin: 1.5rem 0; max-width: 46rem; }
.reveal p { margin-bottom: 1rem; }
.reveal--inline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; padding-block: 0.8rem; }
.reveal--inline p { margin: 0; }
.button--quiet { background: var(--paper); color: var(--cobalt); border-color: var(--cobalt); min-height: var(--tap); padding: 0.5rem 1rem; }
.button--quiet:hover { background: var(--cobalt); border-color: var(--cobalt); color: var(--paper); }

.runs { border-collapse: collapse; margin-top: 1.5rem; width: 100%; max-width: 34rem; font-variant-numeric: tabular-nums; }
.runs caption { text-align: left; font-weight: 600; padding-bottom: 0.4rem; }
.runs th, .runs td { text-align: left; padding: 0.4rem 1rem 0.4rem 0; border-top: 1px solid var(--line); }
.runs th { font-size: 0.875rem; font-weight: 500; color: var(--ink-soft); border-top: var(--rule); }
.runs th:last-child, .runs td:last-child { text-align: right; padding-right: 0; font-weight: 600; }

.lightbox { border: var(--rule); padding: 0; max-width: min(96vw, 80rem); background: var(--ink); }
.lightbox::backdrop { background: rgb(11 18 48 / 0.85); }
.lightbox img { display: block; max-width: 100%; max-height: 86vh; margin-inline: auto; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.5rem 0.75rem; background: var(--paper); }
.lightbox__bar button { font: inherit; font-weight: 600; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 4px; min-height: var(--tap); min-width: var(--tap); padding: 0.3rem 0.9rem; cursor: pointer; }
.lightbox__bar button:hover { background: var(--sky); }

/* ---------- Page head (inner pages) ---------- */

.pagehead { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 3vw, 2.25rem); }
.pagehead__title { font-family: var(--display); font-weight: 700; font-size: clamp(2.25rem, 1.4rem + 4vw, 4rem); line-height: 1; margin: 0 0 1rem; max-width: 20ch; text-wrap: balance; }
.pagehead__lead { font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); max-width: 60ch; }
.pagehead__context { background: var(--sky); border: 1px solid var(--line); border-radius: 4px; padding: 0.7rem 1rem; max-width: 60ch; }

/* ---------- Calculator ---------- */

.calc { display: grid; gap: 2rem clamp(2rem, 5vw, 4rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
@media (min-width: 58rem) {
    .calc { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: start; }
    .receipt { position: sticky; top: 1rem; }
}

.group { border: 0; border-top: 2px solid var(--ink); margin: 0 0 1.75rem; padding: 0; min-width: 0; }
.group__title { font-family: var(--display); font-weight: 700; font-size: 1.5rem; padding: 0.6rem 0.75rem 0.4rem 0; }

.field { margin-bottom: 1.1rem; }
.field--pair { display: grid; gap: 1.1rem 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); align-items: end; }
.field__label { display: block; font-weight: 500; margin-bottom: 0.3rem; }
.field__money { position: relative; }
.field__input {
    width: 100%; font: inherit; font-weight: 600; color: var(--ink); background: var(--paper);
    border: 2px solid var(--ink); border-radius: 4px; padding: 0.6rem 0.75rem; min-height: 3rem;
    font-variant-numeric: tabular-nums;
}
.field__money .field__input { padding-right: 3.5rem; }
.field__input::placeholder { color: var(--ink-soft); font-weight: 400; opacity: 1; }
.field__input:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 0; box-shadow: none; }
.field__unit { position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--ink-soft); font-weight: 500; pointer-events: none; }
.field__hint { font-size: 0.9375rem; color: var(--ink-soft); margin: 0.35rem 0 0; line-height: 1.45; }
select.field__input { appearance: auto; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.choice__item { position: relative; display: block; cursor: pointer; }
.choice__item input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice__item span { display: block; border: 2px solid var(--ink); border-radius: 4px; min-height: 3rem; padding: 0.6rem 0.75rem; font-weight: 500; line-height: 1.3; }
.choice__item b { display: block; font-family: var(--display); font-weight: 700; font-size: 1.375rem; }
.choice__item input:checked + span { background: var(--ink); color: var(--paper); }
.choice__item input:checked + span b { color: var(--cobalt-soft); }
.choice__item input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 2px; }

/* With JS the receipt updates as you type, so the button is only a fallback. */
.js .calc__submit { display: none; }

.receipt { background: var(--ink); color: var(--paper); border-radius: 6px; }
.receipt__inner { padding: clamp(1.25rem, 3vw, 2rem); }
.receipt[aria-busy="true"] .receipt__inner { opacity: 0.55; }
.receipt__label { margin: 0; font-weight: 500; }
.receipt__total { font-family: var(--display); font-weight: 700; font-size: clamp(3rem, 2rem + 4.5vw, 4.75rem); line-height: 1; margin: 0.15rem 0 0.5rem; color: var(--paper); font-variant-numeric: tabular-nums; }
.receipt__sub { margin: 0 0 1.25rem; }

.receipt__bar { display: block; width: 100%; height: 0.9rem; }
.bar--car, .swatch--car { fill: var(--cobalt-soft); background: var(--cobalt-soft); }
.bar--transport, .swatch--transport { fill: var(--paper); background: var(--paper); }
.bar--tax, .swatch--tax { fill: var(--tax); background: var(--tax); }
.bar--local, .swatch--local { fill: #4f86ff; background: #4f86ff; }

.receipt__groups { list-style: none; margin: 0.75rem 0 1.5rem; padding: 0; display: grid; gap: 0.4rem; }
.receipt__group { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; }
.swatch { width: 0.8rem; height: 0.8rem; }
.receipt__group-amount { font-weight: 600; font-variant-numeric: tabular-nums; }

.lines { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.lines th, .lines td { padding: 0.45rem 0; border-top: 1px solid rgb(163 192 255 / 0.4); vertical-align: baseline; }
.lines th { text-align: left; font-weight: 400; padding-right: 1rem; }
.lines td { text-align: right; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lines__note { display: block; font-size: 0.875rem; color: var(--cobalt-soft); }
.lines__row--tax th { font-weight: 600; }
.lines__row--tax td { color: var(--tax); }

.receipt__saving { margin: 1.25rem 0 0; padding: 0.75rem 0.9rem; border: 1px solid rgb(163 192 255 / 0.5); border-radius: 4px; background: rgb(255 255 255 / 0.06); font-weight: 500; }
.receipt__saving--paid { border-color: var(--tax); }
.receipt__rate { margin: 1rem 0 0; font-size: 0.875rem; color: var(--cobalt-soft); }

.totalbar {
    position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
    background: var(--ink); color: var(--paper); text-decoration: none; padding: 0.7rem var(--gutter);
    border-top: 3px solid var(--cobalt);
}
.totalbar:hover { color: var(--paper); }
.totalbar strong { font-family: var(--display); font-weight: 700; font-size: 1.75rem; line-height: 1; color: var(--paper); font-variant-numeric: tabular-nums; }
@media (min-width: 58rem) { .totalbar { display: none; } }

/* ---------- Quote request + partner box ---------- */

.band--accent { background: var(--accent-soft); }
.band--accent .fineprint { color: var(--ink); }
@media (min-width: 58rem) { .split--lead { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
.leadform { background: var(--paper); border: 1px solid #f6c2b8; border-radius: 6px; padding: clamp(1.1rem, 3vw, 1.75rem); }
.leadform .button { margin-top: 0.5rem; width: 100%; }
.leadform__error { color: var(--alarm); font-weight: 600; font-size: 0.9375rem; margin: 0.3rem 0 0.6rem; }
.leadform__error--form { border: 1px solid #f0b4b4; border-radius: 4px; background: var(--alarm-soft); padding: 0.6rem 0.8rem; color: var(--ink); }
.field__hint--gap { margin-bottom: 1.1rem; }
.field__optional { color: var(--ink-soft); font-weight: 400; }
.field__input--area { resize: vertical; min-height: 5rem; font-weight: 500; }
.field__input[aria-invalid="true"] { border-color: var(--alarm); }
.consent { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.75rem; align-items: start; margin: 0.75rem 0 0.25rem; font-size: 0.9375rem; line-height: 1.45; }
.consent input { width: 1.75rem; height: 1.75rem; margin: 0; accent-color: var(--cobalt); cursor: pointer; }
.consent label { cursor: pointer; padding-block: 0.15rem; }
.consent a { display: inline-block; padding-block: 0.35rem; }
.honeypot { position: absolute; left: -999rem; width: 1px; height: 1px; overflow: hidden; }

.partners { display: grid; gap: 1rem; margin: 1.5rem 0 2rem; }
@media (min-width: 48rem) { .partners { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); } }
.partners .partner { margin: 0; max-width: none; }
.partner { display: grid; gap: 0.6rem; border: 1px solid var(--line); border-radius: 6px; padding: 1rem 1.2rem; margin: 1.5rem 0 2rem; max-width: 46rem; background: var(--paper); }
.partner__text { margin: 0; }
.partner .button { justify-self: start; }
.partner__note { margin: 0; font-size: 0.875rem; color: var(--ink-soft); }

.quote { margin: 1rem 0 1.25rem; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 4px; background: var(--sky); max-width: 64ch; }

/* ---------- Prose ---------- */

.prose { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.band .prose { padding-bottom: 0; }
.prose .title { margin-top: 2.25rem; }
.prose > .title:first-child { margin-top: 0; }
.prose ul, .prose ol { max-width: 68ch; padding-left: 1.25rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.6rem; }
/* Links inside sentences: a taller hit area without changing the line height. */
.prose p a:not(.link):not(.button), .prose li a, .consent a { padding-block: 0.7rem; }
.steps { counter-reset: none; }

.tablewrap { overflow-x: auto; margin: 1.5rem 0; max-width: 44rem; }
.compare { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
@media (max-width: 30rem) { .compare { font-size: 0.9375rem; } .compare th, .compare td { padding-inline: 0.4rem; } }
.compare th, .compare td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); text-align: right; }
.compare th[scope="row"] { text-align: left; font-weight: 500; }
.compare thead th { font-weight: 600; border-bottom: var(--rule); vertical-align: bottom; line-height: 1.25; }
.compare td:nth-child(2) { color: var(--cobalt); font-weight: 600; }
.compare__total th, .compare__total td { border-top: var(--rule); border-bottom: var(--rule); font-weight: 700; font-size: 1.125rem; }

.trace { overflow: auto; background: var(--sky); padding: 1rem; font-size: 0.8125rem; }

/* ---------- Guide (Poradnik) ---------- */

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.5rem; margin-bottom: 0.75rem; font-size: 0.9375rem; color: var(--ink-soft); }
.crumbs a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }
.pagehead__title--article { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); max-width: 24ch; }
.article__meta { font-size: 0.9375rem; color: var(--ink-soft); margin: 0 0 1rem; }
.article > * { max-width: 46rem; }
.article .title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.article .compare td:nth-child(2) { color: inherit; }
.article .steps li { margin-bottom: 1rem; }
.compare__note { display: block; font-size: 0.875rem; font-weight: 400; color: var(--ink-soft); }
.compare--left td { text-align: left; }
.compare thead th:first-child { text-align: left; }
.compare tfoot .compare__total th, .compare tfoot .compare__total td { border-bottom: 0; }

.figure { margin-block: 0 clamp(1.5rem, 4vw, 2.5rem); }
.figure .illus { display: block; width: 100%; max-width: 50rem; height: auto; border-radius: 6px; }
.teaser__image { display: block; margin: -1.25rem -1.4rem 1rem; line-height: 0; }
.teaser__image .illus { display: block; width: 100%; height: auto; border-radius: 5px 5px 0 0; }
.teaser { overflow: hidden; }
.articles { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.articles__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 48rem) { .articles__list { grid-template-columns: 1fr 1fr; } }
.teaser {
    display: block; height: 100%; padding: 1.25rem 1.4rem; border: 1px solid var(--line); border-radius: 6px;
    background: var(--paper); color: var(--ink); text-decoration: none;
}
.teaser:hover { border-color: var(--cobalt); color: var(--ink); }
.teaser__title { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.15; margin: 0 0 0.5rem; color: var(--cobalt-deep); }
.teaser:hover .teaser__title { color: var(--cobalt); text-decoration: underline; text-underline-offset: 0.15em; }
.teaser__text { margin: 0; color: var(--ink-soft); }
.teaser__date { margin: 0.75rem 0 0; font-size: 0.9375rem; color: var(--ink-soft); }
.articles__list--compact .teaser__title { font-size: 1.3rem; }

.cta { display: grid; gap: 1rem 2rem; align-items: center; }
.cta p { margin-bottom: 0; }
@media (min-width: 52rem) { .cta { grid-template-columns: minmax(0, 1fr) auto; } }
@media (max-width: 30rem) { .cta .button { width: 100%; } }

.guides { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.guides li { border-bottom: 1px solid var(--line); }
.guides__link { display: flex; align-items: center; min-height: 3.25rem; padding-block: 0.6rem; font-weight: 600; text-decoration: none; }
.guides__link:hover { text-decoration: underline; }

/* ---------- Footer ---------- */

.footer { background: var(--ink); color: var(--paper); }
.footer__inner { padding-block: 2.5rem; display: grid; gap: 1.25rem; }
.footer__note { margin: 0; max-width: 62ch; color: #d5e0f7; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 0 1.75rem; }
.footer__nav a { display: inline-flex; align-items: center; min-height: var(--tap); }
@media (max-width: 47.99rem) {
    .footer__nav { flex-direction: column; border-top: 1px solid rgb(163 192 255 / 0.3); }
    .footer__nav a { min-height: 3rem; border-bottom: 1px solid rgb(163 192 255 / 0.3); text-decoration: none; }
}
.footer a { color: var(--paper); }
.footer a:hover { color: var(--accent); }
.footer__brand { display: block; line-height: 0; }
.footer__brand img { display: block; height: 3rem; width: auto; max-width: 100%; }
.footer__copy { margin: 0; font-size: 0.9375rem; color: var(--cobalt-soft); }

@media (prefers-reduced-motion: no-preference) {
    .receipt__inner { transition: opacity 120ms ease; }
}
