/* Truckchitogalar.com — mobile-first, high-contrast, light/dark */
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --text: #0f172a;
  --muted: #5b6577;
  --border: #d5dbe5;
  --primary: #e8590c;
  --primary-ink: #ffffff;
  --primary-soft: #fff1e8;
  --accent: #f5a524;
  --link: #0b5cad;
  --ok: #0f7b3f;
  --ok-soft: #e3f5ea;
  --bad: #b3261e;
  --bad-soft: #fde8e6;
  --warn: #8a5300;
  --warn-soft: #fff4d6;
  --info-soft: #e6f0fb;
  --side: #0f1b2d;
  --side-2: #16263d;
  --side-text: #c9d4e5;
  --side-active: #f5a524;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 14px rgba(15, 23, 42, .06);
  --tap: 44px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --surface: #121b2c; --surface-2: #1a2539; --text: #e8edf6; --muted: #9aa7bd; --border: #2a3850;
    --primary: #ff7a2e; --primary-ink: #111; --primary-soft: #3a2416; --link: #7ab8ff; --ok: #4cc382; --ok-soft: #12301f;
    --bad: #ff8a80; --bad-soft: #3a1714; --warn: #ffc95c; --warn-soft: #3a2e10; --info-soft: #14263f; --side: #070d18; --side-2: #0f1a2c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --surface: #121b2c; --surface-2: #1a2539; --text: #e8edf6; --muted: #9aa7bd; --border: #2a3850;
  --primary: #ff7a2e; --primary-ink: #111; --primary-soft: #3a2416; --link: #7ab8ff; --ok: #4cc382; --ok-soft: #12301f;
  --bad: #ff8a80; --bad-soft: #3a1714; --warn: #ffc95c; --warn-soft: #3a2e10; --info-soft: #14263f; --side: #070d18; --side-2: #0f1a2c;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55; background: var(--bg); color: var(--text); }
