/* Master Drive design system. Light is the default; dark via [data-theme="dark"] on <html>. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f6f6f8;
  --card: #ffffff;
  --field: #f3f3f6;
  --line: #e4e4ea;
  --text: #141416;
  --text-2: #4a4a52;
  --muted: #6b6b75;
  --red: #e10b17;
  --red-dark: #b00810;
  --red-text: #e10b17;
  --ok-text: #166534;
  --bad-text: #b42318;
  --star: #b45309;
  --on-red: #ffffff;
  --red-tint: rgba(225, 11, 23, .1);
  --ok: #15803d;
  --bad: #d92d20;
  --warn: #b45309;
  --warn-bg: rgba(245, 158, 11, .14);
  --header-bg: rgba(255, 255, 255, .92);
  --hero-bg: radial-gradient(ellipse at 80% 15%, rgba(225, 11, 23, .12), transparent 55%), #fbf4f4;
  --chk-a: #141416;
  --chk-b: #ffffff;
  --hover: rgba(20, 20, 22, .03);
  --shadow-card: 0 1px 2px rgba(20, 20, 22, .05), 0 8px 22px rgba(20, 20, 22, .04);
  --radius: 14px;
  --font: "Noto Sans Armenian", "Noto Sans", system-ui, sans-serif;
  --font-head: "Noto Sans Armenian", "Noto Sans", system-ui, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0b;
  --bg-alt: #131316;
  --card: #1a1a1e;
  --field: #0a0a0b;
  --line: #2a2a30;
  --text: #ffffff;
  --text-2: #c9ced6;
  --muted: #9097a3;
  --red-text: #ff4d57;
  --ok-text: #22c55e;
  --bad-text: #ff7b82;
  --star: #f5b301;
  --red-tint: rgba(225, 11, 23, .15);
  --ok: #22c55e;
  --bad: #ff4d4d;
  --warn: #f5d27a;
  --warn-bg: rgba(245, 179, 1, .12);
  --header-bg: rgba(10, 10, 11, .88);
  --hero-bg: radial-gradient(ellipse at 80% 20%, rgba(225, 11, 23, .28), transparent 55%), #0a0a0b;
  --chk-a: #ffffff;
  --chk-b: #0a0a0b;
  --hover: rgba(255, 255, 255, .02);
  --shadow-card: none;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* the reset above removes the browser's auto margins, which is what centres a modal dialog */
dialog:modal { margin: auto; max-width: calc(100vw - 24px); }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; font-size: 15.5px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.section { padding: 88px 0; }
.section.alt { background: var(--bg-alt); }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 4.2vw, 3.1rem); line-height: 1.15; }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); }
h3 { font-size: 1.1rem; line-height: 1.3; }
.accent { color: var(--red-text); }
.eyebrow { font-family: var(--font-head); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red-text); font-size: .85rem; margin-bottom: 10px; }
.lead { color: var(--text-2); font-size: 1.02rem; max-width: 60ch; }
.section-head { margin-bottom: 48px; }
.section-head.center { text-align: center; }
.section-head.center .lead { margin-inline: auto; }
.section-head p { margin-top: 14px; }

