/* ==========================================================================
   iDovoz.sk public pages - components
   Plain server-rendered markup (Razor tag helpers, jQuery unobtrusive validation classes); JavaScript only enhances.
   Values come from tokens.css only.
   ========================================================================== */

/* --- Buttons ----------------------------------------------------------------- */
.btn {
  --btn-bg: var(--btn-secondary-bg);
  --btn-fg: var(--btn-secondary-fg);
  --btn-bd: var(--btn-secondary-border);
  --btn-shadow: var(--shadow-xs);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--control-h); padding: var(--sp-2-5) var(--sp-5);
  font-size: var(--fs-md); font-weight: var(--fw-button); line-height: var(--lh-tight); letter-spacing: var(--ls-snug); text-align: center; text-decoration: none;
  white-space: normal; /* long Slovak labels wrap inside the button instead of spilling out */
  color: var(--btn-fg); background: var(--btn-bg); border: var(--border-w-thin) solid var(--btn-bd); border-radius: var(--radius-button);
  box-shadow: var(--btn-shadow);
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}
.btn .icon { width: 1.25rem; height: 1.25rem; transition: transform var(--dur-fast) var(--ease-standard); }
.btn:hover { color: var(--btn-fg); text-decoration: none; }
.btn--primary { --btn-bg: var(--btn-primary-bg); --btn-fg: var(--btn-primary-fg); --btn-bd: var(--btn-primary-bg); --btn-shadow: var(--btn-primary-shadow); }
.btn--primary:hover { --btn-bg: var(--btn-primary-bg-hover); --btn-bd: var(--btn-primary-bg-hover); --btn-shadow: var(--btn-primary-shadow-hover); }
.btn--primary:active, .btn--primary.is-pressed { --btn-bg: var(--btn-primary-bg-active); --btn-bd: var(--btn-primary-bg-active); --btn-shadow: var(--shadow-none); transform: translateY(var(--press-offset)); }
.btn--secondary { --btn-bg: var(--btn-secondary-bg); --btn-fg: var(--btn-secondary-fg); --btn-bd: var(--btn-secondary-border); }
.btn--secondary:hover { --btn-bg: var(--btn-secondary-bg-hover); --btn-bd: var(--btn-secondary-border-hover); --btn-shadow: var(--shadow-control-hover); }
.btn--secondary:active, .btn--secondary.is-pressed { --btn-bg: var(--btn-secondary-bg-active); --btn-shadow: var(--shadow-none); transform: translateY(var(--press-offset)); }
.btn--lg { min-height: var(--control-h-lg); font-size: var(--fs-md); padding-inline: var(--sp-5); }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] {
  --btn-bg: var(--btn-disabled-bg); --btn-fg: var(--btn-disabled-fg); --btn-bd: var(--btn-disabled-bg); --btn-shadow: var(--shadow-none);
  cursor: not-allowed; transform: none;
}
.btn:focus-visible { box-shadow: var(--focus-ring); }
a.btn:focus-visible { background: var(--btn-bg); color: var(--btn-fg); outline-color: transparent; box-shadow: var(--focus-ring); border-radius: var(--radius-button); text-decoration: none; }
@media (prefers-reduced-motion: no-preference) {
  .btn:not(:disabled):hover > .icon:last-child:not(:first-child) { transform: translateX(var(--sp-0-5)); }
}
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* --- Links with icons ---------------------------------------------------------- */
.back-link { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--target); font-weight: var(--fw-semibold); text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.back-link .icon { width: 1.125rem; height: 1.125rem; }
.ext-link .icon { display: inline-block; width: 0.95rem; height: 0.95rem; margin-left: 0.3em; vertical-align: -0.1em; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.link-list li { max-width: none; }
.link-list a { display: inline-block; min-height: var(--target); padding-block: var(--sp-2-5); font-weight: var(--fw-medium); line-height: var(--lh-snug); }

/* --- Cards / sections ------------------------------------------------------------ */
.card {
  background: var(--card-bg); border: var(--border-w-thin) solid var(--card-border); border-radius: var(--radius-card);
  padding: var(--card-pad-y) var(--card-pad-x); box-shadow: var(--card-shadow);
}
.card > * + * { margin-top: var(--stack-gap); }
/* Text inside a box uses the whole width of the box; the line length limit (--measure) applies only to running
   text outside boxes. */
:is(.card, .alert, .result, .declaration, .check--boxed, .notice, .fact, .pzp-offer, .legal-quote, .actions, .typed-vin, .similar-vins, .consent-category, .qr) :is(p, li) { max-width: none; }
.card--warning { border-color: var(--danger-border); box-shadow: var(--card-warning-shadow); }

.section-head { display: flex; align-items: center; gap: var(--sp-3); }
.section-head > h2, .section-head > .h2 { font-size: var(--fs-section); letter-spacing: var(--ls-snug); line-height: var(--lh-snug); }
.status-icon {
  flex: none; width: var(--check-size); height: var(--check-size); border-radius: var(--radius-round);
  display: grid; place-items: center; border: var(--border-w) solid var(--status-todo-border); background: var(--surface); color: transparent;
  transition: background-color var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard);
}
.status-icon .icon { width: 0.875rem; height: 0.875rem; stroke-width: var(--icon-stroke-strong); }
.status-icon.is-done { background: var(--status-done-bg); border-color: var(--status-done-bg); color: var(--status-done-fg); }
.status-icon--warn { border-color: var(--danger-tint); background: var(--danger-tint); color: var(--danger); }
.status-icon--warn .icon { width: 0.95rem; height: 0.95rem; stroke-width: var(--icon-stroke); }
.status-icon--warn.is-done { background: var(--status-done-bg); border-color: var(--status-done-bg); color: var(--status-done-fg); }
.status-icon--warn.is-done .icon-warn { display: none; }
.status-icon--warn:not(.is-done) .icon-done { display: none; }
legend.section-legend { width: 100%; margin-bottom: var(--stack-gap); }
.section-icon { flex: none; width: 2.25rem; height: 2.25rem; border-radius: var(--radius-icon); display: grid; place-items: center; background: var(--primary-tint); color: var(--primary); }
.section-icon .icon { width: 1.25rem; height: 1.25rem; }

/* --- Facts: manufacturer and fee ------------------------------------------- */
.facts { display: grid; gap: var(--sp-2-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 22.5em) { .facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); } }
.fact { display: grid; align-content: start; gap: var(--sp-1); background: var(--fact-bg); border: var(--border-w-thin) solid var(--fact-border); border-radius: var(--radius-tile); padding: var(--sp-3) var(--sp-3-5); }
@media (min-width: 40em) { .fact { padding: var(--sp-3-5) var(--sp-4); } }
.fact dt { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-muted); }
.fact dd { margin: 0; font-size: var(--fs-h3); font-weight: var(--fw-semibold); letter-spacing: var(--ls-snug); color: var(--fact-value); line-height: var(--lh-tight); overflow-wrap: normal; hyphens: manual; }
.fee { font-variant-numeric: tabular-nums; }
.fee__amount { font-size: var(--fs-fee); font-weight: var(--fw-amount); letter-spacing: var(--ls-tight); }
.fee__unit { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-muted); white-space: nowrap; letter-spacing: 0; }

/* --- VIN (system monospace, one continuous string) --- */
.vin {
  font-family: var(--font-mono); font-weight: var(--fw-vin); font-size: var(--fs-vin); letter-spacing: var(--ls-vin);
  color: var(--heading); white-space: nowrap; font-variant-ligatures: none; font-variant-numeric: tabular-nums slashed-zero;
}
.vin--inline { font-size: var(--fs-vin-inline); letter-spacing: var(--ls-vin); }
.vin--lg { font-size: var(--fs-vin-bar); }

/* --- Summary list (key - value) ------------------------------------------------------ */
.summary__row { display: grid; gap: var(--sp-0-5); padding-block: var(--sp-3); border-bottom: var(--border-w-thin) solid var(--border); }
.summary__row:first-child { padding-top: 0; }
.summary__row:last-child { border-bottom: 0; padding-bottom: 0; }
.summary dt { font-size: var(--fs-sm); color: var(--text-muted); font-weight: var(--fw-medium); }
.summary dd { margin: 0; font-weight: var(--fw-semibold); color: var(--heading); }
@media (min-width: 36em) { .summary__row { grid-template-columns: minmax(9rem, 34%) 1fr; gap: var(--sp-4); align-items: baseline; } }

/* --- Form fields: label, control, message UNDER the control (tag-helper order) ------- */
.field { display: grid; gap: var(--sp-1-5); align-content: start; }
.field + .field, .field + .or + .field { margin-top: var(--sp-3); }
.label { display: block; font-weight: var(--fw-label); font-size: var(--fs-base); line-height: var(--lh-snug); letter-spacing: var(--ls-snug); color: var(--text); }
.label__optional { font-weight: var(--fw-regular); color: var(--text-muted); }
.hint { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }
.field__control { position: relative; display: block; max-width: 30rem; }
.field__control--wide { max-width: none; }
.field__control--tel { max-width: 18rem; }
.input, .select {
  display: block; width: 100%; min-height: var(--control-h); padding: var(--sp-2-5) var(--sp-3-5);
  font-size: var(--fs-input); line-height: var(--lh-snug); color: var(--field-fg); background-color: var(--field-bg);
  border: var(--border-w-thin) solid var(--field-border); border-radius: var(--radius-control); box-shadow: var(--shadow-xs);
  appearance: none; -webkit-appearance: none;
  transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard), background-color var(--dur-fast) var(--ease-standard);
}
.input::placeholder { color: var(--field-placeholder); opacity: 1; }
.input:hover, .select:hover { border-color: var(--field-border-hover); }
/* Focus: the border turns indigo and doubles (2 px >= 6:1 against white) with a soft halo. */
.input:focus-visible, .select:focus-visible { border-color: var(--field-border-focus); outline-color: transparent; box-shadow: var(--field-focus-ring); border-radius: var(--radius-control); }
/* jQuery unobtrusive validation classes: input-validation-error (invalid), valid (valid). */
.input.input-validation-error, .select.input-validation-error, .input[aria-invalid="true"], .select[aria-invalid="true"] {
  border-color: var(--field-border-invalid); background-color: var(--field-bg-invalid); box-shadow: var(--field-invalid-ring);
}
/* an invalid field keeps its red edge and gets the standard white gap + indigo ring when focused */
.input.input-validation-error:focus-visible, .select.input-validation-error:focus-visible, .input[aria-invalid="true"]:focus-visible, .select[aria-invalid="true"]:focus-visible { border-color: var(--field-border-invalid); box-shadow: var(--field-invalid-ring), var(--focus-ring); }
.input.valid { border-color: var(--field-border-valid); padding-right: 2.75rem; }
.input.valid:focus-visible { border-color: var(--field-border-focus); }
.field__control:has(.input.valid)::after, .field__control.is-valid::after {
  content: ""; position: absolute; right: var(--sp-3-5); top: 50%; width: 1.25rem; height: 1.25rem; margin-top: -0.625rem; pointer-events: none;
  background-color: var(--valid-mark);
  -webkit-mask: url("img/mask-check.svg") center / contain no-repeat; mask: url("img/mask-check.svg") center / contain no-repeat;
}
.input:disabled, .input[readonly] { background: var(--disabled-bg); color: var(--text); border-color: var(--disabled-bg); box-shadow: var(--shadow-none); }
/* the select of a read-only vehicle selector (disabled) */
.select:disabled { background-color: var(--disabled-bg); color: var(--text); border-color: var(--disabled-bg); box-shadow: var(--shadow-none); cursor: not-allowed; }
.select {
  padding-right: 2.75rem; cursor: pointer;
  background-image: var(--select-arrow-image);
  background-position: calc(100% - 1.3rem) 55%, calc(100% - 0.95rem) 55%;
  background-size: 0.36rem 0.36rem, 0.36rem 0.36rem; background-repeat: no-repeat;
}
@media (forced-colors: active) { .select { appearance: auto; background-image: none; } .field__control::after { display: none; } }
/* Messages: field-validation-valid (empty, hidden) / field-validation-error (text with icon). */
.field-message { display: flex; gap: var(--sp-1-5); align-items: flex-start; margin: 0; color: var(--danger); font-weight: var(--fw-semibold); line-height: var(--lh-snug); font-size: var(--fs-message); }
.field-message .icon { width: 1.125rem; height: 1.125rem; margin-top: 0.0625rem; stroke-width: var(--icon-stroke); }
.field-message.field-validation-valid, .field-message:empty { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .field-message.field-validation-error { animation: msg-in var(--dur-base) var(--ease-out); }
  @keyframes msg-in { from { opacity: 0; transform: translateY(calc(-1 * var(--sp-1))); } to { opacity: 1; transform: none; } }
}
.field--error > .label { color: var(--danger-ink); }

