:root {
  --paper: #f8fafc;
  --sheet: #fdfeff;
  --ink: #1e293b;
  --muted: #4b5a70;
  --line: #dbe3ec;
  --blue: #1d4f91;
  --blue-soft: #e8f0fa;
  --right: #19704a;
  --right-soft: #e5f3ec;
  --wrong: #a93128;
  --wrong-soft: #fbeae8;
  --flag: #8a5a00;
  --flag-soft: #fdf1d8;
  /* arayüz ve başlıklar */
  --ui: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  /* soru, şık ve çözüm metinleri: I, l ve 1 karakterleri ayrışır */
  --read: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.6 var(--read); }
h1, h2, h3 { font-family: var(--ui); line-height: 1.3; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--blue); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #f0a020; outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: .5rem; background: var(--sheet); padding: .4rem .8rem; z-index: 9; }

.top { background: var(--sheet); border-bottom: 1px solid var(--line); }
.bar, main, footer, .notice { width: min(100% - 2rem, 62rem); margin-inline: auto; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1.5rem; min-height: 3.5rem; padding: .35rem 0; }
.brand { font: 700 1.1rem var(--ui); color: var(--ink); text-decoration: none; }
nav { display: flex; gap: .25rem; font: 500 .92rem var(--ui); }
nav a { padding: .4rem .7rem; border-radius: 6px; text-decoration: none; color: var(--muted); }
nav a:hover { background: var(--blue-soft); color: var(--blue); }
nav a[aria-current="page"] { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.notice { position: fixed; z-index: 5; left: 0; right: 0; bottom: 1rem; max-width: 36rem; margin-block: 0; padding: .7rem 1rem; background: var(--ink); color: #fff; border-radius: 6px; text-align: center; }
main { display: block; padding: 1.75rem 0 3rem; min-height: 70vh; }
main:focus { outline: none; }
footer { border-top: 1px solid var(--line); padding: 1.25rem 0 2.5rem; font-size: .875rem; color: var(--muted); }

.lead { color: var(--muted); margin-top: .4rem; max-width: 44rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.6rem; padding: .45rem 1.1rem; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); color: var(--ink); font: 600 .9rem var(--ui); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #163f75; color: #fff; }
.btn.danger { color: var(--wrong); }
.btn.on { background: var(--flag-soft); border-color: var(--flag); color: var(--flag); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:disabled:hover { border-color: var(--line); color: var(--ink); }
.btn.primary:disabled:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.back { display: inline-block; margin-bottom: .75rem; font-size: .95rem; }

/* ana sayfa ve listeler */
.chapter { margin-top: 2.25rem; }
.chapter > header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin-bottom: .6rem; }
.chapter > header span { color: var(--muted); font-size: .9rem; }
.units { list-style: none; margin: 0; padding: 0; background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; }
.units li + li { border-top: 1px solid var(--line); }
.units a { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) 11rem 5.5rem; align-items: center; gap: .75rem; padding: .7rem 1rem; color: var(--ink); text-decoration: none; }
.units a:hover { background: var(--blue-soft); }
.units .code { color: var(--muted); font-variant-numeric: tabular-nums; }
.units .count { text-align: right; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.meter { display: flex; height: .55rem; background: #e6edf4; border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; }
.meter .ok { background: var(--right); }
.meter .no { background: var(--wrong); }
.legend { display: flex; gap: 1rem; margin-top: 1.5rem; font-size: .85rem; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: .8rem; height: .55rem; margin-right: .35rem; border-radius: 2px; background: var(--right); }
.legend span + span::before { background: var(--wrong); }

.panel { background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem; margin-top: 1.5rem; }
.panel > h2 { margin-bottom: .35rem; }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0 1.5rem; align-items: start; }
.prep h3 { margin: 1.1rem 0 .35rem; }
.check { display: flex; gap: .65rem; align-items: flex-start; padding: .25rem 0; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; margin: .2rem 0 0; accent-color: var(--blue); flex: none; }
.check input:checked + span { color: var(--muted); }

.field { display: block; border: 0; margin: 1rem 0 0; padding: 0; }
.field > legend, .field > span { display: block; font: 600 .9rem var(--ui); margin-bottom: .35rem; padding: 0; }
select { width: 100%; min-height: 2.6rem; padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); color: var(--ink); font: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { min-height: 2.35rem; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); color: var(--ink); font: 500 .86rem var(--ui); cursor: pointer; }
.chip:hover { border-color: var(--blue); }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.hint { color: var(--muted); font-size: .9rem; margin-top: .6rem; }

/* soru */
.qhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; }
.qhead h1 { font-size: 1.35rem; }
.qmeta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.tag { padding: .1rem .55rem; border-radius: 4px; background: #e6edf4; color: var(--muted); font-size: .83rem; }
.progressline { margin-top: .6rem; height: .3rem; background: #e6edf4; border-radius: 2px; }
.progressline i { display: block; height: 100%; background: var(--blue); border-radius: 2px; }
.question { margin-top: 1rem; }
.stem { font-size: 1.25rem; font-weight: 600; line-height: 1.65; max-width: 44rem; }
.items { margin: .8rem 0 0; padding-left: 1.5rem; font-weight: 600; }
.items li { margin-bottom: .35rem; }
.tablewrap { overflow-x: auto; margin-top: .9rem; }
table { border-collapse: collapse; }
th, td { border: 1px solid #9fb0c1; padding: .35rem .8rem; text-align: center; font-size: .95rem; }
th { background: #e6edf4; }
.ask { margin-top: .9rem; }
.options { display: grid; gap: .5rem; margin-top: 1.1rem; }
.option { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; align-items: center; gap: .8rem; width: 100%; padding: .55rem .8rem .55rem .55rem; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); color: var(--ink); font: inherit; font-size: 1.125rem; line-height: 1.6; text-align: left; }
button.option { cursor: pointer; }
button.option:hover { border-color: var(--blue); }
/* cevap kâğıdı kutusu */
.box { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 2px solid var(--ink); border-radius: 3px; font-weight: 700; }
.option.picked { border-color: var(--blue); background: var(--blue-soft); }
.option.picked .box { background: var(--ink); color: #fff; }
.option.right { border-color: var(--right); background: var(--right-soft); }
.option.right .box { background: var(--right); border-color: var(--right); color: #fff; }
.option.wrong { border-color: var(--wrong); background: var(--wrong-soft); }
.option.wrong .box { background: var(--wrong); border-color: var(--wrong); color: #fff; }
.mark { font-size: .85rem; font-weight: 700; }
.option.right .mark { color: var(--right); }
.option.wrong .mark { color: var(--wrong); }
.solution { line-height: 1.7; margin-top: 1.1rem; padding: 1rem 1.2rem; background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; max-width: 48rem; }
.verdict { font: 700 1rem var(--ui); margin-bottom: .5rem; }
.verdict.ok { color: var(--right); }
.verdict.no { color: var(--wrong); }
.verdict.blank { color: var(--flag); }
.solution p + p, .solution ul { margin-top: .6rem; }
.solution ul { padding-left: 1.2rem; }
.controls { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.controls .grow { flex: 1; }
.keys { margin-top: 1rem; font-size: .85rem; color: var(--muted); }

/* deneme */
.exam { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 1.5rem; align-items: start; }
.sheet { position: sticky; top: 1rem; background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; }
.timer { font: 700 1.9rem var(--ui); font-variant-numeric: tabular-nums; }
.timer.low { color: var(--wrong); }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; margin-top: .8rem; }
.cell { display: grid; place-items: center; min-height: 2.8rem; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--sheet); color: var(--ink); font: .75rem/1.1 var(--ui); cursor: pointer; }
.cell b { font-size: .95rem; min-height: 1.05rem; }
.cell.filled { background: var(--blue-soft); border-color: var(--blue); }
.cell.marked { background: var(--flag-soft); border-color: var(--flag); }
.cell.current { outline: 3px solid var(--ink); outline-offset: -1px; }
.sheet .btn { width: 100%; margin-top: .8rem; }
.confirm { margin-top: .8rem; padding: .8rem; border: 1px solid var(--wrong); border-radius: 6px; background: var(--wrong-soft); }
.confirm .actions { margin-top: .6rem; }
.confirm .btn { width: auto; margin-top: 0; }

.score { font: 700 2.4rem var(--ui); margin-top: .4rem; }
.score small { font: 400 1.0625rem var(--read); color: var(--muted); }
.stats { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin-top: 1rem; }
.stats div b { display: block; font: 700 1.5rem var(--ui); }
.stats div span { color: var(--muted); font-size: .9rem; }
.data { width: 100%; margin-top: .8rem; }
.data th, .data td { border-color: var(--line); text-align: right; }
.data th:first-child, .data td:first-child { text-align: left; }
.review { margin-top: .6rem; background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; }
.review summary { display: flex; gap: .75rem; padding: .7rem 1rem; cursor: pointer; }
.review summary .state { flex: none; width: 5.2rem; font-weight: 700; }
.state.ok { color: var(--right); }
.state.no { color: var(--wrong); }
.state.blank { color: var(--flag); }
.review .body { padding: 0 1rem 1rem; }
.list { list-style: none; margin: .6rem 0 0; padding: 0; }
.list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding: .55rem 0; border-top: 1px solid var(--line); }

@media (max-width: 52rem) {
  .split { grid-template-columns: minmax(0, 1fr); }
  /* telefonda süre üstte sabit kalır, cevap kâğıdı sorunun altına iner */
  .exam { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .sheet { display: contents; }
  .clock { order: -1; position: sticky; top: 0; z-index: 2; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: .45rem .9rem; background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; }
  .sheet .timer { font-size: 1.35rem; }
  .sheet .hint { margin-top: 1.75rem; }
  .sheet > .btn { margin-top: 1rem; }
  .grid { grid-template-columns: repeat(8, 1fr); }
}
@media (max-width: 36rem) {
  h1 { font-size: 1.5rem; }
  .units a { grid-template-columns: 2.6rem minmax(0, 1fr) auto; row-gap: .35rem; }
  .units .meter { grid-column: 2 / -1; grid-row: 2; }
  .units .count { grid-column: 3; grid-row: 1; }
  .stem { font-size: 1.15rem; }
  .option { font-size: 1.0625rem; }
  .grid { grid-template-columns: repeat(6, 1fr); }
  .controls .grow { display: none; }
  .controls .btn { flex: 1 1 8rem; }
  .keys { display: none; }
  .data th, .data td { padding: .3rem .4rem; font-size: .85rem; }
}