/* Checkered flag divider */
.checker { height: 14px; background: repeating-conic-gradient(var(--chk-a) 0 25%, var(--chk-b) 0 50%) 0 0 / 28px 28px; opacity: .9; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 999px; border: 2px solid transparent; font: 700 1rem var(--font-head); cursor: pointer; transition: transform .15s, background .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); color: var(--on-red); box-shadow: 0 8px 28px rgba(225, 11, 23, .35); }
.btn-red:hover { background: var(--red-dark); }
.btn-ghost { border-color: var(--text-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--red); color: var(--red-text); }
.btn-block { width: 100%; }
:focus-visible { outline: 3px solid var(--text-2); outline-offset: 3px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { flex-shrink: 0; white-space: nowrap; display: flex; align-items: center; gap: 10px; font: 800 1.4rem "Barlow Condensed", var(--font-head); font-style: italic; text-transform: uppercase; }
.brand img { width: 46px; height: 46px; border-radius: 50%; }
.brand span span { color: var(--red-text); }
.nav-links { display: flex; align-items: center; gap: 0; white-space: nowrap; list-style: none; }
.nav-links a:not(.btn) { font-size: .8rem; font-weight: 600; color: var(--text-2); transition: color .2s; }
.nav-links a:not(.btn):hover, .nav-links a.active { color: var(--red-text); }
.nav-links .btn { padding: 8px 14px; font-size: .85rem; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); font-size: 1.8rem; cursor: pointer; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; background: var(--hero-bg); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { margin: 12px 0 20px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 32px 0; }
.stats { display: flex; gap: 36px; flex-wrap: wrap; }
.stat b { display: block; font: 800 2.2rem var(--font-head); font-style: normal; color: var(--red-text); }
.stat span { color: var(--muted); font-size: .9rem; }
.hero-logo { filter: drop-shadow(0 0 60px rgba(225, 11, 23, .35)); border-radius: 50%; width: min(440px, 100%); margin-inline: auto; }

/* Cards */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 28px; transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-4px); border-color: var(--red); }
.card .icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: var(--red-tint); font-size: 1.6rem; margin-bottom: 16px; }
.card p { color: var(--muted); margin-top: 8px; }

/* Pricing */
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--red); background: linear-gradient(180deg, rgba(225, 11, 23, .14), var(--card) 60%); }
.badge { position: absolute; top: -13px; right: 22px; background: var(--red); color: var(--on-red); font: 800 .8rem var(--font-head); font-style: normal; letter-spacing: 0; padding: 4px 14px; border-radius: 999px; }
.price { font: 800 2.4rem var(--font-head); font-style: normal; margin: 12px 0; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 500; font-style: normal; }
.price-card ul { list-style: none; margin: 8px 0 28px; flex: 1; }
.price-card li { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.price-card li::before { content: "✓"; color: var(--red-text); font-weight: 800; margin-right: 10px; }

/* Steps / testimonials */
.step-num { font: 800 3.4rem var(--font-head); font-style: normal; color: var(--red-text); line-height: 1; }
.quote { font-size: .97rem; color: var(--text-2); }
.who { margin-top: 16px; font-weight: 700; }
.who span { color: var(--muted); font-weight: 400; display: block; font-size: .9rem; }
.stars { color: var(--star); letter-spacing: 2px; margin-bottom: 10px; }

/* FAQ */
.faq { max-width: 800px; margin-inline: auto; }
details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; padding: 0 24px; }
details[open] { border-color: var(--red); }
summary { cursor: pointer; padding: 20px 0; font-weight: 700; font-size: 1rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::after { content: "+"; color: var(--red-text); font-size: 1.5rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); padding-bottom: 20px; }

/* Forms */
.form-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
form.card { padding: 32px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: .95rem; }
input, select, textarea { width: 100%; padding: 13px 14px; background: var(--field); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); border-color: transparent; }
.form-note { color: var(--muted); font-size: .85rem; margin-top: 12px; }
.success { display: none; text-align: center; padding: 24px 0; }
.success.show { display: block; }
.success h3 { color: var(--ok); margin-bottom: 8px; }
.contact-list { list-style: none; margin-top: 28px; display: grid; gap: 14px; color: var(--text-2); }

/* Footer */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 48px 0 28px; color: var(--muted); }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; margin-bottom: 28px; }
.footer-links { display: flex; gap: 24px; list-style: none; flex-wrap: wrap; }
.footer-links a:hover { color: var(--red-text); }
.copy { border-top: 1px solid var(--line); padding-top: 20px; font-size: .88rem; }

/* Mobile sticky CTA */
.mobile-cta { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--bg-alt); border-top: 1px solid var(--line); padding: 10px 16px; gap: 10px; }
.mobile-cta .btn { flex: 1; padding: 12px; }

