/* Drive Τεστ Κοκ — "η σελίδα είναι το αντικείμενο": η κάρτα της εξέτασης σε χαρτί, πάνω σε επίπεδο χρώμα.
   Direction: page-is-the-object (seed 1035536055) · type: Literata · palette: dealt proportions, colours of the brand and the signs. */

@font-face { font-family: "Literata"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/literata-greek-normal.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/literata-latin-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: "Literata"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/literata-greek-italic.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/literata-latin-italic.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 {
  /* ground, paper, ink, accent — plus the field colours of the signs themselves */
  --field: #e47b02;          /* the brand orange: the ground the cards lie on */
  --paper: #ffffff;
  --paper-2: #f3f4f7;
  --ink: #1f2933;
  --ink-2: #3e4c59;
  --accent: #e47b02;
  --accent-ink: #1f2933;
  --danger: #c8102e;         /* Κ- signs */
  --info: #1d4f91;           /* Π- signs */
  --info-2: #2a62b5;
  --info-3: #163d73;
  --motorway: #0b5d3b;       /* motorway sign green */
  --ok: #0b6b3a;
  --ok-bg: #e3f4ea;
  --err: #b42318;
  --err-bg: #fdecea;
  --behind: var(--field);    /* the colour behind a paper object (for its cut corners) */

  --step-small: clamp(1rem, 0.96rem + 0.1vw, 1.0625rem);
  --step-body: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4.25rem);
  --step-display: clamp(3.5rem, 2rem + 5.6vw, 6.5rem);

  --margin: clamp(16px, 2.2vw, 32px);
  --wrap: 1280px;
  --gap-section: clamp(96px, 12vw, 200px);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 var(--step-body)/1.6 "Literata", Georgia, serif; font-optical-sizing: auto; color: var(--ink); background: var(--ink); }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: #fff; }
::selection { background: var(--ink); color: #fff; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: var(--step-display); }
h2 { font-size: var(--step-head); }
h3 { font-size: var(--step-lead); line-height: 1.2; }
p { margin: 0 0 1em; text-wrap: pretty; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: .5rem 1rem; z-index: 50; }
.skip-link:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--margin); }
.small { font-size: var(--step-small); }

