/* A+YDS — tasarım dili design/ klasöründeki ekranlardan: sıcak kırık beyaz zemin, mürekkep siyahı metin, tek mavi vurgu */
:root {
  --bg: #F5F4EF; --surface: #FFFFFF; --surface-2: #EFEEE8; --ink: #15171C; --ink-2: #3A3F4C; --muted: #5B6070; --line: #E4E2DA;
  --accent: #2443D6; --accent-ink: #1A33A8; --accent-soft: #E8ECFD; --on-accent: #FFFFFF;
  --ok: #17603B; --ok-soft: #E4F2EA; --bad: #9E2B23; --bad-soft: #FBE6E4; --warn: #9A3A12; --warn-soft: #FCEBE3;
  --hero: #15171C; --hero-ink: #FFFFFF; --hero-muted: #C9CCD6; --hero-accent: #9DB0FF; --hero-track: #2D313B;
  --f-head: "Space Grotesk", system-ui, sans-serif; --f-body: Inter, system-ui, sans-serif; --f-read: "Source Serif 4", Georgia, serif;
  --r: 16px; --r-lg: 22px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #111317; --surface: #1B1E24; --surface-2: #242830; --ink: #ECEDF1; --ink-2: #C9CCD6; --muted: #A2A7B4; --line: #2C3038;
  --accent: #8EA4FF; --accent-ink: #B4C3FF; --accent-soft: #222A4A; --on-accent: #0E1430;
  --ok: #7FD1A3; --ok-soft: #17301F; --bad: #F19A92; --bad-soft: #3A1F1D; --warn: #F2B26B; --warn-soft: #3A2A18;
  --hero: #1F232B; --hero-ink: #FFFFFF; --hero-muted: #A2A7B4; --hero-accent: #9DB0FF; --hero-track: #343945; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #111317; --surface: #1B1E24; --surface-2: #242830; --ink: #ECEDF1; --ink-2: #C9CCD6; --muted: #A2A7B4; --line: #2C3038;
  --accent: #8EA4FF; --accent-ink: #B4C3FF; --accent-soft: #222A4A; --on-accent: #0E1430;
  --ok: #7FD1A3; --ok-soft: #17301F; --bad: #F19A92; --bad-soft: #3A1F1D; --warn: #F2B26B; --warn-soft: #3A2A18;
  --hero: #1F232B; --hero-ink: #FFFFFF; --hero-muted: #A2A7B4; --hero-accent: #9DB0FF; --hero-track: #343945; color-scheme: dark }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.shell { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.page { flex: 1; padding-top: max(24px, env(safe-area-inset-top, 0px)); padding-bottom: 104px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 18px; }
.page.focus { padding-bottom: 32px; }

h1, h2, h3 { font-family: var(--f-head); margin: 0; text-wrap: balance; letter-spacing: -0.3px; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
.sub { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.logo { font-family: var(--f-head); font-weight: 700; font-size: 26px; letter-spacing: -0.5px; }
.logo b { color: var(--accent); }
.label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.5px; text-transform: uppercase; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: none; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 10px; background: var(--surface-2); color: var(--ink-2); }
.chip.accent { background: var(--accent-soft); color: var(--accent-ink); }

.card { background: var(--surface); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.hero { background: var(--hero); color: var(--hero-ink); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.hero .muted { color: var(--hero-muted); font-size: 13px; }
.hero .big { font-family: var(--f-head); font-size: 44px; font-weight: 700; line-height: 1; }
.hero .big small { font-size: 18px; font-weight: 500; }
.hero input[type=date] { font: inherit; border-radius: 10px; border: 1px solid var(--hero-track); background: transparent; color: var(--hero-ink); padding: 8px 10px; min-height: 44px; color-scheme: dark; }
.segs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.segs i { height: 8px; border-radius: 999px; background: var(--hero-track); }
.segs i.on { background: var(--hero-accent); }

.row-link { text-decoration: none; color: var(--ink); background: var(--surface); border-radius: var(--r); padding: 14px 16px; display: flex; align-items: center; gap: 14px; min-height: 64px; border: none; width: 100%; text-align: left; cursor: pointer; }
.row-link .ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; background: var(--accent-soft); color: var(--accent); }
.row-link .ic.warm { background: var(--warn-soft); color: var(--warn); }
.row-link .ic.green { background: var(--ok-soft); color: var(--ok); }
.row-link .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-link .txt b { font-size: 15px; }
.row-link .txt span { font-size: 13px; color: var(--muted); }
.row-link .go { font-size: 13px; font-weight: 600; color: var(--accent); }
.list { display: flex; flex-direction: column; gap: 10px; }

.bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

.btn { min-height: 52px; border-radius: var(--r); border: none; background: var(--accent); color: var(--on-accent); font-size: 16px; font-weight: 600; cursor: pointer; padding: 0 18px; width: 100%; }
.btn.ghost { background: var(--surface); color: var(--ink); }
.btn:disabled { opacity: .5; cursor: default; }

.nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding-top: 8px; padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)); padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); z-index: 5; }
.nav-in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nav a { text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; min-height: 48px; color: var(--muted); font-size: 12px; font-weight: 500; }
.nav a.on { color: var(--accent); font-weight: 600; }