/* Contact pair: e-mail - alebo - telefón */
.contact-pair { display: grid; gap: var(--sp-1); }
.or { margin: 0; color: var(--text-muted); font-weight: var(--fw-medium); font-size: var(--fs-sm); display: flex; align-items: center; gap: var(--sp-3); }
.or::after { content: ""; height: var(--border-w-thin); background: var(--border); flex: 1; max-width: 3rem; }
.contact-pair .field + .or { margin-top: 0; }
.contact-pair .or + .field { margin-top: 0; }
@media (min-width: 40em) {
  .contact-pair { grid-template-columns: minmax(0, 1.3fr) auto minmax(0, 1fr); align-items: start; gap: var(--sp-4); }
  .contact-pair .or { padding-top: 2.45rem; }
  .contact-pair .or::after { display: none; }
  .contact-pair .field__control { max-width: none; }
}
.group-error { margin-top: var(--sp-3); }
.field > .actions { margin-top: var(--sp-1-5); }

/* VIN input (home) */
.vin-form { display: grid; gap: var(--sp-3); }
.vin-form__row { display: grid; gap: var(--sp-3); }
.vin-form__control { display: grid; gap: var(--sp-1-5); }
@media (min-width: 48em) { .vin-form__row { grid-template-columns: 1fr auto; align-items: start; } .vin-form__row .btn { min-height: var(--control-h-lg); } }
.input--vin {
  min-height: var(--control-h-lg); padding-inline: var(--sp-4); font-family: var(--font-mono); font-weight: var(--fw-vin);
  font-size: var(--fs-vin-input); letter-spacing: var(--ls-vin-input); text-transform: uppercase; color: var(--heading);
  font-variant-numeric: tabular-nums slashed-zero; font-variant-ligatures: none;
}
@media (max-width: 22.5em) { .input--vin { letter-spacing: var(--ls-vin); } }
.counter { margin: 0; min-height: 1.5em; font-size: var(--fs-sm); color: var(--text-muted); }
.counter strong { color: var(--heading); font-variant-numeric: tabular-nums; }
.counter--over { color: var(--danger); font-weight: var(--fw-semibold); display: flex; gap: var(--sp-1-5); align-items: center; }
.counter--over .icon { width: 1.125rem; height: 1.125rem; }

/* --- Checkboxes (tick drawn with borders - no image, colour from tokens) ------------ */
.check { display: grid; grid-template-columns: var(--check-size) 1fr; gap: var(--sp-3); align-items: start; }
.check__input {
  appearance: none; -webkit-appearance: none; display: inline-grid; place-content: center; width: var(--check-size); height: var(--check-size); margin: var(--sp-0-5) 0 0;
  border: var(--border-w) solid var(--field-border); border-radius: var(--radius-check); background: var(--field-bg); cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
}
.check__input::before {
  content: ""; width: 0.4rem; height: 0.78rem; margin-top: -0.18rem; transform: rotate(45deg) scale(0);
  border: solid var(--check-mark); border-width: 0 var(--border-w) var(--border-w) 0;
  transition: transform var(--dur-fast) var(--ease-out);
}
.check__input:hover { border-color: var(--field-border-hover); }
.check__input:checked { background-color: var(--primary); border-color: var(--primary); }
.check__input:checked::before { transform: rotate(45deg) scale(1); }
.check__input:focus-visible { box-shadow: var(--focus-ring); }
.check__label { cursor: pointer; padding-top: var(--sp-0-5); line-height: var(--lh-body); }
@media (forced-colors: active) { .check__input { appearance: auto; width: 1.5rem; height: 1.5rem; } .check__input::before { display: none; } }

.declaration {
  background: var(--declaration-bg); border: var(--border-w-thin) solid var(--declaration-border);
  border-radius: var(--radius-card); padding: var(--sp-4) var(--sp-4);
  transition: background-color var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard);
}
@media (min-width: 40em) { .declaration { padding: var(--sp-4-5) var(--sp-5); } }
.declaration .check__label { text-align: left; }
/* the VIN in the declaration is the <strong> of the resource text [CorrectnessConfirmation] (as .vin--inline). */
.declaration .check__label > strong {
  font-family: var(--font-mono); font-weight: var(--fw-vin); font-size: var(--fs-vin-inline); letter-spacing: var(--ls-vin);
  color: var(--heading); font-variant-ligatures: none; font-variant-numeric: tabular-nums slashed-zero; overflow-wrap: anywhere;
}
.declaration:has(.check__input:checked), .declaration.is-checked { background: var(--declaration-checked-bg); border-color: var(--declaration-checked-border); }
.legal-warning { color: var(--text); }
.check--boxed { padding: var(--sp-3) var(--sp-3-5); border: var(--border-w-thin) solid var(--border); border-radius: var(--radius-tile); background: var(--surface-sunken); transition: background-color var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard); }
.check--boxed:has(.check__input:checked), .check--boxed.is-checked { background: var(--primary-tint); border-color: var(--primary-tint-border); }

/* --- Category notice of the VIN detail --------------------------------------
   A white card with a thin accent on the left, a small icon, the heading and a status line, the legal text in the
   body colour, the checkbox in a quiet panel. Ticked (:has() or .is-confirmed set by public.js) it shows the confirmed
   state: green accent, a check instead of the warning sign and "Potvrdené", never told by colour alone. */
