:root {
  --ink: #102033;
  --paper: #f4efe6;
  --card: #fffdf8;
  --accent: #e08a1e;
  --accent-2: #1c7c5c;
  --line: #e4d8c4;
  --muted: #5d6b78;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: Manrope, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, #ffe7c2 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #ccefe3 0%, transparent 50%),
    var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

.site-nav {
  background: rgba(255,253,248,.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top);
}

.site-nav-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
  position: relative;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
  min-width: 0;
}

.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--ink); color: #fff; display: grid; place-items: center;
  font-weight: 800;
  flex-shrink: 0;
}

.brand small { display: block; color: var(--muted); font-size: 12px; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.nav-cta {
  background: var(--ink) !important; color: #fff !important;
  padding: 8px 14px; border-radius: 999px;
}

.page-shell { min-height: calc(100vh - 140px); }
.page-inner { padding-top: 1.5rem; padding-bottom: 1.5rem; min-width: 0; }
.site-foot {
  padding: 24px 0 calc(36px + env(safe-area-inset-bottom));
  color: var(--muted);
}

.hero, .panel, .q-card, .year-card, .cat-card, .vehicle-card, .gallery-card, .slider-board {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(16,32,51,.05);
}
.hero { padding: 36px; display: grid; gap: 18px; }
.hero h1 {
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 2.15rem);
  overflow-wrap: anywhere;
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { background: #f7f1e6; border-radius: 16px; padding: 16px; }
.stat b { display: block; font-size: clamp(1.35rem, 3vw, 1.75rem); }
.grid-2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.cat-grid, .year-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cat-card, .year-card, .q-card { padding: 18px; text-decoration: none; color: inherit; display: block; }
.cat-card:hover, .year-card:hover, .vehicle-card:hover, .gallery-card:hover { transform: translateY(-2px); }
.hero a, .muted a { color: var(--ink); font-weight: 700; }
.vehicle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vehicle-card {
  padding: 28px 22px;
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 8px;
}
.vehicle-icon { font-size: 2rem; line-height: 1; }
.arac-view[data-mode="slider"] .gallery-grid { display: none; }
.arac-view[data-mode="grid"] .slider-board { display: none; }
.slider-board {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.slider-head {
  padding: 16px 20px 0;
}
.slider-title { font-weight: 800; }
.slider-viewport {
  overflow: hidden;
  min-width: 0;
}
.slider-track {
  display: flex;
  width: 100%;
  transition: transform .28s ease;
}
.slider-slide {
  flex: 0 0 100%;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  min-width: 0;
}
.slider-slide img {
  width: 100%;
  max-height: min(56vh, 620px);
  object-fit: contain;
  display: block;
  border-radius: 16px;
  background: #111820;
}
.slider-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}
.slider-bar .btn-main,
.slider-bar .btn-ghost {
  width: 100%;
  text-align: center;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.gallery-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  text-align: left;
  cursor: pointer;
  width: 100%;
  font: inherit;
  color: inherit;
}
.gallery-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: #efe6d6;
}
.gallery-meta {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px 14px;
}
.gallery-meta b {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.gallery-meta span { font-weight: 700; line-height: 1.35; }
.btn-main, .btn-ghost {
  border: 0; border-radius: 999px; padding: 11px 18px; font-weight: 700; text-decoration: none; display: inline-block;
  min-height: 44px;
  line-height: 1.2;
}
.btn-main { background: var(--accent); color: #102033; }
button.btn-main, button.btn-ghost { cursor: pointer; }
.btn-ghost { background: #efe6d6; color: var(--ink); }
.btn-main:disabled, .btn-ghost:disabled {
  opacity: .42;
  cursor: not-allowed;
}
.flash { border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; }
.flash-warn { background: #ffe1c4; }
.flash-ok { background: #d9f5e8; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  min-height: 48px;
  overflow-wrap: anywhere;
}
.option input { margin-top: 3px; flex-shrink: 0; }
.option.correct { background: #d9f5e8; border-color: #1c7c5c; }
.option.wrong { background: #fde2d8; border-color: #c05746; }
.year-chip {
  display: inline-block; background: #efe6d6; border-radius: 999px; padding: 4px 10px; margin: 2px; font-size: 13px;
}
.timer { font-variant-numeric: tabular-nums; font-weight: 800; flex-shrink: 0; }
.q-image { max-width: min(520px, 100%); height: auto; border-radius: 12px; display: block; }
.muted { color: var(--muted); }
.search-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.search-bar input,
.search-bar select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 44px;
  min-width: 0;
  flex: 1 1 140px;
  background: #fff;
  font: inherit;
}
.search-bar .btn-main { flex: 0 0 auto; text-align: center; }
.day-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.day-cell {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
  background: #fff;
  color: #1a73a8;
  font-weight: 700;
  text-decoration: none;
  min-height: 48px;
}
button.day-cell { cursor: pointer; }
.day-cell:hover:not(.empty) { background: #f3f8fc; }
.day-cell.empty { color: #9aa7b2; cursor: default; background: #f7f7f7; }

.foot-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-links a { color: var(--ink); font-weight: 700; text-decoration: none; }

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.step-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
}
.step-card span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 10px;
}

.weight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.weight-card {
  background: #f7f1e6;
  border-radius: 16px;
  padding: 14px;
}
.weight-card b { display: block; font-size: 1.45rem; }
.weight-card span { color: var(--muted); font-size: 13px; }

.break-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr 48px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.break-bar {
  height: 10px;
  background: #efe6d6;
  border-radius: 99px;
  overflow: hidden;
}
.break-bar span {
  display: block;
  height: 100%;
  background: var(--accent-2);
}
.break-bar.is-low span { background: #c05746; }
.q-card.is-miss { border-color: #ead0c6; }
.hero.legal p { max-width: 62ch; }

.er-ad-slot {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 300px;
  height: 250px;
  pointer-events: none;
}

.er-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  background: var(--paper);
}

.er-gate[hidden] { display: none !important; }

.er-gate-card {
  width: min(36rem, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
}

.er-gate-card h1 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 4vw, 2rem);
}

body.er-locked {
  overflow: hidden;
}

body.er-locked .site-nav,
body.er-locked .page-shell,
body.er-locked .site-foot {
  visibility: hidden;
  pointer-events: none;
}

/* Sınav çözme: alt bar sabit, içerik kalan yüksekliği doldurur */
body.exam-page {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.exam-page .site-nav { flex-shrink: 0; position: relative; }

body.exam-page .site-foot { display: none; }

body.exam-page .page-shell {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

body.exam-page .page-inner {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding-top: 12px;
  padding-bottom: 12px;
  max-width: 960px;
}

body.exam-page .flash { flex-shrink: 0; }

.exam-board {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(16,32,51,.05);
  overflow: hidden;
}

.exam-top {
  flex-shrink: 0;
  min-width: 0;
  padding: 18px 24px 0;
}

.exam-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  min-width: 0;
}

.exam-head > div { min-width: 0; }

.exam-chips { margin-bottom: 4px; }

.exam-scroll {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 24px 16px;
}

.exam-question {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 700;
  line-height: 1.45;
  margin: 8px 0 12px;
  overflow-wrap: anywhere;
}

.exam-bar {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--card);
}

.exam-bar .btn-main,
.exam-bar .btn-ghost {
  width: 100%;
  text-align: center;
  min-height: 48px;
  padding: 12px 10px;
}

@media (max-width: 900px) {
  .grid-2, .stats, .cat-grid, .year-grid, .vehicle-grid, .step-grid, .weight-grid { grid-template-columns: 1fr; }
  .hero { padding: 22px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% - 4px);
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 16px 36px rgba(16,32,51,.12);
    z-index: 30;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    padding: 12px 8px;
    min-height: 44px;
    white-space: normal;
  }
  .nav-cta { text-align: center; }
  .page-inner { padding-top: 1rem; padding-bottom: 1rem; }
  .q-card, .cat-card, .year-card { padding: 16px; }
  body.exam-page .brand small { display: none; }
  body.exam-page .page-inner {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .exam-top { padding: 14px 16px 0; }
  .exam-scroll { padding: 8px 16px 14px; }
  .exam-bar {
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }
  .exam-bar .btn-main,
  .exam-bar .btn-ghost {
    font-size: 14px;
    padding: 12px 6px;
  }
  .q-image { max-width: 100%; }
}

@media (max-width: 600px) {
  .day-grid { grid-template-columns: 1fr; }
  .search-bar { flex-direction: column; }
  .search-bar input,
  .search-bar select,
  .search-bar .btn-main { width: 100%; flex: 1 1 auto; }
  .hero { padding: 18px; }
  .stat { padding: 14px; }
}

@media (max-width: 420px) {
  .exam-bar { grid-template-columns: 1fr 1fr 1fr; }
  .exam-bar .btn-main,
  .exam-bar .btn-ghost {
    font-size: 13px;
  }
}