/* Ders */
.rule { background: var(--accent-soft); color: var(--accent-ink); border-radius: var(--r); padding: 14px 16px; font-weight: 600; font-size: 16px; line-height: 1.4; }
.steps-ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.trap { border-left: 3px solid var(--warn); padding: 2px 0 2px 12px; display: flex; flex-direction: column; gap: 2px; }
.trap b { font-size: 14px; }
.trap span { font-size: 14px; color: var(--ink-2); }
details.box { background: var(--surface); border-radius: var(--r); }
details.box > summary { cursor: pointer; padding: 14px 16px; font-weight: 600; min-height: 48px; display: flex; align-items: center; justify-content: space-between; list-style: none; }
details.box > summary::-webkit-details-marker { display: none; }
details.box > summary::after { content: "+"; font-size: 20px; color: var(--muted); }
details.box[open] > summary::after { content: "–"; }
details.box .in { padding: 0 16px 16px; }
.tbl-wrap { overflow-x: auto; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 13px; }
table.tbl th, table.tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl th { color: var(--muted); font-weight: 600; }

/* Soru */
.progress-top { display: flex; align-items: center; gap: 12px; }
.progress-top .grow { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.progress-top .meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.passage { background: var(--surface); border-radius: var(--r); padding: 16px; font-family: var(--f-read); font-size: 16px; line-height: 1.6; max-height: 42vh; overflow-y: auto; }
.passage mark { background: var(--accent-soft); color: var(--accent-ink); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.stem { font-family: var(--f-read); font-size: 17px; line-height: 1.55; white-space: pre-line; margin: 0; }
.opts { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 0; }
.opt { width: 100%; text-align: left; display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 2px solid transparent; border-radius: 14px; padding: 12px 14px; min-height: 52px; cursor: pointer; font-size: 15px; line-height: 1.45; }
.opt .l { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.opt.ok { border-color: var(--ok); background: var(--ok-soft); }
.opt.ok .l { background: var(--ok); color: var(--surface); }
.opt.bad { border-color: var(--bad); background: var(--bad-soft); }
.opt.bad .l { background: var(--bad); color: var(--surface); }
.opt:disabled { cursor: default; color: var(--ink); }
.verdict { font-family: var(--f-head); font-weight: 700; font-size: 18px; }
.verdict.ok { color: var(--ok); }
.verdict.bad { color: var(--bad); }
.expl p { margin: 0; line-height: 1.55; }
.steps-box .in { display: flex; flex-direction: column; gap: 14px; }
.steps-box .read { font-family: var(--f-read); font-size: 15px; line-height: 1.55; margin: 0; }
.so { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.so li { border-left: 3px solid var(--line); padding-left: 10px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.so li.ok { border-left-color: var(--ok); }
.so .t b { font-weight: 600; }
.so .t span { color: var(--muted); }
.sticky-next { position: sticky; bottom: max(12px, env(safe-area-inset-bottom, 0px)); }

/* Sonuç */
.score { font-family: var(--f-head); font-size: 56px; font-weight: 700; line-height: 1; }
.res-list { display: flex; flex-direction: column; gap: 8px; }
.res { background: var(--surface); border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; border: none; width: 100%; text-align: left; cursor: pointer; }
.res .dot { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--surface); }
.res .dot.ok { background: var(--ok); }
.res .dot.bad { background: var(--bad); }
.res .q { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.word { font-family: var(--f-head); font-size: 24px; font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.loading { display: flex; align-items: center; justify-content: center; min-height: 60vh; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .page { animation: in .18s ease-out; } @keyframes in { from { opacity: 0; transform: translateY(4px); } } }

/* Kelime */
.w { all: unset; cursor: pointer; border-radius: 4px; }
.w:hover, .w:focus-visible { background: var(--accent-soft); color: var(--accent-ink); outline: none; }
.scrim { position: fixed; inset: 0; background: rgba(10, 12, 16, 0.45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); width: 100%; max-width: 560px; border-radius: 24px 24px 0 0; padding: 20px; padding-bottom: max(20px, env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; max-height: 85vh; overflow-y: auto; }
@media (prefers-reduced-motion: no-preference) { .sheet { animation: up .2s ease-out; } @keyframes up { from { transform: translateY(24px); opacity: 0; } } }
.inp { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; min-height: 48px; width: 100%; }
.sheet .inp { background: var(--bg); }
.rate { min-height: 56px; border-radius: 16px; border: none; font-weight: 600; font-size: 15px; cursor: pointer; padding: 0 6px; }
.rate.bad { background: var(--bad-soft); color: var(--bad); }
.rate.warn { background: var(--warn-soft); color: var(--warn); }
.rate.ok { background: var(--ok-soft); color: var(--ok); }
.drow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.drow:last-child { border-bottom: none; }
.link-btn { border: none; background: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 4px 0; min-height: 32px; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.toggle.on { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

/* Sütun yapıları: telefonda alt alta, masaüstünde yan yana */
.cols, .col, .qcols, .qcol { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.qcol { gap: 14px; }
.desk-only, .nav-logo { display: none !important; }
.kbd { margin-left: 10px; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.22); vertical-align: middle; }
.rate .kbd { background: rgba(0, 0, 0, 0.07); }

/* Masaüstü: solda menü, geniş içerik, iki sütun */
@media (min-width: 960px) {
  .desk-only { display: revert !important; }
  .card.desk-only { display: flex !important; }
  .kbd.desk-only { display: inline-block !important; }
  .shell { max-width: none; margin: 0; }
  .shell:has(> .nav) { display: grid; grid-template-columns: 232px minmax(0, 1fr); }
  .shell:has(> .nav) > .page { grid-column: 2; grid-row: 1; }
  .nav { grid-column: 1; grid-row: 1; position: sticky; top: 0; height: 100vh; border-top: none; border-right: 1px solid var(--line); padding: 28px 16px; display: flex; flex-direction: column; gap: 28px; }
  .nav .nav-logo { display: block !important; flex-direction: row; min-height: 0; font-family: var(--f-head); font-weight: 700; font-size: 26px; letter-spacing: -0.5px; color: var(--ink); text-decoration: none; padding: 0 12px; }
  .nav .nav-logo b { color: var(--accent); }
  .nav-in { max-width: none; margin: 0; grid-template-columns: 1fr; gap: 4px; }
  .nav a:not(.nav-logo) { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; min-height: 44px; border-radius: 12px; font-size: 15px; }
  .nav a.on { background: var(--accent-soft); }
  .nav a:not(.nav-logo):hover { background: var(--surface-2); color: var(--ink); }
  .nav a.on:hover { background: var(--accent-soft); color: var(--accent); }
  .page { width: 100%; max-width: 1120px; margin: 0 auto; padding: 40px 48px 56px; gap: 24px; }
  .page.focus { max-width: 1180px; }
  .shell.narrow .page { max-width: 680px; }
  .page .top .logo { display: none; }
  h1 { font-size: 32px; }
  .cols { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .qcols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .qleft { position: sticky; top: 24px; }
  .qleft .passage { max-height: calc(100vh - 150px); }
  .sticky-next { position: static; display: flex; justify-content: flex-end; }
  .sticky-next .btn { width: auto; min-width: 240px; }
  .row-link:hover, .res:hover { box-shadow: 0 0 0 2px var(--accent-soft); }
  .opt:not(:disabled):hover { border-color: var(--accent-soft); }
  .btn:not(:disabled):hover { filter: brightness(1.06); }
}
@media (min-width: 960px) { .shell.narrow .page > .card { flex: none; min-height: 420px; } }
.exam-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.exam-chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hero-track); background: transparent; color: var(--hero-muted); font-size: 14px; font-weight: 600; cursor: pointer; }
.exam-chip.on { background: var(--hero-accent); border-color: var(--hero-accent); color: #0E1430; }

/* Mini deneme */
.opt.secili { border-color: var(--accent); background: var(--accent-soft); }
.opt.secili .l { background: var(--accent); color: var(--on-accent); }
.timer { font-variant-numeric: tabular-nums; color: var(--ink); font-size: 14px; padding: 2px 8px; border-radius: 8px; background: var(--surface); }
.timer.az { color: var(--bad); background: var(--bad-soft); }
.deneme-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qgrid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.qcell { min-height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
.qcell.dolu { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.qcell.simdi { outline: 2px solid var(--accent); outline-offset: 1px; }
.res .dot.bos { background: var(--muted); }
@media (min-width: 960px) { .deneme-nav { display: flex; justify-content: flex-end; } .deneme-nav .btn { width: auto; min-width: 180px; } .qgrid { grid-template-columns: repeat(20, minmax(0, 1fr)); } }