/* ---------- the page ---------- */
.page { position: relative; z-index: 1; background: var(--paper); overflow-x: clip; }
.field { background: var(--field); color: var(--ink); position: relative; }
.field-motorway { background: var(--motorway); color: #fff; --behind: var(--motorway); }
.field-info { background: var(--info); color: #fff; --behind: var(--info); }
.field-paper2 { background: var(--paper-2); --behind: var(--paper-2); }

/* ---------- top row on the field ---------- */
.topbar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding-block: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: var(--step-small); }
.brand img { width: 44px; height: 44px; border-radius: 50%; background: var(--paper); padding: 3px; transition: transform .4s var(--ease-spring); }
.brand:hover img { transform: rotate(-12deg) scale(1.06); }
.toplinks { display: flex; justify-content: center; gap: clamp(14px, 1.9vw, 32px); }
.toplinks a { white-space: nowrap; }
.toplinks a, .menu summary { text-decoration: none; font-size: var(--step-small); font-weight: 600; padding: 10px 2px; position: relative; }
.toplinks a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 3px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out); }
.toplinks a:hover::after, .toplinks a[aria-current="page"]::after { transform: scaleX(1); }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(86vw, 320px); background: var(--ink); color: var(--paper); border-radius: 18px; padding: 12px; z-index: 40; }
.menu-panel a { display: block; padding: 12px 14px; border-radius: 12px; text-decoration: none; font-weight: 500; }
.menu-panel a:hover { background: #2d3a47; }
@media (max-width: 1240px) { .toplinks { display: none; } .menu { display: block; justify-self: end; } .topbar { grid-template-columns: minmax(0, 1fr) auto auto; } }
@media (max-width: 860px) { .toplinks { display: none; } .menu { display: block; justify-self: end; } .topbar { grid-template-columns: minmax(0, 1fr) auto; } .topbar .btn { display: none; } }

/* ---------- buttons: one shape (pill), a solid base that the face presses into ---------- */
.btn { --btn-bg: var(--ink); --btn-fg: #fff; --btn-base: #0b1015;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 52px; padding: 0 1.5em;
  border: 0; border-radius: 999px; background: var(--btn-bg); color: var(--btn-fg); font: 600 var(--step-small)/1 "Literata", serif; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; isolation: isolate; transform: translateY(0); transition: transform .18s var(--ease-out), background-color .2s;
  margin-bottom: 5px; }
.btn::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--btn-base); transform: translateY(5px); z-index: -1; transition: transform .18s var(--ease-out); }
.btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--btn-bg); z-index: -1; }
.btn:hover { transform: translateY(-2px); }
.btn:hover::before { transform: translateY(7px); }
.btn:active { transform: translateY(4px); }
.btn:active::before { transform: translateY(1px); }
.btn-accent { --btn-bg: var(--accent); --btn-fg: var(--accent-ink); --btn-base: #9a4a00; }
.btn-paper { --btn-bg: var(--paper); --btn-fg: var(--ink); --btn-base: #c3c9d1; }
.btn .arrow { transition: transform .25s var(--ease-spring); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- paper objects: filled shapes with cut corners ---------- */
.paper { position: relative; background: var(--paper); color: var(--ink); }
.paper.cut::before, .paper.cut::after { content: ""; position: absolute; top: -22px; width: 44px; height: 44px; border-radius: 50%; background: var(--behind); }
.paper.cut::before { left: -22px; }
.paper.cut::after { right: -22px; }
.zigzag { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 97.5% 100%, 95% calc(100% - 14px), 92.5% 100%, 90% calc(100% - 14px), 87.5% 100%, 85% calc(100% - 14px), 82.5% 100%, 80% calc(100% - 14px), 77.5% 100%, 75% calc(100% - 14px), 72.5% 100%, 70% calc(100% - 14px), 67.5% 100%, 65% calc(100% - 14px), 62.5% 100%, 60% calc(100% - 14px), 57.5% 100%, 55% calc(100% - 14px), 52.5% 100%, 50% calc(100% - 14px), 47.5% 100%, 45% calc(100% - 14px), 42.5% 100%, 40% calc(100% - 14px), 37.5% 100%, 35% calc(100% - 14px), 32.5% 100%, 30% calc(100% - 14px), 27.5% 100%, 25% calc(100% - 14px), 22.5% 100%, 20% calc(100% - 14px), 17.5% 100%, 15% calc(100% - 14px), 12.5% 100%, 10% calc(100% - 14px), 7.5% 100%, 5% calc(100% - 14px), 2.5% 100%, 0 calc(100% - 14px)); padding-bottom: 40px; }
.perforation { height: 0; border: 0; border-top: 5px dotted var(--behind); margin: 28px -1px; }

/* ---------- home: the invitation card, cropped by the viewport ---------- */
.hero-home { min-height: 100svh; overflow: hidden; }
.hero-card { width: min(100% - 2 * var(--margin), 760px); margin: clamp(48px, 7vh, 96px) auto 0; padding: clamp(32px, 4.5vw, 56px); text-align: center; min-height: calc(100svh - 150px); border-radius: 0; }
.hero-card h1 { font-style: italic; font-size: clamp(3.2rem, 1.6rem + 5.6vw, 6.2rem); line-height: .98; margin-bottom: .35em; }
.hero-card h1 .l1 { display: block; transform: translateX(-6%); }
.hero-card h1 .l2 { display: block; transform: translateX(8%); }
.hero-card .lead { max-width: 34em; margin-inline: auto; }
.facts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 18px; font-size: var(--step-small); font-weight: 600; margin: 0 0 22px; }
.diamond { width: 10px; height: 10px; background: var(--field); transform: rotate(45deg); flex: none; }
.plate { position: relative; width: min(46%, 300px); margin: 26px auto 6px; transform: rotate(-2.5deg); padding: 8px; background: var(--paper); outline: 0; }
.plate img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; animation: drift 14s ease-in-out infinite alternate; }
.plate-wrap { overflow: hidden; }
@keyframes drift { from { transform: scale(1.08) translate(1%, 0); } to { transform: scale(1) translate(-1%, -1%); } }

