/* GoCodigo — asphalt with a bright blue accent.
   Type: Plus Jakarta Sans throughout. */

:root {
  --paper: #F6F9FC;
  --calm: #16324F;        /* deep harbour blue: brand block */
  --calm-2: #E9F2FB;      /* top bar */
  --calm-3: #F0F5FB;      /* sidebar */
  --calm-line: #D6E4F2;
  --surface: #FFFFFF;
  --asphalt: #1E2129;
  --asphalt-2: #2C313C;
  --asphalt-3: #3A404D;
  --blue: #0A4DA2;
  --blue-soft: #E6EEF9;
  --marking: #2F7BFF;
  --marking-soft: #E7F0FF;
  --sky: #6FB0FF;
  --stop: #C8102E;
  --stop-soft: #FBE7EA;
  --go: #16794A;
  --go-soft: #E3F4EB;
  --ink: #1E2129;
  --muted: #5D6577;
  --line: #DDE2EA;
  --radius: 10px;
  --radius-lg: 16px;
  --sidebar: 248px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55;
  color: var(--ink); background: var(--paper);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
h1, h2, h3, .wide {
  line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em;
}
h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 800; }
h2 { font-size: 1.45rem; font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 68ch; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- brand */
.brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-car { width: 62px; height: 28px; flex: none; display: block; }
.brand-logo { display: block; height: 46px; width: auto; }
.brand-name { font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em; color: #fff; line-height: 1; }
.brand-name b { color: var(--marking); font-weight: 800; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 650; font-size: 1rem; line-height: 1;
  padding: .85rem 1.25rem; border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--marking); color: #fff; }
.btn-primary:hover { background: #1F66E6; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #083E85; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-dark { background: var(--asphalt); color: #fff; }
.btn-dark:hover { background: var(--asphalt-3); }
.btn-danger { background: var(--stop); color: #fff; }
.btn-lg { padding: 1.05rem 1.6rem; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------------------------------------------------------------- app shell (signed in) */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; grid-template-rows: auto 1fr; min-height: 100vh; }
.shell-brand {
  grid-column: 1; grid-row: 1; background: var(--calm); display: flex; align-items: center;
  padding: 1.1rem 1.4rem; border-bottom: 4px solid var(--marking);
}
.shell-top {
  grid-column: 2; grid-row: 1; background: var(--calm-2); color: #4A6380;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 1.75rem; border-bottom: 4px solid var(--calm-line);
}
.shell-top .page-title { color: var(--calm); font-weight: 650; font-size: 1.05rem; }
.shell-top .user { display: flex; align-items: center; gap: 1rem; font-size: .92rem; }
.shell-top form { margin: 0; }
.link-btn { background: none; border: 0; color: var(--calm); font: inherit; font-weight: 600; cursor: pointer; padding: .4rem .2rem; }
.link-btn:hover { color: var(--marking); }

.sidebar { grid-column: 1; grid-row: 2; background: var(--calm-3); border-right: 1px solid var(--calm-line); padding: .75rem 0 2rem; }
.nav { list-style: none; margin: 0; padding: 0; }
.nav a {
  display: flex; align-items: center; gap: .9rem; padding: .85rem 1.4rem;
  color: #2B4563; text-decoration: none; font-weight: 600; font-size: .98rem;
  border-left: 5px solid transparent;
}
.nav a svg { width: 22px; height: 22px; flex: none; color: #5B7899; }
.nav a:hover { background: #E2ECF7; }
.nav a[aria-current="page"] { background: var(--surface); border-left-color: var(--marking); color: var(--ink); }
.nav a[aria-current="page"] svg { color: var(--blue); }
.nav .badge { margin-left: auto; background: var(--stop); color: #fff; font-size: .75rem; padding: .1rem .5rem; border-radius: 99px; }
.nav-sep { height: 1px; background: var(--calm-line); margin: .75rem 1.4rem; }

.main { grid-column: 2; grid-row: 2; padding: 2rem 1.75rem 4rem; min-width: 0; }
.container { max-width: 1080px; }
.menu-toggle { display: none; }

@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .shell-brand { grid-column: 1; justify-content: space-between; }
  .shell-top { grid-column: 1; grid-row: 2; padding: .7rem 1rem; }
  .shell-top .page-title { font-size: .95rem; }
  .sidebar { grid-column: 1; grid-row: 3; display: none; }
  .sidebar.open { display: block; }
  .main { grid-column: 1; grid-row: 4; padding: 1.4rem 1rem 3rem; }
  .menu-toggle { display: inline-flex; }
}

/* ---------------------------------------------------------------- hamburger menus */
.burger {
  display: none; align-items: center; justify-content: center; width: 46px; height: 46px; flex: none;
  background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.35); border-radius: 10px;
  color: #fff; cursor: pointer; padding: 0;
}
.burger:hover { background: rgba(255,255,255,.16); }
.burger:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.burger svg { width: 24px; height: 24px; }
.burger .i-close, .burger[aria-expanded="true"] .i-open { display: none; }
.burger[aria-expanded="true"] .i-close { display: block; }
.public-top .public-menu { display: block; background: var(--calm); padding: .25rem 1rem 1.25rem; box-shadow: 0 12px 24px rgba(6,14,32,.35); }
.public-top .public-menu[hidden] { display: none; }
.public-top .public-menu a.plain { display: block; color: #fff; text-decoration: none; font-weight: 600; font-size: 1.05rem; padding: .9rem .5rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.public-top .public-menu a.plain:hover { color: var(--sky); }
.public-top .public-menu .btn { display: block; text-align: center; margin-top: 1rem; }
@media (max-width: 760px) {
  .public-top nav.top-links { display: none; }
  .public-top .burger { display: inline-flex; }
}
@media (min-width: 761px) { .public-top .public-menu { display: none !important; } }
@media (max-width: 880px) { .shell-brand .burger { display: inline-flex; } }

/* ---------------------------------------------------------------- public layout */
.public-top { background: var(--calm); border-bottom: 4px solid var(--marking); }
.public-top .inner { max-width: 1160px; margin: 0 auto; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.public-top nav { display: flex; gap: .6rem; align-items: center; }
.public-top nav a.plain { color: #fff; text-decoration: none; font-weight: 600; padding: .6rem .8rem; }
.public-top nav a.plain:hover { color: var(--sky); }
.public-main { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }
.site-foot { max-width: 1160px; margin: 0 auto; padding: 3rem 1.5rem; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- home hero */
.hero { background: var(--asphalt); color: #fff; position: relative; overflow: hidden; }
.hero::after { /* lane line */
  content: ""; position: absolute; left: 0; right: 0; bottom: 38px; height: 6px;
  background: repeating-linear-gradient(90deg, var(--marking) 0 56px, transparent 56px 96px);
  opacity: .9;
}
.hero-inner { max-width: 1160px; margin: 0 auto; padding: 4rem 1.5rem 6.5rem; display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 4rem); color: #fff; margin-bottom: 1rem; }
.hero p.lead { font-size: 1.2rem; color: #C9CFDA; max-width: 34ch; }
.hero .cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero .btn-ghost { color: #fff; border-color: var(--asphalt-3); }
.hero .btn-ghost:hover { border-color: #fff; }
.rules { display: flex; gap: 2.2rem; margin-top: 2.4rem; }
.rules div { display: flex; flex-direction: column; }
.rules strong { font-size: 2rem; color: var(--sky); line-height: 1; }
.rules span { color: #C9CFDA; font-size: .92rem; margin-top: .35rem; }

.try { background: var(--surface); color: var(--ink); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); }
.try-bar { background: var(--asphalt-3); color: #fff; display: flex; justify-content: space-between; align-items: center; padding: .6rem 1rem; font-size: .9rem; font-weight: 600; }
.try-bar .clock { font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: .4rem; }
.try-img { background: #EEF1F5; display: grid; place-items: center; padding: 1.2rem; height: 190px; }
.try-img img { max-height: 150px; width: auto; }
.try .q-head { display: grid; grid-template-columns: 56px 1fr; background: #E7EAEF; }
.try .q-num { background: var(--asphalt-3); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.5rem; }
.try .q-text { padding: .9rem 1rem; font-weight: 650; }
.try .answers .ans { grid-template-columns: 56px 1fr; }
.try .answers .letter { font-size: 1.5rem; }
.try .answers .ans-text { padding: .75rem 1rem; font-size: .96rem; }
.try-feedback { padding: .9rem 1rem; font-size: .95rem; border-top: 1px solid var(--line); display: none; }
.try-feedback.show { display: block; }

.section { padding: 4rem 0 1rem; }
.topic-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; margin-top: 1.5rem; }
.topic-chip { display: flex; align-items: center; gap: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.topic-chip img { width: 40px; height: 40px; }
.topic-chip span { display: block; font-size: .85rem; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 1.5rem; }
.steps h3 { display: flex; align-items: baseline; gap: .6rem; }
.steps h3 em { font-style: normal; color: var(--blue); font-size: 1.6rem; font-weight: 800; }

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; padding: 2.5rem 1.2rem 5.5rem; gap: 2rem; }
  .steps { grid-template-columns: 1fr; gap: 1rem; }
  .rules { gap: 1.4rem; }
}

/* ---------------------------------------------------------------- auth */
.auth-wrap { min-height: calc(100vh - 80px); display: grid; place-items: center; padding: 2.5rem 1rem; }
.auth { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2.2rem; }
.auth.wide { max-width: 760px; }
.auth h1 { font-size: 1.8rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 650; margin-bottom: .35rem; font-size: .95rem; }
.field input {
  width: 100%; font: inherit; padding: .8rem .9rem; border: 2px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink);
}
.field input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-soft); }
.field .help { font-size: .85rem; color: var(--muted); margin-top: .3rem; }
.field .help ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.errorlist { list-style: none; margin: .35rem 0 0; padding: 0; color: var(--stop); font-size: .9rem; }
.code-input { font-size: 1.6rem !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.alert { padding: .85rem 1rem; border-radius: var(--radius); margin-bottom: 1.2rem; font-size: .95rem; border-left: 5px solid; }
.alert-error { background: var(--stop-soft); border-color: var(--stop); }
.alert-success { background: var(--go-soft); border-color: var(--go); }
.alert-info { background: var(--blue-soft); border-color: var(--blue); }
.alert-warning { background: #FFF1E0; border-color: #FF8A00; }
.messages { margin-bottom: 1.2rem; }
.auth-foot { margin-top: 1.2rem; font-size: .95rem; text-align: center; }
.setup-grid { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; }
.qr { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: .6rem; }
.qr svg { width: 100%; height: auto; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--paper); border: 1px dashed var(--line); padding: .6rem .8rem; border-radius: 8px; word-break: break-all; font-size: .95rem; }
.steps-list { padding-left: 1.2rem; margin: 0 0 1.2rem; }
.steps-list li { margin-bottom: .45rem; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin: 1rem 0 1.5rem; padding: 0; list-style: none; }
.codes li { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .6rem; text-align: center; }
details.toggle summary { cursor: pointer; font-weight: 600; color: var(--blue); margin: 1rem 0 .6rem; }
@media (max-width: 640px) { .setup-grid { grid-template-columns: 1fr; } .qr { max-width: 240px; } .auth { padding: 1.5rem; } }

/* ---------------------------------------------------------------- panels & dashboard */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.stack > * + * { margin-top: 1.25rem; }
@media (max-width: 980px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.readiness { display: grid; grid-template-columns: auto 1fr; gap: 1.6rem; align-items: center; background: var(--asphalt); color: #fff; border: 0; }
.readiness h2 { color: #fff; }
.readiness p { color: #C9CFDA; margin-bottom: 1.2rem; }
.gauge { width: 150px; height: 150px; position: relative; }
.gauge svg { width: 150px; height: 150px; transform: rotate(-90deg); }
.gauge .val { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.gauge .val strong { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.gauge .val span { display: block; font-size: .8rem; color: #C9CFDA; }
@media (max-width: 560px) { .readiness { grid-template-columns: 1fr; } }

.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .92rem; }

.bars { list-style: none; margin: 0; padding: 0; }
.bars li { display: grid; grid-template-columns: 34px 1fr 52px; gap: .8rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.bars li:last-child { border-bottom: 0; }
.bars img { width: 30px; height: 30px; }
.bars .name { font-weight: 600; font-size: .95rem; display: flex; justify-content: space-between; gap: .5rem; }
.bars .name a { color: inherit; text-decoration: none; }
.bars .name a:hover { color: var(--blue); }
.track { height: 8px; background: #E9ECF1; border-radius: 99px; overflow: hidden; margin-top: .35rem; }
.track i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.track i.low { background: var(--stop); }
.track i.mid { background: #FF9F43; }
.track i.high { background: var(--go); }
.bars .pct { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

table.list { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.list th { text-align: left; font-weight: 650; color: var(--muted); padding: .6rem .5rem; border-bottom: 2px solid var(--line); }
table.list td { padding: .7rem .5rem; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: .2rem .65rem; border-radius: 99px; font-size: .82rem; font-weight: 700; }
.pill-pass { background: var(--go-soft); color: var(--go); }
.pill-fail { background: var(--stop-soft); color: var(--stop); }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty .btn { margin-top: 1rem; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.page-head p { margin: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.card-link { display: flex; flex-direction: column; gap: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.2rem; color: var(--ink); text-decoration: none; transition: border-color .15s; }
.card-link:hover { border-color: var(--blue); }
.card-link .top { display: flex; align-items: center; gap: .8rem; }
.card-link img { width: 44px; height: 44px; }
.card-link h3 { margin: 0; font-size: 1.02rem; }
.card-link .meta { font-size: .88rem; color: var(--muted); }
.card-link.feature { background: var(--asphalt); color: #fff; border-color: var(--asphalt); }
.card-link.feature .meta { color: #C9CFDA; }
.card-link.feature:hover { border-color: var(--marking); }

/* ---------------------------------------------------------------- start screen */
.start { max-width: 760px; }
.start .rules-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0; }
.start .rules-list div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.start .rules-list strong { display: block; font-size: 1.9rem; font-weight: 800; color: var(--blue); }
.start ul.how { padding-left: 1.2rem; }
.start ul.how li { margin-bottom: .4rem; }
@media (max-width: 560px) { .start .rules-list { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- exam screen */
.exam-body { background: #fff; }
.exam-progress { height: 5px; background: var(--asphalt); }
.exam-progress i { display: block; height: 100%; width: 0; background: var(--marking); transition: width .3s; }
.exam-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: stretch; background: var(--asphalt-2); color: #fff; min-height: 72px; }
.exam-bar .tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; background: var(--asphalt-3); color: #fff; border: 0; padding: 0 1.2rem; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.exam-bar .tool svg { width: 26px; height: 26px; }
.exam-bar .tool:hover { background: #474E5D; }
.timer { display: flex; align-items: center; justify-content: center; gap: .6rem; font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.timer svg { width: 24px; height: 24px; }
.timer.warn { color: #FF9F43; }
.timer.danger { color: #FF6B7F; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.finish { display: flex; align-items: center; gap: .6rem; background: var(--asphalt); color: #fff; border: 0; padding: 0 1.8rem; font: inherit; font-size: 1.15rem; font-weight: 750; cursor: pointer; }
.finish svg { width: 20px; height: 20px; }
.finish:hover { background: var(--stop); }

.qstrip { display: grid; grid-template-columns: 56px 1fr 56px; background: #F3F4F6; border-bottom: 1px solid var(--line); }
.qstrip .arrow { border: 0; background: transparent; color: #8A93A3; cursor: pointer; display: grid; place-items: center; }
.qstrip .arrow:hover { color: var(--ink); background: #E7EAEF; }
.qstrip .arrow svg { width: 26px; height: 26px; }
.qnums { display: flex; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; }
.qnums::-webkit-scrollbar { display: none; }
.qnums button {
  flex: 0 0 64px; height: 64px; border: 0; background: transparent; font: inherit; font-size: 1.2rem; font-weight: 600;
  color: #8A93A3; cursor: pointer; position: relative; font-variant-numeric: tabular-nums;
}
.qnums button:hover { color: var(--ink); background: #E7EAEF; }
.qnums button.answered { color: var(--ink); }
.qnums button.answered::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: 10px; height: 4px; border-radius: 2px; background: var(--blue); }
.qnums button.flagged::before { content: ""; position: absolute; top: 9px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: #FF8A00; }
.qnums button.current { background: var(--asphalt-3); color: #fff; }
.qnums button.current::after { background: var(--sky); }

.exam-stage { max-width: 1120px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
.q-figure { position: relative; width: min(560px, 100%); aspect-ratio: 3 / 2; background: #EEF1F5; border-radius: 6px; box-shadow: 0 2px 10px rgba(30,33,41,.15); display: grid; place-items: center; overflow: hidden; margin-bottom: 1.8rem; }
.q-figure img { max-width: 78%; max-height: 82%; width: auto; height: auto; }
.q-figure img.scene { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: cover; }
.q-figure .zoom { position: absolute; right: 0; bottom: 0; width: 52px; height: 52px; border: 0; background: var(--asphalt); color: #fff; display: grid; place-items: center; cursor: pointer; border-top-left-radius: 6px; }
.q-figure .zoom svg { width: 24px; height: 24px; }
.q-figure.noimg { aspect-ratio: auto; height: 0; margin: 0; box-shadow: none; }

.q-head { display: grid; grid-template-columns: 84px 1fr 84px; background: #E7EAEF; min-height: 84px; }
.q-head .q-num { background: var(--asphalt-3); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 2.6rem; font-variant-numeric: tabular-nums; }
.q-head .q-text { padding: 1rem 1.3rem; font-weight: 700; font-size: 1.28rem; display: flex; align-items: center; line-height: 1.35; }
.q-head .q-next { background: var(--asphalt-3); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center; }
.q-head .q-next:hover { background: var(--blue); }
.q-head .q-next svg { width: 40px; height: 40px; }
.q-head .q-next.ready { background: var(--blue); }

.answers { display: block; }
.ans {
  display: grid; grid-template-columns: 84px 1fr; width: 100%; border: 0; padding: 0; background: #fff; text-align: left;
  font: inherit; color: var(--ink); cursor: pointer; border-bottom: 1px solid #EEF0F3;
}
.ans .letter { background: #F3F4F6; display: grid; place-items: center; font-size: 2.6rem; font-weight: 500; color: #5D6577; min-height: 80px; }
.ans .ans-text { padding: 1rem 1.4rem; font-size: 1.12rem; display: flex; align-items: center; }
.ans:hover .letter { background: #E7EAEF; color: var(--ink); }
.ans:hover .ans-text { background: #FAFBFC; }
.ans[aria-pressed="true"] .letter { background: var(--blue); color: #fff; }
.ans[aria-pressed="true"] .ans-text { background: var(--blue-soft); font-weight: 650; }
.ans.correct .letter { background: var(--go); color: #fff; }
.ans.correct .ans-text { background: var(--go-soft); }
.ans.wrong .letter { background: var(--stop); color: #fff; }
.ans.wrong .ans-text { background: var(--stop-soft); }
.ans[disabled] { cursor: default; }

.q-tools { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.2rem; flex-wrap: wrap; }
.flag-btn { display: inline-flex; align-items: center; gap: .5rem; background: none; border: 2px solid var(--line); border-radius: var(--radius); padding: .6rem 1rem; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); }
.flag-btn[aria-pressed="true"] { border-color: #FF8A00; background: #FFF1E0; }
.flag-btn svg { width: 18px; height: 18px; }
.kbd-hint { color: var(--muted); font-size: .88rem; align-self: center; }
kbd { font-family: inherit; font-size: .8rem; background: #F3F4F6; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: .05rem .4rem; }
.save-state { font-size: .85rem; color: var(--muted); min-height: 1.2em; }

@media (max-width: 720px) {
  .exam-bar { min-height: 60px; }
  .exam-bar .tool { padding: 0 .8rem; }
  .timer { font-size: 1.35rem; }
  .finish { padding: 0 1rem; font-size: 1rem; }
  .qnums button { flex-basis: 52px; height: 54px; font-size: 1.05rem; }
  .qnums button.answered::after { left: 16px; right: 16px; }
  .qstrip { grid-template-columns: 40px 1fr 40px; }
  .exam-stage { padding: 1.2rem .8rem 2rem; }
  .q-head, .ans { grid-template-columns: 56px 1fr; }
  .q-head { grid-template-columns: 56px 1fr 60px; min-height: 68px; }
  .q-head .q-num { font-size: 1.8rem; }
  .q-head .q-text { font-size: 1.05rem; padding: .8rem; }
  .ans .letter { font-size: 1.8rem; min-height: 64px; }
  .ans .ans-text { font-size: 1rem; padding: .8rem; }
}

/* modal & lightbox */
.modal { position: fixed; inset: 0; background: rgba(20,22,28,.7); display: none; place-items: center; padding: 1rem; z-index: 50; }
.modal.open { display: grid; }
.modal-card { background: #fff; border-radius: var(--radius-lg); padding: 1.8rem; max-width: 460px; width: 100%; }
.modal-card .actions { display: flex; gap: .7rem; justify-content: flex-end; margin-top: 1.4rem; flex-wrap: wrap; }
.lightbox .modal-card { max-width: 900px; padding: 1rem; background: #EEF1F5; }
.lightbox img { width: 100%; max-height: 80vh; object-fit: contain; }
.help-list { padding-left: 1.2rem; margin: 0; }
.help-list li { margin-bottom: .45rem; }

/* ---------------------------------------------------------------- practice */
.practice-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--calm); color: #fff; padding: .9rem 1.2rem; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.practice-head .count { font-variant-numeric: tabular-nums; font-weight: 700; }
.practice-head .score { color: var(--sky); font-weight: 700; }
.practice-box { background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); padding: 1.5rem; }
.practice-box .q-figure { margin-left: auto; margin-right: auto; }
.feedback { margin-top: 1.2rem; padding: 1rem 1.2rem; border-radius: var(--radius); display: none; }
.feedback.show { display: block; }
.feedback.good { background: var(--go-soft); border-left: 5px solid var(--go); }
.feedback.bad { background: var(--stop-soft); border-left: 5px solid var(--stop); }
.feedback strong { display: block; margin-bottom: .2rem; }
.practice-actions { display: flex; justify-content: flex-end; margin-top: 1.2rem; }

/* ---------------------------------------------------------------- results */
.result-hero { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; border-radius: var(--radius-lg); padding: 2rem; color: #fff; }
.result-hero.pass { background: var(--go); }
.result-hero.fail { background: var(--stop); }
.result-hero h1 { color: #fff; margin-bottom: .3rem; }
.result-hero p { color: rgba(255,255,255,.85); margin: 0; }
.big-score { font-size: 4.2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.big-score small { font-size: 1.6rem; opacity: .75; }
.review { list-style: none; margin: 0; padding: 0; }
.review > li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.2rem; display: grid; grid-template-columns: 120px 1fr; gap: 1.2rem; }
.review > li + li { margin-top: .9rem; }
.review .thumb { width: 120px; aspect-ratio: 3/2; background: #EEF1F5; border-radius: 8px; display: grid; place-items: center; }
.review .thumb img { max-width: 80%; max-height: 80%; }
.review .thumb img.scene { max-width: 100%; max-height: 100%; border-radius: 8px; }
.review .thumb.none { background: var(--paper); color: var(--muted); font-weight: 800; font-size: 1.6rem; }
.review h3 { font-size: 1rem; font-weight: 650; line-height: 1.4; }
.review ol { list-style: none; padding: 0; margin: .5rem 0; }
.review ol li { padding: .35rem .6rem; border-radius: 6px; font-size: .95rem; display: flex; gap: .6rem; }
.review ol li b { width: 1.2rem; flex: none; }
.review ol li.is-correct { background: var(--go-soft); }
.review ol li.is-wrong { background: var(--stop-soft); }
.review .why { font-size: .92rem; color: var(--muted); margin: .4rem 0 0; }
.review .tag { font-size: .8rem; font-weight: 700; color: var(--muted); }
.filter { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filter button { border: 2px solid var(--line); background: #fff; border-radius: 99px; padding: .45rem .9rem; font: inherit; font-weight: 600; cursor: pointer; }
.filter button[aria-pressed="true"] { border-color: var(--asphalt); background: var(--asphalt); color: #fff; }
@media (max-width: 640px) { .review > li { grid-template-columns: 1fr; } .result-hero { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- study */
.lesson { max-width: 760px; }
.lesson-head { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1rem; }
.lesson-head img { width: 72px; height: 72px; }
.keypoints { list-style: none; padding: 0; margin: 1.5rem 0; counter-reset: kp; }
.keypoints li { position: relative; padding: .9rem 1rem .9rem 3.4rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .6rem; }
.keypoints li::before { counter-increment: kp; content: counter(kp); position: absolute; left: 1rem; top: .85rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--marking); color: #fff; font-weight: 800; font-size: .85rem; display: grid; place-items: center; }
.sign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; margin: 1rem 0 2rem; }
.sign-grid figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; text-align: center; }
.sign-grid img { width: 80px; height: 80px; margin: 0 auto .6rem; }
.sign-grid img.scene { width: 100%; height: auto; }
.sign-grid figcaption { font-size: .86rem; line-height: 1.35; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* guest trial */
.qnums button.locked { color: #B6BCC7; }
.qnums button.locked::before { content: ""; position: absolute; top: 10px; right: 12px; width: 8px; height: 7px; border: 2px solid #B6BCC7; border-bottom: 0; border-radius: 4px 4px 0 0; }
.gate { text-align: center; max-width: 520px; padding: 2.2rem; }
.gate .gate-sign { width: 72px; height: 72px; margin: 0 auto 1rem; }
.gate .actions { justify-content: center; }
.link-plain { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ================================================================ HOME (v2) */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.display { font-size: clamp(2rem, 4.2vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; }
.section-lead { font-size: 1.18rem; color: var(--muted); max-width: 56ch; margin-bottom: 2.4rem; }
.btn-xl { padding: 1.2rem 1.9rem; font-size: 1.15rem; border-radius: 12px; }
.btn-glass { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.45); backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255,255,255,.22); border-color: #fff; }
.hide-sm { }
@media (max-width: 760px) { .hide-sm { display: none; } }

/* header floating over the hero */
.public-top.over-hero { position: absolute; top: 0; left: 0; right: 0; z-index: 5; background: linear-gradient(rgba(6,14,32,.65), rgba(6,14,32,0)); border-bottom: 0; }
.public-top.over-hero .inner { max-width: 1200px; padding-top: 1.3rem; }

/* hero */
.road-hero { position: relative; min-height: clamp(640px, 94vh, 980px); overflow: hidden; background: #0B1E44; color: #fff; isolation: isolate; }
.hero-scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.road-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6,14,32,.6) 0%, rgba(6,14,32,.3) 40%, rgba(6,14,32,0) 62%); }
.road-hero-inner { max-width: 1200px; margin: 0 auto; padding: clamp(7rem, 15vh, 10rem) 1.5rem 0; }
.road-hero h1 { font-size: clamp(2.5rem, 6vw, 5.2rem); line-height: 1.05; color: #fff; max-width: 13ch; letter-spacing: -.025em; text-shadow: 0 2px 30px rgba(6,14,32,.35); margin-bottom: 1.4rem; }
.road-hero .lead { font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: #E4E9F2; max-width: 40ch; }
.road-hero .cta, .night-cta .cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.hero-note { margin-top: 1rem; color: #C9D3E6; font-size: .98rem; }
.road-hero-inner > * { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.road-hero-inner > *:nth-child(2) { animation-delay: .12s; }
.road-hero-inner > *:nth-child(3) { animation-delay: .24s; }
.road-hero-inner > *:nth-child(4) { animation-delay: .36s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* rules band overlapping the dashboard */
.rules-band { background: var(--asphalt); color: #fff; border-top: 6px solid var(--marking); }
.rules-band-inner { max-width: 1200px; margin: 0 auto; padding: 2.4rem 1.5rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.rules-band strong { display: block; font-size: clamp(2.4rem, 4vw, 3.4rem); font-weight: 800; color: var(--sky); line-height: 1; }
.rules-band strong small { font-size: .45em; color: #fff; margin-left: .15em; }
.rules-band span { display: block; color: #C9CFDA; margin-top: .5rem; max-width: 22ch; }
@media (max-width: 760px) { .rules-band-inner { grid-template-columns: repeat(2, 1fr); } }

.home-section { padding: clamp(4rem, 9vw, 7rem) 0; }

/* route: a road with km posts */
.route { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; position: relative; }
.route::before { content: ""; position: absolute; left: 0; right: 0; top: 34px; height: 22px; background: var(--asphalt); border-radius: 11px;
  background-image: repeating-linear-gradient(90deg, var(--marking) 0 34px, transparent 34px 60px); background-size: 100% 4px; background-repeat: no-repeat; background-position: 0 9px; }
.route li { position: relative; padding-top: 5.2rem; }
.route .km { position: absolute; top: 0; left: 0; width: 58px; height: 90px; background: #fff; border: 3px solid var(--asphalt); border-radius: 29px 29px 6px 6px; display: grid; place-items: center; padding-bottom: 18px; font-weight: 800; font-size: 1.6rem; color: var(--asphalt); }
.route .km::after { content: ""; position: absolute; left: 0; right: 0; top: 14px; height: 12px; background: var(--stop); }
.route h3 { font-size: 1.3rem; margin-top: 1.2rem; }
.route p { color: var(--muted); }
@media (max-width: 860px) { .route { grid-template-columns: 1fr 1fr; } .route::before { display: none; } .route li { padding-top: 0; padding-left: 5rem; min-height: 96px; } .route h3 { margin-top: .2rem; } }
@media (max-width: 520px) { .route { grid-template-columns: 1fr; } }

/* split with mini exam mockup */
.split-section { background: #E9EDF3; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.ticks { list-style: none; padding: 0; margin: 0 0 2rem; }
.ticks li { position: relative; padding: .55rem 0 .55rem 2.2rem; font-size: 1.08rem; border-bottom: 1px solid #D5DBE4; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .8rem; width: 22px; height: 22px; border-radius: 50%; background: var(--go); }
.ticks li::after { content: ""; position: absolute; left: 7px; top: 1.05rem; width: 8px; height: 5px; border: 3px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg); }
.mini-exam { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(14,30,68,.45), 0 0 0 1px rgba(14,30,68,.06); transform: perspective(1400px) rotateY(6deg) rotateX(2deg); }
.mini-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; background: var(--asphalt-2); color: #fff; font-weight: 700; }
.mini-tool { background: var(--asphalt-3); padding: .9rem 1rem; font-size: .8rem; }
.mini-clock { text-align: center; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.mini-finish { background: var(--asphalt); padding: .9rem 1.2rem; }
.mini-strip { display: flex; background: #F3F4F6; border-bottom: 1px solid var(--line); }
.mini-strip span { flex: 1; text-align: center; padding: .7rem 0; color: #8A93A3; font-weight: 600; position: relative; }
.mini-strip span.done { color: var(--ink); }
.mini-strip span.done::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 6px; height: 3px; background: var(--blue); border-radius: 2px; }
.mini-strip span.on { background: var(--asphalt-3); color: #fff; }
.mini-body { padding: 1.2rem; }
.mini-img { background: #EEF1F5; border-radius: 6px; height: 150px; display: grid; place-items: center; margin-bottom: 1rem; }
.mini-img img { height: 110px; width: auto; }
.mini-q, .mini-a { display: grid; grid-template-columns: 52px 1fr; align-items: center; }
.mini-q { grid-template-columns: 52px 1fr 52px; background: #E7EAEF; font-weight: 700; min-height: 52px; }
.mini-q b { background: var(--asphalt-3); color: #fff; height: 100%; display: grid; place-items: center; font-size: 1.4rem; }
.mini-q span { padding: 0 .9rem; }
.mini-q i { background: var(--blue); height: 100%; }
.mini-a { border-bottom: 1px solid #EEF0F3; }
.mini-a b { background: #F3F4F6; height: 100%; min-height: 48px; display: grid; place-items: center; font-weight: 500; font-size: 1.4rem; color: var(--muted); }
.mini-a span { padding: .6rem .9rem; font-size: .95rem; }
.mini-a.sel b { background: var(--blue); color: #fff; }
.mini-a.sel span { background: var(--blue-soft); font-weight: 650; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .mini-exam { transform: none; } }

/* sign wall on asphalt */
.sign-wall { background: var(--asphalt); color: #fff; padding: clamp(4rem, 9vw, 7rem) 0; position: relative; }
.sign-wall::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: repeating-linear-gradient(90deg, var(--marking) 0 70px, transparent 70px 120px); }
.sign-wall .display { color: #fff; }
.sign-wall .section-lead { color: #C9CFDA; }
.sign-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.2rem; }
.sign-row figure { margin: 0; text-align: center; background: var(--asphalt-2); border-radius: 14px; padding: 1.4rem .8rem 1rem; }
.sign-row img { width: 84px; height: 84px; margin: 0 auto .9rem; transition: transform .2s; }
.sign-row figure:hover img { transform: scale(1.08); }
.sign-row figcaption { font-size: .92rem; color: #DDE2EA; }
@media (max-width: 900px) { .sign-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .sign-row { grid-template-columns: repeat(2, 1fr); } }

/* topics */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.topic-tile { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; }
.topic-tile img { width: 52px; height: 52px; flex: none; }
.topic-tile h3 { margin: 0 0 .15rem; font-size: 1.02rem; }
.topic-tile span { color: var(--muted); font-size: .9rem; }

/* trust */
.trust { padding-top: 0; }
.trust-inner { display: grid; grid-template-columns: 96px 1fr; gap: 2rem; align-items: center; background: var(--blue-soft); border-radius: 20px; padding: 2.4rem; }
.trust-inner svg { width: 96px; height: 96px; }
.trust-inner p { margin: 0; color: var(--asphalt-2); font-size: 1.08rem; }
@media (max-width: 600px) { .trust-inner { grid-template-columns: 1fr; } }

/* night CTA */
.night-cta { position: relative; overflow: hidden; color: #fff; min-height: 520px; display: flex; align-items: flex-start; isolation: isolate; }
.night-road { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.night-inner { max-width: 1200px; margin: 0 auto; padding: 5rem 1.5rem 12rem; width: 100%; text-align: center; }
.night-inner .display { color: #fff; max-width: 20ch; margin: 0 auto; }
.night-cta .cta { justify-content: center; }

/* footer */
.big-foot { background: #0F1218; color: #AEB6C4; padding: 4rem 0 2rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.big-foot p { margin-top: 1rem; max-width: 40ch; }
.big-foot h3 { color: #fff; font-size: 1rem; }
.big-foot a:not(.brand) { display: block; color: #AEB6C4; text-decoration: none; padding: .25rem 0; }
.big-foot a:not(.brand):hover { color: var(--sky); }
.foot-note { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #252A33; font-size: .88rem; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }
.public-top nav a { white-space: nowrap; }
@media (max-width: 420px) { .public-top .inner { padding-left: 1rem; padding-right: 1rem; } .public-top nav { gap: .2rem; } .public-top nav .btn { padding: .7rem .9rem; font-size: .92rem; } .brand-name { font-size: 1.1rem; } .brand-logo { height: 38px; } }
.route .km { padding: 26px 0 0; place-items: start center; }
.route .km::after { top: 9px; height: 10px; }

/* ================================================================ backend */
.bo-tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1.6rem; border-bottom: 2px solid var(--line); }
.bo-tabs a { padding: .7rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.bo-tabs a:hover { color: var(--ink); }
.bo-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--marking); }
.bo-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.bo-stats .stat { text-decoration: none; color: var(--ink); }
.bo-stats a.stat:hover { border-color: var(--marking); }
@media (max-width: 900px) { .bo-stats { grid-template-columns: 1fr 1fr; } }
.bo-filter { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.bo-filter input, .bo-filter select, .bo-edit select, .bo-edit textarea, .bo-edit input[type=text], .bo-edit input[type=file], .panel input[type=file], .panel input[type=number] {
  font: inherit; padding: .65rem .8rem; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); }
.bo-filter input[type=search] { flex: 1 1 260px; }
.bo-edit textarea, .bo-edit select, .bo-edit input[type=text], .panel input[type=number] { width: 100%; }
.bo-table td { vertical-align: middle; }
.bo-thumb { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; background: #EEF1F5; }
.pill-warn { background: #FFF1E0; color: #B35C00; }
.bo-edit { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 980px) { .bo-edit { grid-template-columns: 1fr; } }
.bo-options { border: 0; padding: 0; margin: 0 0 1.1rem; }
.bo-options legend { font-weight: 650; margin-bottom: .35rem; font-size: .95rem; }
.bo-opt { display: grid; grid-template-columns: 28px 1fr; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.bo-opt input[type=radio] { width: 20px; height: 20px; accent-color: var(--go); }
.bo-check { display: flex; gap: .5rem; align-items: center; margin: .4rem 0; font-weight: 600; }
.bo-photo { width: 100%; border-radius: 10px; background: #EEF1F5; }
.bo-review { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1rem; }
.bo-review h3 { font-size: 1.02rem; margin: .4rem 0 .6rem; line-height: 1.35; }
.bo-answers { list-style: none; padding: 0; margin: 0 0 .6rem; }
.bo-answers li { padding: .4rem .6rem; border-radius: 6px; font-size: .95rem; }
.bo-answers li.is-correct { background: var(--go-soft); font-weight: 650; }
.bo-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .8rem; }
.bo-actions form { margin: 0; }
.chip { display: inline-block; border: 2px solid var(--line); background: #fff; border-radius: 99px; padding: .4rem .9rem; font-weight: 600; text-decoration: none; color: var(--ink); }
.chip.on { background: var(--asphalt); border-color: var(--asphalt); color: #fff; }
.bo-progress { height: 12px; background: #E9ECF1; border-radius: 99px; overflow: hidden; margin: .8rem 0 .4rem; }
.bo-progress i { display: block; height: 100%; background: var(--marking); transition: width .3s; }
.nav a.nav-donate { color: var(--blue); }

/* ================================================================ donate */
.donate-card { text-align: center; max-width: 480px; }
.donate-icon { width: 56px; height: 56px; margin: 0 auto 1rem; }
.donate-card form { text-align: left; margin-top: 1.4rem; }
.amounts { border: 0; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.amounts label { position: relative; }
.amounts input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.amounts span { display: block; text-align: center; padding: .9rem 0; border: 2px solid var(--line); border-radius: var(--radius); font-weight: 700; font-size: 1.05rem; }
.amounts input:checked + span { border-color: var(--marking); background: var(--marking-soft); color: var(--blue); }
.amounts input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.btn-donate { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-donate:hover { border-color: #fff; }

/* ================================================================ exam screen v2 (GoCodigo layout) */
.x-body { background: #F2F4F8; }
.x-top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  background: var(--asphalt); color: #fff; padding: .7rem 1.4rem; }
.x-top-left { display: flex; align-items: center; gap: .9rem; }
.x-logo { display: block; height: 34px; width: auto; }
.x-top-left strong { display: block; font-size: 1rem; }
.x-top-left span { display: block; font-size: .82rem; color: #AEB6C4; }
.x-timer { display: inline-flex; align-items: center; gap: .55rem; background: #2C313C; border: 1px solid #3A404D; border-radius: 99px;
  padding: .55rem 1.2rem; font-size: 1.55rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.x-timer svg { width: 22px; height: 22px; color: var(--sky); }
.x-timer.warn { color: #FFB86B; border-color: #FF9F43; }
.x-timer.danger { color: #FF8597; border-color: #FF6B7F; animation: pulse 1s ease-in-out infinite; }
.x-top-right { display: flex; justify-content: flex-end; gap: .6rem; }
.x-ghost { background: transparent; color: #fff; border: 1.5px solid #4A5160; border-radius: 10px; padding: .6rem 1rem; font: inherit; font-weight: 600; cursor: pointer; }
.x-ghost:hover { border-color: #fff; }
.x-finish { background: var(--marking); color: #fff; border: 0; border-radius: 10px; padding: .65rem 1.2rem; font: inherit; font-weight: 700; cursor: pointer; }
.x-finish:hover { background: #1F66E6; }
.x-progress { height: 4px; background: #D9DEE7; }
.x-progress i { display: block; height: 100%; width: 0; background: var(--marking); transition: width .3s; }

.x-stage { max-width: 1240px; margin: 0 auto; padding: 1.6rem 1.4rem 3rem; display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "photo qa" "map map" "ad ad"; gap: 1.4rem 1.8rem; align-items: start; }
.x-photo { grid-area: photo; position: sticky; top: 92px; }
.x-photo .q-figure { width: 100%; margin: 0; aspect-ratio: 4 / 3; border-radius: 18px; background: #fff; box-shadow: 0 18px 40px -24px rgba(14,30,68,.45); }
.x-photo .q-figure img { max-width: 72%; max-height: 72%; }
.x-photo .q-figure img.scene { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: cover; }
.x-photo .q-figure .zoom { width: 46px; height: 46px; right: 12px; bottom: 12px; border-radius: 12px; background: rgba(30,33,41,.82); }
.x-photo .q-figure.noimg { display: none; }
.x-qa { grid-area: qa; background: #fff; border-radius: 18px; padding: 1.6rem; box-shadow: 0 18px 40px -28px rgba(14,30,68,.4); }
.x-count { color: var(--muted); font-weight: 600; font-size: .95rem; margin: 0 0 .5rem; }
.x-count span { color: var(--ink); }
.x-question { font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.35; font-weight: 750; margin: 0 0 1.3rem; letter-spacing: -.01em; }

.x-qa .answers { display: grid; gap: .7rem; }
.x-qa .ans { display: flex; align-items: center; gap: 1rem; border: 2px solid var(--line); border-radius: 14px; background: #fff; padding: .95rem 1.1rem; min-height: 64px; transition: border-color .12s, background .12s; }
.x-qa .ans .letter { flex: none; width: 40px; height: 40px; min-height: 0; border-radius: 50%; background: #EEF1F6; color: var(--asphalt-2); font-size: 1.05rem; font-weight: 800; display: grid; place-items: center; }
.x-qa .ans .ans-text { padding: 0; font-size: 1.06rem; background: none; }
.x-qa .ans:hover { border-color: #AFC6F2; background: #F7FAFF; }
.x-qa .ans:hover .letter { background: var(--marking-soft); color: var(--blue); }
.x-qa .ans:hover .ans-text { background: none; }
.x-qa .ans[aria-pressed="true"] { border-color: var(--marking); background: var(--marking-soft); }
.x-qa .ans[aria-pressed="true"] .letter { background: var(--marking); color: #fff; }
.x-qa .ans[aria-pressed="true"] .ans-text { background: none; font-weight: 650; }

.x-nav { display: grid; grid-template-columns: auto auto 1fr; gap: .7rem; margin-top: 1.4rem; align-items: center; }
.x-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border-radius: 12px; padding: .85rem 1.2rem; font: inherit; font-weight: 700; cursor: pointer; border: 2px solid transparent; }
.x-btn svg { width: 18px; height: 18px; }
.x-btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.x-btn-ghost:hover { border-color: var(--ink); }
.x-btn-ghost[disabled] { opacity: .45; cursor: default; }
.x-btn-primary { background: var(--asphalt); color: #fff; justify-self: end; min-width: 170px; }
.x-btn-primary.ready { background: var(--marking); }
.x-btn-primary:hover { background: #1F66E6; }
.x-nav .flag-btn { padding: .78rem 1rem; border-radius: 12px; }
.x-qa .save-state { margin: .8rem 0 0; }

.x-map { grid-area: map; background: #fff; border-radius: 18px; padding: 1.2rem 1.4rem; box-shadow: 0 18px 40px -30px rgba(14,30,68,.4); }
.x-map-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.x-map-head h2 { font-size: 1.05rem; margin: 0; }
.x-legend { font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.x-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-left: .5rem; }
.lg-answered { background: var(--marking-soft); border: 2px solid var(--marking); }
.lg-flagged { background: #FFF1E0; border: 2px solid #FF8A00; }
.lg-current { background: var(--asphalt); }
.x-grid { display: grid; grid-template-columns: repeat(15, 1fr); gap: .45rem; overflow: visible; }
.x-grid button { position: relative; aspect-ratio: 1; min-width: 0; height: auto; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted);
  font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; flex: none; }
.x-grid button:hover { border-color: var(--ink); color: var(--ink); background: #fff; }
.x-grid button.answered { background: var(--marking-soft); border-color: var(--marking); color: var(--blue); }
.x-grid button.answered::after, .x-grid button.flagged::before { content: none; }
.x-grid button.flagged { background: #FFF1E0; border-color: #FF8A00; color: #B35C00; }
.x-grid button.current { background: var(--asphalt); border-color: var(--asphalt); color: #fff; }
.x-grid button.locked { color: #C3C9D3; border-style: dashed; }
.x-grid button.locked::before { content: none; }
.x-map .kbd-hint { display: block; margin: .9rem 0 0; }
.x-stage > .ad-slot { grid-area: ad; }

@media (max-width: 960px) {
  .x-top { grid-template-columns: 1fr auto; padding: .6rem .9rem; }
  .x-top-left div { display: none; }
  .x-top-right { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  .x-timer { font-size: 1.25rem; padding: .4rem .9rem; }
  .x-stage { grid-template-columns: 1fr; grid-template-areas: "photo" "qa" "map" "ad"; padding: 1rem .8rem 6.5rem; gap: 1rem; }
  .x-photo { position: static; }
  .x-qa { padding: 1.1rem; }
  .x-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; margin: 0; padding: .7rem .8rem; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -16px rgba(0,0,0,.3); }
  .x-btn-primary { min-width: 0; }
  .x-grid { grid-template-columns: repeat(10, 1fr); }
}

/* ================================================================ category picker */
.cat-picker { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: 0 0 1rem; }
.cat-label { font-weight: 700; }
.cat-options { display: flex; flex-wrap: wrap; gap: .45rem; }
.cat-chip { border: 2px solid var(--line); background: #fff; border-radius: 99px; padding: .45rem .95rem; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; color: var(--ink); }
.cat-chip:hover { border-color: var(--marking); }
.cat-chip.on { background: var(--marking); border-color: var(--marking); color: #fff; }
.bo-cats { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }

/* ================================================================ ads */
.ad-slot { margin: 1.5rem auto; max-width: 970px; text-align: center; }
.ad-label { display: block; font-size: .72rem; color: #8A93A3; margin-bottom: .3rem; letter-spacing: .02em; }
.ad-placeholder { display: grid; place-items: center; min-height: 100px; border: 2px dashed #C9D0DB; border-radius: 12px; background: repeating-linear-gradient(45deg, #F7F8FA 0 12px, #EFF2F6 12px 24px); color: #8A93A3; font-weight: 600; font-size: .9rem; }
.home-section + .wrap .ad-slot, .wrap > .ad-slot { margin: 2rem auto; }

/* ---------------------------------------------------------------- comments */
.comments h2 { margin: 0 0 .6rem; font-size: 1.2rem; }
.comments-inline { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.cm-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.cm-form { margin: .4rem 0 1.2rem; }
.cm-form textarea { width: 100%; font: inherit; padding: .75rem .9rem; border: 2px solid var(--line); border-radius: var(--radius); resize: vertical; background: #fff; color: var(--ink); }
.cm-form textarea:focus { outline: none; border-color: var(--marking); }
.cm-form-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: .5rem; }
.cm-replying { margin: 0 0 .4rem; font-size: .9rem; color: var(--muted); }
.cm-thread { border-top: 1px solid #EDF1F6; padding: .9rem 0; }
.cm header { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.cm-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--calm-2); color: var(--calm); display: inline-grid; place-items: center; font-weight: 800; font-size: .85rem; }
.cm-staff .cm-avatar { background: var(--marking); color: #fff; }
.cm-badge { background: var(--marking-soft); color: var(--blue); font-size: .72rem; font-weight: 800; padding: .1rem .45rem; border-radius: 99px; }
.cm p { margin: .45rem 0 .35rem 2.4rem; line-height: 1.6; white-space: pre-line; }
.cm footer { display: flex; gap: .3rem; margin-left: 2.1rem; flex-wrap: wrap; }
.cm footer form { margin: 0; }
.cm-act { background: none; border: 0; font: inherit; font-size: .85rem; font-weight: 600; color: var(--muted); cursor: pointer; padding: .25rem .45rem; border-radius: 6px; }
.cm-act:hover { background: #EEF3F9; color: var(--ink); }
.cm-act.on { color: var(--stop); }
.cm-replies { margin: .5rem 0 0 2.4rem; padding-left: 1rem; border-left: 3px solid var(--calm-2); }
.cm-replies .cm { padding: .5rem 0; }
.cm-empty { color: var(--muted); padding: .6rem 0; }
.discuss { max-width: 900px; }
.discuss-q { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.4rem; align-items: start; }
.discuss-img { width: 100%; border-radius: 12px; }
.discuss-title { font-size: 1.35rem; line-height: 1.35; margin: .4rem 0 .9rem; }
.discuss-answers { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; gap: .45rem; }
.discuss-answers li { display: grid; grid-template-columns: 30px 1fr; gap: .2rem .5rem; padding: .6rem .75rem; border: 2px solid var(--line); border-radius: var(--radius); }
.discuss-answers li.is-correct { border-color: var(--go); background: var(--go-soft); }
.discuss-answers em { grid-column: 2; font-style: normal; font-size: .8rem; font-weight: 700; color: var(--go); }
.discuss .comments { margin-top: 1.2rem; }
.discuss-link { display: inline-block; margin-top: .5rem; font-weight: 600; font-size: .92rem; }
@media (max-width: 760px) { .discuss-q { grid-template-columns: 1fr; } .cm p, .cm footer { margin-left: 0; } .cm-replies { margin-left: .6rem; } }

/* ---------------------------------------------------------------- backend: users */
.bo-stats-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .bo-stats-5 { grid-template-columns: repeat(3, 1fr); } }
.dot-online { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #22A35A; box-shadow: 0 0 0 3px #D9F2E3; margin-right: .45rem; vertical-align: middle; }
.pill-info { background: var(--marking-soft); color: var(--blue); }
.btn-sm { padding: .4rem .75rem; font-size: .85rem; }
.bo-user-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 1rem; margin-top: 1rem; align-items: start; }
@media (max-width: 980px) { .bo-user-grid { grid-template-columns: 1fr; } }
.bo-user-grid h2 { font-size: 1.1rem; margin: 0 0 .7rem; }
.bo-actions form { margin: 0 0 .6rem; }
.bo-input { width: 100%; font: inherit; padding: .6rem .75rem; border: 2px solid var(--line); border-radius: var(--radius); margin: .3rem 0 .5rem; }
.bo-row-actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.bo-row-actions form { margin: 0; }
.discuss-q.no-img { grid-template-columns: 1fr; }
.bo-actions .btn { width: 100%; justify-content: center; }
.mb-btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; }
.mb-logo { background: #fff; color: #1B5FAA; font-weight: 900; font-size: .8rem; letter-spacing: -.02em; border-radius: 5px; padding: .15rem .35rem; }
.mb-steps { margin: 1rem 0 .7rem; padding-left: 1.2rem; color: var(--muted); line-height: 1.55; }
.mb-steps li { margin-bottom: .25rem; }
.bo-settings h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.switch-row { display: grid; grid-template-columns: 52px 1fr; gap: .9rem; align-items: center; padding: .9rem 0; border-top: 1px solid #EDF1F6; cursor: pointer; position: relative; }
.switch-row:last-of-type { margin-bottom: 1rem; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 48px; height: 28px; border-radius: 99px; background: #CBD5E1; position: relative; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch-row input:checked + .switch { background: var(--marking); }
.switch-row input:checked + .switch::after { transform: translateX(20px); }
.switch-row input:focus-visible + .switch { outline: 3px solid var(--sky); outline-offset: 2px; }
.switch-row input:disabled + .switch { opacity: .5; }

/* ================================================================ HOME (v3, calm) */
.hero3 { position: relative; overflow: hidden; background: linear-gradient(180deg, #EAF3FD 0%, #F4F9FF 62%, #FFFFFF 100%); padding: clamp(3rem, 7vw, 5.5rem) 0 2.5rem; isolation: isolate; }
.hero3-lines { position: absolute; right: 0; bottom: 0; width: min(60vw, 820px); height: 100%; z-index: -1; opacity: .9; }
.hero3-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero3-kicker { display: inline-flex; align-items: center; gap: .55rem; background: #fff; border: 1px solid var(--calm-line); color: var(--calm); font-weight: 700; font-size: .9rem; padding: .45rem .9rem; border-radius: 99px; box-shadow: 0 2px 10px -4px rgba(22,50,79,.18); }
.hero3-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--marking); box-shadow: 0 0 0 4px var(--marking-soft); }
.hero3 h1 { font-size: clamp(2.4rem, 5.2vw, 4.3rem); line-height: 1.06; letter-spacing: -.03em; color: var(--calm); margin: 1.2rem 0 1.1rem; max-width: 15ch; }
.hero3 .lead { font-size: clamp(1.08rem, 1.5vw, 1.25rem); color: #42597A; max-width: 46ch; line-height: 1.6; }
.hero3 .cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero3 .btn-ghost { background: #fff; }
.hero3-points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: #42597A; font-weight: 600; font-size: .95rem; }
.hero3-points li::before { content: "✓"; color: var(--go); font-weight: 900; margin-right: .45rem; }
.hero3-copy > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.hero3-copy > *:nth-child(2) { animation-delay: .08s; } .hero3-copy > *:nth-child(3) { animation-delay: .16s; } .hero3-copy > *:nth-child(4) { animation-delay: .24s; } .hero3-copy > *:nth-child(5) { animation-delay: .32s; }

.hero3-visual { position: relative; animation: rise .9s .15s cubic-bezier(.2,.7,.2,1) both; }
.pv { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(22,50,79,.35), 0 0 0 1px rgba(22,50,79,.06); }
.pv-top { display: flex; justify-content: space-between; align-items: center; background: var(--calm); color: #fff; padding: .85rem 1.1rem; font-weight: 700; font-size: .9rem; }
.pv-clock { background: rgba(255,255,255,.12); padding: .3rem .75rem; border-radius: 99px; font-variant-numeric: tabular-nums; }
.pv-body { padding: 1rem; }
.pv-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: #EEF3F9; }
.pv-img-sign { display: grid; place-items: center; } .pv-img-sign img { height: 70%; }
.pv-q { padding: .9rem .2rem .2rem; }
.pv-count { font-size: .82rem; color: var(--muted); } .pv-count b { color: var(--ink); }
.pv-q p { font-weight: 750; font-size: 1.05rem; line-height: 1.35; margin: .3rem 0 .75rem; color: var(--ink); }
.pv-a { display: grid; grid-template-columns: 32px 1fr; gap: .7rem; align-items: center; border: 2px solid var(--line); border-radius: 12px; padding: .55rem .7rem; margin-bottom: .5rem; font-size: .92rem; }
.pv-a b { width: 32px; height: 32px; border-radius: 50%; background: #EEF2F7; display: grid; place-items: center; font-size: .85rem; }
.pv-a.on { border-color: var(--marking); background: var(--marking-soft); }
.pv-a.on b { background: var(--marking); color: #fff; }
.pv-badge { position: absolute; background: #fff; border-radius: 14px; box-shadow: 0 18px 40px -18px rgba(22,50,79,.4), 0 0 0 1px rgba(22,50,79,.06); padding: .75rem 1rem; display: flex; align-items: center; gap: .6rem; font-size: .88rem; font-weight: 650; color: var(--calm); }
.pv-badge strong { font-size: 1.5rem; font-weight: 800; color: var(--marking); }
.pv-badge-1 { left: -1.6rem; top: 30%; flex-direction: column; gap: 0; }
.pv-badge-2 { right: -1.2rem; bottom: 1.6rem; }
.pv-badge .ok { width: 28px; height: 28px; border-radius: 50%; background: var(--go-soft); color: var(--go); display: grid; place-items: center; font-weight: 900; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.stat-row > div { background: #fff; border: 1px solid var(--calm-line); border-radius: 16px; padding: 1.2rem 1.3rem; }
.stat-row strong { display: block; font-size: clamp(1.9rem, 3vw, 2.5rem); font-weight: 800; color: var(--calm); line-height: 1; }
.stat-row strong small { font-size: .5em; color: var(--muted); margin-left: .1em; }
.stat-row span { color: var(--muted); font-size: .95rem; }

.cats-section { background: #fff; padding-top: clamp(3rem, 6vw, 4.5rem); }
.cat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.cat-card { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; align-items: center; padding: 1.1rem 1.2rem; border: 1px solid var(--calm-line); border-radius: 16px; text-decoration: none; color: var(--ink); background: #FBFDFF; transition: border-color .15s, transform .15s, box-shadow .15s; }
.cat-card:hover { border-color: var(--marking); transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(22,50,79,.35); }
.cat-letter { width: 64px; height: 64px; border-radius: 14px; background: var(--calm); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; }
.cat-card strong { display: block; font-size: 1.05rem; }
.cat-card strong + span { color: var(--muted); font-size: .92rem; }

/* recolour the sections people liked, calmer backgrounds */
#route { background: #fff; }
.route::before { background: var(--calm); }
.route .km { border-color: var(--calm); color: var(--calm); }
.split-section { background: #F1F6FC; }
.ticks li { border-bottom-color: var(--calm-line); }
.mini-bar { background: var(--calm); }
.mini-tool { background: #24476D; }
.mini-finish { background: #0F2640; }
.mini-strip span.on { background: var(--calm); }
.mini-q b { background: var(--calm); }
.sign-wall { background: #fff; color: var(--ink); }
.sign-wall::before { background: repeating-linear-gradient(90deg, var(--calm-line) 0 70px, transparent 70px 120px); height: 6px; }
.sign-wall .display { color: var(--calm); }
.sign-wall .section-lead { color: var(--muted); }
.sign-row figure { background: #F4F8FD; border: 1px solid var(--calm-line); }
.sign-row figcaption { color: #2B4563; font-weight: 600; }
#topics { background: #F6F9FC; }
.topic-tile { border-color: var(--calm-line); }
.home-section .display { color: var(--calm); }

/* official materials */
.mat-section { background: linear-gradient(180deg, #F1F6FC, #F6F9FC); }
.mat-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; }
.mat-kicker { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .88rem; color: var(--calm); text-transform: uppercase; letter-spacing: .06em; }
.pt-flag { width: 20px; height: 14px; border-radius: 3px; background: linear-gradient(90deg, #046A38 0 40%, #DA291C 40% 100%); box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.mat-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--calm-line); border-radius: 16px; padding: 1.2rem 1.25rem; color: var(--ink); text-decoration: none; }
.mat-card-link { transition: border-color .15s, transform .15s; } .mat-card-link:hover { border-color: var(--marking); transform: translateY(-2px); }
.mat-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .7rem; }
.mat-type { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.mat-lang { font-size: .72rem; font-weight: 800; color: #046A38; background: #E4F3EA; border-radius: 6px; padding: .15rem .45rem; }
.mat-card h3 { font-size: 1.08rem; line-height: 1.3; margin: 0; color: var(--calm); }
.mat-en { margin: .2rem 0 .6rem; color: var(--marking); font-weight: 650; font-size: .92rem; }
.mat-sum { color: #4A5B72; font-size: .93rem; line-height: 1.55; margin: 0 0 .8rem; flex: 1; }
.mat-meta { font-size: .8rem; color: var(--muted); margin: 0 0 .9rem; }
.mat-btn { align-self: flex-start; }
.mat-head h1 { margin: .4rem 0 .6rem; color: var(--calm); }
.mat-tip { background: var(--calm-2); border: 1px solid var(--calm-line); border-radius: 12px; padding: .8rem 1rem; font-size: .93rem; color: #2B4563; margin-bottom: 1rem; }
.mat-group { margin-top: 2rem; }
.mat-group h2 { font-size: 1.25rem; margin: 0 0 .9rem; color: var(--calm); }
.mat-foot { margin-top: 2.5rem; }
.materials-public { padding-top: 2.5rem; padding-bottom: 4rem; }

/* closing CTA + footer */
.calm-cta { background: radial-gradient(1200px 400px at 50% 120%, #2A5C92 0%, var(--calm) 60%); color: #fff; text-align: center; padding: clamp(4rem, 9vw, 6.5rem) 0; position: relative; overflow: hidden; }
.calm-cta::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 8px; height: 80px; margin-left: -4px; background: repeating-linear-gradient(180deg, rgba(255,255,255,.5) 0 18px, transparent 18px 32px); }
.calm-cta .display { color: #fff; max-width: 20ch; margin: 0 auto .8rem; }
.calm-cta p { color: #C9DAEE; font-size: 1.1rem; }
.calm-cta .cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 1.8rem; }
.big-foot { background: #0E2238; color: #A9BBD0; }
.big-foot a:not(.brand) { color: #A9BBD0; }
.foot-note { border-top-color: #1F3A57; }

@media (max-width: 960px) {
  .hero3-grid { grid-template-columns: 1fr; }
  .hero3-visual { max-width: 560px; }
  .pv-badge-1 { left: auto; right: -.5rem; top: -1rem; }
  .pv-badge-2 { right: auto; left: -.5rem; bottom: -1rem; }
  .cat-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .cat-cards { grid-template-columns: 1fr; }
  .pv-badge { display: none; }
}
.bo-form .bo-field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.bo-form .bo-field label { font-weight: 650; }
.bo-form .bo-field input[type=text], .bo-form .bo-field input[type=url], .bo-form .bo-field input[type=number], .bo-form .bo-field select, .bo-form .bo-field textarea { font: inherit; padding: .65rem .8rem; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; }
.bo-form .bo-field-check { flex-direction: row; align-items: center; flex-wrap: wrap; }
.bo-form .field-error { color: var(--stop); font-size: .88rem; }
.pv-img.pv-img-contain { object-fit: contain; padding: 8%; }

/* partner driving schools */
.sc-section { background: #fff; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; }
.sc-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--calm-line); border-radius: 18px; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.sc-card:hover { box-shadow: 0 18px 40px -22px rgba(22,50,79,.4); transform: translateY(-2px); }
.sc-img { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--calm-2), #DCE9F7); display: grid; place-items: center; }
.sc-img img { width: 100%; height: 100%; object-fit: cover; }
.sc-initial { width: 76px; height: 76px; border-radius: 18px; background: var(--calm); color: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 800; }
.sc-partner { position: absolute; top: .7rem; left: .7rem; background: rgba(255,255,255,.95); color: var(--calm); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: .25rem .55rem; border-radius: 6px; }
.sc-body { padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.sc-body h3 { margin: 0; font-size: 1.15rem; color: var(--calm); }
.sc-where { margin: .25rem 0 .6rem; color: var(--muted); font-size: .92rem; }
.sc-desc { margin: 0 0 .7rem; color: #4A5B72; font-size: .94rem; line-height: 1.55; }
.sc-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .7rem; }
.sc-chip { font-size: .78rem; font-weight: 700; background: #EEF3F9; color: #2B4563; padding: .2rem .55rem; border-radius: 99px; }
.sc-chip.sc-lang { background: var(--marking-soft); color: var(--blue); }
.sc-price { margin: 0 0 .3rem; font-weight: 700; }
.sc-offer { margin: 0 0 .7rem; background: #FFF6E5; color: #8A5300; border-radius: 8px; padding: .45rem .65rem; font-size: .9rem; font-weight: 600; }
.sc-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .4rem; }
.sc-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.2rem; }
.sc-filter a { border: 2px solid var(--line); background: #fff; border-radius: 99px; padding: .35rem .85rem; font-weight: 600; text-decoration: none; color: var(--ink); font-size: .92rem; }
.sc-filter a[aria-current] { background: var(--calm); border-color: var(--calm); color: #fff; }

/* staff sidebar */
.nav-label { margin: 1rem 1.4rem .3rem; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6E87A6; }
.sidebar-staff .nav a { padding-top: .7rem; padding-bottom: .7rem; }
.nav .badge-soft { background: var(--marking-soft); color: var(--blue); }
.nav-back { display: block; margin: .4rem 1rem .2rem; padding: .7rem .9rem; background: var(--calm); color: #fff; border-radius: 10px; font-weight: 700; text-decoration: none; text-align: center; }
.nav-back:hover { background: #24476D; }
.nav-note { margin: .2rem 1.4rem .8rem; font-size: .8rem; color: var(--muted); text-align: center; }

/* question bank + question page */
.bank-filter input[type=search] { flex: 1 1 280px; }
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: .9rem; }
.bank-card { display: grid; grid-template-columns: 132px 1fr; background: #fff; border: 1px solid var(--calm-line); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.bank-card:hover { border-color: var(--marking); box-shadow: 0 12px 26px -18px rgba(22,50,79,.4); }
.bank-thumb { background: #EEF3F9; display: grid; place-items: center; min-height: 100px; }
.bank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bank-thumb.sign img { width: 70%; height: auto; object-fit: contain; }
.bank-thumb span { font-size: 2rem; font-weight: 800; color: #9DB1C9; }
.bank-body { padding: .75rem .9rem; display: flex; flex-direction: column; gap: .3rem; }
.bank-meta { display: flex; gap: .6rem; font-size: .78rem; color: var(--muted); }
.bank-code { font-weight: 800; color: var(--calm); }
.bank-body p { margin: 0; font-size: .93rem; line-height: 1.4; font-weight: 600; flex: 1; }
.bank-cm { font-size: .8rem; font-weight: 700; color: var(--marking); }
@media (max-width: 480px) { .bank-card { grid-template-columns: 100px 1fr; } }

.dq-crumbs { font-size: .88rem; color: var(--muted); margin-bottom: .4rem; }
.dq-crumbs a { color: var(--muted); } .dq-crumbs span { margin: 0 .25rem; }
.dq-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.dq-head h1 { margin: 0; font-size: 1.6rem; color: var(--calm); }
.dq-nav { display: flex; gap: .5rem; }
.dq-card { background: #fff; border: 1px solid var(--calm-line); border-radius: 18px; overflow: hidden; }
.dq-figure { margin: 0; background: #0F1A27; display: grid; place-items: center; }
.dq-figure img { width: 100%; max-height: 460px; object-fit: contain; display: block; }
.dq-figure.dq-sign { background: #F1F6FC; padding: 1.5rem; } .dq-figure.dq-sign img { max-height: 220px; width: auto; }
.dq-bar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .8rem 1.2rem; background: var(--calm); }
.dq-pill { font-size: .78rem; font-weight: 700; padding: .25rem .65rem; border-radius: 99px; background: rgba(255,255,255,.16); color: #fff; }
.dq-pill-soft { background: rgba(255,255,255,.08); color: #C9DAEE; }
.dq-pill-imt { background: #E4F3EA; color: #046A38; }
.dq-jump { margin-left: auto; color: #fff; font-weight: 700; font-size: .88rem; text-decoration: none; }
.dq-question { font-size: 1.2rem; line-height: 1.4; margin: 1.1rem 1.2rem .8rem; color: var(--ink); }
.dq-answers { list-style: none; padding: 0; margin: 0 1.2rem 1.1rem; display: grid; gap: .5rem; }
.dq-answers li { display: grid; grid-template-columns: 38px 1fr auto; gap: .8rem; align-items: center; padding: .7rem .9rem; border: 2px solid var(--line); border-radius: 12px; }
.dq-answers b { width: 38px; height: 38px; border-radius: 50%; background: #EEF2F7; display: grid; place-items: center; }
.dq-answers li.is-correct { border-color: var(--go); background: var(--go-soft); }
.dq-answers li.is-correct b { background: var(--go); color: #fff; }
.dq-answers em { font-style: normal; font-weight: 800; font-size: .82rem; color: var(--go); }
.dq-pt { margin: 0 1.2rem 1.2rem; border: 1px dashed var(--calm-line); border-radius: 12px; padding: .7rem .9rem; background: #FAFCFE; }
.dq-pt summary { cursor: pointer; font-weight: 700; color: var(--calm); display: flex; align-items: center; gap: .5rem; }
.dq-pt-q { font-weight: 650; margin: .8rem 0 .5rem; }
.dq-pt-a { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.dq-pt-a li { display: grid; grid-template-columns: 26px 1fr; color: #3D4F66; }
.dq-explain { margin-top: 1rem; background: var(--calm-2); border: 1px solid var(--calm-line); border-radius: 16px; padding: 1.1rem 1.25rem; }
.dq-explain h2 { font-size: 1.05rem; margin: 0 0 .4rem; color: var(--calm); }
.dq-explain p { margin: 0; line-height: 1.6; }
.discuss .comments { margin-top: 1.2rem; }

/* glossary */
.gl-tools { position: sticky; top: 0; z-index: 2; background: var(--paper); padding: .5rem 0 .8rem; }
.gl-tools input { width: 100%; font: inherit; padding: .8rem 1rem; border: 2px solid var(--line); border-radius: 12px; background: #fff; }
.gl-tools input:focus { outline: none; border-color: var(--marking); }
.gl-letters { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .6rem; }
.gl-letters a { min-width: 32px; text-align: center; padding: .3rem .4rem; border-radius: 8px; background: #fff; border: 1px solid var(--calm-line); font-weight: 700; text-decoration: none; color: var(--calm); font-size: .88rem; }
.gl-list { margin: 0; }
.gl-letter { font-size: 1.4rem; font-weight: 800; color: var(--marking); margin: 1.4rem 0 .4rem; scroll-margin-top: 120px; }
.gl-item { background: #fff; border: 1px solid var(--calm-line); border-radius: 12px; padding: .8rem 1rem; margin-bottom: .5rem; }
.gl-item dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; }
.gl-pt { font-weight: 800; color: var(--calm); font-size: 1.05rem; }
.gl-en { color: var(--marking); font-weight: 650; }
.gl-item dd { margin: .3rem 0 0; color: #4A5B72; line-height: 1.55; font-size: .95rem; }
.bank-code { white-space: nowrap; } .bank-meta span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* summaries */
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .8rem; }
.note-card { display: grid; grid-template-columns: 48px 1fr; gap: .9rem; align-items: start; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--calm-line); border-radius: 14px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.note-card:hover { border-color: var(--marking); transform: translateY(-2px); }
.note-num { width: 48px; height: 48px; border-radius: 12px; background: var(--calm); color: #fff; display: grid; place-items: center; font-weight: 800; }
.note-txt { display: flex; flex-direction: column; gap: .15rem; }
.note-txt strong { font-size: 1.05rem; color: var(--calm); }
.note-txt em { font-style: normal; color: var(--marking); font-weight: 650; font-size: .88rem; }
.note-txt span { color: var(--muted); font-size: .9rem; line-height: 1.45; margin-top: .2rem; }
.note-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1.6rem; align-items: start; }
@media (max-width: 1000px) { .note-layout { grid-template-columns: 1fr; } .note-side { order: -1; } }
.note-title { margin: .2rem 0 .2rem; color: var(--calm); }
.note-pt { display: flex; align-items: center; gap: .5rem; color: var(--marking); font-weight: 650; margin: 0 0 1rem; }
.note-body { background: #fff; border: 1px solid var(--calm-line); border-radius: 16px; padding: 1.3rem 1.5rem; line-height: 1.65; }
.note-body h2 { font-size: 1.15rem; color: var(--calm); margin: 1.4rem 0 .5rem; }
.note-body h2:first-child { margin-top: 0; }
.note-body ul, .note-body ol { padding-left: 1.3rem; } .note-body li { margin-bottom: .3rem; }
.note-table { overflow-x: auto; margin: .8rem 0 1rem; border: 1px solid var(--calm-line); border-radius: 12px; }
.note-table table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.note-table th { background: var(--calm); color: #fff; text-align: left; padding: .6rem .7rem; font-weight: 700; vertical-align: bottom; }
.note-table th small { font-weight: 500; color: #C9DAEE; }
.note-table td { padding: .55rem .7rem; border-top: 1px solid #EDF1F6; }
.note-table td:not(:first-child) { font-variant-numeric: tabular-nums; font-weight: 700; }
.note-table tr:nth-child(even) td { background: #FAFCFE; }
.note-table tr.note-group td { background: var(--calm-2); color: var(--calm); font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.note-tip { background: #FFF6E5; border-left: 4px solid #F2A12E; border-radius: 10px; padding: .75rem 1rem; margin: 1rem 0; color: #5E4100; }
.note-pager { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin: 1.2rem 0; }
.note-side { position: sticky; top: 1rem; background: #fff; border: 1px solid var(--calm-line); border-radius: 16px; padding: 1rem; }
.note-side ol { margin: 0; padding-left: 1.3rem; }
.note-side li { margin: .3rem 0; font-size: .93rem; }
.note-side a { color: var(--ink); text-decoration: none; } .note-side a:hover { color: var(--marking); }
.note-side a[aria-current] { color: var(--marking); font-weight: 800; }
.bo-form textarea.mono { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; }

/* ---------------------------------------------------------------- site footer + legal pages */
.site-foot { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.25rem 0 2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 1.5rem; color: var(--muted); font-size: .9rem; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-foot a { color: var(--muted); text-decoration: none; padding: .35rem 0; }
.site-foot a:hover { color: var(--marking); text-decoration: underline; }
.site-foot p { margin: 0; padding: .35rem 0; }
.main .site-foot { max-width: 1080px; }
.legal { max-width: 760px; }
.legal h2 { scroll-margin-top: 1rem; }
.bo-danger { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.bo-danger h3 { margin: 0 0 .4rem; font-size: .95rem; color: var(--stop); }

/* ---------------------------------------------------------------- sign-in / sign-up background */
body.auth-page { background: #0B1E44 url("../img/auth-bg.8bc42bdec726.svg") center bottom / cover no-repeat fixed; }
body.auth-page .public-top { background: rgba(11, 30, 68, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-bottom-color: rgba(47, 123, 255, .7); }
body.auth-page .auth-wrap { min-height: calc(100vh - 90px); }
body.auth-page .auth { border: 0; background: rgba(255, 255, 255, .97); box-shadow: 0 24px 60px rgba(6, 14, 32, .45); }
body.auth-page .site-foot { border-top-color: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .85); text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
body.auth-page .site-foot a { color: #fff; }
.auth-forgot { margin: -.4rem 0 1rem; text-align: right; font-size: .92rem; }
@media (max-width: 760px) { body.auth-page { background-attachment: scroll; background-position: 70% bottom; } }
/* Hide an ad box when AdSense has no ad to fill it (e.g. before approval). */
.ad-slot:has(ins[data-ad-status="unfilled"]) { display: none; }
