:root {
  --bg: #f5f6f8;
  --card: #fff;
  --text: #182b3f;
  --muted: #667587;
  --line: #e3e8ee;
  --accent: #246b66;
  --ok: #26816d;
  --bad: #bc5351;
  --warn: #9a6b28;
  --soft-ok: #eaf5f0;
  --soft-bad: #fbefed;
  --soft-accent: #eaf2f1;
  --radius: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101923; --card: #182431; --text: #edf2f7; --muted: #a1afbd; --line: #2d3b4a;
    --accent: #85cbb9; --ok: #85cbb9; --bad: #ed9992; --warn: #dfb97a;
    --soft-ok: #203e38; --soft-bad: #432f33; --soft-accent: #253b3d;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }

#topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  padding: calc(var(--safe-t) + 8px) 12px 8px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
#topbar h1 { flex: 1; margin: 0; font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#top-actions { display: flex; gap: 6px; }
.icon-btn { border: 0; background: none; font-size: 30px; line-height: 1; padding: 0 8px 4px; color: var(--accent); cursor: pointer; }

#view { padding: 12px 16px calc(90px + var(--safe-b)); max-width: 760px; margin: 0 auto; }

#tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
#tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 6px 0 8px; font-size: 11px; color: var(--muted); }
#tabs a.active { color: var(--accent); font-weight: 600; }
.tab-ico { font-size: 22px; line-height: 1.2; }

h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; margin: 22px 4px 8px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.card + .card { margin-top: 12px; }
.pad { padding: 14px 16px; }
.list > * { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text); }
.list > *:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .sub { font-size: 13px; color: var(--muted); }
.list .chev::after { content: "›"; color: var(--muted); font-size: 22px; }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 12px; padding: 11px 16px; cursor: pointer;
  background: var(--soft-accent); color: var(--accent); font-weight: 600;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.danger { background: var(--soft-bad); color: var(--bad); }