/* ---------- Theory module ---------- */
.theory-hero { padding: 56px 0 24px; }
.quiz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; padding-bottom: 88px; }
.side-panel { position: sticky; top: 96px; }
.side-panel h3 { margin-bottom: 14px; font-size: 1.1rem; }
.progress-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: .95rem; }
.progress-row b { color: var(--text); }
.meter { height: 10px; background: var(--field); border-radius: 99px; overflow: hidden; margin: 14px 0 6px; }
.meter > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red-dark), var(--red)); transition: width .4s; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; margin-top: 14px; }
.topic-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 24px 0; }
.topic { text-align: left; background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 18px; color: var(--text); cursor: pointer; font: inherit; transition: border-color .2s, transform .2s; }
.topic:hover { border-color: var(--red); transform: translateY(-2px); }
.topic b { display: block; font: 800 1.2rem var(--font-head); font-style: normal;  }
.topic span { color: var(--muted); font-size: .88rem; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.timer { color: var(--text-2); font-variant-numeric: tabular-nums; }
.q-text { font-size: 1.15rem; font-weight: 700; margin: 22px 0; line-height: 1.4; }
.q-visual { font-size: 3.4rem; text-align: center; background: var(--field); border-radius: 12px; padding: 18px; margin-top: 18px; }
.options { display: grid; gap: 12px; }
.option { text-align: left; display: flex; gap: 14px; align-items: center; background: var(--field); border: 2px solid var(--line); border-radius: 12px; padding: 15px 18px; color: var(--text); font: inherit; cursor: pointer; transition: border-color .2s; }
.option:hover:not(:disabled) { border-color: var(--text-2); }
.option .key { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--card); font-weight: 800; }
.option.correct { border-color: var(--ok); background: rgba(34, 197, 94, .12); }
.option.wrong { border-color: var(--bad); background: rgba(255, 77, 77, .12); }
.option:disabled { cursor: default; }
.feedback { display: none; margin-top: 20px; padding: 18px; border-radius: 12px; border-left: 5px solid; }
.feedback.show { display: block; }
.feedback.good { border-color: var(--ok); background: rgba(34, 197, 94, .1); }
.feedback.bad { border-color: var(--bad); background: rgba(255, 77, 77, .1); }
.feedback p { color: var(--text-2); margin-top: 4px; }
.quiz-actions { display: flex; justify-content: flex-end; margin-top: 22px; }
.result { text-align: center; }
.score-ring { width: 170px; height: 170px; border-radius: 50%; margin: 24px auto; display: grid; place-items: center; font: 800 2.8rem var(--font-head); font-style: normal; background: conic-gradient(var(--c, var(--red)) calc(var(--p) * 1%), var(--field) 0); position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--card); }
.score-ring span { position: relative; }
.verdict { font: 800 1.8rem var(--font-head); font-style: normal;  }
.verdict.pass { color: var(--ok); }
.verdict.fail { color: var(--bad); }
.result .btn { margin: 8px 6px 0; }
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 1299px) {
  .menu-btn { display: block; }
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; background: var(--bg-alt); padding: 24px; border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
}
@media (max-width: 900px) {
  .hero-grid, .form-wrap, .quiz-layout { grid-template-columns: 1fr; }
  .hero-logo { max-width: 280px; order: -1; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .side-panel { position: static; }
  .section { padding: 64px 0; }
}
@media (max-width: 600px) {
  .grid-3, .grid-4, .topic-grid { grid-template-columns: 1fr; }
  .mobile-cta { display: flex; }
  body { padding-bottom: 66px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Accounts & booking ---------- */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 56px 0 88px; }
.auth-card { width: min(460px, 100%); }
.auth-card h1, .auth-card p { overflow-wrap: anywhere; }
.auth-card:hover, .dash .card:hover { transform: none; border-color: var(--line); }
.demo-banner { background: var(--warn-bg); border: 1px solid var(--warn); color: var(--warn); border-radius: 10px; padding: 10px 14px; font-size: .9rem; margin: 14px 0; }
.dash { padding: 48px 0 88px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; margin-top: 16px; }
.dash h3 { margin-bottom: 14px; font-size: 1.15rem; }
.lesson { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lesson span { display: block; color: var(--muted); font-size: .9rem; }
.lesson span.pill { display: inline-block; font-size: .78rem; }
.lesson .btn { padding: 8px 18px; font-size: .9rem; }
.book-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 16px 0; }
.slot { background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 12px; color: var(--text); font: inherit; cursor: pointer; text-align: left; transition: border-color .2s; }
.slot:hover:not(:disabled) { border-color: var(--red); }
.slot b { display: block; font: 800 1.3rem var(--font-head); font-style: normal; }
.slot span { color: var(--muted); font-size: .85rem; }
@media (max-width: 900px) { .dash-grid, .book-filters { grid-template-columns: 1fr; } }


.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .row-2 { grid-template-columns: 1fr; } }

/* ---------- Theme toggle ---------- */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 1.1rem; cursor: pointer; transition: border-color .2s; }
.theme-toggle:hover { border-color: var(--red); }
.nav-tools { display: flex; align-items: center; gap: 10px; }