/* No coloured stripe on the left; the checkbox panel carries the state: amber until ticked, green when confirmed. */
.notice { position: relative; }
.notice .check--boxed { background: var(--pending-tint); border-color: var(--pending-border); transition: background-color var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard); }
.notice__head { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--sp-3); row-gap: var(--sp-0-5); align-items: center; }
.notice__icon {
  grid-row: 1 / span 2; flex: none; width: 2.25rem; height: 2.25rem; border-radius: var(--radius-round); display: grid; place-items: center;
  background: var(--notice-icon-bg); color: var(--notice-icon-fg);
  transition: background-color var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard);
}
.notice__icon .icon { width: 1.125rem; height: 1.125rem; }
.notice__icon .icon-done { display: none; stroke-width: var(--icon-stroke-strong); }
.notice__title { font-size: var(--fs-section); letter-spacing: var(--ls-snug); line-height: var(--lh-snug); }
.notice__state { margin: 0; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-muted); line-height: var(--lh-snug); }
.notice__state-done { display: none; }
.notice:has(#agree_warning_chkbox:checked), .notice.is-confirmed { --notice-accent: var(--notice-accent-done); --notice-icon-bg: var(--notice-icon-done-bg); --notice-icon-fg: var(--notice-icon-done-fg); }
.notice:has(#agree_warning_chkbox:checked) .notice__icon .icon-warn, .notice.is-confirmed .notice__icon .icon-warn,
.notice:has(#agree_warning_chkbox:checked) .notice__state-todo, .notice.is-confirmed .notice__state-todo { display: none; }
.notice:has(#agree_warning_chkbox:checked) .notice__icon .icon-done, .notice.is-confirmed .notice__icon .icon-done { display: block; }
.notice:has(#agree_warning_chkbox:checked) .notice__state-done, .notice.is-confirmed .notice__state-done { display: inline; color: var(--success-ink); font-weight: var(--fw-semibold); }
.notice:has(#agree_warning_chkbox:checked) .check--boxed, .notice.is-confirmed .check--boxed { background: var(--success-tint); border-color: var(--success-border); }
@media (forced-colors: active) { .notice::before { background: CanvasText; } }

/* --- Radio tiles (payment method, category): icon left, text, radio right ------------- */
.tiles { display: grid; gap: var(--sp-2-5); }
@media (min-width: 36em) { .tiles--2 { grid-template-columns: 1fr 1fr; gap: var(--sp-3); } }
.tile {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3);
  min-height: var(--tile-h); padding: var(--sp-3) var(--sp-3-5); margin: 0;
  background: var(--tile-bg); border: var(--border-w-thin) solid var(--tile-border); border-radius: var(--radius-tile); cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard), background-color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}
.tile:hover { border-color: var(--tile-border-hover); box-shadow: var(--shadow-control-hover); }
.tile:active { transform: scale(var(--press-scale)); }
.tile__icon { grid-column: 1; grid-row: 1; width: var(--icon-tile); height: var(--icon-tile); display: grid; place-items: center; border-radius: var(--radius-icon); background: var(--tile-icon-bg); color: var(--tile-icon-fg); transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard); }
.tile__icon .icon { width: 1.375rem; height: 1.375rem; stroke-width: var(--icon-stroke-light); }
.tile__text { grid-column: 2; grid-row: 1; display: grid; gap: var(--sp-0-5); }
.tile__title { font-weight: var(--fw-semibold); font-size: var(--fs-md); letter-spacing: var(--ls-snug); color: var(--heading); line-height: var(--lh-snug); }
.tile__hint { font-size: var(--fs-sm); color: var(--text-muted); line-height: var(--lh-snug); }
.tile__input {
  grid-column: 3; grid-row: 1; appearance: none; -webkit-appearance: none; width: var(--check-size); height: var(--check-size); margin: 0; flex: none;
  border: var(--border-w) solid var(--field-border); border-radius: var(--radius-round); background: var(--surface); cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-standard), background var(--dur-fast) var(--ease-standard);
}
.tile__input:checked { border-color: var(--tile-selected-border); background: var(--radio-dot); }
.tile:has(.tile__input:checked), .tile.is-checked { border-color: var(--tile-selected-border); background: var(--tile-selected-bg); box-shadow: var(--tile-selected-ring), var(--shadow-tile-selected); }
.tile:has(.tile__input:checked) .tile__icon, .tile.is-checked .tile__icon { background: var(--tile-icon-selected-bg); color: var(--tile-icon-selected-fg); }
.tile:has(.tile__input:focus-visible), .tile.has-focus { box-shadow: var(--focus-ring); }
.tile:has(.tile__input:checked):has(.tile__input:focus-visible), .tile.is-checked.has-focus { box-shadow: var(--tile-selected-ring), var(--focus-ring); }
.tile__input:focus-visible { box-shadow: var(--shadow-none); }
.tile--compact { grid-template-columns: minmax(0, 1fr) auto; min-height: var(--control-h-lg); }
@media (max-width: 29.99em) { .tile { gap: var(--sp-2-5); padding-inline: var(--sp-3); } .tile__icon { width: 2.25rem; height: 2.25rem; } .tile__icon .icon { width: 1.25rem; height: 1.25rem; } }
.tile--compact .tile__text { grid-column: 1; }
.tile--compact .tile__input { grid-column: 2; }
.tiles--error .tile { border-color: var(--danger); background: var(--field-bg-invalid); }
@media (forced-colors: active) {
  .tile__input { appearance: auto; }
  .tile:has(.tile__input:checked) { outline: var(--focus-width) solid Highlight; }
}

/* --- Alerts / messages ------------------------------------------------------------------ */
.alert {
  display: grid; grid-template-columns: 1.375rem minmax(0, 1fr); gap: var(--sp-3); align-items: start;
  padding: var(--sp-3-5) var(--sp-4); border: var(--border-w-thin) solid var(--border); border-radius: var(--radius-alert); background: var(--surface);
}
.alert > .icon { width: 1.375rem; height: 1.375rem; margin-top: 0.0625rem; }
.alert__body > * + * { margin-top: var(--sp-1-5); }
.alert__title { font-size: var(--fs-base); font-weight: var(--fw-semibold); line-height: var(--lh-snug); color: var(--text); letter-spacing: var(--ls-snug); }
.alert--info { background: var(--info-tint); border-color: var(--info-border); }
.alert--info > .icon { color: var(--info); }
.alert--success { background: var(--success-tint); border-color: var(--success-border); }
.alert--success > .icon { color: var(--success); }
.alert--danger { background: var(--danger-tint); border-color: var(--danger-border); }
.alert--danger > .icon { color: var(--danger); }
.alert--danger .alert__title { color: var(--danger-ink); }
.alert--pending { background: var(--pending-tint); border-color: var(--pending-border); }
.alert--pending > .icon { color: var(--pending); }
.alert--plain { background: var(--surface); border-color: var(--border); box-shadow: var(--card-shadow); }
.alert--plain > .icon { color: var(--primary); }

/* --- Status chips --------------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: var(--sp-1-5); padding: var(--sp-1) var(--sp-2-5) var(--sp-1) var(--sp-2);
  border-radius: var(--radius-chip); border: var(--border-w-thin) solid; font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: var(--fw-semibold); line-height: var(--lh-tight); white-space: nowrap; letter-spacing: 0;
}
.chip .icon { width: 1rem; height: 1rem; stroke-width: var(--icon-stroke); }
.chip--neutral { background: var(--chip-neutral-bg); border-color: var(--chip-neutral-border); color: var(--chip-neutral-fg); }
.chip--pending { background: var(--chip-pending-bg); border-color: var(--chip-pending-border); color: var(--chip-pending-fg); }
.chip--success { background: var(--chip-success-bg); border-color: var(--chip-success-border); color: var(--chip-success-fg); }
.chip--info { background: var(--chip-info-bg); border-color: var(--chip-info-border); color: var(--chip-info-fg); }
@media (max-width: 29.99em) { .chip { font-size: var(--fs-xs); padding: var(--sp-0-5) var(--sp-2) var(--sp-0-5) var(--sp-1-5); } .chip .icon { width: 0.875rem; height: 0.875rem; } }

/* --- Status line of the vehicle bar ----------------------------------------
   A small icon and plain text after the VIN, separated by a hairline from 30em; only the icon differs between
   the states, the text always says the state. */
.vehicle-status { display: inline-flex; align-items: center; gap: var(--sp-1-5); font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: var(--fw-medium); line-height: var(--lh-tight); letter-spacing: 0; color: var(--vehicle-status-fg); white-space: nowrap; }
.vehicle-status .icon { width: 1rem; height: 1rem; stroke-width: var(--icon-stroke-strong); color: var(--vehicle-status-icon); }
.vehicle-status--pending .icon { color: var(--pending); }
.vehicle-status--verifying .icon { color: var(--info); }
.vehicle-status--done .icon { color: var(--success); }
@media (min-width: 30em) { .vehicle-status { padding-left: var(--sp-2-5); border-left: var(--border-w-thin) solid var(--vehicle-bar-border); } }
@media (forced-colors: active) { .vehicle-status .icon { color: CanvasText; } }

/* --- Step indicator: a progress bar - one line + segments on phones, labelled segments from 48em --- */
.steps { margin-bottom: var(--flow-gap); display: grid; gap: var(--sp-2); }
.steps__summary { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); line-height: var(--lh-snug); }
.steps__summary strong { color: var(--heading); font-weight: var(--fw-semibold); }
.steps__list { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--sp-1); }
.steps__item { position: relative; flex: 1 1 0; height: var(--steps-bar-h); border-radius: var(--radius-pill); background: var(--steps-line); max-width: none; }
.steps__item.is-done { background: var(--steps-line-done); }
.steps__item.is-current { background: var(--steps-current-fill); }
.steps__item.is-current.is-done { background: var(--steps-line-done); }
/* every step finished (paid): the whole bar turns green - the success colour */
.steps:has(.steps__item.is-current.is-done) .steps__item { background: var(--steps-complete); }
.steps__marker, .steps__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 48em) {
  .steps { gap: 0; }
  .steps__summary { display: none; }
  .steps__list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--sp-3); }
  .steps__item, .steps__item.is-done, .steps__item.is-current, .steps__item.is-current.is-done, .steps:has(.steps__item.is-current.is-done) .steps__item {
    height: auto; background: none; border-radius: 0;
    display: flex; align-items: center; gap: var(--sp-2); padding-top: var(--sp-3-5);
    font-size: var(--fs-sm); line-height: var(--lh-snug); color: var(--text-muted);
  }
  .steps__item::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--steps-bar-h-lg); border-radius: var(--radius-pill); background: var(--steps-line); }
  .steps__item.is-done::before { background: var(--steps-line-done); }
  .steps__item.is-current::before { background: var(--steps-current-fill); }
  .steps__item.is-current.is-done::before { background: var(--steps-line-done); }
  .steps:has(.steps__item.is-current.is-done) .steps__item::before { background: var(--steps-complete); }
  .steps__marker, .steps__label { position: relative; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
  .steps__marker {
    flex: none; width: 1.5rem; height: 1.5rem; border-radius: var(--radius-round); display: grid; place-items: center;
    font-size: var(--fs-xs); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums;
    background: var(--steps-marker-bg); border: var(--border-w-thin) solid var(--steps-marker-border); color: var(--text-muted);
  }
  .steps__marker .icon { width: 0.85rem; height: 0.85rem; stroke-width: var(--icon-stroke-strong); }
  .steps__item.is-done .steps__marker { background: var(--steps-done-bg); border-color: var(--steps-done-bg); color: var(--steps-done-fg); }
  .steps__item.is-current .steps__marker { background: var(--steps-current-bg); border-color: var(--steps-current-bg); color: var(--steps-current-fg); box-shadow: var(--steps-current-halo); }
  .steps:has(.steps__item.is-current.is-done) .steps__marker { background: var(--steps-complete); border-color: var(--steps-complete); color: var(--on-primary); box-shadow: var(--shadow-none); }
  .steps__item.is-done .steps__label { color: var(--text); }
  .steps__item.is-current .steps__label { color: var(--heading); font-weight: var(--fw-semibold); }
}

/* --- Dialog (typo check) ---------------------------------------------------------- */
.dialog {
  width: min(34rem, calc(100% - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); margin: auto;
  padding: 0; border: 0; border-radius: var(--radius-dialog); box-shadow: var(--shadow-dialog);
  color: var(--text); background: var(--surface); overflow-y: auto; overscroll-behavior: contain;
}
.dialog::backdrop { background: var(--overlay); }
html:has(.dialog[open]) { overflow: hidden; }
.dialog__head {
  display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--sp-3); align-items: center; padding: var(--sp-4) var(--sp-5);
  background: var(--dialog-head-bg); border-bottom: var(--border-w-thin) solid var(--dialog-head-border); color: var(--dialog-head-fg);
}
.dialog__head .icon { width: 2.5rem; height: 2.5rem; padding: var(--sp-2); border-radius: var(--radius-round); background: var(--dialog-icon-bg); color: var(--dialog-icon-fg); }
.dialog__title { color: var(--dialog-head-fg); font-size: var(--fs-h3); line-height: var(--lh-snug); font-weight: var(--fw-bold); letter-spacing: var(--ls-snug); }
.dialog__body { padding: var(--sp-5); display: grid; gap: var(--sp-4); }
.dialog__body p { max-width: none; }
.typed-vin { display: grid; gap: var(--sp-3); padding: var(--sp-4); background: var(--surface-sunken); border: var(--border-w-thin) solid var(--border); border-radius: var(--radius-tile); }
.typed-vin p { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-2); }
.typed-vin .vin { font-size: var(--fs-vin-bar); white-space: normal; word-break: break-all; }
.dialog .hint-list { margin: var(--sp-2) 0 0; padding-left: var(--sp-5); display: grid; gap: var(--sp-2); }
.dialog .hint-list li::marker { color: var(--primary); }
.dialog .btn { width: 100%; }
@media (min-width: 30.01em) { .dialog .btn { width: auto; min-width: 16rem; } }
@media (max-width: 30em) { .dialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); } .dialog__body { padding: var(--sp-4); } .dialog__head { padding: var(--sp-3-5) var(--sp-4); } }
@media (prefers-reduced-motion: no-preference) {
  .dialog[open] { animation: dialog-in var(--dur-base) var(--ease-out); }
  .dialog[open]::backdrop { animation: backdrop-in var(--dur-base) var(--ease-out); }
  @keyframes dialog-in { from { opacity: 0; transform: translateY(var(--sp-2)) scale(0.98); } to { opacity: 1; transform: none; } }
  @keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
}