.btn.big { width: 100%; padding: 16px; font-size: 18px; border-radius: 14px; }
.btn.small { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin: 0 2px 4px; }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); font-size: 16px;
}
textarea { min-height: 120px; resize: vertical; }
.seg { display: flex; background: var(--bg); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px 4px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.seg button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.15); font-weight: 600; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { background: var(--card); border-radius: 12px; padding: 10px 8px; text-align: center; }
.stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
@media (max-width: 380px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--bg); color: var(--muted); }
.pill.ok { background: var(--soft-ok); color: var(--ok); }
.pill.bad { background: var(--soft-bad); color: var(--bad); }
.pill.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: center; }
.tbl th { font-size: 12px; color: var(--muted); font-weight: 600; }
.tbl td.l, .tbl th.l { text-align: left; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr[data-go] { cursor: pointer; }
.tbl .key { color: var(--ok); font-weight: 700; }
.scroll-x { overflow-x: auto; }

.bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; min-width: 50px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.bar.ok > i { background: var(--ok); }
.bar.bad > i { background: var(--bad); }
.bar.warn > i { background: var(--warn); }

.hist { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 16px; }
.hist > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.hist i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.hist small { font-size: 10px; color: var(--muted); margin-top: 4px; }
.hist b { font-size: 11px; margin-bottom: 2px; }

/* Cevap anahtarı / sonuç düzenleme ızgarası */
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 18px; }
.qrow { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.qrow .qn { width: 30px; text-align: right; font-weight: 700; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.opt {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line);
  background: var(--card); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; color: var(--muted);
}
.opt.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.opt.right { border-color: var(--ok); border-width: 2.5px; color: var(--ok); }
.opt.on.right { background: var(--ok); color: #fff; }
.opt.on.wrong { background: var(--bad); border-color: var(--bad); color: #fff; }
.opt.on.multi { background: var(--warn); border-color: var(--warn); color: #fff; }
.qrow .mark { margin-left: auto; font-size: 13px; width: 18px; text-align: center; }

/* Modal */
#modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center; }
#modal[hidden] { display: none; }
.sheet-modal {
  background: var(--card); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + var(--safe-b));
  animation: up .2s ease-out;
}
.sheet-modal h3 { margin: 0 0 14px; font-size: 19px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 600px) { #modal { align-items: center; } .sheet-modal { border-radius: 18px; } }

#toast {
  position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); z-index: 80;
  background: rgba(30,30,32,.94); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: 90vw;
  pointer-events: none; /* altındaki düğmelere basılabilsin */
}
#toast[hidden] { display: none; }

/* Tarayıcı ekranı */
#scanner { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; overflow: hidden; }
#scanner[hidden] { display: none; }
#scan-video, #scan-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
#scan-video { object-fit: cover; }
.scan-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 10px) 12px 10px; background: linear-gradient(rgba(0,0,0,.6), transparent); }
.scan-title { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.scan-title small { opacity: .8; font-size: 13px; }
.scan-close { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 38px; height: 38px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.scan-chip { display: inline-flex; align-items: center; gap: 6px; border: 0; background: rgba(255,255,255,.18); color: #fff; padding: 8px 12px; border-radius: 99px; font-size: 14px; cursor: pointer; }
.scan-frame { position: absolute; inset: 12% 8% 22%; pointer-events: none; }
.scan-frame i { position: absolute; width: 34px; height: 34px; border: 4px solid rgba(255,255,255,.75); }
.scan-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.scan-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.scan-frame i:nth-child(3) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.scan-frame i:nth-child(4) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.scan-bottom { position: absolute; bottom: 0; left: 0; right: 0; padding: 12px 12px calc(14px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 10px; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.scan-status { background: rgba(0,0,0,.6); padding: 8px 14px; border-radius: 99px; font-size: 14px; }
.scan-status.ok { background: var(--ok); }
.scan-status.bad { background: var(--bad); }
.scan-tools { display: flex; gap: 8px; }
.scan-card { width: 100%; max-width: 480px; background: var(--card); color: var(--text); border-radius: 18px; padding: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.scan-card .name { font-size: 18px; font-weight: 700; }
.scan-card .nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; text-align: center; }
.scan-card .nums b { display: block; font-size: 24px; }
.scan-card .nums span { font-size: 12px; color: var(--muted); }


/* Giriş ekranı */
#auth { position: fixed; inset: 0; z-index: 90; background: var(--bg); overflow: auto; display: flex; justify-content: center; padding: calc(var(--safe-t) + 40px) 20px 40px; }
.auth-box { width: 100%; max-width: 380px; text-align: center; }
.auth-box img { border-radius: 18px; }
.auth-box h1 { margin: 12px 0 4px; font-size: 26px; }
.auth-box .field { text-align: left; }
.auth-msg { min-height: 20px; color: var(--bad); font-size: 14px; margin: 4px 0 10px; }
.auth-msg.ok { color: var(--ok); }
.link-btn { border: 0; background: none; color: var(--accent); margin-top: 16px; font-size: 14px; cursor: pointer; }
.auth-tabs { margin: 18px 0 16px; }
.pass-wrap { position: relative; display: block; }
.pass-wrap input { padding-right: 72px; }
.pass-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--accent); font-size: 14px; padding: 6px 8px; cursor: pointer; }
.link-btn.inline { margin: 0; padding: 0; font-size: inherit; text-decoration: underline; }
.btn.big-ish { padding: 14px; font-size: 17px; }
.seg a.seg-link { flex: 1; text-align: center; padding: 8px 4px; border-radius: 8px; font-size: 14px; color: var(--text); }
.seg a.seg-link.on { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.15); font-weight: 600; }

/* Sınav analizi */
.tap { cursor: pointer; }
.stack { display: flex; gap: 2px; height: 10px; margin: 6px 0 4px; border-radius: 5px; overflow: hidden; background: var(--bg); }
.stack.tall { height: 18px; border-radius: 6px; }
.stack i { display: block; min-width: 3px; }
.stack i:first-child { border-radius: 4px 0 0 4px; } .stack i:last-child { border-radius: 0 4px 4px 0; } .stack i:only-child { border-radius: 4px; }
.stack .ok, .legend .ok { background: var(--ok); }
.stack .bad, .legend .bad { background: var(--bad); }
.stack .warn, .legend .warn { background: var(--warn); }
.stack .none, .legend .none { background: color-mix(in srgb, var(--muted) 45%, transparent); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.matrix { border-collapse: separate; border-spacing: 2px; font-size: 11px; font-variant-numeric: tabular-nums; }
.matrix th { font-weight: 600; color: var(--muted); padding: 4px 2px; cursor: pointer; min-width: 22px; }
.matrix td { width: 22px; height: 22px; text-align: center; border-radius: 4px; font-weight: 700; color: #fff; }
.matrix td.l, .matrix th.l { position: sticky; left: 0; background: var(--card); text-align: left; padding: 0 8px 0 4px; white-space: nowrap; max-width: 130px; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: var(--text); z-index: 1; }
.matrix td:last-child { color: var(--text); padding: 0 6px; width: auto; }
.matrix .m-d { background: var(--ok); }
.matrix .m-y { background: var(--bad); }
.matrix .m-b { background: color-mix(in srgb, var(--muted) 30%, transparent); }
.matrix .m-x { background: var(--bg); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border-radius: 99px; background: var(--bg); color: var(--text); font-size: 13px; }
.chip b { color: var(--bad); }
.optbar { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 14px; }
.optbar > b { width: 22px; text-align: center; }
.optbar > b.right { color: var(--ok); }
.optbar > span { min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.report-preview { padding: 0; }
.report-preview img { display: block; width: 100%; height: auto; }
.optbar > .grow { flex: 1; }
.add-more { margin-top: 12px; }
.add-more > summary { list-style: none; }
.add-more > summary::-webkit-details-marker { display: none; }
.add-more[open] > summary { margin-bottom: 12px; }

/* Optik: sakin yüzeyler, belirgin veri hiyerarşisi ve mobil dokunma alanları. */
body { font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
button, a, summary { -webkit-user-select: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button { transition: background .16s, transform .16s; }
button:active, .btn:active { transform: translateY(1px); }
#topbar { min-height: calc(72px + var(--safe-t)); padding: calc(var(--safe-t) + 14px) max(20px, calc((100vw - 1040px) / 2)) 14px; gap: 12px; }
#topbar h1 { font-size: 17px; letter-spacing: -.35px; }
#back { width: 40px; height: 40px; padding: 0 0 4px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--card); }
#view { max-width: 1080px; padding: 28px 24px calc(114px + var(--safe-b)); }
#tabs { left: 50%; right: auto; transform: translateX(-50%); width: min(100%, 600px); padding: 8px 12px calc(8px + var(--safe-b)); box-shadow: 0 -8px 32px #10233806; border: 1px solid var(--line); border-bottom: 0; border-radius: 24px 24px 0 0; }
#tabs a { gap: 5px; padding: 7px 0; border-radius: 14px; font-size: 11px; letter-spacing: .15px; }
#tabs a.active { background: var(--soft-accent); }
.tab-ico { width: 23px; height: 23px; }
h2 { margin: 28px 2px 12px; text-transform: none; color: var(--text); font-size: 16px; font-weight: 650; letter-spacing: -.25px; }
.card { border: 1px solid var(--line); box-shadow: 0 3px 12px #152c4303; }
.pad { padding: 22px; }
.list > * { padding: 16px 20px; gap: 14px; }
.list .sub { margin-top: 3px; line-height: 1.5; }
.btn { min-height: 46px; padding: 12px 18px; font-size: 14px; font-weight: 650; border-radius: 12px; }
.btn.primary { background: #203d50; color: #fff; }
.btn.small { min-height: 40px; padding: 9px 12px; }
.btn.big { font-size: 16px; padding: 18px; }
.btns { gap: 12px; }
.stat { border: 1px solid var(--line); border-radius: 16px; padding: 18px 12px; text-align: left; }
.stat b { font-size: 28px; font-weight: 650; letter-spacing: -1px; }
.stat span { font-size: 12px; }
.tbl th { background: var(--bg); padding: 13px 10px; white-space: nowrap; }
.tbl td { padding: 14px 10px; }
.tbl tr[data-go]:hover, .tbl tr.tap:hover { background: var(--soft-accent); }
.seg { border: 1px solid var(--line); padding: 4px; border-radius: 13px; }
.seg button, .seg a.seg-link { padding: 11px 6px; border-radius: 9px; }
.seg button.on, .seg a.seg-link.on { color: var(--accent); box-shadow: 0 2px 6px #142c4210; }
input[type=checkbox] { width: 19px; height: 19px; accent-color: var(--accent); flex-shrink: 0; }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=password], select, textarea { min-height: 48px; }
.sheet-modal { padding: 26px 24px calc(24px + var(--safe-b)); border-radius: 26px 26px 0 0; box-shadow: 0 16px 80px #10233830; }
.sheet-modal h3 { letter-spacing: -.5px; font-size: 23px; }
.report-preview { max-width: 680px; margin-inline: auto; background: #f9fafb; border-radius: 12px; box-shadow: 0 8px 32px #142c420c; }
.eyebrow { display: block; font-size: 10px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); }
.page-intro { margin: 0 0 24px; }
.page-intro h2 { font-size: clamp(26px, 4vw, 34px); margin: 7px 0; letter-spacing: -1px; line-height: 1.2; overflow-wrap: anywhere; }
.page-intro p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.analysis-hero { display: grid; grid-template-columns: 1fr auto; position: relative; gap: 24px; padding: 30px; border-radius: 22px; color: #fff; background: #1b3045; overflow: hidden; }
.analysis-hero .eyebrow { color: #b2c8d6; }
.hero-value { margin-top: 12px; font-size: clamp(46px, 8vw, 64px); font-weight: 600; letter-spacing: -3px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-value small { font-size: 16px; letter-spacing: 0; font-weight: 400; color: #bacbd8; margin-left: 9px; }
.hero-caption { margin: 12px 0 0; color: #bdcbd8; font-size: 12px; }
.hero-aside { min-width: 140px; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; border-left: 1px solid #ffffff20; padding-left: 28px; }
.hero-aside b { font-size: 34px; font-weight: 550; letter-spacing: -1px; }
.hero-aside span { font-size: 12px; color: #bdcbd8; }
.hero-meter { width: 120px; height: 5px; border-radius: 4px; background: #ffffff1a; overflow: hidden; margin-top: 12px; }
.hero-meter i { display: block; height: 100%; border-radius: inherit; background: #8dcbb8; }
.analysis-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; margin: 12px 0 26px; background: var(--card); padding: 18px 0; }
.analysis-metrics > div { padding: 0 22px; border-right: 1px solid var(--line); }
.analysis-metrics > div:last-child { border: 0; }
.analysis-metrics span { display: block; color: var(--muted); font-size: 12px; }
.analysis-metrics > div { display: flex; flex-direction: column; justify-content: space-between; }
.analysis-metrics b { display: block; margin-top: 4px; font-size: 23px; font-weight: 650; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.analytics-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: stretch; }
.analytics-grid > .card + .card { margin: 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 22px; }
.section-head h2 { margin: 0; font-size: 16px; }
.section-head p { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.section-index { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; border: 1px solid var(--line); padding: 4px 8px; border-radius: 7px; }
.hist { height: 165px; padding: 0; gap: 7px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent 39px, var(--line) 40px, transparent 41px); }
.hist > div { position: relative; justify-content: flex-end; }
.hist .hist-column { width: 100%; display: flex; flex-direction: column; justify-content: flex-end; height: 135px; align-items: center; }
.hist b { font-size: 11px; font-weight: 600; color: var(--text); }
.hist i { background: #91b4b1; border-radius: 5px 5px 0 0; min-height: 0; max-width: 36px; }
.hist .peak i { background: var(--accent); }
.hist small { font-size: 10px; height: 21px; margin-top: 8px; }
.chart-foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 12px; gap: 10px; }
.difficulty-row { display: grid; grid-template-columns: 54px 1fr 48px; align-items: center; gap: 12px; margin: 22px 0; font-size: 13px; }
.difficulty-row b { text-align: right; font-weight: 600; font-size: 12px; }
.bar { height: 6px; min-width: 0; background: var(--line); }
.insight-note { margin: 14px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.analysis-section { margin-top: 28px; }
.analysis-section > .section-head { margin-bottom: 14px; }
.question-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.question-card { display: grid; grid-template-columns: 42px 1fr 16px; text-align: left; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); padding: 18px; border-radius: 16px; cursor: pointer; min-width: 0; }
.question-number { display: flex; align-items: center; justify-content: center; width: 42px; height: 46px; border-radius: 11px; background: var(--soft-bad); color: var(--bad); font-size: 19px; font-weight: 650; }
.question-body { min-width: 0; }
.question-body > strong { display: block; font-weight: 600; font-size: 13px; }
.question-body > small { display: block; color: var(--muted); font-size: 11px; line-height: 1.6; }
.question-card .stack { height: 5px; margin: 10px 0 8px; }
.question-arrow { color: var(--muted); font-size: 24px; }
.question-card:hover { border-color: var(--accent); }
.detail-disclosure { margin-top: 16px; }
.detail-disclosure > summary { cursor: pointer; padding: 20px; font-size: 15px; font-weight: 650; }
.detail-disclosure > summary::marker { color: var(--accent); }
.detail-disclosure > summary span { display: inline-block; margin-left: 8px; font-size: 11px; color: var(--muted); font-weight: 400; }
.detail-disclosure > .scroll-x { padding: 0 12px 12px; }
.detail-disclosure .card { box-shadow: none; border: 0; border-radius: 0; }
.detail-disclosure > p, .detail-disclosure > .legend { margin: 12px 20px 20px !important; }
.matrix td { height: 30px; min-width: 28px; }
.matrix th { min-width: 28px; }
.matrix th button { border: 0; background: none; color: inherit; font: inherit; min-height: 40px; min-width: 30px; cursor: pointer; }
.tbl .question-link { color: var(--accent); background: var(--soft-accent); border: 0; min-width: 40px; min-height: 40px; border-radius: 8px; font-weight: 650; cursor: pointer; }
.report-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.report-options label { min-height: 48px; font-size: 13px; }
.report-options p { grid-column: 1 / -1; }
.result-identity { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; }
.student-avatar { width: 50px; height: 50px; display: flex; flex-shrink: 0; align-items: center; justify-content: center; background: var(--soft-accent); color: var(--accent); border-radius: 15px; font-size: 17px; font-weight: 650; }
.result-identity h2 { margin: 0; font-size: 22px; letter-spacing: -.6px; }
.result-identity p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.result-score { margin-bottom: 14px; }
@media (min-width: 700px) { .sheet-modal { border-radius: 24px; } }
@media (max-width: 650px) {
  #view { padding: 22px 16px calc(108px + var(--safe-b)); }
  #topbar { min-height: calc(64px + var(--safe-t)); padding: calc(var(--safe-t) + 10px) 16px 10px; }
  #topbar h1 { font-size: 15px; }
  .pad { padding: 20px; }
  .page-intro { margin-bottom: 20px; }
  .page-intro h2 { font-size: 27px; }
  .analysis-hero { padding: 24px 22px; gap: 14px; border-radius: 18px; }
  .hero-value { font-size: 49px; }
  .hero-aside { min-width: 92px; padding-left: 16px; }
  .hero-aside b { font-size: 29px; }
  .hero-meter { width: 82px; }
  .analysis-metrics { padding: 16px 0; margin-bottom: 22px; }
  .analysis-metrics > div { padding: 0 14px; }
  .analysis-metrics b { font-size: 21px; }
  .analysis-metrics span { font-size: 11px; }
  .analytics-grid, .question-cards { grid-template-columns: 1fr; gap: 14px; }
  .question-card { padding: 16px; }
  .analysis-section { margin-top: 24px; }
  .section-head h2 { font-size: 15px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 15px 18px; }
  .stat b { font-size: 27px; }
  .tbl { font-size: 12px !important; }
  .tbl td, .tbl th { padding: 12px 5px; }
  .tbl td.l { overflow-wrap: anywhere; }
  .list > * { padding: 16px; }
  #view[data-page=send] > .list > div { flex-wrap: wrap; }
  #view[data-page=send] > .list > div > .row { width: 100%; }
  #view[data-page=send] > .list > div > .row > * { flex: 1; }
  .report-options { grid-template-columns: 1fr; }
  .detail-disclosure > summary span { display: block; margin: 4px 0 0 18px; }
}
@media (max-width: 360px) {
  .analysis-hero { padding: 22px 16px; }
  .hero-value { font-size: 42px; }
  .hero-aside { min-width: 80px; padding-left: 12px; }
  .hero-meter { width: 68px; }
  .analysis-metrics > div { padding: 0 10px; }
  .btns { gap: 8px; }
  .btn { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Sınıf sayfası: sınavlar (mavi, tarih rozetli kartlar) ile öğrenciler (yeşil, numaralı yoklama listesi)
   birbirinden ilk bakışta ayrılsın. */
:root { --exam: #4a5db0; --soft-exam: #eceffa; --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
@media (prefers-color-scheme: dark) { :root { --exam: #a9b6ef; --soft-exam: #262f4d; } }
.class-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 26px 28px; border-radius: 22px; background: #1b3045; color: #fff; }
.class-hero .eyebrow { color: #b2c8d6; }
.class-hero h2 { margin: 6px 0 0; color: #fff; font-size: clamp(28px, 5vw, 38px); letter-spacing: -1px; line-height: 1.1; overflow-wrap: anywhere; }
.class-hero-stats { display: flex; gap: 28px; }
.class-hero-stats b { display: block; font-size: 26px; font-weight: 650; letter-spacing: -.8px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.class-hero-stats span { font-size: 12px; color: #bdcbd8; }
.class-section { margin-top: 32px; }
.section-title { display: flex; align-items: center; gap: 12px; margin: 0 2px 12px; }
.section-title h2 { flex: 1; margin: 0; font-size: 18px; }
.section-title .count { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 99px; background: var(--soft-accent); color: var(--accent); font-size: 13px; vertical-align: 2px; }
.section-ico { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 11px; }
.section-ico svg { width: 20px; height: 20px; }
.exam-ico { background: var(--soft-exam); color: var(--exam); }
.student-ico { background: var(--soft-accent); color: var(--accent); }
.section-note { margin: -4px 2px 12px; font-size: 13px; color: var(--muted); }

.exam-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.exam-tile { display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--exam); border-radius: 18px; color: var(--text); transition: border-color .16s, box-shadow .16s; }
.exam-tile:hover { border-color: var(--exam); box-shadow: 0 6px 20px #1c2c6010; }
.exam-tile .chev::after { content: "›"; color: var(--muted); font-size: 24px; }
.date-badge { width: 54px; height: 58px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; background: var(--soft-exam); color: var(--exam); }
.date-badge b { font-size: 21px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.date-badge span { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .5px; }
.exam-tile-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.exam-tile-name { font-size: 16px; font-weight: 650; letter-spacing: -.2px; overflow-wrap: anywhere; }
.progress { display: block; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--exam); }
.exam-tile-meta { font-size: 13px; color: var(--muted); }

.roster { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.roster::after { content: ""; background: var(--card); }
.roster-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 12px 10px 14px; background: var(--card); }
.roster-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; color: var(--text); }
.roster-no { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.roster-name { font-size: 15px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster-main:hover .roster-name { color: var(--accent); }
.code-chip { display: flex; flex-direction: column; align-items: flex-end; padding: 5px 10px; border-radius: 10px; background: var(--soft-accent); color: var(--accent); font: 650 14px/1.2 var(--mono); letter-spacing: .04em; white-space: nowrap; }
.code-chip small { font: 600 9px/1.3 inherit; font-family: "Segoe UI", -apple-system, sans-serif; letter-spacing: .8px; text-transform: uppercase; opacity: .75; }
.roster-edit { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--card); color: var(--muted); cursor: pointer; }
.roster-edit svg { width: 18px; height: 18px; }
.roster-edit:hover { color: var(--accent); border-color: var(--accent); }
@media (min-width: 760px) { .roster { grid-template-columns: 1fr 1fr; } }

.code-box { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; padding: 14px 16px; border-radius: 14px; background: var(--soft-accent); }
.code-box > div { flex: 1; min-width: 0; }
.code-box span { display: block; font-size: 12px; color: var(--muted); }
.code-box b { display: block; margin: 2px 0; font: 650 24px/1.2 var(--mono); letter-spacing: .06em; color: var(--accent); }
.code-box small { display: block; font-size: 12px; color: var(--muted); }
.code-box .btn { flex-shrink: 0; background: var(--card); border: 1px solid var(--line); color: var(--accent); }

@media (max-width: 650px) {
  .class-hero { flex-direction: column; align-items: flex-start; padding: 22px; border-radius: 18px; }
  .class-hero-stats { gap: 24px; }
  .exam-tiles { grid-template-columns: 1fr; }
  .exam-tile { padding: 14px; gap: 12px; }
  .roster-row { padding: 10px; gap: 10px; }
  .roster-no { width: 32px; height: 32px; font-size: 12px; }
  .roster-name { font-size: 14px; white-space: normal; }
  .code-chip { font-size: 13px; padding: 4px 8px; }
}

/* Ana ekrana ekleme: hatırlatma bandı ve iPhone adımları */
.install-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 10px 12px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--soft-accent); }
.install-banner img { border-radius: 11px; flex-shrink: 0; }
.install-banner .grow { flex: 1; min-width: 0; }
.install-banner b { display: block; font-size: 15px; }
.install-banner span { display: block; font-size: 13px; color: var(--muted); }
.install-x { width: 32px; height: 32px; flex-shrink: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.install-steps { list-style: none; margin: 0 0 4px; padding: 0; counter-reset: step; }
.install-steps li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); counter-increment: step; font-size: 15px; line-height: 1.45; }
.install-steps li:last-child { border-bottom: 0; }
.install-steps .step-ico { position: relative; width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: var(--soft-accent); color: var(--accent); }
.install-steps .step-ico::before { content: counter(step); position: absolute; top: -6px; left: -6px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.install-steps .step-ico svg { width: 22px; height: 22px; }
.install-steps li svg { width: 16px; height: 16px; vertical-align: -3px; }
.install-steps .step-ico svg { width: 22px; height: 22px; vertical-align: 0; }

/* Sınıf kimliği: aynı renk kartlarda, filtrelerde ve sınıf detayında kullanılır. */
[style*="--class-light"] { --class-color: var(--class-light); --class-soft: color-mix(in srgb, var(--class-color) 10%, var(--card)); }
.collection-intro { margin: 2px 0 24px; }
.collection-intro .eyebrow { font-size: 10px; font-weight: 750; letter-spacing: 1.8px; color: var(--accent); }
.collection-intro h2 { margin: 8px 0; font-size: clamp(23px, 4vw, 30px); line-height: 1.2; letter-spacing: -.8px; }
.collection-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.class-grid, .exam-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.class-card { position: relative; min-width: 0; padding: 22px; border: 1px solid color-mix(in srgb, var(--class-color) 23%, var(--line)); border-radius: 22px; background: linear-gradient(135deg, var(--class-soft), var(--card)); color: var(--text); }
.class-card-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--class-soft); color: var(--class-color); margin-bottom: 24px; }
.class-card-icon svg { width: 25px; height: 25px; }
.class-card-label { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: var(--muted); }
.class-card h3 { margin: 4px 0 20px; font-size: 30px; letter-spacing: -1px; color: var(--class-color); overflow-wrap: anywhere; }
.class-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.class-card-footer > span:last-child { color: var(--class-color); font-size: 22px; }
.meta-dot { margin: 0 5px; }
.exam-tools { margin-bottom: 22px; }
.exam-search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--card); padding: 0 14px; border-radius: 14px; }
.exam-search svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--muted); }
.exam-search input { width: 100%; min-width: 0; height: 48px; border: 0; background: transparent; font-size: 16px; outline: none; }
.exam-search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.exam-search input::placeholder { color: var(--muted); }
.class-filters { display: flex; gap: 8px; overflow-x: auto; padding: 12px 3px 6px; scrollbar-width: thin; }
.class-filters button { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; min-height: 44px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); cursor: pointer; font-size: 13px; font-weight: 600; }
.class-filters button[aria-pressed=true] { background: var(--class-soft, var(--soft-accent)); border-color: var(--class-color, var(--accent)); color: var(--class-color, var(--accent)); }
.class-filters i { width: 8px; height: 8px; border-radius: 50%; background: var(--class-color); }
.class-filters button > span { opacity: .7; font-size: 11px; }
.collection-count { display: flex; justify-content: space-between; margin: 0 2px 12px; color: var(--muted); font-size: 12px; }
.collection-count > span:first-child { font-weight: 650; color: var(--text); }
.exam-card { min-width: 0; display: flex; flex-direction: column; position: relative; padding: 18px 20px 20px; border: 1px solid var(--line); border-left: 4px solid var(--class-color); border-radius: 18px; background: var(--card); color: var(--text); box-shadow: 0 4px 16px #10233804; }
.exam-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.class-badge { padding: 5px 10px; background: var(--class-soft); color: var(--class-color); border-radius: 8px; font-size: 14px; font-weight: 750; overflow-wrap: anywhere; }
.exam-date { flex-shrink: 0; color: var(--muted); font-size: 12px; }
.exam-card h3 { margin: 15px 0 10px; font-size: 18px; line-height: 1.45; font-weight: 650; letter-spacing: -.35px; overflow-wrap: anywhere; }
.exam-card-detail { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 12px; margin-bottom: 22px; }
.exam-status { display: inline-flex; align-items: center; gap: 6px; }
.exam-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--class-color); }
.exam-status.needs-key { color: var(--warn); }
.exam-status.needs-key::before { background: var(--warn); }
.exam-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; font-size: 12px; color: var(--muted); }
.exam-card-bottom b { color: var(--text); font-size: 15px; }
.exam-open { color: var(--class-color); font-weight: 600; white-space: nowrap; }
.exam-open > span { margin-left: 6px; }
.exam-progress { display: block; height: 4px; border-radius: 4px; overflow: hidden; background: var(--class-soft); margin-top: 12px; }
.exam-progress i { display: block; height: 100%; background: var(--class-color); border-radius: inherit; }
.exam-grid > .empty { grid-column: 1 / -1; }
.exam-grid > .empty .btn { margin-top: 16px; }
.class-colored { --exam: var(--class-color); --soft-exam: var(--class-soft); }
.class-hero.class-colored { background: linear-gradient(120deg, color-mix(in srgb, var(--class-light) 65%, #142334), #142334); border: 1px solid color-mix(in srgb, var(--class-color) 35%, var(--line)); }
@media (hover: hover) { .exam-card:hover, .class-card:hover { border-color: var(--class-color); box-shadow: 0 6px 24px #10233812; } }
@media (prefers-color-scheme: dark) { [style*="--class-light"] { --class-color: var(--class-dark); } }
@media (max-width: 650px) {
  #topbar h1 { font-size: 20px; letter-spacing: -.6px; }
  #view { padding-top: 22px; }
  .exam-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .class-grid { gap: 12px; }
  .class-card { padding: 17px 15px; border-radius: 18px; }
  .class-card-footer { font-size: 12px; }
  .class-card-footer .meta-dot { margin: 0 2px; }
  .exam-card { padding: 16px 16px 18px; }
  .collection-intro { margin-bottom: 20px; }
}
@media (max-width: 360px) { .class-grid { grid-template-columns: minmax(0, 1fr); } }

/* Yayın bildirimi tüm ekranların üstünde, içeriği kapatmadan görünür. */
#update-notice { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: 12px; padding: calc(12px + var(--safe-t)) 18px 12px; background: #203d50; color: #fff; box-shadow: 0 3px 18px #0002; }
#update-notice strong { display: block; font-size: 14px; font-weight: 650; }
#update-notice small { display: block; margin-top: 3px; font-size: 12px; color: #d0e0e9; }
.update-notice-icon { font-size: 27px; line-height: 1; }
body:has(#update-notice:not([hidden])) #topbar { position: static; padding-top: 12px; }
body:has(#update-notice:not([hidden])) #modal, body:has(#update-notice:not([hidden])) #scanner { top: calc(85px + var(--safe-t)); }