/* ---------- Admin panel ---------- */
.admin-tag { margin-left: 8px; color: var(--on-red); background: var(--red); border-radius: 6px; padding: 2px 8px; font: 700 .7rem var(--font); letter-spacing: .1em; text-transform: uppercase; align-self: center; }
.admin-user { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .9rem; }
.admin-user .btn { padding: 8px 18px; font-size: .9rem; }
.admin { padding: 28px 0 88px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; color: var(--text-2); font: 700 1rem var(--font); padding: 12px 16px; cursor: pointer; }
.tabs button.on { color: var(--text); border-color: var(--red); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.bar h2 { font-size: 1.5rem; }
.bar h2 small { color: var(--muted); font-size: 1rem; font-weight: 600; }
.bar input, .bar select { width: auto; min-width: 220px; }
.bar-ctl { display: flex; gap: 10px; flex-wrap: wrap; }
.mini-btn { padding: 9px 20px; font-size: .95rem; }
.filters { display: flex; gap: 14px; flex-wrap: wrap; margin: 6px 0 12px; }
.filters > div { min-width: 170px; flex: 1; max-width: 280px; }
.filters label { margin-top: 4px; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; padding: 12px 14px; background: var(--bg-alt); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tr:hover td { background: var(--hover); }
.tbl small { color: var(--muted); }
.tbl a { color: var(--text-2); }
.tbl .act { white-space: nowrap; text-align: right; }
.mini { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 12px; font: 600 .85rem var(--font); cursor: pointer; margin-left: 6px; }
.mini:hover { border-color: var(--text-2); }
.mini.danger:hover { border-color: var(--bad); color: var(--bad); }
.mini.off { opacity: .6; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 700; }
.pill.free { background: rgba(34, 197, 94, .15); color: var(--ok-text); }
.pill.booked { background: rgba(225, 11, 23, .18); color: var(--bad-text); }
select.st { width: auto; padding: 6px 10px; font-weight: 600; }
.st-new { border-color: var(--red); }
.st-enrolled { border-color: var(--ok); }
.st-lost { opacity: .6; }
.dlg { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; width: min(560px, calc(100% - 24px)); max-height: 90vh; overflow-y: auto; }
.dlg::backdrop { background: rgba(0, 0, 0, .7); }
.dlg-sec { margin: 20px 0 4px; color: var(--red-text); font: 700 .9rem var(--font); text-transform: uppercase; letter-spacing: .1em; border-top: 1px solid var(--line); padding-top: 14px; }
.chk { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.chk input { width: auto; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.dlg-actions .btn { padding: 10px 24px; }

.tab-badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--red); color: var(--on-red); font-size: .75rem; font-weight: 700; line-height: 20px; text-align: center; }

::placeholder { color: var(--muted); opacity: 1; }

.access-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--red-tint); border: 1px solid var(--red); border-radius: 12px; padding: 12px 16px; margin: 0 0 18px; }