/* --- Result panel (document issued, order issued, sent) -------------------------------- */
.result {
  background: var(--card-bg); border: var(--border-w-thin) solid var(--card-border);
  border-radius: var(--radius-card); padding: var(--card-pad-y) var(--card-pad-x); box-shadow: var(--card-shadow);
  display: grid; gap: var(--sp-4);
}
.result__head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-2) var(--sp-3-5); align-items: center; }
.result__badge { width: 2.75rem; height: 2.75rem; margin: var(--sp-1); border-radius: var(--radius-round); display: grid; place-items: center; background: var(--result-badge-bg); color: var(--result-badge-fg); box-shadow: var(--result-badge-halo); }
.result__badge .icon { width: 1.375rem; height: 1.375rem; stroke-width: var(--icon-stroke-strong); }
.result__title { font-size: var(--fs-h2); letter-spacing: var(--ls-heading); }
.result__meta { color: var(--text-muted); margin: var(--sp-1) 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--sp-2); }
.result__meta .vin { font-size: var(--fs-vin); }
.result__actions { display: grid; gap: var(--sp-2-5); }
@media (min-width: 40em) { .result__actions--2 { grid-template-columns: 1fr 1fr; gap: var(--sp-3); } }
.result--info .result__badge { background: var(--result-info-accent); color: var(--on-primary); box-shadow: var(--result-info-halo); }
.result__badge--danger { background: var(--danger); color: var(--on-danger); box-shadow: var(--result-danger-halo); }
.result-pair { display: grid; gap: var(--flow-gap); }
@media (min-width: 48em) { .result-pair { grid-template-columns: 1fr 1fr; align-items: stretch; } }

/* --- Download item (big tap target for a document action) -------------------------------- */
.download {
  display: grid; grid-template-columns: var(--icon-tile) minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3);
  width: 100%; min-height: var(--download-h); padding: var(--sp-2-5) var(--sp-4) var(--sp-2-5) var(--sp-2-5); margin-inline: 0; margin-bottom: 0;
  font: inherit; text-align: left; text-decoration: none; color: var(--text);
  background: var(--download-bg); border: var(--border-w-thin) solid var(--download-border); border-radius: var(--radius-tile); cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: background-color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}
.download:hover { border-color: var(--download-hover-border); background: var(--download-hover-bg); color: var(--text); text-decoration: none; }
.download:active, .download.is-pressed { background: var(--download-active-bg); transform: scale(var(--press-scale)); }
.download__icon { width: var(--icon-tile); height: var(--icon-tile); display: grid; place-items: center; border-radius: var(--radius-icon); background: var(--download-icon-bg); color: var(--download-icon-fg); }
.download__icon .icon { width: 1.375rem; height: 1.375rem; stroke-width: var(--icon-stroke-light); }
.download__text { display: grid; gap: var(--sp-0-5); }
.download__title { font-weight: var(--fw-semibold); font-size: var(--fs-md); letter-spacing: var(--ls-snug); line-height: var(--lh-snug); }
.download__go { width: 1.375rem; height: 1.375rem; color: var(--download-go); transition: transform var(--dur-fast) var(--ease-standard); }
@media (prefers-reduced-motion: no-preference) { .download:hover .download__go { transform: translateX(var(--sp-0-5)); } }
.download--primary { background: var(--btn-primary-bg); border-color: var(--btn-primary-bg); color: var(--btn-primary-fg); box-shadow: var(--btn-primary-shadow); }
.download--primary:hover { background: var(--btn-primary-bg-hover); border-color: var(--btn-primary-bg-hover); color: var(--btn-primary-fg); box-shadow: var(--btn-primary-shadow-hover); }
.download--primary:active, .download--primary.is-pressed { background: var(--btn-primary-bg-active); border-color: var(--btn-primary-bg-active); box-shadow: var(--shadow-none); }
.download--primary .download__icon { background: var(--on-primary-soft); color: var(--btn-primary-fg); }
.download--primary .download__go { color: var(--btn-primary-fg); }
.download:focus-visible { box-shadow: var(--focus-ring); }

/* --- Payment details with copy buttons (optional bank-details page) ------------------------ */
.paydetails { display: grid; gap: 0; }
.paydetails__row { display: grid; gap: var(--sp-1); padding-block: var(--sp-3); border-bottom: var(--border-w-thin) solid var(--border); }
.paydetails__row:first-child { padding-top: 0; }
.paydetails__row:last-child { border-bottom: 0; padding-bottom: 0; }
.paydetails dt { font-size: var(--fs-sm); color: var(--text-muted); font-weight: var(--fw-medium); }
.paydetails dd { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--sp-2) var(--sp-3); }
.paydetails dd > :only-child { grid-column: 1 / -1; }
.paydetails__value { font-weight: var(--fw-semibold); font-size: var(--fs-md); color: var(--heading); }
.paydetails__value--mono { font-family: var(--font-mono); letter-spacing: var(--ls-vin); font-variant-numeric: tabular-nums; overflow-wrap: normal; word-break: normal; }
.paydetails__value--amount { font-size: var(--fs-h2); font-weight: var(--fw-amount); letter-spacing: var(--ls-tight); font-variant-numeric: tabular-nums; }
.copy-btn {
  display: inline-flex; align-items: center; gap: var(--sp-1-5); min-height: var(--target); padding: 0 var(--sp-3);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--btn-secondary-fg);
  background: var(--btn-secondary-bg); border: var(--border-w-thin) solid var(--btn-secondary-border); border-radius: var(--radius-button); cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: background-color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}
.copy-btn .icon { width: 1.125rem; height: 1.125rem; }
.copy-btn:hover { background: var(--btn-secondary-bg-hover); border-color: var(--btn-secondary-border-hover); }
.copy-btn:focus-visible { box-shadow: var(--focus-ring); }
.copy-btn:active { background: var(--btn-secondary-bg-active); transform: translateY(var(--press-offset)); }
.copy-btn.is-copied { background: var(--copy-done-bg); border-color: var(--copy-done-border); color: var(--copy-done-fg); }
.copy-btn__idle, .copy-btn__done { display: inline-flex; align-items: center; gap: var(--sp-1-5); white-space: nowrap; }
.copy-btn__done { display: none; }
.copy-btn.is-copied .copy-btn__idle { display: none; }
.copy-btn.is-copied .copy-btn__done { display: inline-flex; }
@media (prefers-reduced-motion: no-preference) {
  .copy-btn.is-copied .copy-btn__done .icon { animation: copy-pop var(--dur-pop) var(--ease-out); }
  @keyframes copy-pop { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); } }
}
.payorder { display: grid; gap: var(--sp-5); }
@media (min-width: 48em) { .payorder { grid-template-columns: minmax(0, 1fr) 15rem; align-items: start; gap: var(--sp-6); } }
.payorder__notes { margin: 0; padding-left: var(--sp-5); display: grid; gap: var(--sp-1); }

/* --- PAY by square (frame image + QR code) --------------------------------------- */
.qr { margin: 0; display: grid; justify-items: center; gap: var(--sp-2); padding: var(--sp-4); background: var(--surface-sunken); border: var(--border-w-thin) solid var(--border); border-radius: var(--radius-tile); }
.qr__frame { position: relative; width: 12.5rem; aspect-ratio: 253 / 293; background: var(--qr-bg) url("../../Content/Images/pay_by_square_frame.png") center / 100% 100% no-repeat; border-radius: var(--radius-xs); }
.qr__code { position: absolute; left: 9.49%; top: 7.85%; width: 80.2%; height: auto; aspect-ratio: 1; fill: var(--qr-ink); }
.qr figcaption { font-size: var(--fs-sm); color: var(--text-muted); text-align: center; max-width: 16rem; }
@media (forced-colors: active) { .qr__frame { forced-color-adjust: none; } }

/* --- PZP partner offer: prominent call to action, clearly a partner box ---------------- */
/* Own sky-blue palette and a pill-shaped button, so the offer does not look like a step of the process; always after
   the documents and "Čo bude nasledovať?". */
.pzp-offer {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-3) var(--sp-4); align-items: center;
  padding: var(--card-pad-y) var(--card-pad-x);
  background-color: var(--pzp-bg); background-image: var(--pzp-bg-image); color: var(--pzp-text);
  border: var(--border-w-thin) solid var(--pzp-border); border-radius: var(--pzp-radius); box-shadow: var(--card-shadow);
}
.pzp-offer__icon {
  width: 3.5rem; height: 3.5rem; border-radius: var(--radius-lg); display: grid; place-items: center;
  background: var(--pzp-icon-bg); color: var(--pzp-icon-fg); border: var(--border-w-thin) solid var(--pzp-icon-border); box-shadow: var(--shadow-xs);
}
.pzp-offer__icon .icon { width: 2.25rem; height: 2.25rem; stroke-width: var(--icon-stroke-light); }
.pzp-offer__title { font-size: var(--fs-h3); line-height: var(--lh-snug); font-weight: var(--fw-heading); color: var(--pzp-title); letter-spacing: var(--ls-snug); text-wrap: pretty; }
.pzp-offer__cta {
  grid-column: 1 / -1; justify-self: stretch;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--control-h-lg); padding: var(--sp-2-5) var(--sp-6);
  font-size: var(--fs-md); font-weight: var(--fw-semibold); line-height: var(--lh-tight); letter-spacing: var(--ls-snug); text-align: center; text-decoration: none;
  color: var(--pzp-btn-fg); background: var(--pzp-btn-bg); border: var(--border-w-thin) solid var(--pzp-btn-bg); border-radius: var(--pzp-btn-radius);
  box-shadow: var(--pzp-btn-shadow);
  transition: background-color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}