img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 70ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary); color: var(--primary-ink); padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ico { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* App shell */
.app { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; background: var(--side); color: var(--side-text); display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform .2s ease; z-index: 50; overflow-y: auto; }
.sidebar.is-open { transform: none; }
.sidebar-backdrop { display: none; }
.sidebar.is-open + .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
.brand { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px; border-bottom: 1px solid var(--side-2); }
.brand-link { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.brand-link b { color: var(--side-active); }
.nav { padding: 8px 8px 0; flex: 1; }
.nav-group { margin-bottom: 10px; }
.nav-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #7f8ea6; padding: 10px 12px 4px; }
.nav a, .nav-bottom a { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 8px 12px; border-radius: 10px; color: var(--side-text); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav-bottom a:hover { background: var(--side-2); color: #fff; }
.nav a.active { background: var(--side-2); color: #fff; box-shadow: inset 3px 0 0 var(--side-active); }
.nav a.active .ico { color: var(--side-active); }
.nav-bottom { padding: 8px; border-top: 1px solid var(--side-2); }
.nav-admin { color: #ffd38a !important; }
.badge { margin-left: auto; background: var(--primary); color: #fff; border-radius: 999px; padding: 0 8px; font-size: .78rem; font-weight: 700; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 12px;
  background: var(--surface); border-bottom: 1px solid var(--border); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); border-radius: 10px; cursor: pointer; }
.sidebar .icon-btn { background: transparent; color: #fff; border-color: var(--side-2); }
.breadcrumb { display: none; gap: 6px; align-items: center; font-size: .92rem; color: var(--muted); min-width: 0; flex: 1 1 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.breadcrumb a { color: var(--muted); }
.search-box { position: relative; display: flex; align-items: center; gap: 6px; flex: 1 1 160px; min-width: 0; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; min-height: var(--tap); }
.search-box input { border: 0; background: transparent; color: var(--text); font: inherit; width: 100%; min-height: 40px; outline: none; }
.suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); z-index: 60; overflow: hidden; }
.suggest a { display: flex; gap: 8px; padding: 10px 12px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); }
.suggest a:hover, .suggest a.is-active { background: var(--surface-2); }
.suggest .t { font-size: .75rem; color: var(--muted); text-transform: uppercase; min-width: 64px; }
.state-select select { min-height: var(--tap); border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; padding: 0 6px; }
.lang-flags { display: flex; gap: 2px; order: 10; width: 100%; justify-content: flex-end; }
.flag { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; border-radius: 10px; text-decoration: none; font-size: 1.35rem;
  border: 2px solid transparent; filter: grayscale(.35); opacity: .8; }
.flag:hover { opacity: 1; filter: none; background: var(--surface-2); }
.flag.is-active { border-color: var(--primary); background: var(--primary-soft); opacity: 1; filter: none; }
main { padding: 16px; flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; }
main:focus { outline: none; }
.footer { padding: 18px 16px 28px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 639px) {
  /* Phone header: row 1 = menu, flags, theme; row 2 = search, state */
  .menu-btn { order: 0; }
  .lang-flags { order: 1; flex: 1 1 auto; width: auto; gap: 0; }
  .flag { min-width: 32px; font-size: 1.2rem; }
  .theme-btn { order: 2; }
  .search-box { order: 3; flex: 1 1 200px; }
  .state-select { order: 4; }
}
@media (min-width: 640px) {
  .lang-flags { width: auto; order: 0; }
  .topbar { flex-wrap: nowrap; }
}
@media (min-width: 1024px) {
  .sidebar { position: sticky; top: 0; height: 100vh; transform: none; }
  .app { background: linear-gradient(90deg, var(--side) 272px, transparent 272px); }
  .main-col { background: var(--bg); }
  .sidebar-close, .menu-btn { display: none; }
  .sidebar-backdrop { display: none !important; }
  .breadcrumb { display: flex; }
  .search-box { flex: 0 1 300px; }
  main { padding: 24px 28px; }
}

/* Components */
.page-head { margin: 4px 0 18px; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card h2, .card h3 { margin-bottom: .4em; }
.card-link { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--text); transition: border-color .15s; }
.card-link:hover { border-color: var(--primary); }
.card-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: 0 0 48px; }
.card-icon .ico { width: 26px; height: 26px; }
.card-link p { margin: 0; color: var(--muted); font-size: .95rem; }
.stat { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .9rem; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 26px 0 12px; }
.section-title h2 { margin: 0; }
.hero { background: linear-gradient(135deg, #0f1b2d 0%, #1d3557 60%, #2b4c7e 100%); color: #fff; border-radius: 16px; padding: 22px; position: relative; overflow: hidden; }
.hero h1 { color: #fff; }
.hero p { color: #d7e1f0; max-width: 60ch; }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,.5); background: transparent; }
.hero-road { position: absolute; right: -20px; bottom: -10px; width: 260px; opacity: .18; pointer-events: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 8px 16px; border-radius: 10px; border: 2px solid transparent;
  font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--link); border-color: transparent; padding-inline: 10px; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-sm { min-height: 36px; padding: 4px 10px; font-size: .92rem; }
.btn-lg { min-height: 56px; padding: 12px 22px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.bookmark.is-on { color: var(--warn); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 750; letter-spacing: .03em;
  text-transform: uppercase; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.chip-federal { background: #e6f0fb; color: #0b4a8f; border-color: #b9d3f0; }
.chip-state { background: #efe6fb; color: #5b2a9a; border-color: #d4c1f0; }
.chip-community { background: #fff4d6; color: #7a4a00; border-color: #f2d58f; }
.chip-sample { background: #fde8e6; color: #9c2018; border-color: #f3b9b3; }
.chip-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
:root[data-theme="dark"] .chip-federal, :root[data-theme="dark"] .chip-state, :root[data-theme="dark"] .chip-community, :root[data-theme="dark"] .chip-sample { filter: brightness(.85) saturate(1.1); }
.notice, .flash, .callout { border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 14px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); }
.notice-parked { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.notice-lang { background: var(--info-soft); border-color: transparent; }
.notice-warn, .flash-error { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.flash-success { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.flash-info { background: var(--info-soft); border-color: transparent; }
.notice-community { background: var(--warn-soft); border-color: #f2d58f; color: var(--text); }
.callout { display: block; background: var(--surface-2); }
.callout-warning { background: var(--bad-soft); border-color: transparent; }
.callout-note, .callout-tip { background: var(--info-soft); border-color: transparent; }
.callout-example { background: var(--ok-soft); border-color: transparent; }
.callout-definition { background: var(--surface-2); border-left: 4px solid var(--primary); }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.field > span { font-weight: 600; font-size: .95rem; }
.field small { color: var(--muted); }
.field input, .field select, .field textarea, .input { font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 12px; min-height: var(--tap); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.field .err { color: var(--bad); font-size: .88rem; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--primary); }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: span 2; } }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; }
.chips-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-select label { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 12px; border: 1.5px solid var(--border); border-radius: 999px; cursor: pointer; background: var(--surface); }
.chips-select input { accent-color: var(--primary); width: 18px; height: 18px; }
.chips-select label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 1em; background: var(--surface); }
.table { width: 100%; border-collapse: collapse; min-width: 520px; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { background: var(--surface-2); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain > li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.list-plain > li:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 6px 12px; margin: 0; }
.kv dt { color: var(--muted); font-size: .92rem; }
.kv dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.stars { color: var(--accent); letter-spacing: 1px; white-space: nowrap; }
.stars .muted { color: var(--border); }
.stars b { color: var(--text); margin-left: 4px; letter-spacing: 0; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.page { min-width: var(--tap); min-height: var(--tap); display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; background: var(--surface); }
.page.is-current { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); font-weight: 700; }
.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.tabs a, .tabs button { padding: 10px 14px; min-height: var(--tap); border: 0; background: none; font: inherit; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; cursor: pointer; }
.tabs .is-active { color: var(--text); border-bottom-color: var(--primary); font-weight: 700; }
.progress { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width .2s; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #111827; color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 200; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.modal { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100% - 24px)); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal::backdrop { background: rgba(0,0,0,.5); }
.modal-body { padding: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.center-card { max-width: 560px; margin: 8vh auto; text-align: center; }
.min-main { padding: 16px; }
.split { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .split { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); } .split-rev { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); } }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.meta-line { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .9rem; align-items: center; }
.icon-text { display: inline-flex; align-items: center; gap: 6px; }

/* Tests */
.mode-card { position: relative; }
.mode-card .chip { position: absolute; top: 12px; right: 12px; }
.runner { max-width: 820px; margin: 0 auto; }
.runner-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 10px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.25rem; padding: 4px 12px; border-radius: 10px; background: var(--surface-2); }
.timer.is-low { background: var(--bad-soft); color: var(--bad); }
.question-text { font-size: 1.2rem; font-weight: 650; margin: 12px 0 14px; }
.q-image { display: block; max-height: 220px; width: auto; margin: 0 auto 14px; }
.answers { display: grid; gap: 10px; }
.answer { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 56px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; color: var(--text); text-align: left; width: 100%; }
.answer:hover { border-color: var(--primary); }
.answer .key { flex: 0 0 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); font-weight: 800; }
.answer.is-selected { border-color: var(--primary); background: var(--primary-soft); }
.answer.is-correct { border-color: var(--ok); background: var(--ok-soft); }
.answer.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.feedback { margin-top: 14px; padding: 14px; border-radius: 12px; }
.feedback.ok { background: var(--ok-soft); }
.feedback.bad { background: var(--bad-soft); }
.runner-nav { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-top: 16px; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; margin-top: 12px; }
.qgrid button { min-height: 44px; border: 1.5px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; position: relative; }
.qgrid .answered { background: var(--info-soft); border-color: #8fb7e6; }
.qgrid .current { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.qgrid .flagged::after { content: "⚑"; position: absolute; top: -4px; right: 2px; color: var(--bad); font-size: .8rem; }
.score-ring { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px; background: conic-gradient(var(--c, var(--ok)) calc(var(--p) * 1%), var(--surface-2) 0); }
.score-ring > div { width: 118px; height: 118px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 2rem; font-weight: 800; }
.bar { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr auto; gap: 10px; align-items: center; margin-bottom: 8px; font-size: .95rem; }

/* Manual */
.toc a { display: block; padding: 6px 0; }
.toc .sub { padding-left: 14px; font-size: .94rem; }
.prose { max-width: 75ch; }
.prose h3 { margin-top: 1.4em; }
.prose figure { margin: 1em 0; text-align: center; }
.prose figcaption { color: var(--muted); font-size: .9rem; }
.section-block { scroll-margin-top: 80px; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.kcheck { border: 1px dashed var(--primary); border-radius: 12px; padding: 12px; margin: 1em 0; background: var(--surface); }
.kcheck-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.kcheck-opts .is-correct { border-color: var(--ok); background: var(--ok-soft); }
.kcheck-opts .is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.source-box { font-size: .9rem; color: var(--muted); border-top: 1px solid var(--border); margin-top: 10px; padding-top: 8px; }

/* Signs / placards */
.sign-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.sign-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 14px 10px; text-decoration: none; color: var(--text); }
.sign-tile img { width: 96px; height: 96px; object-fit: contain; }
.sign-hero { width: 200px; height: 200px; object-fit: contain; display: block; margin: 0 auto; }
.flashcard { min-height: 320px; display: grid; place-items: center; text-align: center; cursor: pointer; perspective: 800px; }
.flashcard .back { display: none; }
.flashcard.is-flipped .front { display: none; }
.flashcard.is-flipped .back { display: block; }

/* Facilities / map */
.map { height: 420px; border-radius: var(--radius); border: 1px solid var(--border); z-index: 1; background: var(--surface-2); }
.map-full { height: calc(100vh - 210px); min-height: 420px; }
@media (min-width: 1024px) { .map { height: 560px; } .map-full { height: calc(100vh - 150px); } }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.fac-item { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.fac-item a.name { font-weight: 700; font-size: 1.05rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.photo-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; }
.review { padding: 14px 0; border-bottom: 1px solid var(--border); }
.review-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.rating-input { display: flex; gap: 4px; }
.rating-input label { cursor: pointer; font-size: 1.6rem; color: var(--border); min-width: 36px; text-align: center; }
.rating-input input { position: absolute; opacity: 0; width: 1px; }
.rating-input label.on { color: var(--accent); }
.parking-badge { font-weight: 800; padding: 4px 10px; border-radius: 8px; }
.pk-available { background: var(--ok-soft); color: var(--ok); }
.pk-almost_full { background: var(--warn-soft); color: var(--warn); }
.pk-full { background: var(--bad-soft); color: var(--bad); }
.pk-stale { opacity: .6; }
.leaflet-container { font: inherit; }
.tc-cluster { background: var(--primary); color: #fff; border-radius: 50%; display: grid; place-items: center; font-weight: 800; border: 3px solid rgba(255,255,255,.85); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.tc-pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--c, #0b5cad); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); display: grid; place-items: center; }
.tc-pin span { transform: rotate(45deg); color: #fff; font-size: 12px; font-weight: 800; }
.contrib-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }

/* Tools */
.calc output, .calc .result { display: block; font-size: 1.5rem; font-weight: 800; margin: 6px 0; }
.calc .assume { font-size: .88rem; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 8px; margin-top: 8px; }

/* Admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.admin-nav a { padding: 8px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); font-size: .93rem; }
.admin-nav a.active { background: var(--side); color: #fff; border-color: var(--side); }
.log { background: #0b1220; color: #cfe3ff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; padding: 12px; border-radius: 10px; max-height: 360px; overflow: auto; white-space: pre-wrap; }
.dropzone { display: block; cursor: pointer; margin-bottom: 8px; border: 2px dashed var(--border); border-radius: var(--radius); padding: 26px; text-align: center; background: var(--surface-2); }
.dropzone.is-over { border-color: var(--primary); background: var(--primary-soft); }
.step-list { counter-reset: s; list-style: none; padding: 0; }
.step-list li { counter-increment: s; display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.step-list li::before { content: counter(s); flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; }
.step-list li.done::before { background: var(--ok); color: #fff; content: "✓"; }
.step-list li.active::before { background: var(--primary); color: #fff; }

@media print { .sidebar, .topbar, .footer, .btn, .lang-flags { display: none !important; } main { padding: 0; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