/* live question on the card */
.live { margin: 34px auto 0; max-width: 560px; text-align: left; }
.live-head { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.live-head img { width: 112px; height: 112px; object-fit: contain; flex: none; transition: transform .5s var(--ease-spring); }
.live.is-correct .live-head img { transform: rotate(-8deg) scale(1.08); }
.live-q { font-size: var(--step-lead); font-weight: 600; line-height: 1.25; margin: 0; }
.options { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.option { width: 100%; text-align: left; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 18px; border: 0; border-radius: 18px;
  background: var(--paper-2); color: var(--ink); font: 500 var(--step-body)/1.35 "Literata", serif; cursor: pointer; position: relative;
  transition: transform .18s var(--ease-out), background-color .2s; }
.option:hover { transform: translateX(4px); background: #e6e9ef; }
.option:active { transform: scale(.98); }
.option .mark { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; background: var(--paper); transition: transform .3s var(--ease-spring), background-color .2s; }
.option.is-correct { background: var(--ok-bg); color: var(--ok); animation: pop .45s var(--ease-spring); }
.option.is-correct .mark { background: var(--ok); color: #fff; transform: scale(1.15); }
.option.is-wrong { background: var(--err-bg); color: var(--err); animation: shake .45s; }
.option.is-wrong .mark { background: var(--err); color: #fff; }
.option.is-correct .mark::after { content: ""; width: 8px; height: 14px; border: solid #fff; border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }
.option.is-wrong .mark::before, .option.is-wrong .mark::after { content: ""; grid-area: 1 / 1; width: 14px; height: 3px; border-radius: 2px; background: #fff; transform: rotate(45deg); }
.option.is-wrong .mark::after { transform: rotate(-45deg); }
.option[disabled] { cursor: default; }
.option[disabled]:hover { transform: none; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.feedback { min-height: 1.6em; margin: 14px 0 0; font-weight: 600; }
.feedback.ok { color: var(--ok); } .feedback.err { color: var(--err); }
.feedback .emoji, .result .emoji { display: inline-block; animation: bounce .8s var(--ease-spring); }
@keyframes bounce { 0% { transform: scale(.96) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.3) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }

/* ---------- section headings and rhythm ---------- */
.section { padding-block: var(--gap-section); }
.section.tight-top { padding-top: 56px; }
.section-head { max-width: 22ch; }
.section-intro { max-width: 46ch; font-size: var(--step-lead); line-height: 1.45; }

/* ---------- list: vehicle cards that fold into spines ---------- */
.deck-wrap { position: relative; }
.deck-stage { position: relative; }
.deck { display: grid; gap: 12px; margin-top: 40px; list-style: none; padding: 0; }
.deck-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 360px; padding: 32px; color: #fff; text-decoration: none; overflow: hidden; position: relative; transition: transform .25s var(--ease-out); }
.deck-card:nth-child(3n+1) { background: var(--info); } .deck-card:nth-child(3n+2) { background: var(--info-2); } .deck-card:nth-child(3n) { background: var(--info-3); }
.deck-card h3 { font-size: var(--step-lead); margin: 0 0 12px; white-space: nowrap; }
.deck-card .excerpt { font-size: var(--step-small); margin: 0; max-width: 34ch; }
.deck-card .foot { display: flex; justify-content: space-between; align-items: center; font-size: var(--step-small); font-weight: 600; margin-top: 20px; }
.deck-card .go { display: inline-flex; gap: 6px; align-items: center; }
.deck-card .go span { transition: transform .25s var(--ease-spring); }
.deck-card:hover .go span { transform: translateX(6px); }
.deck-card .photo { position: absolute; right: 0; top: 0; width: 46%; height: 100%; object-fit: cover; opacity: .95; }
.deck-card .text { position: relative; z-index: 1; max-width: 52%; display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.deck-after { margin-top: 48px; font-size: var(--step-small); display: flex; flex-wrap: wrap; gap: 8px 28px; }
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .js .deck-wrap { height: 230svh; }
  .js .deck-stage { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
  .js .deck { position: relative; height: 360px; display: block; margin-top: 32px; }
  .js .deck-card { position: absolute; top: 0; left: 0; width: 620px; height: 360px; transition: transform .55s var(--ease-out), width .55s var(--ease-out); will-change: transform; }
  .js .deck-card.is-spine .text > *:not(h3) { opacity: 0; }
  .js .deck-card.is-spine h3 { writing-mode: vertical-rl; transform: rotate(180deg); }
  .js .deck-card.is-spine .photo { visibility: hidden; }
  .js .deck-card.is-away { opacity: 0; visibility: hidden; }
  .js .deck-card .text { transition: opacity .35s var(--ease-out); }
  .js .deck-card.is-peek .text { opacity: 0; }
  .js .deck-wrap { padding-top: 0; }
}
@media (max-width: 1023px) {
  .deck-card { min-height: 0; padding: 24px; }
  .deck-card h3 { white-space: normal; }
  .deck-card .photo { position: relative; width: calc(100% + 48px); max-width: none; height: 180px; margin: -24px -24px 18px; }
  .deck-card .text { max-width: none; }
}

/* ---------- gallery: picture tiles with label strips ---------- */
.tiles { list-style: none; padding: 0; margin: 40px auto 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 12px; }
.tiles--families { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.tiles--four { margin-top: 24px; }
.tile a { display: block; text-decoration: none; color: inherit; }
.tile .pic { aspect-ratio: 1 / 1; background: var(--paper-2); display: grid; place-items: center; overflow: hidden; }
.tile .pic img, .tile .pic svg { width: 72%; height: 72%; object-fit: contain; transition: transform .45s var(--ease-spring); }
.tile a:hover .pic img, .tile a:hover .pic svg { transform: scale(1.1) rotate(-3deg); }
.strip { min-height: 92px; padding: 12px; font-size: var(--step-small); line-height: 1.35; font-variant-numeric: tabular-nums; }
.strip .row { display: flex; justify-content: space-between; gap: 8px; }
.strip .title { margin-top: 6px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile:nth-child(4n+1) .strip { background: var(--danger); color: #fff; }
.tile:nth-child(4n+2) .strip { background: var(--info); color: #fff; }
.tile:nth-child(4n+3) .strip { background: var(--motorway); color: #fff; }
.tile:nth-child(4n) .strip { background: var(--ink); color: var(--field); }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 8px; } .strip .row.second, .strip .row span:nth-child(3) { display: none; } .strip { padding: 12px 14px; } }

/* ---------- how it works: itinerary on a slip ---------- */
.slip-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: start; }
.slip-grid .intro { grid-column: 1 / span 5; }
.slip { grid-column: 7 / span 6; padding: 36px 32px 48px; font-variant-numeric: tabular-nums; font-size: var(--step-small); }
.slip h3 { font-size: var(--step-small); font-weight: 700; margin: 28px 0 10px; letter-spacing: 0; }
.slip h3:first-child { margin-top: 0; }
.slip .line { display: flex; align-items: baseline; gap: 10px; padding: 4px 0; }
.slip .line .leader { flex: 1; border-bottom: 4px dotted #9aa5b1; transform: translateY(-5px); min-width: 24px; }
.slip .total { margin: 26px -32px 0; padding: 0 32px; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--ink); color: var(--paper); font-weight: 600; }
@media (max-width: 860px) { .slip-grid { display: block; } .slip { margin-top: 32px; } }

/* ---------- faq: tabbed index cards (exclusive <details>) ---------- */
.files { max-width: 820px; margin: 40px auto 0; }
.file { position: relative; margin-top: -24px; padding: 40px 32px 28px; background: var(--paper); clip-path: polygon(0 40px, var(--tab-x) 40px, var(--tab-x) 0, calc(var(--tab-x) + 200px) 0, calc(var(--tab-x) + 200px) 40px, 100% 40px, 100% 100%, 0 100%); }
.file:first-child { margin-top: 0; }
.file:nth-child(3n+2) { background: #dce7f6; } .file:nth-child(3n) { background: #dff0e6; }
.file:nth-child(1) { --tab-x: 0px; } .file:nth-child(2) { --tab-x: 150px; } .file:nth-child(3) { --tab-x: 300px; } .file:nth-child(4) { --tab-x: 450px; } .file:nth-child(5) { --tab-x: 600px; } .file:nth-child(6) { --tab-x: 450px; }
.file .tab { position: absolute; top: 9px; left: calc(var(--tab-x) + 20px); font-size: var(--step-small); font-weight: 600; }
.file summary { list-style: none; cursor: pointer; font-size: var(--step-lead); font-weight: 500; padding: 22px 0 8px; display: flex; justify-content: space-between; gap: 16px; }
.file summary::-webkit-details-marker { display: none; }
.file summary .plus { transition: transform .3s var(--ease-spring); font-weight: 700; }
.file[open] summary .plus { transform: rotate(45deg); }
.file p { max-width: 50ch; font-size: var(--step-body); margin: 6px 0 0; }
.file[open] p { animation: rise .4s var(--ease-out); }
@media (max-width: 860px) { .file { padding: 40px 20px 22px; clip-path: polygon(0 40px, var(--tab-x) 40px, var(--tab-x) 0, calc(var(--tab-x) + 120px) 0, calc(var(--tab-x) + 120px) 40px, 100% 40px, 100% 100%, 0 100%); }
  .file:nth-child(1) { --tab-x: 0px; } .file:nth-child(2) { --tab-x: 48px; } .file:nth-child(3) { --tab-x: 96px; } .file:nth-child(4) { --tab-x: 144px; } .file:nth-child(5) { --tab-x: 192px; } .file:nth-child(6) { --tab-x: 96px; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- inner pages: the field head and the sheet ---------- */
.head { padding-block: clamp(24px, 4vw, 56px) clamp(64px, 8vw, 120px); }
.head h1 { font-size: var(--step-head); max-width: 18ch; }
.head .lead { max-width: 44ch; font-size: var(--step-lead); line-height: 1.45; }
/* the head arrives: crumbs, headline column, then the object */
.js .head .crumbs, .js .head-grid > *, .js .head-split > * { animation: rise .8s var(--ease-out) both; }
.js .head-grid > :nth-child(2), .js .head-split > :nth-child(2) { animation-delay: .15s; }
.js .head h1 .h1-sub { animation: rise .8s .1s var(--ease-out) both; }
/* a long SEO headline keeps its words: the topic big, the rest on a quieter second line */
.head h1 .h1-main { display: block; }
.head h1 .h1-sub { display: block; max-width: 34ch; margin-top: .45em; font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.01em; }
@media (max-width: 599px) { .head h1 .h1-sub { font-size: var(--step-body); } }
.head h1:last-child { margin-bottom: 0; }
/* the head always uses its width: headline left, and on the right the page's object (exam card, photo) or its lead */
.head-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.head-grid--exam { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: start; }
.head-grid--wide { grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); }
.head-grid--exam .exam { max-width: none; margin: 0; }
.head-object > * + * { margin-top: 32px; }
.head-object > [hidden] + * { margin-top: 0; }
.head-photo { padding: 8px; background: var(--paper); transform: rotate(2deg); transition: transform .5s var(--ease-spring); }
.head-photo:hover { transform: rotate(0deg) scale(1.02); }
.head-photo img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.head-photo--side { max-width: 400px; margin-top: 40px; transform: rotate(-2deg); }
.head-photo--aside { margin-top: 32px; max-width: 460px; }
.head-split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(24px, 4vw, 64px); align-items: end; }
.head-split h1 { margin-bottom: 0; max-width: 22ch; }
.head-split:has(.head-photo) { align-items: start; }
.head-aside .lead { margin: 0; }
.head-aside .lead + .small { margin-top: 12px; }
.plate-day { margin: 0; padding: clamp(24px, 3vw, 40px); text-align: center; }
.plate-day img { width: min(100%, 340px); height: auto; margin: 8px auto 20px; transition: transform .6s var(--ease-spring); }
.plate-day:hover img { transform: rotate(-4deg) scale(1.05); }
.plate-day details { text-align: center; min-height: 7.5em; }
.plate-day summary { list-style: none; display: inline-flex; gap: 10px; }
.plate-day summary::-webkit-details-marker { display: none; }
.plate-day details[open] summary .plus { transform: rotate(45deg); }
.plate-day summary .plus { transition: transform .3s var(--ease-spring); }
.plate-day details p { font-size: var(--step-lead); font-weight: 600; line-height: 1.3; margin: 18px auto 0; max-width: 26ch; animation: rise .4s var(--ease-out); }
@media (max-width: 1099px) { .head-grid--exam { grid-template-columns: minmax(0, 1fr); } .head-photo--side { display: none; } .head-object { margin-top: 8px; } }
@media (max-width: 860px) { .head-grid, .head-split { grid-template-columns: minmax(0, 1fr); align-items: start; } .head-photo { max-width: 360px; } }
/* archive shelves: one vehicle per shelf, its photo pinned on the left */
.shelf { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); align-items: start; }
.shelf + .shelf, .ad + .shelf, .shelf + .ad { margin-top: 96px; }
.shelf h2 a { text-decoration: none; } .shelf h2 a:hover { text-decoration: underline; }
.shelf-photo { display: block; padding: 6px; background: var(--paper-2); transform: rotate(-2deg); transition: transform .45s var(--ease-spring); }
.shelf-photo:hover { transform: rotate(0deg) scale(1.03); }
.shelf-photo img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
@media (max-width: 760px) { .shelf { grid-template-columns: minmax(0, 1fr); } .shelf-photo { transform: none; } .shelf-photo img { aspect-ratio: 16 / 9; } }
/* same topic, other vehicles: photo cards */
.rides { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 28px 20px; }
.rides a { display: block; text-decoration: none; color: inherit; }
.rides img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .45s var(--ease-spring); }
.rides a:hover img { transform: rotate(-1.5deg) scale(1.03); }
.rides .name { display: block; margin-top: 12px; font-weight: 700; font-size: var(--step-small); }
.rides .title { display: block; font-size: var(--step-small); line-height: 1.35; }
.rides a:hover .title { text-decoration: underline; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 0; margin: 0 0 18px; font-size: var(--step-small); font-weight: 500; }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.sheet { margin-top: -56px; padding: clamp(20px, 4vw, 56px); position: relative; }
@media (max-width: 599px) { .sheet { margin-inline: calc(-1 * var(--margin)); padding-inline: var(--margin); } }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-weight: 600; font-size: var(--step-small); }

/* syllabus: the chapter list printed as a contents sheet */
.contents { list-style: none; margin: 0; padding: 0; }
.contents li a { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; text-decoration: none; transition: transform .2s var(--ease-out); }
.contents li a:hover { transform: translateX(6px); }
.contents li a:hover .name { text-decoration: underline; }
.contents .name { font-weight: 500; font-size: var(--step-body); min-width: 0; }
@media (max-width: 599px) { .contents .leader { min-width: 12px; } .contents .progress { width: 48px; } }
.contents .leader { flex: 1; border-bottom: 4px dotted #c3c9d1; transform: translateY(-6px); min-width: 24px; }
.contents .count { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: var(--step-small); font-weight: 600; }
.contents .done { display: none; width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: #fff; font-size: .8rem; place-items: center; flex: none; }
.contents .is-done .done { display: grid; }
.progress { display: block; height: 8px; background: var(--paper-2); border-radius: 99px; overflow: hidden; width: 90px; flex: none; align-self: center; }
.progress > span { display: block; height: 100%; width: 0; background: var(--ok); border-radius: inherit; transition: width .8s var(--ease-out); }
.cols-2 { columns: 2; column-gap: 64px; }
.cols-2 li { break-inside: avoid; }
@media (max-width: 860px) { .cols-2 { columns: 1; } }

/* ---------- the quiz: the exam card itself ---------- */
.exam { max-width: 820px; margin: 0 auto; padding: clamp(24px, 4vw, 48px); }
.exam-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 600; font-size: var(--step-small); margin-bottom: 18px; }
@media (max-width: 599px) { .exam-top { flex-direction: column; align-items: flex-start; gap: 10px; } }
.dots { display: flex; gap: 6px; flex-wrap: wrap; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--paper-2); transition: background-color .3s, transform .3s var(--ease-spring); }
.dots i.is-now { background: var(--ink); transform: scale(1.25); }
.dots i.is-ok { background: var(--ok); }
.dots i.is-bad { background: var(--err); }
.bar { height: 10px; background: var(--paper-2); border-radius: 99px; overflow: hidden; margin-bottom: 26px; }
.bar > span { display: block; height: 100%; width: 0; background: var(--field); border-radius: inherit; transition: width .6s var(--ease-out); }
.exam-q { font-size: var(--step-lead); font-weight: 600; line-height: 1.3; margin: 0 0 18px; }
.exam-img { margin: 0 auto 20px; max-height: 360px; width: auto; cursor: zoom-in; transition: transform .3s var(--ease-out); }
.exam-img.is-zoomed { max-height: none; width: 100%; cursor: zoom-out; }
.exam-body { animation: slide-in .45s var(--ease-out); }
.exam-body.is-leaving { animation: slide-out .25s var(--ease-out) forwards; }
@keyframes slide-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes slide-out { to { opacity: 0; transform: translateX(-40px); } }
.exam-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; align-items: center; }
.why { margin-top: 12px; padding: 14px 18px; background: var(--paper-2); border-radius: 14px; font-size: 1rem; }
@media (max-width: 719px) { .layout-quiz .exam-actions { position: sticky; bottom: 0; padding: 12px 0; background: var(--paper); z-index: 5; } }

/* result card with emoji, count-up and confetti */
.result { text-align: center; padding: 12px 0 4px; }
.result .emoji { font-size: clamp(4rem, 3rem + 4vw, 6.5rem); line-height: 1; margin-bottom: 10px; }
.result .score { font-size: var(--step-head); font-weight: 600; font-variant-numeric: tabular-nums; margin: 0 0 6px; letter-spacing: -0.02em; }
.result .verdict { font-size: var(--step-lead); margin: 0 0 18px; }
.result .wrong-list { text-align: left; max-width: 640px; margin: 24px auto 0; padding: 0; list-style: none; }
.result .wrong-list li { padding: 14px 18px; background: var(--paper-2); border-radius: 14px; margin-bottom: 10px; font-size: 1rem; }
.result .wrong-list .ans { color: var(--ok); font-weight: 600; }
.round-summary { margin-bottom: 0; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

/* study view and theory */
.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); margin-top: 1.6em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0 1.6em; font-size: var(--step-small); line-height: 1.4; font-variant-numeric: tabular-nums; }
.prose thead th { text-align: left; font-weight: 700; padding: 12px 14px; background: var(--ink); color: var(--paper); }
.prose thead th:first-child { border-radius: 12px 0 0 0; } .prose thead th:last-child { border-radius: 0 12px 0 0; }
.prose tbody td { padding: 12px 14px; vertical-align: top; border: 0; }
.prose tbody tr:nth-child(even) td { background: var(--paper-2); }
.prose td:first-child { font-weight: 500; }
@media (max-width: 760px) {
  .prose table, .prose tbody, .prose tr, .prose td { display: block; width: 100%; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose tbody tr { padding: 12px 14px; border-radius: 14px; margin-bottom: 10px; background: var(--paper-2); }
  .prose tbody tr:nth-child(even) td { background: none; }
  .prose tbody td { padding: 2px 0; }
  .prose tbody td:first-child { font-weight: 700; margin-bottom: 4px; }
  .prose tbody td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; font-weight: 600; }
}
.prose tr[hidden] { display: none; }
.table-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 1.4em 0 0; }
.table-filter label { font-weight: 600; font-size: var(--step-small); }
.table-filter input { flex: 1 1 260px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--paper-2); font: 500 var(--step-body) "Literata", serif; color: var(--ink); }
.table-filter input:focus-visible { outline: 3px solid var(--field); outline-offset: 2px; }
@media (max-width: 599px) { .prose h2 { font-size: 1.3rem; line-height: 1.25; } .prose h3 { font-size: 1.15rem; } }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.prose img { margin: 1.2em 0; }
.prose figure { margin: 1.8em 0; }
.prose figure img { margin: 0; }
.prose figcaption { margin-top: .7em; font-size: var(--step-small); line-height: 1.45; color: var(--ink-2); }
.prose .fig-signs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; }
.prose .fig-signs figcaption { flex-basis: 100%; }
.qa-faq { margin-top: 64px; }
.q-head { max-width: 62rem; padding-bottom: 8px; }
.head h1.q-title { font-size: clamp(1.7rem, 1.1rem + 2.2vw, 2.8rem); line-height: 1.15; max-width: 34ch; }
.q-answer span { font-weight: 600; }
.q-exam { background: var(--paper-2); border-radius: 20px; padding: 24px 26px; margin-bottom: 40px; }
.q-page h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); line-height: 1.2; }
.q-img { max-width: 100%; height: auto; max-height: 320px; width: auto; margin-bottom: 14px; border-radius: 10px; }
.q-why p { max-width: 70ch; }
.qa-explained { padding-bottom: 48px; margin-bottom: 48px; border-bottom: 1px solid #d5dae1; }
.qa-explained-lead { max-width: 62ch; }
.qa-explained-groups { columns: 2 340px; column-gap: 56px; }
.qa-explained-group { break-inside: avoid; padding-top: 8px; }
.qa-explained h3 { font-size: 1.15rem; margin: 20px 0 4px; }
.qa-explained h3 a { font-weight: 600; }
@media (max-width: 599px) { .q-exam { padding: 18px 16px; } }
.qa-faq h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); margin: 0 0 .6em; }
@media (max-width: 599px) { .qa-faq h2 { font-size: 1.3rem; line-height: 1.25; } }
.qa-faq details { border-top: 1px solid #d5dae1; }
.qa-faq details:last-of-type { border-bottom: 1px solid #d5dae1; }
.qa-faq summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font-weight: 600; line-height: 1.4; }
.qa-faq summary::-webkit-details-marker { display: none; }
.qa-faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 1.5rem; font-weight: 400; transition: transform .3s var(--ease-spring); }
.qa-faq details[open] summary::after { transform: rotate(45deg); }
.qa-faq details p { margin: 0 0 20px; max-width: 70ch; }
.study summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; background: var(--ink); color: var(--paper); border-radius: 20px; transition: transform .2s var(--ease-out); }
.study summary:hover { transform: translateY(-2px); }
.study summary h2, .study summary h3 { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); margin: 0; }
.contents .rounds { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 12px; font-size: var(--step-small); font-weight: 600; }
.contents .rounds a { display: inline-grid; place-items: center; min-width: 34px; height: 34px; border-radius: 999px; background: var(--paper-2); text-decoration: none; font-variant-numeric: tabular-nums; transition: transform .2s var(--ease-spring), background-color .2s; }
.contents .rounds a:hover { background: var(--field); transform: translateY(-2px); }
.study summary .plus { font-size: 1.6rem; transition: transform .3s var(--ease-spring); }
.study details[open] summary .plus { transform: rotate(45deg); }
.study summary::-webkit-details-marker { display: none; }
.study-list { list-style: none; padding: 0; margin: 28px 0 0; counter-reset: q; }
.study-list > li { padding: 0; margin-bottom: 36px; }
.study-q { font-weight: 600; margin-bottom: 8px; }
.study-answers { list-style: none; padding: 0; margin: 0; }
.study-answers li { padding: 3px 0; color: var(--ink-2); }
.study-answers li.is-correct { color: var(--ok); font-weight: 600; }
.study-list img { max-height: 220px; width: auto; margin-bottom: 10px; }
.study-why { background: var(--paper-2); padding: 10px 14px; border-radius: 12px; font-size: 1rem; }
.chapter-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 56px 0 0; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
@media (max-width: 1199px) { .pair { grid-template-columns: 1fr; } .pair > .rail { display: none; } }
.rail-nav { margin-bottom: 40px; }
.rail-nav h2 { font-size: var(--step-lead); margin-bottom: 12px; }
.rail-nav ol { list-style: none; padding: 0; margin: 0; }
.rail-nav li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; }
.rail-nav a { font-weight: 600; text-decoration: none; }
.rail-nav a:hover, .rail-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; }
.article-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.article-list a { display: block; height: 100%; padding: 20px 22px; background: var(--paper-2); border-radius: 18px; text-decoration: none; transition: transform .25s var(--ease-spring), background-color .2s; }
.article-list a:hover { transform: translateY(-3px); background: #e6ebf1; }
.article-list .name { display: block; font-weight: 600; font-size: var(--step-body); line-height: 1.3; }
.article-list .desc { display: block; margin-top: 8px; font-size: var(--step-small); line-height: 1.45; }
.explainers { margin-top: 48px; padding: 24px 28px; background: var(--paper-2); border-radius: 20px; }
.explainers h2 { font-size: var(--step-lead); margin-bottom: 8px; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding: 8px 0; }
.link-list a { font-weight: 500; }

/* sign library grid */
.sign-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: 24px 12px; }
@media (min-width: 600px) { .sign-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }
.sign-card { scroll-margin-top: 24px; }
.sign-card .pic { aspect-ratio: 1 / 1; background: var(--paper-2); display: grid; place-items: center; }
.sign-card .pic img { width: 70%; height: 70%; object-fit: contain; transition: transform .45s var(--ease-spring); }
.sign-card:hover .pic img { transform: scale(1.08) rotate(-3deg); }
.sign-card .strip { min-height: 0; }
.sign-card h3 { font-size: 1rem; margin: 0 0 4px; letter-spacing: 0; }
.sign-card p { margin: 0; }
.sign-card:nth-child(4n+1) .strip { background: var(--danger); color: #fff; } .sign-card:nth-child(4n+2) .strip { background: var(--info); color: #fff; }
.sign-card:nth-child(4n+3) .strip { background: var(--motorway); color: #fff; } .sign-card:nth-child(4n) .strip { background: var(--ink); color: var(--field); }
.sign-grid-ad { grid-column: 1 / -1; }

/* ---------- ads: reserved height, plain label, distance from controls ---------- */
.ad { position: relative; margin: 48px 0; min-height: var(--ad-h-m, 280px); padding-top: 26px; }
@media (min-width: 960px) { .ad { min-height: var(--ad-h-d, 280px); } }
.ad-label { position: absolute; top: 0; left: 0; font-size: var(--step-small); color: inherit; opacity: .85; }
.ad-preview { display: flex; align-items: flex-start; justify-content: center; padding-top: 18px; height: calc(var(--ad-h-m, 280px) - 26px); background: rgba(31, 41, 51, .08); color: inherit; font-size: var(--step-small); }
@media (min-width: 960px) { .ad-preview { height: calc(var(--ad-h-d, 280px) - 26px); } }
.ad--desktop { display: none; }
@media (min-width: 1200px) { .ad--desktop { display: block; } }
.exam + .ad, .ad + .exam { margin-top: 150px; }

/* ---------- footer: the back of the card, it rises into view ---------- */
.site-footer { position: relative; background: var(--ink); color: var(--ink); padding: 72px 0 32px; }
.postcard { width: min(100% - 2 * var(--margin), 1100px); margin: 0 auto; position: relative; }
.postcard .scallops { display: block; width: 100%; height: 34px; color: var(--paper); }
.postcard .back { background: var(--paper); display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 24px clamp(24px, 4vw, 56px) 28px; }
.postcard .signoff { font-size: var(--step-lead); font-weight: 500; font-style: italic; margin: 0 0 14px; letter-spacing: -0.01em; }
.postcard .msg { font-size: var(--step-small); max-width: 42ch; }
.postcard .addr { position: relative; padding-top: 8px; }
.postcard .addr ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: var(--step-body); }
.postcard .addr a { font-weight: 500; }
.postcard .stamp { position: absolute; right: 0; top: 0; width: 88px; padding: 6px; background: var(--paper); outline: 4px dotted var(--paper-2); outline-offset: -2px; transform: rotate(4deg); transition: transform .4s var(--ease-spring); }
.postcard .stamp:hover { transform: rotate(-6deg) scale(1.08); }
.postcard .stamp img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.postcard .imprint { grid-column: 1 / -1; text-align: center; font-size: var(--step-small); margin: 8px 0 0; color: var(--ink-2); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; cursor: pointer; font-weight: 500; }
@media (max-width: 860px) { .postcard .back { grid-template-columns: 1fr; gap: 28px; } .postcard .stamp { width: 64px; } }

/* ---------- motion: entrances (only when script runs), reduced motion ---------- */
.js [data-reveal] > * { opacity: 0; transform: translateY(26px); }
.js .rv { opacity: 0; transform: translateY(22px); }
.js .rv.is-in { opacity: 1; transform: none; transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.js [data-reveal].is-in > * { opacity: 1; transform: none; transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.js .hero-card { animation: card-in .9s var(--ease-out) both; }
@keyframes card-in { from { transform: translateY(80px); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] > *, .js .rv { opacity: 1; transform: none; }
  .plate img { animation: none; }
}
@media print { .js [data-reveal] > *, .js .rv { opacity: 1 !important; transform: none !important; } .topbar, .site-footer, .ad, .exam, .chapter-nav { display: none !important; } .study details > *:not(summary) { display: block; } }