.pzp-offer__cta .icon { width: 1.25rem; height: 1.25rem; transition: transform var(--dur-fast) var(--ease-standard); }
.pzp-offer__cta:hover { color: var(--pzp-btn-fg); background: var(--pzp-btn-bg-hover); border-color: var(--pzp-btn-bg-hover); text-decoration: none; }
.pzp-offer__cta:active { background: var(--pzp-btn-bg-active); border-color: var(--pzp-btn-bg-active); transform: translateY(var(--press-offset)); box-shadow: var(--shadow-none); }
.pzp-offer__cta:focus-visible { color: var(--pzp-btn-fg); background: var(--pzp-btn-bg); outline-color: transparent; box-shadow: var(--pzp-focus-ring, var(--focus-ring)); border-radius: var(--pzp-btn-radius); text-decoration: none; }
@media (prefers-reduced-motion: no-preference) { .pzp-offer__cta:hover .icon { transform: translateX(var(--sp-0-5)); } }
@media (min-width: 40em) {
  .pzp-offer { grid-template-columns: auto minmax(0, 1fr); column-gap: var(--sp-5); }
  .pzp-offer__icon { grid-row: 1 / span 2; align-self: start; width: 4rem; height: 4rem; }
  .pzp-offer__icon .icon { width: 2.5rem; height: 2.5rem; }
  .pzp-offer__cta { grid-column: 2; justify-self: start; }
  .pzp-offer--no-cta .pzp-offer__icon { grid-row: auto; align-self: center; }
}

/* --- "Čo bude nasledovať?" - numbered timeline ------------------------------------------- */
.next { display: grid; gap: var(--sp-3); }
.next > h2 { font-size: var(--fs-section); letter-spacing: var(--ls-snug); }
.next__list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); counter-reset: next; }
.next__list li { position: relative; padding-left: 2.5rem; padding-top: var(--sp-0-5); min-height: 1.75rem; counter-increment: next; }
.next__list li::before {
  content: counter(next); position: absolute; left: 0; top: 0; width: 1.75rem; height: 1.75rem; border-radius: var(--radius-round);
  display: grid; place-items: center; font-size: var(--fs-xs); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums;
  color: var(--info); background: var(--info-tint); border: var(--border-w-thin) solid var(--info-border);
}
.next__list li:not(:last-child)::after { content: ""; position: absolute; left: 0.875rem; top: 1.875rem; bottom: calc(-1 * var(--sp-3) + var(--sp-1)); width: var(--border-w-thin); background: var(--info-border); }

/* --- FAQ: intro, jump list, grouped accordion ------------------ */
.faq-toc { padding-block: var(--sp-2); }
.faq-toc__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.faq-toc__list li { max-width: none; border-bottom: var(--border-w-thin) solid var(--border); }
.faq-toc__list li:last-child { border-bottom: 0; }
.faq-toc__list a {
  display: flex; align-items: center; gap: var(--sp-2-5); min-height: var(--target); padding: var(--sp-2) var(--sp-2); margin-inline: calc(-1 * var(--sp-2));
  font-weight: var(--fw-medium); text-decoration: none; border-radius: var(--radius-sm);
  transition: background-color var(--dur-fast) var(--ease-standard);
}
.faq-toc__list a:hover { background: var(--surface-hover); text-decoration: underline; }
.faq-toc__list a .icon { width: 1rem; height: 1rem; flex: none; }
@media (min-width: 48em) { .faq-toc__list { grid-template-columns: 1fr 1fr; column-gap: var(--sp-6); } .faq-toc__list li:nth-last-child(2):nth-child(odd) { border-bottom: 0; } }
.faq-group + .faq-group { margin-top: var(--flow-gap); }
.faq-group__title { margin-bottom: var(--sp-2); font-size: var(--fs-section); }
/* Photos of the three-wheeled L2e vehicles (faq-trojkolesove): two or four in a row. */
.faq-photos { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); margin-block: var(--sp-2) var(--sp-3); }
.faq-photos figure { margin: 0; }
.faq-photos img { display: block; width: 100%; height: auto; border: var(--border-w-thin) solid var(--border); border-radius: var(--radius-tile); background: #fff; }
.faq-photos figcaption { margin-top: var(--sp-1-5); font-size: var(--fs-sm); color: var(--text-muted); line-height: var(--lh-snug); }
.accordion { border-top: var(--border-w-thin) solid var(--border); }
.card > .accordion:first-child { border-top: 0; }
.accordion__item { border-bottom: var(--border-w-thin) solid var(--border); scroll-margin-top: var(--sp-4); }
.card > .accordion > .accordion__item:last-child { border-bottom: 0; }
.accordion__summary {
  list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) 2rem; gap: var(--sp-3); align-items: center;
  min-height: 3.5rem; padding: var(--sp-3) 0; cursor: pointer; color: var(--heading); border-radius: var(--radius-sm);
}
.accordion__summary::-webkit-details-marker { display: none; }
.accordion__summary h2, .accordion__summary h3 { font-size: var(--fs-md); line-height: var(--lh-snug); font-weight: var(--fw-semibold); color: inherit; letter-spacing: var(--ls-snug); }
.accordion__summary .icon {
  width: 2rem; height: 2rem; padding: var(--sp-1-5); border-radius: var(--radius-round); background: var(--surface-muted); color: var(--text-muted);
  transition: transform var(--dur-base) var(--ease-standard), background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.accordion__item[open] > .accordion__summary .icon { transform: rotate(180deg); background: var(--primary-tint); color: var(--primary); }
.accordion__summary:hover { color: var(--link); }
.accordion__summary:hover .icon { background: var(--primary-tint); color: var(--primary); }
.accordion__summary:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
.accordion__panel { padding: 0 0 var(--sp-4); }
@media (min-width: 48em) { .accordion__panel { padding-right: var(--sp-7); } }
.accordion__panel > * + * { margin-top: var(--sp-3); }
.accordion__panel ul { display: grid; gap: var(--sp-2); }
.accordion__panel li::marker { color: var(--primary); }

/* --- Actions area: fee summary, the submit buttons, why the button is not active yet -------- */
.actions { display: grid; gap: var(--sp-3); justify-items: start; }
.actions .btn { min-width: min(100%, 16rem); }
@media (max-width: 39.99em) { .actions .btn { width: 100%; } }
.actions__hint { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }
.actions__hint ul { margin: var(--sp-1) 0 0; padding-left: var(--sp-5); }
.actions__hint li { margin-top: var(--sp-0-5); }
.actions__outcome { display: flex; gap: var(--sp-2); align-items: flex-start; font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }
.actions__outcome .icon { width: 1.125rem; height: 1.125rem; margin-top: 0.0625rem; color: var(--primary); }
/* The payment block reads like a checkout summary: a white card with the fee and the button. */
.actions--pay {
  background: var(--card-bg); border: var(--border-w-thin) solid var(--card-border); border-radius: var(--radius-card);
  padding: var(--card-pad-y) var(--card-pad-x); box-shadow: var(--shadow-raised);
}
.pay-summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 var(--sp-3); width: 100%; padding-bottom: var(--sp-3); border-bottom: var(--border-w-thin) solid var(--border); }
.pay-summary__label { margin: 0; font-weight: var(--fw-medium); color: var(--text-muted); }
.pay-summary__value { margin: 0; font-weight: var(--fw-amount); color: var(--heading); font-variant-numeric: tabular-nums; }
.pay-summary__value .fee__amount { font-size: var(--fs-h2); }
@media (min-width: 40em) {
  .actions--pay { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--sp-5); }
  .actions--pay > * { grid-column: 1 / -1; }
  .actions--pay > .pay-summary { grid-column: 1; border-bottom: 0; padding-bottom: 0; justify-content: flex-start; flex-direction: column; }
  .actions--pay > .pay-submit { grid-column: 2; grid-row: 1; justify-self: end; }
}

/* The VIN page shows contact, declaration and the matching "Pokračovať ďalej" once a method is chosen (CSS :has(),
   works without JavaScript); public.js sets data-method as the fallback. */
.pay-details { display: none; }
.pay-form:has(.tile__input[data-method-choice]:checked) .pay-details, .pay-form[data-method] .pay-details { display: grid; gap: var(--flow-gap); }
.pay-form [data-for-method] { display: none; }
.pay-form:has(.tile__input[value="PayEcommerce"]:checked) [data-for-method="PayEcommerce"],
.pay-form:has(.tile__input[value="PayTransaction"]:checked) [data-for-method="PayTransaction"],
.pay-form[data-method="PayEcommerce"] [data-for-method="PayEcommerce"],
.pay-form[data-method="PayTransaction"] [data-for-method="PayTransaction"] { display: flex; }
/* the name of the button in the hint sentence: inline, not a flex row */
.pay-form:has(.tile__input[value="PayEcommerce"]:checked) .pay-label[data-for-method="PayEcommerce"],
.pay-form:has(.tile__input[value="PayTransaction"]:checked) .pay-label[data-for-method="PayTransaction"],
.pay-form[data-method="PayEcommerce"] .pay-label[data-for-method="PayEcommerce"],
.pay-form[data-method="PayTransaction"] .pay-label[data-for-method="PayTransaction"] { display: inline; }
/* M1/N1 choice and several manufacturers: the fee and the payment wait for the choice, also without JavaScript. */
.pay-form:has([data-reveal-choice]):not(:has(input[data-reveal-choice]:checked, select[data-reveal-choice] option:checked:not([value="default"]))):not(.has-choice) [data-after-choice] { display: none; }
/* Without JavaScript the button appears only after the required boxes are ticked (with JS it is disabled instead). */
html:not(.js) .pay-form:not(:has(#agree_chkbox:checked)) .pay-submit,
html:not(.js) .pay-form:has(#agree_warning_chkbox:not(:checked)) .pay-submit { display: none !important; }
@media (prefers-reduced-motion: no-preference) {
  .pay-form:has(.tile__input[data-method-choice]:checked) .pay-details, .pay-form[data-method] .pay-details { animation: reveal-in var(--dur-base) var(--ease-out); }
  @keyframes reveal-in { from { opacity: 0; transform: translateY(var(--sp-1-5)); } to { opacity: 1; transform: none; } }
}

/* --- Page flows inside one form (payment order, paid page) ---------------------------------- */
.flow-form { display: flex; flex-direction: column; gap: var(--flow-gap); }

/* --- VIN detail layout: one column; two columns on wide desktops (vehicle card left) -------- */
.vin-detail { display: flex; flex-direction: column; gap: var(--flow-gap); }
.vin-detail__main { display: flex; flex-direction: column; gap: var(--flow-gap); }
/* the method tiles and the details form one block that the fee logic shows or hides (public.js). */
.vin-detail__payment { display: flex; flex-direction: column; gap: var(--flow-gap); }
@media (min-width: 75em) {
  .layout-vin { --container: var(--container-wide); }
  .vin-detail { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); column-gap: var(--sp-6); row-gap: var(--flow-gap); align-items: start; }
  .vin-detail > .alert { grid-column: 1 / -1; }
  .vin-detail > .vehicle-card { grid-column: 1; position: sticky; top: var(--sp-4); }
  .vin-detail > .vin-detail__main { grid-column: 2; }
}

/* --- Contact cards (Kontakty) ------------------------------------------------------------- */
.contact-cards { display: grid; gap: var(--flow-gap); }
@media (min-width: 48em) { .contact-cards { grid-template-columns: 1fr 1fr; } .contact-cards > :last-child { grid-column: 1 / -1; } }
.contact-card { display: grid; grid-template-columns: var(--icon-tile) minmax(0, 1fr); gap: var(--sp-3) var(--sp-4); align-items: start; }
.contact-card__icon { width: var(--icon-tile); height: var(--icon-tile); border-radius: var(--radius-icon); display: grid; place-items: center; background: var(--primary-tint); color: var(--primary); }
.contact-card__icon .icon { width: 1.375rem; height: 1.375rem; stroke-width: var(--icon-stroke-light); }
.contact-card h2 { font-size: var(--fs-section); letter-spacing: var(--ls-snug); margin-bottom: var(--sp-1-5); }
.contact-card p + p { margin-top: var(--sp-1); }
.contact-email { font-weight: var(--fw-semibold); font-size: var(--fs-md); color: var(--heading); user-select: all; }
.contact-card .ext-link { display: inline-flex; align-items: center; min-height: var(--target); }
@media (max-width: 29.99em) { .contact-card { grid-template-columns: minmax(0, 1fr); } }

/* --- Information pages: prose sections ------------- */
.prose > * + * { margin-top: var(--sp-3); }
.prose h2 { margin-top: var(--sp-5); }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { display: grid; gap: var(--sp-2); }
.info-sections { display: grid; gap: var(--flow-gap); }
.info-section > h2 { font-size: var(--fs-section); letter-spacing: var(--ls-snug); }
.info-section > h2 + * { margin-top: var(--sp-2); }
.info-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); counter-reset: info-step; }
.info-steps > li { position: relative; padding-left: 3rem; max-width: none; counter-increment: info-step; }
.info-steps > li::before {
  content: counter(info-step); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; border-radius: var(--radius-round);
  display: grid; place-items: center; font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; color: var(--steps-current-fg); background: var(--steps-current-bg);
}
.info-steps h3 { margin-bottom: var(--sp-1); }