.pill.none { background: var(--field); color: var(--muted); }
.mini.primary { background: var(--red); border-color: var(--red); color: var(--on-red); }
.mini.primary:hover { background: var(--red-dark); border-color: var(--red-dark); }

/* ---------- Theory: categories, groups, images, options ---------- */
.cat { margin: 0 0 22px; }
.cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cat-head h4 { font: 700 1.15rem var(--font-head); }
.grp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.grp { text-align: left; background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--text); cursor: pointer; font: inherit; transition: border-color .2s, transform .2s; }
.grp:hover:not(:disabled) { border-color: var(--red); transform: translateY(-2px); }
.grp b { display: block; font-weight: 700; font-size: .92rem; line-height: 1.3; margin-bottom: 4px; overflow-wrap: anywhere; }
.grp-soon { opacity: .55; cursor: default; }
.grp span { display: block; color: var(--muted); font-size: .85rem; }
.grp small { display: block; color: var(--ok-text); font-size: .78rem; min-height: 1.2em; }
.pbar { display: block; height: 5px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.pbar u { display: block; height: 100%; background: var(--red); text-decoration: none; }
.qid { font-size: .78rem; color: var(--muted); letter-spacing: .04em; margin: 10px 0 2px; }
.q-img { margin: 12px auto; max-height: 360px; width: auto; max-width: 100%; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.options.opt-grid { grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); }
.option.opt-num { justify-content: center; font: 700 1.3rem var(--font-head); padding: 16px 10px; }
.quiz-top .link-btn { margin: 0; }

.tbl tr.dim td { opacity: .55; }
.tbl .thumb { display: block; max-height: 90px; max-width: 220px; border: 1px solid var(--line); border-radius: 6px; margin: 0 0 6px; background: #fff; }
.tbl .okopt { color: var(--ok-text); font-weight: 700; }
code { background: var(--field); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

/* ---------- Language switcher ---------- */
.lang-switch { display: flex; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch button { background: none; border: 0; color: var(--text-2); font: 700 .8rem var(--font); padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.lang-switch button.on { background: var(--red); color: var(--on-red); }

/* wide header so the full menu fits on large screens */
.nav.container { width: min(1360px, 100% - 32px); }
@media (max-width: 600px) {
  .admin-user #who { display: none; }
  .admin-tag { display: none; }
  .admin-user { gap: 6px; }
  .admin-user .btn { padding: 6px 12px; font-size: .8rem; }
  .nav .brand { font-size: 1.2rem; }
}

/* Road signs page */
.sign-tools { max-width: 420px; margin: 8px 0 14px; }
.sign-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.sign-cats button { background: var(--card); border: 1px solid var(--line); color: var(--text-2); border-radius: 999px; padding: 8px 14px; font: 600 .85rem var(--font); cursor: pointer; }
.sign-cats button small { color: var(--muted); font-weight: 600; margin-left: 4px; }
.sign-cats button.on { background: var(--red); border-color: var(--red); color: var(--on-red); }
.sign-cats button.on small { color: inherit; opacity: .85; }
.sign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 10px 0 28px; }
.sign-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 10px 14px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin: 0; font: inherit; color: inherit; cursor: pointer; width: 100%; transition: border-color .2s, transform .15s; }
.sign-card:hover { border-color: var(--red); transform: translateY(-2px); }
.sign-img { width: 110px; height: 110px; display: grid; place-items: center; background: #fff; border-radius: 10px; }
.sign-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sign-none { color: #888; font-size: 2rem; }
.sign-cap b { display: block; color: var(--red-text); font-size: .95rem; }
.sign-cap > span { display: block; color: var(--text-2); font-size: .82rem; line-height: 1.35; overflow-wrap: anywhere; }
.sign-note { margin: 0 0 56px; }
.sign-credits summary { cursor: pointer; font-weight: 700; }
.credit-list { overflow-x: auto; margin-top: 12px; max-height: 420px; overflow-y: auto; }
.credit-list .tbl { font-size: .82rem; }
.credit-list a { color: var(--red-text); text-decoration: underline; }
@media (max-width: 420px) { .sign-grid { grid-template-columns: repeat(2, 1fr); } .sign-img { width: 96px; height: 96px; } }
@media (max-width: 600px) { .sign-cats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; } .sign-cats button { flex: 0 0 auto; } }

/* Sign detail window */
.sign-dlg { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; margin: auto; }
.sign-dlg::backdrop { background: rgba(0, 0, 0, .6); }
.sd-head { display: flex; justify-content: flex-end; padding: 10px 12px 0; }
.sd-close { background: none; border: 0; color: var(--text-2); font-size: 1.3rem; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
.sd-close:hover { background: var(--field); }
.sd-body { padding: 0 24px 12px; text-align: center; }
.sd-img { width: 220px; height: 220px; margin: 0 auto 14px; display: grid; place-items: center; background: #fff; border-radius: 14px; }
.sd-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sd-body h2 { font-size: 1.25rem; line-height: 1.3; margin: 4px 0 12px; }
.sd-desc { text-align: left; color: var(--text-2); line-height: 1.65; margin: 0; overflow-wrap: anywhere; }
.sd-nav { display: flex; justify-content: space-between; gap: 10px; padding: 14px 24px 22px; }
.sd-nav .btn { padding: 10px 18px; font-size: .9rem; }
.sd-nav .btn:disabled { opacity: .4; cursor: default; transform: none; }
@media (max-width: 420px) { .sd-img { width: 170px; height: 170px; } .sd-body { padding: 0 16px 8px; } .sd-nav { padding: 12px 16px 18px; } }

/* Navbar: text links are separated by thin vertical lines (desktop) / horizontal lines (dropdown) */
.nav-links > li:has(> a:not(.btn)) > a { display: block; padding: 4px 6px; }
.nav-links > li:has(> a:not(.btn)) { border-right: 1px solid color-mix(in srgb, var(--text) 28%, transparent); }
.nav-links > li:has(> a.btn) { padding: 0 6px 0 8px; }
.nav-links > .theme-li, .nav-links > .lang-switch { padding: 0 4px; }
@media (max-width: 1299px) {
  .nav-links > li:has(> a:not(.btn)) { border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--text) 18%, transparent); }
  .nav-links > li:has(> a:not(.btn)) > a { padding: 12px 4px; }
  .nav-links > li { width: 100%; }
  .nav-links > .theme-li, .nav-links > .lang-switch { width: auto; }
  .nav-links { align-items: flex-start; }
  .nav-links > li:has(> a) { align-self: stretch; }
  .nav-links > li:has(> a.btn) { padding: 14px 0 6px; }
  .nav-links > .theme-li, .nav-links > .lang-switch { padding: 12px 0 4px; }
}

/* Question number strip */
.qnav { position: relative; display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; margin: 10px 0 2px; scrollbar-width: thin; }
.qn { flex: 0 0 auto; min-width: 38px; height: 38px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); color: var(--text-2); font: 700 .85rem var(--font); cursor: pointer; }
.qn:hover { border-color: var(--red); color: var(--text); }
.qn.ok { background: rgba(34, 197, 94, .16); border-color: rgba(34, 197, 94, .55); color: var(--ok-text); }
.qn.bad { background: rgba(225, 11, 23, .14); border-color: rgba(225, 11, 23, .5); color: var(--bad-text); }
.qn.cur { outline: 2px solid var(--red); outline-offset: 1px; color: var(--text); }