/* --- Error page -------------------------------------------------------------------------- */
.error-page { display: grid; gap: var(--sp-4); justify-items: start; }
.error-page .result__badge { margin: var(--sp-1) var(--sp-1) 0; }

/* --- Redirect notice and cookie consent bar ---------------------- */
.redirect-notice { position: relative; overflow: hidden; }
.redirect-notice .btn { margin-top: var(--sp-1); }
/* a thin bar that empties in 30 s - the same time limit, shown; "Zostať na tejto stránke" stops it */
.redirect-notice::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--steps-bar-h-lg); background: var(--primary); transform-origin: left center; }
@media (prefers-reduced-motion: no-preference) {
  .redirect-notice::after { animation: countdown var(--dur-countdown) linear forwards; }
  @keyframes countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
}
/* The bar sits directly above the footer: a hairline on top, never over the content or the footer links. */
.consent { background: var(--consent-bg); color: var(--consent-fg); border-top: var(--border-w-thin) solid var(--consent-border); box-shadow: var(--consent-shadow); }
.consent__inner { display: grid; gap: var(--sp-3); padding-block: var(--sp-4); }
.consent__title { font-size: var(--fs-h3); display: flex; align-items: center; gap: var(--sp-2-5); }
.consent__inner > p { max-width: none; }
.consent__title::before { content: ""; flex: none; width: 2.25rem; height: 2.25rem; border-radius: var(--radius-icon); background: var(--consent-icon-bg) url("img/icon-cookie.svg") center / 1.375rem no-repeat; }
.consent__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.consent__actions .btn { flex: 1 1 14rem; }
/* phones: a compact bar - two buttons in a row, 44 px high */
@media (max-width: 47.99em) { .consent__title::before { width: 1.75rem; height: 1.75rem; background-size: 1.125rem; } .consent__actions .btn { flex: 1 1 9rem; min-height: var(--target); padding-inline: var(--sp-3); } }
@media (min-width: 48em) { .consent__inner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--sp-6); } .consent__inner > :not(.consent__actions) { grid-column: 1; } .consent__actions { grid-column: 2; grid-row: 1 / span 3; flex-direction: column; align-self: center; } .consent__actions .btn { flex: none; } }
@media (forced-colors: active) { .consent__title::before { display: none; } }

/* --- Page-specific pieces ------------------------------------------------------------------ */
/* The home page is only the heading and the VIN form, centred horizontally; from 40em wide and 32em high (tablets,
   desktops) the form card sits in the vertical middle between the header and the footer, on phones it starts at
   the top (the field stays above the keyboard). */
.home { width: 100%; max-width: var(--home-width); margin-inline: auto; text-align: center; }
.home .page-head { margin-bottom: 0; }
.home .vin-form { text-align: left; }
.home__title { font-size: var(--fs-h1); }
/* The heading is the resource text [MainSubheader]: its <span> is the second line, its <br> is not needed. */
.home__title br { display: none; }
.home__subtitle, .home__title > span { display: block; margin: var(--sp-2-5) auto 0; font-size: var(--fs-lg); line-height: var(--lh-snug); font-weight: var(--fw-regular); color: var(--text-muted); letter-spacing: 0; max-width: 40ch; text-wrap: pretty; }
.home .vin-form { margin-top: var(--flow-gap); box-shadow: var(--shadow-raised); }
@media (min-width: 40em) and (min-height: 32em) {
  .page-home .site-main { display: flex; flex-direction: column; padding-block: var(--sp-6); }
  .page-home .site-main > .container { flex: 1 0 auto; display: flex; flex-direction: column; }
  /* rows: the heading at the bottom of the upper half, the card in the middle, an equal empty lower half */
  .page-home .home { flex: 1 0 auto; display: grid; grid-template-rows: minmax(min-content, 1fr) auto 1fr; }
  .page-home .home > .page-head { align-self: end; margin-bottom: var(--flow-gap); }
  .page-home .home > .vin-form { grid-row: 2; margin-top: 0; }
}
.label--lg { font-size: var(--fs-h3); font-weight: var(--fw-semibold); }
.inline-submit { display: grid; gap: var(--sp-3); }
@media (min-width: 36em) { .inline-submit { grid-template-columns: minmax(0, 30rem) auto; align-items: start; } }
.email-addr { overflow-wrap: anywhere; }
.send-form .h2 label { cursor: default; }
/* Home: a faint measuring grid behind the hero, fading out - purely decorative. */
.page-home .site-main { position: relative; isolation: isolate; }
.page-home .site-main::before {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: 26rem; pointer-events: none;
  background-image: var(--home-backdrop); background-size: var(--home-backdrop-size); background-position: center top;
  -webkit-mask-image: var(--home-backdrop-fade); mask-image: var(--home-backdrop-fade);
}
@media (forced-colors: active) { .page-home .site-main::before { display: none; } }

/* --- Further pieces ------------------------------- */
/* Information pages: the tagline [MainSubheader2] as the resource text (its <br> is not needed, the <strong> is a
   block); tables and law quotations; the small print of the PZP page. */
.service-bar__inner br { display: none; }
.table-wrap { width: 100%; }
.info-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); line-height: var(--lh-snug); }
.info-table th, .info-table td { text-align: left; vertical-align: top; padding: var(--sp-2-5) var(--sp-3); border-bottom: var(--border-w-thin) solid var(--border); overflow-wrap: anywhere; }
.info-table thead th { background: var(--surface-muted); color: var(--heading); font-weight: var(--fw-semibold); }
.info-table tbody th { font-weight: var(--fw-semibold); color: var(--heading); }
@media (max-width: 29.99em) { .info-table th, .info-table td { padding: var(--sp-2) var(--sp-2); } }
.legal-quote { margin: 0; padding: var(--sp-3) var(--sp-4); border-left: var(--border-w-thick) solid var(--primary-tint-border); background: var(--surface-sunken); border-radius: var(--radius-sm); }
.legal-quote > * + * { margin-top: var(--sp-2); }
.legal-quote__source { font-size: var(--fs-sm); color: var(--text-muted); }
.legal-details > .accordion__summary { padding: 0; min-height: var(--target); }
.legal-details[open] > .accordion__summary { margin-bottom: var(--sp-3); }
.legal-details[open] > .accordion__summary .icon { transform: rotate(180deg); background: var(--primary-tint); color: var(--primary); }
.legal-details > .accordion__panel { padding-bottom: 0; }
.small-print { font-size: var(--fs-sm); color: var(--text-muted); }
.page-head > .chip { margin-bottom: calc(-1 * var(--sp-1)); }
.info-section ul, .info-section ol:not(.info-steps) { display: grid; gap: var(--sp-2); }
.info-steps > li > ul { margin-top: var(--sp-2); display: grid; gap: var(--sp-1-5); }

/* The consent bar: three equally prominent buttons; the settings dialog with the categories; the short confirmation
   "Nastavenia sme uložili."; the footer button that opens the settings again, drawn as a footer link. */
@media (min-width: 48em) { .consent__actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; max-width: 30rem; } .consent__actions .btn { flex: 1 1 auto; } }
.dialog--consent .dialog__head { background: var(--surface-sunken); border-bottom-color: var(--border); }
.dialog--consent .dialog__title { color: var(--heading); }
.dialog--consent .dialog__head .icon { background: var(--primary-tint); color: var(--primary); }
.consent-category { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--sp-1) var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); border: var(--border-w-thin) solid var(--border); border-radius: var(--radius-tile); background: var(--surface); }
.consent-category .check__input { grid-row: 1; }
.consent-category__name { font-weight: var(--fw-semibold); color: var(--heading); cursor: pointer; }
.consent-category__state { font-size: var(--fs-sm); color: var(--text-muted); }
.consent-category__text { grid-column: 2 / -1; font-size: var(--fs-sm); color: var(--text-muted); }
.consent-category .check__input:disabled + .consent-category__name { cursor: default; }
.consent-dialog__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.dialog .consent-dialog__actions .btn { width: auto; min-width: 0; flex: 1 1 12rem; }
.consent-toast { position: fixed; left: var(--gutter); bottom: var(--sp-4); z-index: 50; max-width: min(24rem, calc(100% - 2 * var(--gutter))); margin: 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-tile); background: var(--primary); color: var(--on-primary); font-weight: var(--fw-semibold); box-shadow: var(--shadow-raised); }
.consent-toast:empty { padding: 0; box-shadow: none; background: transparent; }
.site-footer__button { display: inline-flex; align-items: center; min-height: var(--target); padding: 0; border: 0; background: transparent; color: var(--footer-fg-strong); font: inherit; font-weight: var(--fw-medium); cursor: pointer; }
.site-footer__button:hover { text-decoration: underline; }
.site-footer__button:focus-visible { outline: var(--focus-width) solid var(--focus-on-dark); outline-offset: var(--sp-0-5); box-shadow: none; }

/* --- VIN scan and the typo protection ---------------
   The scanner button under the VIN field and the privacy note of the scan (an accordion item); the scanner window is
   in css/public/vinscan.css. The hint above the field after "Opraviť VIN". The similar-VIN warning before the payment. */
.vinscan-entry { display: grid; gap: var(--sp-2); }
.vinscan-entry .btn .icon { width: 1.5rem; height: 1.5rem; }
.vinscan-entry .accordion { border-top: 0; }
.vinscan-entry .accordion__item { border-bottom: 0; }
.vinscan-entry .accordion__summary { min-height: var(--target); padding: var(--sp-1-5) 0; }
.vinscan-entry .accordion__summary h3 { font-size: var(--fs-base); font-weight: var(--fw-medium); color: var(--link); }
.vinscan-entry .accordion__summary .icon { width: 1.75rem; height: 1.75rem; padding: var(--sp-1); }
.vinscan-entry .accordion__panel { font-size: var(--fs-sm); color: var(--text-muted); }
.vinscan-entry .accordion__panel ul { margin: 0; padding-left: var(--sp-5); }
.input--vin.vinscan-filled { background-color: var(--success-tint); border-color: var(--success); }
/* Exactly 17 characters: a light green field; more than 17: a light red one (public.js; the counter under the field
   says the same in words). The focus ring stays. */
.input--vin.is-complete { background-color: var(--success-tint); border-color: var(--success); }
.input--vin.is-over { background-color: var(--danger-tint); border-color: var(--danger); }
.vin-fix-hint { margin: 0; }

.dialog--warning { --dialog-head-bg: var(--pending-tint); --dialog-head-border: var(--pending-border); --dialog-head-fg: var(--heading); --dialog-icon-bg: var(--pending); --dialog-icon-fg: var(--on-danger); }
.dialog__head--close { grid-template-columns: 2.5rem minmax(0, 1fr) var(--target); }
.dialog__close {
  display: inline-flex; align-items: center; justify-content: center; width: var(--target); height: var(--target); padding: 0;
  border: 0; border-radius: var(--radius-round); background: transparent; color: var(--text-muted); cursor: pointer;
}
.dialog__close:hover { background: var(--surface-hover); color: var(--text); }
.dialog__close:focus-visible { box-shadow: var(--focus-ring); }
.dialog__head .dialog__close .icon { width: 1.5rem; height: 1.5rem; padding: 0; background: transparent; color: inherit; }
.similar-vins { display: grid; gap: 0; padding: var(--sp-1) var(--sp-4); background: var(--surface-sunken); border: var(--border-w-thin) solid var(--border); border-radius: var(--radius-tile); }
.similar-vins__row { display: grid; gap: var(--sp-0-5); padding-block: var(--sp-2-5); }
.similar-vins__row + .similar-vins__row { border-top: var(--border-w-thin) solid var(--border); }
.similar-vins__label { font-size: var(--fs-xs); font-weight: var(--fw-semibold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--text-muted); }
.similar-vins .vin { white-space: normal; overflow-wrap: anywhere; }
.similar-vins mark { padding: 0 1px; color: var(--heading); background: var(--pending-border); border-radius: var(--radius-xs); }
.similar-vin__actions { display: grid; gap: var(--sp-2-5); }
.dialog .similar-vin__actions .btn { width: 100%; min-width: 0; }
.similar-vin__contact { justify-self: center; display: inline-flex; align-items: center; min-height: var(--target); font-size: var(--fs-sm); }
.similar-vin__error { color: var(--danger-ink); font-weight: var(--fw-semibold); }
@media (min-width: 30.01em) { .similar-vin__actions { grid-template-columns: 1fr 1fr; } .similar-vin__actions > :only-child, .similar-vin__contact { grid-column: 1 / -1; } }

/* ==========================================================================================================================
   Overrides: plain look of the pages (flat cards, 8 px corners, no card shadow, 1120 px container, 800 px forms,
   720 px home card). One layer after every rule above.
   ========================================================================================================================== */

/* --- Common: content column, flat cards, no decorative icon backdrops ------------------------------------------------ */
/* The content uses the whole container (1120 px), so it lines up with the header and the VIN bar and is centred on
   wide screens. */
.site-main > .container > * { max-width: none; }
.site-main > .container > .home { max-width: var(--home-width); }
.home .vin-form, .actions--pay, .tile, .download, .input, .select, .alert--plain { box-shadow: none; }
.section-head > .status-icon:not(.status-icon--warn) { display: none; }
.section-icon, .contact-card__icon { display: none; }
.contact-card { grid-template-columns: minmax(0, 1fr); }
.contact-card > div { margin-top: 0; }
.vehicle-bar { box-shadow: none; }
.vehicle-bar__main::before { display: none; }
.consent__title::before { display: none; }
.tile__icon, .tile:has(.tile__input:checked) .tile__icon, .tile.is-checked .tile__icon { width: auto; height: auto; background: transparent; color: var(--primary); }
.download__icon, .download--primary .download__icon { width: auto; height: auto; background: transparent; }

/* --- Choice groups: payment method and M1 / N1 side by side when the group is wide enough (2 x 17rem + 10 px ~ 554 px) - */
.choice-grid, .tiles--2 { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.tile { border-color: var(--border-strong); }
.tile:hover { border-color: var(--border-hover); box-shadow: none; }
.tile:active { transform: none; }
/* selected: the radio, a dark blue outline (2 px in total) and a light blue tint */
.tile:has(.tile__input:checked), .tile.is-checked { border-color: var(--primary); background: var(--primary-tint); box-shadow: inset 0 0 0 1px var(--primary); }
/* keyboard focus: its own outline outside the tile, visible on the selected tile too */
.tile:has(.tile__input:focus-visible), .tile.has-focus { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; box-shadow: none; }
.tile:has(.tile__input:checked):has(.tile__input:focus-visible), .tile.is-checked.has-focus { box-shadow: inset 0 0 0 1px var(--primary); }

/* --- Home: no grid backdrop; the heading and the one card ~80 px under the header (28 px on phones) ------------------- */
.page-home .site-main::before { display: none; }
.page-home .site-main, .page-home .site-main > .container, .page-home .home { display: block; }
.page-home .site-main { padding-top: 28px; }
.page-home .home > .page-head { margin-bottom: var(--flow-gap); }
.page-home .home > .vin-form { margin-top: 0; }
@media (min-width: 48em) { .page-home .site-main { padding-top: 80px; } }
/* On larger screens the heading and the card sit in the middle between the header and the footer (a little above
   the exact middle, which looks centred); on phones and low windows they stay at the top. */
@media (min-width: 48em) and (min-height: 40em) {
  .page-home .site-main { display: flex; flex-direction: column; padding-block: var(--sp-6); }
  .page-home .site-main > .container { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; }
  .page-home .home { flex: 0 0 auto; padding-bottom: 8vh; }
}
@media (max-width: 47.99em) { .vin-form__row .btn { width: 100%; } }
/* the placeholder "Zadajte VIN vozidla" in the normal text style, not in the uppercase VIN style */
.input--vin::placeholder { font-family: var(--font-sans); font-weight: var(--fw-regular); letter-spacing: normal; text-transform: none; }

/* --- Dialogs (typo check, similar VIN, cookies): a white head with a small icon, the VIN on its own line ---------------- */
.dialog .dialog__head, .dialog--warning .dialog__head { grid-template-columns: 1.5rem minmax(0, 1fr); background: var(--surface); border-bottom-color: var(--border); color: var(--heading); }
.dialog .dialog__head--close { grid-template-columns: 1.5rem minmax(0, 1fr) var(--target); }
.dialog .dialog__title { color: var(--heading); }
.dialog .dialog__head > .icon { width: 1.5rem; height: 1.5rem; padding: 0; border-radius: 0; background: transparent; color: var(--pending); }
.dialog--consent .dialog__head > .icon { color: var(--primary); }
.typed-vin p { display: block; }
.typed-vin .vin { display: block; margin-top: var(--sp-1); }

/* --- VIN detail: one column, the compact summary (manufacturer left, fee right), one form block ------------------------ */
@media (min-width: 75em) {
  .vin-detail { display: flex; flex-direction: column; align-items: stretch; }
  .vin-detail > .vehicle-card { position: static; }
}
.vehicle-card > .section-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* A compact summary that lines up with the form: the manufacturer (28 px, bold) over the left payment tile, the fee
   (28 px) where "Prevod z účtu" starts. The columns follow the payment tiles: they stand side by side from
   2 x 17rem + 10 px (34.625rem) of the group, and the summary splits at the same width (container query). */
.vehicle-card { container-type: inline-size; padding-block: 1.25rem; }
/* the first visible item starts right at the 20 px padding (the hidden fields before it are no reason for a gap) */
.vehicle-card > dl.facts, .vehicle-card > .fee-summary { margin-top: 0; }
.vehicle-card .facts, .fee-summary { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3) 10px; }
.fee-summary { gap: var(--sp-4) 10px; }
.fee-summary > * { margin-top: 0; }
.vehicle-card .fact { padding: 0; background: transparent; border: 0; border-radius: 0; text-align: left; }
.vehicle-card .fact dd { font-size: 1.75rem; font-weight: var(--fw-bold); line-height: var(--lh-tight); }
.vehicle-card .fee__amount { font-size: 1.75rem; }
@container (min-width: 34.625rem) {
  .vehicle-card .facts, .fee-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fee-summary > * { grid-column: 1 / -1; }
  .fee-summary > .field:not(fieldset) { grid-column: 1; }
  .fee-summary > dl.facts[data-fee] { grid-column: 2; grid-row: 1; grid-template-columns: minmax(0, 1fr); }
}
/* the method, the contact and the VIN declaration: one block, separated by space and hairlines (no nested cards) */
.vin-detail__payment { gap: 0; background: var(--card-bg); border: var(--border-w-thin) solid var(--card-border); border-radius: var(--radius-card); padding: var(--card-pad-y) var(--card-pad-x); }
.vin-detail__payment .card { background: transparent; border: 0; border-radius: 0; padding: 0; }
.pay-form .vin-detail__payment .pay-details { gap: 0; }
.vin-detail__payment .pay-details > * { margin-top: var(--flow-gap); padding-top: var(--flow-gap); border-top: var(--border-w-thin) solid var(--border); }
.declaration, .declaration:has(.check__input:checked), .declaration.is-checked { background: transparent; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; padding-inline: 0; padding-bottom: 0; }
/* the closing row: the fee and the main button together (the fee above the button on phones) */
.actions--pay { background: transparent; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; padding-inline: 0; padding-bottom: 0; }

/* The e-mail and the telephone fields are equally wide. */
@media (min-width: 40em) { .contact-pair { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); } }
.contact-pair .field__control--tel { max-width: none; }

/* --- Category notice: one block with a thin warning line, the checkbox right under the legal text ----------------------- */
.notice { border-color: var(--pending-border); }
.notice:has(#agree_warning_chkbox:checked), .notice.is-confirmed { border-color: var(--success); }
.notice .check--boxed, .notice:has(#agree_warning_chkbox:checked) .check--boxed, .notice.is-confirmed .check--boxed { padding: 0; background: transparent; border: 0; border-radius: 0; }
.notice > .legal-warning + .check { margin-top: var(--sp-3); }
.notice__icon, .notice:has(#agree_warning_chkbox:checked) .notice__icon, .notice.is-confirmed .notice__icon { width: 1.5rem; height: 1.5rem; background: transparent; color: var(--pending); }
.notice:has(#agree_warning_chkbox:checked) .notice__icon, .notice.is-confirmed .notice__icon { color: var(--success); }
.notice__icon .icon { width: 1.5rem; height: 1.5rem; }

/* --- Issued confirmation: one green check, saving is the main action, the rest are secondary rows ----------------------- */
.result__badge, .result--info .result__badge, .result__badge--danger { width: auto; height: auto; margin: 0; background: transparent; box-shadow: none; color: var(--success); }
.result--info .result__badge { color: var(--primary); }
.result__badge--danger { color: var(--danger); }
.result__badge .icon { width: 1.75rem; height: 1.75rem; }
.result-pair > .result + .result .result__badge { color: var(--primary); } /* one green check only: the e-mail result keeps the brand colour */
.result__actions { gap: 0; }
.download--primary { margin-bottom: var(--sp-3); }
.download:not(.download--primary) { min-height: 3.5rem; padding-inline: var(--sp-1); background: transparent; border: 0; border-top: var(--border-w-thin) solid var(--border); border-radius: 0; }
.download:not(.download--primary):last-child { border-bottom: var(--border-w-thin) solid var(--border); }
.download:not(.download--primary):hover { background: var(--surface-hover); }
.download:not(.download--primary):active { transform: none; }
.download:not(.download--primary) .download__icon { color: var(--primary); }
.download:not(.download--primary) .download__title { color: var(--heading); }
/* "Čo bude nasledovať?" - a simple section with a plain list (no numbered circles) */
.next__list { list-style: disc; padding-left: var(--sp-5); gap: var(--sp-1-5); }
.next__list li { padding: 0; min-height: 0; }
.next__list li::before, .next__list li:not(:last-child)::after { content: none; }
.result > .next { padding-top: var(--sp-4); border-top: var(--border-w-thin) solid var(--border); gap: var(--sp-2); }
.result > .next > h2 { font-size: var(--fs-md); }
.result__actions:has(> .download:not(.download--primary):last-child) + .next { padding-top: var(--sp-2); border-top: 0; }

/* --- FAQ: group headings, hairlines between the questions, the whole row clickable, the arrow without a circle --------- */
.faq-group.card { background: transparent; border: 0; border-radius: 0; padding: 0; }
.accordion__summary { grid-template-columns: minmax(0, 1fr) 1.25rem; padding-inline: var(--sp-1); }
.accordion__summary:hover { background: var(--surface-hover); color: var(--link); }
.accordion__summary .icon, .accordion__summary:hover .icon, .accordion__item[open] > .accordion__summary .icon, .legal-details[open] > .accordion__summary .icon { width: 1.25rem; height: 1.25rem; padding: 0; border-radius: 0; background: transparent; color: var(--primary); }
.accordion__panel { padding-inline: var(--sp-1); }

/* --- Contacts: the help contact first (the e-mail underlined), the mandate and the operator in two columns below -------- */
.contact-cards > :last-child { grid-column: auto; }
@media (min-width: 48em) { .contact-cards > :first-child { grid-column: 1 / -1; } }
.contact-email { text-decoration: underline; text-decoration-thickness: var(--border-w-thin); text-underline-offset: 0.2em; }

/* --- Cookies: the policy as text sections, the settings with hairlines between the categories --------------------------- */
.info-sections--text { gap: 0; }
.info-sections--text > .info-section { background: transparent; border: 0; border-radius: 0; padding: var(--sp-5) 0 0; }
.info-sections--text > .info-section + .info-section { margin-top: var(--sp-5); border-top: var(--border-w-thin) solid var(--border); }
.info-sections--text > .info-section:first-child { padding-top: 0; }
.info-sections--text > .info-section > h2 { font-size: var(--fs-h3); }
.consent-category { padding: var(--sp-3) 0; border: 0; border-top: var(--border-w-thin) solid var(--border); border-radius: 0; background: transparent; }
.consent-category + .consent-category { margin-top: calc(-1 * var(--sp-4)); }
.consent-category:has(+ :not(.consent-category)) { border-bottom: var(--border-w-thin) solid var(--border); }

/* --- LiveAgent contact form "Napíšte nám": a compact outline button bottom right on desktops; on phones a round icon
   button bottom right and the same item in the menu under Kontakty.
   Both appear only once LiveAgent has loaded (public.js sets html.has-chat) and open the chat with its button's onClick(). */
.chat-launcher {
  position: fixed; right: calc(var(--gutter) + env(safe-area-inset-right, 0px)); bottom: calc(var(--sp-4) + env(safe-area-inset-bottom, 0px)); z-index: 40;
  display: none; align-items: center; gap: var(--sp-2); min-height: var(--target); padding: 0 var(--sp-4);
  font: inherit; font-weight: var(--fw-semibold); color: var(--heading); background: var(--surface);
  border: var(--border-w-thin) solid var(--primary); border-radius: var(--radius-button); cursor: pointer;
}
.chat-launcher:hover { background: var(--primary-tint); }
.chat-launcher:focus-visible { box-shadow: var(--focus-ring); }
.chat-launcher .icon { width: 1.25rem; height: 1.25rem; }
html.has-chat .chat-launcher { display: inline-flex; }
.site-nav__chat { display: none; }
.site-nav__chat button { display: inline-flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: var(--control-h); padding: 0 var(--sp-3); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); font: inherit; font-weight: var(--fw-medium); text-align: left; cursor: pointer; }
.site-nav__chat button:hover { background: var(--nav-hover-bg); color: var(--heading); }
.site-nav__chat button:focus-visible { background: var(--focus-link-bg); color: var(--focus-link-fg); outline: var(--focus-width) solid var(--focus); box-shadow: none; }
@media (max-width: 47.99em) {
  /* phones: a round 48 px button with the icon only; the word stays for screen readers; the footer ends above it */
  .chat-launcher { width: var(--control-h); height: var(--control-h); min-height: 0; padding: 0; justify-content: center; border-radius: var(--radius-round); box-shadow: var(--shadow-raised); }
  .chat-launcher .icon { width: 1.375rem; height: 1.375rem; }
  .chat-launcher span { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  html.has-chat .site-footer__simple { padding-bottom: calc(var(--control-h) + var(--sp-4) * 2 + env(safe-area-inset-bottom, 0px)); }
  /* while the cookie bar asks, the round button would cover its buttons: it waits for the choice (the menu has the same item) */
  html.has-chat:has(#suhlas:not([hidden])) .chat-launcher { display: none; }
  html.has-chat .site-nav__chat { display: list-item; }
}

/* --- Support banner (Kontakty): the contact form of the helpdesk as the first way to get in touch ----------------------
   The button opens the LiveAgent window (its contact form) and is shown from the start: a click before LiveAgent is
   ready waits for it (aria-busy). When LiveAgent cannot be loaded (html.chat-failed) or scripting is off, the button
   and the form sentence give way to a line that points to the e-mail below. */
.support-banner {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-3) var(--sp-4); align-items: center;
  padding: var(--sp-5) var(--card-pad-x);
  background-color: var(--support-bg); background-image: var(--support-bg-image); color: var(--support-text);
  border: var(--border-w-thin) solid var(--support-bg); border-radius: var(--radius-card);
}
.support-banner__icon {
  width: 3rem; height: 3rem; border-radius: var(--radius-lg); display: grid; place-items: center;
  background: var(--support-icon-bg); color: var(--support-icon-fg); border: var(--border-w-thin) solid var(--support-icon-border);
}
.support-banner__icon .icon { width: 1.75rem; height: 1.75rem; stroke-width: var(--icon-stroke-light); }
.support-banner__title { color: var(--support-title); text-wrap: balance; }
.support-banner__text { grid-column: 1 / -1; display: grid; gap: var(--sp-2); }
.support-banner__text p { max-width: 62ch; }
.support-banner__lead, .support-banner__fallback { font-size: var(--fs-lg); line-height: var(--lh-snug); }
.support-banner__fallback { display: none; font-weight: var(--fw-semibold); color: var(--support-title); }
.support-banner__hint { font-size: var(--fs-sm); }
.support-banner__cta {
  grid-column: 1 / -1; justify-self: stretch;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--control-h-lg); padding: var(--sp-2-5) var(--sp-6);
  font-size: var(--fs-md); font-weight: var(--fw-semibold); line-height: var(--lh-tight); letter-spacing: var(--ls-snug); text-align: center;
  color: var(--support-btn-fg); background: var(--support-btn-bg); border: var(--border-w-thin) solid var(--support-btn-bg); border-radius: var(--radius-button);
  box-shadow: var(--support-btn-shadow); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}
.support-banner__cta .icon { width: 1.25rem; height: 1.25rem; transition: transform var(--dur-fast) var(--ease-standard); }
.support-banner__cta:hover { background: var(--support-btn-bg-hover); border-color: var(--support-btn-bg-hover); }
.support-banner__cta:active { background: var(--support-btn-bg-active); border-color: var(--support-btn-bg-active); box-shadow: var(--shadow-none); transform: translateY(var(--press-offset)); }
.support-banner__cta:focus-visible { outline-color: transparent; box-shadow: var(--support-focus-ring); border-radius: var(--radius-button); }
.support-banner__cta[aria-busy="true"] { cursor: progress; opacity: 0.8; }
@media (prefers-reduced-motion: no-preference) { .support-banner__cta:hover .icon:last-child { transform: translateX(var(--sp-0-5)); } }
@media (min-width: 48em) {
  .support-banner { grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--sp-2) var(--sp-6); padding: var(--sp-6); }
  .support-banner__icon { grid-row: 1 / span 2; align-self: start; width: 4rem; height: 4rem; }
  .support-banner__icon .icon { width: 2.25rem; height: 2.25rem; }
  .support-banner__title, .support-banner__text { grid-column: 2; }
  .support-banner__cta { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
}
html.chat-failed .support-banner__cta, html.chat-failed .support-banner__lead { display: none; }
html.chat-failed .support-banner__fallback { display: block; }
@media (scripting: none) {
  .support-banner__cta, .support-banner__lead { display: none; }
  .support-banner__fallback { display: block; }
}
@media (forced-colors: active) { .support-banner__icon { border-color: CanvasText; } }
