/* onlineders.org — light theme: graph-paper notebook; dark theme: chalkboard. */

@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/assets/fonts/bricolage-grotesque-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/atkinson-hyperlegible-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/atkinson-hyperlegible-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }

:root, [data-theme="light"] {
  color-scheme: light;
  --paper: #f6f8fc;
  --grid: #e3e8f2;
  --surface: #ffffff;
  --surface-2: #f0f3f9;
  --ink: #1a2747;
  --ink-soft: #55607a;
  --line: #dde3ee;
  --line-strong: #c4ccdb;
  --pen: #2747d0;
  --pen-ink: #ffffff;
  --pen-soft: #e6ebfb;
  --marker: #ffe45c;
  --marker-ink: #1a2747;
  --ok: #17804f;
  --ok-soft: #e1f3ea;
  --bad: #c8382f;
  --bad-soft: #fbe8e6;
  --warn-soft: #fff4d1;
  --d0: #2f6fe4;
  --d1: #1f9d55;
  --d2: #e0a800;
  --d3: #d93b30;
  --mat: #2747d0;
  --fen: #11845b;
  --tur: #c2410c;
  --sos: #8a4fbf;
  --lis: #0e7490;
  --shadow: 0 1px 0 rgba(26, 39, 71, .04), 0 6px 18px -10px rgba(26, 39, 71, .18);
}

[data-theme="dark"] {
  color-scheme: dark;
  --paper: #15221d;
  --grid: rgba(236, 241, 234, .035);
  --surface: #1c2c26;
  --surface-2: #233630;
  --ink: #ecf1ea;
  --ink-soft: #a6b6ad;
  --line: #2c4038;
  --line-strong: #3b544a;
  --pen: #93b6ff;
  --pen-ink: #0f1b17;
  --pen-soft: rgba(147, 182, 255, .14);
  --marker: #f2d46b;
  --marker-ink: #15221d;
  --ok: #6fd3a0;
  --ok-soft: rgba(111, 211, 160, .13);
  --bad: #ff8f86;
  --bad-soft: rgba(255, 143, 134, .13);
  --warn-soft: rgba(242, 212, 107, .14);
  --d0: #7fa8ff;
  --d1: #5fd197;
  --d2: #f2cc4b;
  --d3: #ff7f75;
  --mat: #93b6ff;
  --fen: #6fd3a0;
  --tur: #ffab7a;
  --sos: #d0a8f5;
  --lis: #7fd6e8;
  --shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 10px 24px -14px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px;
  font: 17px/1.6 "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3, .h2, .h3, .logo, .card-title, .display { font-family: "Bricolage Grotesque", system-ui, sans-serif; letter-spacing: -.015em; }
h1, h2, h3 { line-height: 1.15; margin: 1.5em 0 .5em; font-weight: 750; }
h1 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.4rem); margin-top: .5em; }
h2, .h2 { font-size: 1.45rem; }
h3, .h3 { font-size: 1.15rem; }
a { color: var(--pen); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; font-size: .88em; }
table { border-collapse: collapse; width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }
body.site { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main.wrap { flex: 1 0 auto; width: 100%; padding-bottom: 64px; }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 40em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inline { display: inline; }

/* Header */
.site-header { background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--ink); text-decoration: none; white-space: nowrap; padding-top: .1em; }
.logo-o { height: .92em; width: .612em; vertical-align: -.02em; overflow: visible; margin-left: .2em; }
.lo-o { fill: var(--pen); }
.lo-cap { fill: var(--ink); }
.lo-cord { fill: none; stroke: var(--marker); stroke-width: 34; stroke-linecap: round; stroke-linejoin: round; }
.lo-tassel { fill: var(--marker); }
.lo-end { stroke: var(--ink); stroke-width: 18; }
[data-theme="dark"] .lo-end { stroke: none; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { color: var(--ink); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: .95rem; }
.main-nav a:hover { background: var(--surface-2); }
.search { flex: 1; min-width: 150px; }
.user-menu { position: relative; }
.user-menu summary { display: inline-flex; align-items: center; gap: 7px; list-style: none; cursor: pointer; padding: 6px 10px 6px 8px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: .95rem; white-space: nowrap; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover, .user-menu[open] summary { border-color: var(--pen); }
.user-menu summary svg { width: 18px; height: 18px; flex: none; }
.user-menu .user-menu-caret { width: 14px; height: 14px; color: var(--ink-soft); transition: transform .15s; }
.user-menu[open] .user-menu-caret { transform: rotate(180deg); }
.user-menu-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; }
.user-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 190px; display: grid; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .35); }
.user-menu-list a, .user-menu-list .link { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.user-menu-list a:hover, .user-menu-list .link:hover, .user-menu-list a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.user-menu-list form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }
.user-menu-list .link { color: var(--bad); }
.search input { width: 100%; }
.user-nav { display: flex; align-items: center; gap: 14px; }
.user-nav a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.user-nav a:hover { color: var(--pen); }
.user-nav a.btn, .user-nav a.btn:hover { color: var(--pen-ink); }
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.theme-toggle:hover { border-color: var(--pen); color: var(--pen); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0; font-size: .92rem; color: var(--ink-soft); }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-row p { margin: 0; max-width: 34em; }
.footer-row nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* Forms */
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=url], input[type=number], input:not([type]), select, textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink);
}
input::placeholder, textarea::placeholder { color: var(--ink-soft); opacity: .8; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--pen-soft); border-color: var(--pen); }
textarea { resize: vertical; }
select[multiple] { padding: 4px; }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 5px; font-weight: 700; font-size: .95rem; }
.form small { font-weight: 400; color: var(--ink-soft); }
.form .check { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; }
.form .check input { margin-top: 6px; accent-color: var(--pen); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-box { max-width: 470px; margin: 28px auto; background: var(--surface); padding: 28px 30px; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.form-box-wide { max-width: 800px; }
.form-box h1 { margin-top: 0; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form select { width: auto; }
.stack { display: grid; gap: 6px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
legend { font-weight: 700; padding: 0 6px; }
.opt-row { display: flex; gap: 10px; align-items: center; margin: 7px 0; }
.opt-radio { display: flex !important; align-items: center; gap: 6px; font-weight: 700; min-width: 50px; }
.opt-radio input { accent-color: var(--ok); }
.preview { padding: 2px 14px; border-left: 3px solid var(--marker); color: var(--ink-soft); font-size: .95rem; }
.preview:empty { display: none; }
.current-img { display: flex; gap: 12px; align-items: center; }
.current-img img { max-height: 120px; border: 1px solid var(--line); border-radius: 8px; }
details.help { background: var(--pen-soft); border-radius: 10px; padding: 9px 15px; margin-bottom: 16px; }
details.help summary { cursor: pointer; font-weight: 700; }
.outcome-filter { margin-bottom: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--pen); color: var(--pen-ink); border: 1px solid var(--pen); padding: 10px 19px; border-radius: 999px; text-decoration: none; cursor: pointer; font-weight: 700; line-height: 1.25; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--pen); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
[data-theme="dark"] .btn-danger { color: #2a0f0c; }
.btn-small { padding: 6px 13px; font-size: .875rem; }
.btn-block { width: 100%; justify-content: center; }
button.link { background: none; border: 0; padding: 0; color: var(--pen); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }

/* Flash */
.flash { padding: 13px 17px; border-radius: 12px; margin: 18px 0; border: 1px solid transparent; }
.flash ul { margin: 0; padding-left: 18px; }
.flash-success { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.flash-error { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.flash-warn { background: var(--warn-soft); }
.flash-info { background: var(--pen-soft); }
.notice { background: var(--warn-soft); padding: 10px 14px; border-radius: 10px; }

/* Home */
.hero { padding: 56px 0 24px; max-width: 820px; }
.hero h1 { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.9rem); line-height: 1.02; letter-spacing: -.03em; font-weight: 800; margin: 0 0 18px; }
.hero .lead { margin: 0; }
.search-big { display: flex; align-items: center; gap: 0; max-width: 680px; margin: 30px 0 8px; border-bottom: 3px solid var(--ink); }
.search-big input { font-size: 1.25rem; padding: 12px 2px; border: 0; border-radius: 0; background: transparent; }
.search-big input:focus { outline: none; }
.search-big:focus-within { border-bottom-color: var(--pen); }
.search-big .btn { flex: none; }
.search-hint { color: var(--ink-soft); font-size: .92rem; margin: 0; }
.level-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 40px 0 12px; }
.level { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow); }
.level h2 { margin: 0 0 4px; font-size: 1.35rem; }
.level .grade-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.grade-chip { display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); text-decoration: none; font-family: "Bricolage Grotesque", sans-serif; font-weight: 750; font-size: 1.1rem; }
.grade-chip:hover { border-color: var(--pen); color: var(--pen); }
.grade-chip.is-empty { opacity: .45; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { background: var(--surface); border-radius: 16px; padding: 20px 22px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card-link { display: grid; gap: 4px; text-decoration: none; color: var(--ink); position: relative; padding-top: 26px; }
.card-link::before { content: ""; position: absolute; top: -1px; left: 20px; width: 44px; height: 8px; border-radius: 0 0 6px 6px; background: var(--subject, var(--pen)); }
.card-link:hover { border-color: var(--subject, var(--pen)); }
.card-kicker { font-size: .88rem; color: var(--ink-soft); }
.card-title { font-size: 1.35rem; font-weight: 750; }
.card-meta { font-size: .92rem; color: var(--ink-soft); }
.card-danger { border-top: 3px solid var(--bad); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 32px 0; }
.stats-row { display: flex; gap: 16px; margin: 28px 0; flex-wrap: wrap; }
.stats-row > * { flex: 1; min-width: 150px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; display: grid; text-decoration: none; color: var(--ink); }
.stats-row strong { font-family: "Bricolage Grotesque", sans-serif; font-size: 1.9rem; font-weight: 800; color: var(--pen); line-height: 1.1; }
.stats-row span { color: var(--ink-soft); font-size: .92rem; }
.stats-links a:hover { border-color: var(--pen); }
.impact { font-size: 1.05rem; color: var(--ink-soft); margin: 8px 0 0; }
.impact strong { color: var(--ink); }
.steps { padding-left: 22px; margin: 0; }
.steps li + li { margin-top: 6px; }
.center-box { text-align: center; padding: 56px 0; }

/* Subject colour coding */
[data-subject="matematik"] { --subject: var(--mat); }
[data-subject="fen-bilimleri"], [data-subject="fizik"], [data-subject="kimya"], [data-subject="biyoloji"], [data-subject="hayat-bilgisi"] { --subject: var(--fen); }
[data-subject="turkce"], [data-subject="turk-dili-ve-edebiyati"] { --subject: var(--tur); }
[data-subject="sosyal-bilgiler"], [data-subject="tarih"], [data-subject="cografya"], [data-subject="inkilap-tarihi"], [data-subject="din-kulturu"], [data-subject="felsefe"] { --subject: var(--sos); }
[data-subject="ingilizce"] { --subject: var(--lis); }

/* Curriculum */
.crumbs { font-size: .9rem; color: var(--ink-soft); margin-top: 22px; }
.crumbs a { color: var(--ink-soft); }
.page-head { border-left: 6px solid var(--subject, var(--pen)); padding-left: 16px; margin: 12px 0 24px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; }
.area-title { font-size: 1.05rem; color: var(--ink-soft); font-family: "Atkinson Hyperlegible", sans-serif; font-weight: 700; letter-spacing: 0; margin: 34px 0 10px; }
.topic-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.topic-list li { border-bottom: 1px solid var(--line); }
.topic-list li:last-child { border-bottom: 0; }
.topic-list a { display: flex; gap: 14px; align-items: center; padding: 14px 18px; text-decoration: none; color: var(--ink); }
.topic-list a:hover { background: var(--surface-2); }
.topic-no { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-family: "Bricolage Grotesque", sans-serif; font-weight: 750; color: var(--subject, var(--pen)); }
.topic-name { flex: 1; font-weight: 700; }
.outcome-list { list-style: none; padding: 0; margin: 0; }
.outcome-list li { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; padding: 9px 14px; border-radius: 10px; flex-wrap: wrap; }
.outcome-list li:nth-child(odd) { background: var(--surface); }
.outcome-list li > a { flex: 1; min-width: 260px; color: var(--ink); text-decoration: none; }
.outcome-list li > a:hover { color: var(--pen); }
.outcome-list-big li { padding: 12px 14px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8em; color: var(--pen); background: var(--pen-soft); padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.code-big { font-size: .92rem; }
.badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: .78rem; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); white-space: nowrap; font-weight: 700; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-d1, .badge-d2, .badge-d3 { color: var(--ink); background: color-mix(in srgb, var(--dc) 20%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dc) 45%, transparent); }
.badge-d1 { --dc: var(--d1); }
.badge-d2 { --dc: var(--d2); }
.badge-d3 { --dc: var(--d3); }
.badge-auto { background: var(--warn-soft); color: var(--ink); border: 1px dashed color-mix(in srgb, var(--ink) 35%, transparent); }
.outcome-head h1 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); margin-top: 12px; }
.outcome-desc { background: var(--surface); padding: 12px 16px; border-radius: 12px; border-left: 4px solid var(--marker); }
.kazanim-tags { margin: 10px 0 0; }
.kazanim-tags summary { cursor: pointer; color: var(--ink-soft); font-weight: 700; }
.kazanim-tags ul { margin: 8px 0 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.tabs { display: flex; gap: 6px; margin: 24px 0 0; position: sticky; top: 65px; background: var(--paper); padding: 10px 0; z-index: 10; overflow-x: auto; }
.tab { display: inline-flex; gap: 6px; align-items: center; padding: 7px 15px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; white-space: nowrap; }
.tab:hover { border-color: var(--pen); }
.tab-count { color: var(--ink-soft); font-weight: 400; }
.section { scroll-margin-top: 130px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter { display: flex; gap: 6px; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 5px 13px; cursor: pointer; font-size: .9rem; }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Difficulty chips: see-through colour, stronger when chosen. Tümü blue, Kolay green, Orta yellow, Zor red. */
.diff-chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.diff-chips legend { padding: 0; margin: 0 0 8px; font-weight: 700; font-size: .92rem; }
.diff-chip { --dc: var(--d0); display: inline-flex; align-items: center; gap: 7px; position: relative; color: var(--ink); background: color-mix(in srgb, var(--dc) 12%, transparent); border-color: color-mix(in srgb, var(--dc) 40%, transparent); padding: 6px 14px; font-weight: 600; transition: background .15s, border-color .15s; }
.diff-chip.d1 { --dc: var(--d1); }
.diff-chip.d2 { --dc: var(--d2); }
.diff-chip.d3 { --dc: var(--d3); }
.diff-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.diff-chip:hover { background: color-mix(in srgb, var(--dc) 20%, transparent); }
.diff-chip:has(input:checked) { background: color-mix(in srgb, var(--dc) 30%, transparent); border-color: var(--dc); box-shadow: inset 0 0 0 1px var(--dc); font-weight: 750; }
.diff-chip:has(input:focus-visible) { outline: 3px solid var(--pen); outline-offset: 2px; }
.diff-chip.is-empty { opacity: .45; cursor: not-allowed; }
.chip-n { font-variant-numeric: tabular-nums; font-weight: 400; font-size: .84rem; padding: 0 7px; border-radius: 999px; background: color-mix(in srgb, var(--dc) 18%, transparent); }

/* Topic test launcher and Testler section */
.test-start { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 24px; align-items: end; padding: 20px 22px; margin: 4px 0 14px; border-left: 6px solid var(--subject, var(--pen)); }
.test-start-text h3 { margin: 0 0 4px; }
.test-start-text p { margin: 0; color: var(--ink-soft); max-width: 60ch; }
.test-start .diff-chips { grid-column: 1; }
.test-start > .btn { grid-column: 2; grid-row: 2; }
@media (max-width: 640px) { .test-start { grid-template-columns: 1fr; } .test-start > .btn { grid-column: 1; grid-row: auto; justify-self: start; } }
.test-continue { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 12px 16px; margin: 0 0 12px; border-radius: 14px; background: var(--pen-soft); border: 1px solid color-mix(in srgb, var(--pen) 30%, transparent); }
.test-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.test-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 18px; align-items: center; padding: 14px 18px; border-left: 5px solid var(--subject, var(--pen)); }
.test-item-main { display: grid; gap: 2px; }
.test-item-name { font-weight: 700; color: var(--ink); text-decoration: none; }
.test-item-name:hover { color: var(--pen); }
.test-meter { font-size: .86rem; font-weight: 700; padding: 2px 11px; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--pen) 26%, transparent) var(--p), var(--surface-2) var(--p)); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) { .test-item { grid-template-columns: 1fr auto; } .test-item-main { grid-column: 1 / -1; } }
.test-next { margin: 18px 0 8px; }
.exam-q-tags { display: inline-flex; gap: 6px; align-items: center; }
.empty { background: var(--surface); border: 1px dashed var(--line-strong); padding: 16px 18px; border-radius: 12px; color: var(--ink-soft); }
.hint { font-size: .92rem; color: var(--ink-soft); }
.auto-note { font-size: .9rem; color: var(--ink-soft); background: var(--warn-soft); border-radius: 10px; padding: 9px 13px; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin: 40px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }

/* Resources */
.resource-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.resource { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: start; background: var(--surface); padding: 15px 18px; border-radius: 14px; border: 1px solid var(--line); }
.resource-title { font-weight: 700; font-size: 1.05rem; }
.resource-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; font-size: .88rem; color: var(--ink-soft); }
.resource-note { margin: 6px 0 0; font-size: .94rem; }
.embed-toggle { margin-top: 10px; }
.embed { grid-column: 1 / -1; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.embed-video { aspect-ratio: 16 / 9; }
.embed-sim { aspect-ratio: 4 / 3; max-height: 82vh; background: #fff; }
@media (max-width: 640px) { .embed-sim { aspect-ratio: 3 / 4; } }
.vote { display: grid; justify-items: center; line-height: 1.1; }
.vote-btn { border: 0; background: none; cursor: pointer; color: var(--ink-soft); font-size: .9rem; padding: 2px 6px; }
.vote-btn.on, .vote-btn:hover { color: var(--pen); }
.vote-score { font-weight: 700; font-size: .95rem; }

/* Questions */
.question { background: var(--surface); border-radius: 16px; padding: 20px 22px; margin: 14px 0; border: 1px solid var(--line); box-shadow: var(--shadow); }
.question-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .9rem; margin-bottom: 8px; }
.question-head a.muted { text-decoration: none; }
.stem { font-size: 1.08rem; margin: 8px 0 14px; }
.question-img { display: block; max-height: 360px; margin: 8px 0 14px; border-radius: 8px; background: #fff; }
.options { display: grid; gap: 8px; }
.option { position: relative; isolation: isolate; display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 13px; cursor: pointer; overflow: hidden; }
.option:hover:not(:disabled) { border-color: var(--pen); }
.option:disabled { cursor: default; }
.opt-label { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-strong); display: grid; place-items: center; font-weight: 700; font-size: .92rem; }
/* The one motion moment: the correct answer gets a highlighter swipe. */
.option.correct { border-color: var(--ok); color: var(--marker-ink); }
.option.correct::before { content: ""; position: absolute; inset: 6px 4px; z-index: -1; background: var(--marker); border-radius: 4px 10px 6px 12px / 10px 4px 12px 6px; transform-origin: left center; animation: marker-swipe .5s cubic-bezier(.3, .7, .2, 1) both; }
.option.correct .opt-label { background: var(--ok); color: #fff; border-color: var(--ok); }
[data-theme="dark"] .option.correct .opt-label { color: var(--pen-ink); }
.option.wrong { background: var(--bad-soft); border-color: var(--bad); }
.option.wrong .opt-label { background: var(--bad); color: #fff; border-color: var(--bad); }
[data-theme="dark"] .option.wrong .opt-label { color: var(--pen-ink); }
@keyframes marker-swipe { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .option.correct::before { animation: none; } }
.solution { margin-top: 14px; padding: 13px 17px; background: var(--pen-soft); border-radius: 12px; }
.solution .verdict { font-weight: 700; display: block; margin-bottom: 4px; }
.question-foot { margin-top: 10px; display: flex; justify-content: flex-end; align-items: center; gap: 14px; font-size: .86rem; }
.question-foot .check-btn { margin-right: auto; }
.question-foot .check-btn:disabled { opacity: .45; cursor: not-allowed; }
.check-btn[hidden] { display: none; }
.option.selected:not(.wrong):not(.correct) { border-color: var(--pen); background: var(--pen-soft); box-shadow: inset 0 0 0 1px var(--pen); }
.option.selected:not(.wrong):not(.correct) .opt-label { background: var(--pen); color: var(--pen-ink); border-color: var(--pen); }

/* Hold to pick: a fill grows under the option for one second; when it is full the option is picked. */
.option, label.exam-opt { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
label.exam-opt { isolation: isolate; overflow: hidden; }
.option::after, label.exam-opt::after { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--pen) 22%, transparent); transform: scaleX(0); transform-origin: left center; transition: transform .18s ease-out; pointer-events: none; }
.option.is-holding::after, label.exam-opt.is-holding::after { transform: scaleX(1); transition: transform 1s linear; }
.option.just-picked, label.exam-opt.just-picked { animation: pick-pop .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pick-pop { 0% { transform: scale(.985); } 60% { transform: scale(1.012); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .option.is-holding::after, label.exam-opt.is-holding::after { transform: none; opacity: 1; transition: opacity 1s linear; }
  .option::after, label.exam-opt::after { transform: none; opacity: 0; transition: opacity .15s; }
  .option.just-picked, label.exam-opt.just-picked { animation: none; }
}
.hold-note { font-size: .92rem; color: var(--ink-soft); }
.question[hidden] { display: none; }

/* Panel */
.table { background: var(--surface); border-radius: 14px; border: 1px solid var(--line); overflow: hidden; font-size: .94rem; }
.table th, .table td { padding: 10px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: var(--surface-2); font-weight: 700; font-size: .86rem; color: var(--ink-soft); }
.status { font-size: .8rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.status-approved, .status-active { background: var(--ok-soft); color: var(--ok); }
.status-pending { background: var(--warn-soft); }
.status-rejected, .status-suspended, .status-broken, .status-retired { background: var(--bad-soft); color: var(--bad); }
.review-card { margin: 14px 0; }
.review-options { padding-left: 0; list-style: none; }
.review-options li { padding: 4px 8px; border-radius: 6px; }
.review-options .is-correct { background: var(--ok-soft); }
.solution-box { background: var(--pen-soft); padding: 10px 14px; border-radius: 10px; margin: 10px 0; }
.review-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.review-form input { flex: 1; min-width: 220px; }
.rules ul { margin: 0; padding-left: 20px; }
.outcome-edit { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px; margin: 6px 0; }
.outcome-edit summary { cursor: pointer; }
.outcome-edit form { margin-top: 10px; }

/* Prose pages */
.prose { max-width: 720px; }
.prose table th, .prose table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; font-size: .94rem; }

/* Dialog */
.dialog { border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px; width: min(450px, 92vw); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.dialog::backdrop { background: rgba(10, 16, 30, .5); }
.dialog h3 { margin-top: 0; }
.dialog form { display: grid; gap: 12px; }
.dialog label { display: grid; gap: 5px; font-weight: 700; font-size: .95rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 11px 19px; border-radius: 999px; z-index: 100; font-size: .95rem; }

.katex { font-size: 1.05em; }

@media (max-width: 1120px) {
  .header-row { padding-bottom: 10px; }
  .search { order: 4; flex-basis: 100%; }
  .user-nav { margin-left: auto; }
}
@media (max-width: 820px) {
  .level-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .header-row { gap: 12px; padding-top: 8px; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; gap: 0; }
  .main-nav a { padding: 6px 10px; white-space: nowrap; }
  .search { order: 4; width: 100%; flex-basis: 100%; padding-bottom: 10px; }
  .user-nav { margin-left: auto; gap: 10px; }
  .two-col, .grid-2 { grid-template-columns: 1fr; }
  .resource { grid-template-columns: 1fr auto; }
  .resource .report-btn { grid-column: 1 / -1; justify-self: end; }
  .tabs { top: 0; }
  .form-box { padding: 20px; }
  .table { display: block; overflow-x: auto; }
  .hero { padding-top: 32px; }
}

/* Additions for levels, tabs and admin rows */
.main-nav a[aria-current="page"] { background: var(--surface-2); font-weight: 700; }
.level h2 a.plain, .area-title a { color: inherit; text-decoration: none; }
.level h2 a.plain:hover, .area-title a:hover { color: var(--pen); }
.tab.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tab.is-on .tab-count { color: inherit; opacity: .75; }
.tabs-static { position: static; }
.tab-panel[hidden] { display: none; }
.outcome-row { margin-top: 8px; }
.outcome-row input:not([type=hidden]) { flex: 1; min-width: 200px; }
.hero { padding-bottom: 8px; }
.level-row { margin-top: 18px; }
@media (max-width: 760px) {
  .pager { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
  .pager > span:empty { display: none; }
}
.worksheet-card { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; text-decoration: none; color: var(--ink); }
.worksheet-card:hover { border-color: var(--pen); }
.worksheet-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--marker); color: var(--marker-ink); display: grid; place-items: center; font-size: 1.2rem; }

/* Deneme sınavı */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body.is-exam .site-header { position: static; }

.exam-promo { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; margin: 22px 0 6px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--marker); border-radius: 16px; box-shadow: var(--shadow); }
.exam-promo h2 { margin: 0 0 2px; font-size: 1.3rem; }
.exam-promo p { margin: 0; color: var(--ink-soft); }
.exam-promo .actions-row { margin: 0; }

.exam-continue { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; background: var(--warn-soft); padding: 12px 16px; border-radius: 12px; margin: 0 0 20px; }
.exam-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 4px 0 28px; align-items: start; }
.exam-choice { border-top: 6px solid var(--subject, var(--pen)); }
.exam-choice h2 { margin: .15em 0 .7em; }
.exam-kicker { margin: 0; font-size: .88rem; color: var(--ink-soft); font-weight: 700; }
.exam-variants { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.exam-variants legend { padding: 0; margin-bottom: 6px; }
.exam-variant { display: flex; gap: 11px; align-items: center; border: 1px solid var(--line-strong); border-radius: 12px; padding: 9px 13px; background: var(--paper); cursor: pointer; }
.exam-variant:hover { border-color: var(--pen); }
.exam-variant:has(input:checked) { border-color: var(--pen); background: var(--pen-soft); }
.exam-variant input { accent-color: var(--pen); width: 18px; height: 18px; flex: none; margin: 0; }
.exam-variant > span { display: grid; line-height: 1.3; }
.exam-variant.is-empty { opacity: .5; cursor: not-allowed; }
.exam-variant-static { margin: 0 0 10px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.exam-dist { font-size: .94rem; margin: 6px 0 4px; }
.exam-dist th, .exam-dist td { padding: 5px 2px; border-bottom: 1px dashed var(--line); text-align: left; }
.exam-dist thead th { font-size: .82rem; color: var(--ink-soft); }
.exam-dist td:last-child, .exam-dist thead th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.exam-dist td:last-child { font-weight: 700; }
.exam-dist-group th { padding-top: 12px; font-size: .85rem; color: var(--subject, var(--pen)); }
.exam-rule { display: inline-block; margin: 12px 0 14px; padding: 3px 11px; border-radius: 8px; background: var(--surface-2); font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: .95rem; }
.exam-start .hint { margin-top: 0; }
.exam-notes ul { padding-left: 20px; max-width: 52em; }
.exam-notes li { margin: 8px 0; }
.exam-notes li.auto-note { list-style: none; margin-left: -20px; }

/* Exam page */
.exam-head h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin: .3em 0 .2em; }
.exam-head p { margin: 0 0 10px; }
.exam-bar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin: 8px -22px 0; padding: 10px 22px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.exam-timer { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-family: "Bricolage Grotesque", sans-serif; font-weight: 750; font-size: 1.25rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.exam-timer svg { width: 20px; height: 20px; color: var(--pen); }
.exam-timer.is-low { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.exam-timer.is-low svg { color: var(--bad); }
.exam-progress { font-weight: 700; font-variant-numeric: tabular-nums; }
.exam-progress-label { font-weight: 400; color: var(--ink-soft); }
.exam-save { margin-left: auto; font-size: .85rem; color: var(--ink-soft); }
.exam-save.is-ok { color: var(--ok); }
.exam-save.is-bad { color: var(--bad); font-weight: 700; }
.exam-layout { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 28px; align-items: start; }
.exam-test-title { border-left: 6px solid var(--subject, var(--pen)); padding-left: 12px; font-size: 1.35rem; margin: 30px 0 12px; }
.exam-test-title .muted { font-family: "Atkinson Hyperlegible", sans-serif; font-weight: 400; font-size: .9rem; letter-spacing: 0; margin-left: 4px; }
.exam-part-title { font-family: "Atkinson Hyperlegible", sans-serif; letter-spacing: 0; font-size: 1rem; color: var(--ink-soft); margin: 22px 0 8px; }
.exam-q { position: relative; min-width: 0; margin: 0 0 14px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); scroll-margin-top: 80px; }
.exam-q legend { float: left; width: 100%; padding: 0; margin: 0 0 4px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.exam-q legend + * { clear: both; }
.exam-q-no { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 10px; background: var(--surface-2); color: var(--subject, var(--pen)); font-family: "Bricolage Grotesque", sans-serif; font-weight: 750; font-size: 1.05rem; }
.exam-q.is-answered .exam-q-no { background: var(--pen); color: var(--pen-ink); }
.exam-q.is-flagged { box-shadow: inset 5px 0 0 var(--marker), var(--shadow); }
.exam-map-toggle[hidden], .exam-map-close[hidden] { display: none; }
.exam-finish-short { display: none; }
.exam-q .stem { margin-top: 6px; }
.exam-options { display: grid; gap: 8px; }
.exam-opt { position: relative; display: flex; gap: 12px; align-items: center; width: 100%; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 13px; }
label.exam-opt { cursor: pointer; }
label.exam-opt:hover { border-color: var(--pen); }
.exam-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.exam-opt .opt-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.exam-opt input:checked + .opt-label { background: var(--pen); color: var(--pen-ink); border-color: var(--pen); }
.exam-opt:has(input:checked) { border-color: var(--pen); background: var(--pen-soft); box-shadow: inset 0 0 0 1px var(--pen); }
.exam-opt input:focus-visible + .opt-label { outline: 3px solid var(--pen); outline-offset: 2px; }
.exam-opt:has(input:focus-visible) { outline: 3px solid var(--pen); outline-offset: 2px; }
.exam-opt:has(input:focus-visible) .opt-label { outline: 0; }
.exam-q-foot { display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; font-size: .88rem; }
.exam-q-foot .report-btn { margin-left: auto; font-size: .84rem; color: var(--ink-soft); }
.exam-pill { display: inline-flex; gap: 7px; align-items: center; padding: 5px 13px 5px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); cursor: pointer; min-height: 36px; }
.exam-pill:hover { border-color: var(--pen); }
.exam-pill input { accent-color: var(--pen); width: 16px; height: 16px; margin: 0; }
.exam-blank:has(input:checked) { background: var(--surface-2); border-color: var(--ink-soft); }
.exam-flag:has(input:checked) { background: var(--marker); color: var(--marker-ink); border-color: var(--marker); }
.exam-flag input { accent-color: var(--marker-ink); }
.exam-end { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin: 28px 0 0; }
.exam-end p { margin: 0; flex: 1; min-width: 240px; }
.exam-nav { position: sticky; top: 76px; max-height: calc(100vh - 92px); max-height: calc(100dvh - 92px); overflow: auto; margin-top: 30px; padding: 14px 16px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.exam-nav-head { display: flex; justify-content: space-between; align-items: center; }
.exam-legend { list-style: none; padding: 0; margin: 8px 0 4px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--ink-soft); }
.exam-legend li { display: inline-flex; align-items: center; gap: 5px; }
.exam-legend .nav-q { width: 14px; height: 14px; min-width: 0; border-radius: 4px; }
.exam-nav-test { margin: 12px 0 6px; font-size: .84rem; font-weight: 700; color: var(--ink-soft); }
.exam-nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 6px; }
.nav-q { display: inline-grid; place-items: center; height: 36px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .86rem; font-variant-numeric: tabular-nums; }
a.nav-q:hover { border-color: var(--pen); color: var(--pen); }
.nav-q.is-answered { background: var(--pen); border-color: var(--pen); color: var(--pen-ink); }
a.nav-q.is-answered:hover { color: var(--pen-ink); filter: brightness(1.1); }
.nav-q.is-flagged { border-color: var(--marker); box-shadow: inset 0 0 0 2px var(--marker); }
.nav-q.is-answered.is-flagged { box-shadow: inset 0 0 0 3px var(--marker); }

/* Result page */
.exam-score .exam-score-net { background: var(--marker); border-color: transparent; }
.exam-score .exam-score-net strong, .exam-score .exam-score-net span { color: var(--marker-ink); }
.exam-score > div strong { font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; position: relative; }
.exam-table td, .exam-table th { font-variant-numeric: tabular-nums; }
.exam-table tbody th, .exam-table tfoot th { background: transparent; color: var(--ink); font-size: inherit; }
.exam-table tfoot td, .exam-table tfoot th { background: var(--surface-2); font-weight: 700; border-bottom: 0; }
.exam-table-part th { padding-left: 30px; font-weight: 400; color: var(--ink-soft) !important; }
.exam-table-part td { color: var(--ink-soft); }
.exam-topics tbody th { font-weight: 700; }
.exam-meter { display: inline-block; min-width: 62px; padding: 1px 9px; border-radius: 999px; font-weight: 700; font-size: .85rem; background: linear-gradient(90deg, color-mix(in srgb, var(--ok) 28%, transparent) var(--p), var(--surface-2) var(--p)); }
.exam-weak-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.exam-weak-list .card { display: grid; gap: 3px; align-content: start; padding: 16px 18px; border-top: 5px solid var(--subject, var(--pen)); }
.exam-weak-name { font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; line-height: 1.3; }
.exam-weak-name:hover { color: var(--pen); }
.exam-weak-score { font-weight: 700; color: var(--bad); font-size: .92rem; }
.exam-weak-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: .92rem; }
.exam-review-actions { margin: 26px 0 0; }
.exam-review-actions .inline-form { gap: 10px 14px; }
.exam-key { list-style: none; padding: 0; margin: 10px 0 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.exam-key a { display: flex; justify-content: space-between; gap: 4px; padding: 3px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.exam-key a span { font-weight: 400; color: var(--ink-soft); }
.exam-key .exam-key-dogru a { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.exam-key .exam-key-yanlis a { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.exam-review-test { font-size: 1.2rem; margin: 28px 0 8px; }
.exam-review { background: var(--surface); border-radius: 16px; padding: 18px 20px; margin: 12px 0; border: 1px solid var(--line); border-left: 5px solid var(--line-strong); box-shadow: var(--shadow); scroll-margin-top: 80px; }
.exam-review[hidden], .exam-review-test[hidden] { display: none; }
.exam-review-dogru { border-left-color: var(--ok); }
.exam-review-yanlis { border-left-color: var(--bad); }
.exam-review .exam-q-no { min-width: 30px; height: 30px; font-size: .95rem; }
.exam-options-review { list-style: none; padding: 0; margin: 0; }
.exam-opt.is-correct { border-color: var(--ok); background: var(--ok-soft); }
.exam-opt.is-correct .opt-label { background: var(--ok); border-color: var(--ok); color: #fff; }
.exam-opt.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.exam-opt.is-wrong .opt-label { background: var(--bad); border-color: var(--bad); color: #fff; }
[data-theme="dark"] .exam-opt.is-correct .opt-label, [data-theme="dark"] .exam-opt.is-wrong .opt-label { color: var(--pen-ink); }
.exam-opt-tag { flex: none; font-size: .76rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface); color: var(--ok); white-space: nowrap; }
.exam-opt.is-wrong .exam-opt-tag, .exam-opt-mine { color: var(--ink-soft); }
.exam-opt.is-wrong .exam-opt-mine { color: var(--bad); }

@media (max-width: 900px) {
  .exam-layout { grid-template-columns: minmax(0, 1fr); }
  .exam-nav { position: static; max-height: none; margin-top: 18px; }
  .has-js .exam-nav { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 40; max-height: 72vh; max-height: 72dvh; margin: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .28); padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); }
  .has-js .exam-nav:not(.is-open) { display: none; }
  .exam-nav-grid { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); }
  .nav-q { height: 42px; }
}
@media (max-width: 760px) {
  .exam-choices { grid-template-columns: 1fr; }
  .exam-bar { gap: 6px 10px; padding: 8px 14px; margin: 6px -22px 0; }
  .exam-timer { font-size: 1.1rem; padding: 3px 10px 3px 8px; }
  .exam-progress-label { display: none; }
  .exam-save { order: 10; flex-basis: 100%; margin: -2px 0 0; font-size: .78rem; }
  .exam-save:empty { display: none; }
  .exam-map-toggle { margin-left: auto; }
  .exam-q { padding: 14px 14px 12px; border-radius: 14px; }
  .exam-finish-long { display: none; }
  .exam-finish-short { display: inline; }
  .exam-save.is-ok { display: none; }
  .exam-progress.is-saved::after { content: "✓"; margin-left: 5px; color: var(--ok); }
  .exam-opt { padding: 9px 11px; gap: 10px; }
  .exam-review { padding: 14px 14px; }
  .exam-opt-tag { font-size: .7rem; padding: 1px 7px; }
  .exam-options-review .exam-opt { flex-wrap: wrap; }
  .exam-table { font-size: .86rem; display: table; }
  .exam-table th, .exam-table td { padding: 8px 6px; }
  .exam-table-part th { padding-left: 14px; }
  .exam-topics th .muted, .exam-topics tr > :last-child { display: none; }
  .exam-meter { min-width: 0; padding: 1px 6px; }
}

/* Bot koruması (iş kanıtı) */
.pow-noscript { margin: 0; font-size: .9rem; color: var(--ink); background: var(--warn-soft); border-radius: 10px; padding: 9px 13px; font-weight: 400; }
.btn.is-verifying, button.is-verifying { cursor: progress; opacity: .78; filter: none; }
.btn.is-verifying::before { content: ""; width: .85em; height: .85em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: pow-spin .8s linear infinite; }
@keyframes pow-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-verifying::before { animation: none; border-right-color: currentColor; opacity: .5; } }

/* Sonuç sayfası: üyelik çağrısı */
.save-callout { display: flex; gap: 14px 28px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 22px 0 8px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--pen); border-radius: 16px; box-shadow: var(--shadow); }
.save-callout > div:first-child { flex: 1 1 420px; }
.save-callout h2 { margin: 0 0 6px; }
.save-callout p { margin: 0 0 6px; }
.save-callout p:last-child { margin-bottom: 0; }
.save-callout .actions-row { margin: 0; flex: none; }
.progress-link { background: var(--pen-soft); border-radius: 12px; padding: 10px 15px; margin: 16px 0 6px; }
.progress-link a { font-weight: 700; }

/* Hesabım: gelişim kutusu */
.progress-promo { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin: 22px 0 6px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--marker); border-radius: 16px; box-shadow: var(--shadow); }
.progress-promo h2 { margin: 0 0 2px; }
.progress-promo p { margin: 0; }
.progress-promo .actions-row { margin: 0; }

/* Gelişimim */
.progress-empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 16px; padding: 22px 24px; max-width: 46em; }
.progress-empty h2 { margin-top: 0; }
.progress-none { margin: 26px 0 0; }
.progress-type { margin: 30px 0 10px; padding-top: 4px; }
.progress-type + .progress-type { border-top: 1px solid var(--line); padding-top: 18px; }
.progress-type-head { display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; border-left: 6px solid var(--subject, var(--pen)); padding-left: 14px; }
.progress-type-head h2 { margin: 0; font-size: 1.7rem; }
.progress-type-head p { margin: 0; }
.progress-block { margin: 26px 0 0; }
.progress-block > h3 { margin: 0 0 10px; }
.progress-kpis { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.progress-kpis > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; min-width: 120px; }
.progress-kpis dt { font-size: .82rem; color: var(--ink-soft); }
.progress-kpis dd { margin: 0; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 1.3rem; font-variant-numeric: tabular-nums; line-height: 1.25; }
.progress-kpis dd .trend { font-size: 1.05rem; }
.trend { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.trend-up { color: var(--ok); }
.trend-down { color: var(--bad); }
.trend-flat { color: var(--ink-soft); }
.chart { margin: 0 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 12px 10px; max-width: 760px; }
.chart figcaption { padding: 2px 6px 0; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: "Atkinson Hyperlegible", system-ui, sans-serif; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-zero { stroke: var(--line-strong); stroke-width: 1.5; }
.chart-tick { fill: var(--ink-soft); font-size: 13px; font-variant-numeric: tabular-nums; }
.chart-line { fill: none; stroke: var(--pen); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: var(--pen); opacity: .08; }
.chart-dot { fill: var(--pen); stroke: var(--surface); stroke-width: 2; }
.chart-dot:hover { stroke: var(--pen); stroke-width: 6; stroke-opacity: .25; }
.chart-dot-last { fill: var(--marker); stroke: var(--pen); stroke-width: 2.5; }
.chart-value { fill: var(--ink); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.progress-data { max-width: 760px; }
.progress-data tbody th { font-weight: 400; color: var(--ink-soft) !important; }
.progress-subjects td, .progress-subjects th { white-space: nowrap; }
.progress-col-sec { display: block; font-weight: 400; font-size: .76rem; }
.progress-subjects td .small { margin-left: 1px; }
.subject-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--subject, var(--pen)); margin-right: 8px; vertical-align: 1px; }
.progress-topics { margin-top: 10px; }
.progress-topics .card { scroll-margin-top: 90px; }
.progress-review-form { margin-top: 4px; font-size: .92rem; }
.progress-review-form button.link { text-align: left; }
@media (max-width: 760px) {
  .save-callout { padding: 16px; }
  .progress-kpis > div { min-width: 0; flex: 1 1 30%; padding: 7px 10px; }
  .progress-kpis dd { font-size: 1.12rem; }
  .progress-kpis dd .trend { font-size: .92rem; }
  .chart { padding: 10px 6px 8px; border-radius: 12px; }
  .chart-tick { font-size: 17px; }
  .chart-value { font-size: 19px; }
  .progress-data th:nth-child(3), .progress-data td:nth-child(3) { display: none; }
}

/* Topic page: video cards with thumbnails; a card opens its player in place and widens to the full row. */
.video-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.video-grid > .resource:not(.video-card) { grid-column: 1 / -1; }
.video-grid > .video-card { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; align-items: stretch; gap: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.video-stage { position: relative; aspect-ratio: 16 / 9; background: color-mix(in srgb, var(--subject, var(--pen)) 16%, var(--surface-2)); }
.video-thumb { position: absolute; inset: 0; display: block; color: inherit; overflow: hidden; }
.video-thumb:focus-visible { outline-offset: -4px; border-radius: 0; }
.video-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease, filter .25s ease; }
.video-thumb.no-thumb img { display: none; }
.video-thumb.no-thumb::before { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 19px, color-mix(in srgb, var(--subject, var(--pen)) 18%, transparent) 19px 20px),
              repeating-linear-gradient(90deg, transparent 0 19px, color-mix(in srgb, var(--subject, var(--pen)) 18%, transparent) 19px 20px); }
.video-play { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%;
  display: grid; place-items: center; padding-left: 3px; background: var(--marker); color: var(--marker-ink);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--marker) 35%, transparent), 0 8px 18px -6px rgba(0, 0, 0, .45); transition: transform .2s ease; }
.video-dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 6px; font-size: .8rem; font-weight: 700;
  background: rgba(10, 16, 30, .78); color: #fff; letter-spacing: .01em; }
.video-thumb:hover img, .video-thumb:focus-visible img { transform: scale(1.04); filter: brightness(.88); }
.video-thumb:hover .video-play, .video-thumb:focus-visible .video-play { transform: scale(1.1); }
.video-stage .embed { position: absolute; inset: 0; border: 0; border-radius: 0; }
.video-body { padding: 12px 15px 4px; flex: 1; }
.video-title { margin: 0; font-size: 1rem; line-height: 1.3; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-body .resource-meta { margin-top: 6px; font-size: .84rem; }
.video-foot { display: flex; align-items: center; gap: 14px; padding: 6px 12px 10px 9px; }
.vote-row { display: flex; align-items: center; gap: 0; }
.vote-row .vote-score { min-width: 1.4em; text-align: center; font-size: .9rem; }
.video-foot .video-yt { margin-left: auto; color: var(--ink-soft); }
.video-foot .report-btn { color: var(--ink-soft); grid-column: auto; justify-self: auto; }
.video-card.is-playing { grid-column: 1 / -1; }
.video-card.is-playing .video-stage { background: #000; }
.video-card.is-playing .video-title { -webkit-line-clamp: unset; font-size: 1.15rem; }
.video-card.is-playing .video-close { font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .video-thumb img, .video-play { transition: none; } .video-thumb:hover img, .video-thumb:hover .video-play { transform: none; } }
@media (max-width: 560px) { .video-grid { grid-template-columns: 1fr; gap: 14px; } }

/* Admin: dashboard, members */
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { margin-bottom: 4px; }
.admin-nav { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.admin-nav a { padding: 6px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .92rem; }
.admin-nav a[aria-current] { background: var(--ink); color: var(--paper); }
.period-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 18px 0 6px; }
.period-row .chip { text-decoration: none; color: var(--ink); }
.period-row .chip.on { color: var(--paper); }
.period-note { flex-basis: 100%; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0 26px; }
.kpi { display: grid; align-content: start; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: var(--ink); text-decoration: none; }
a.kpi:hover { border-color: var(--pen); }
.kpi strong { font-family: "Bricolage Grotesque", sans-serif; font-size: 1.85rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-small strong { font-size: 1.35rem; }
.kpi-label { color: var(--ink-soft); font-size: .92rem; }
.delta { font-size: .82rem; font-weight: 700; margin-top: 4px; color: var(--ink-soft); }
.delta .muted { font-weight: 400; }
.delta-up { color: var(--ok); }
.delta-down { color: var(--bad); }
.chart-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: 14px; }
.chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 10px; }
.admin-box .chart { border: 0; padding: 0; background: none; }
.chart figcaption { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-bottom: 6px; }
.chart-title { font-weight: 700; }
.chart-total { color: var(--ink-soft); font-size: .86rem; font-variant-numeric: tabular-nums; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .chart-gridline { stroke: var(--line); stroke-width: 1; }
.chart .chart-base { stroke: var(--line-strong); stroke-width: 1; }
.chart-axis { fill: var(--ink-soft); font-size: 13px; font-variant-numeric: tabular-nums; }
.chart-bar path { fill: var(--pen); }
.chart-hit { fill: transparent; }
.chart-bar:hover path { fill: color-mix(in srgb, var(--pen) 70%, var(--ink)); }
.chart-bar:hover .chart-hit { fill: color-mix(in srgb, var(--pen) 8%, transparent); }
.chart-table summary { cursor: pointer; font-size: .84rem; color: var(--ink-soft); margin-top: 4px; }
.chart-table table { margin-top: 8px; max-height: 260px; overflow-y: auto; display: block; }
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-compact th, .table-compact td { padding: 6px 10px; }
.admin-h2 { margin-top: 38px; }
.admin-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: 14px; }
.admin-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; min-width: 0; }
.admin-box h3 { margin: 0 0 8px; font-size: 1.02rem; }
.admin-box .mt, .mt { margin-top: 18px; }
.rank { margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.rank li { counter-increment: rank; display: grid; grid-template-columns: 1.7em 1fr auto; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.rank li:last-child { border-bottom: 0; }
.rank li::before { content: counter(rank); color: var(--ink-soft); font-size: .84rem; font-variant-numeric: tabular-nums; }
.rank li > a, .rank li > span:not(.rank-val) { grid-column: 2; }
.rank li > .small.muted { grid-column: 2; }
.rank-val { grid-column: 3; grid-row: 1; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.hbars li { display: grid; grid-template-columns: minmax(90px, 34%) 1fr 3.6em; gap: 10px; align-items: center; font-size: .92rem; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.hbar { display: block; height: 100%; border-radius: 5px; background: var(--pen); min-width: 2px; }
.hbar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 8px; }
.filter-row input[type="search"] { flex: 1 1 260px; }
.members-table a.strong { font-weight: 700; }
.pending-box { margin-bottom: 26px; }
.member-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.member-head h1 { margin-bottom: 2px; }
.member-badges { display: flex; gap: 8px; align-items: center; }
.stack-form { display: grid; gap: 10px; justify-items: start; }
.stack-form label { display: grid; gap: 4px; width: 100%; font-weight: 600; }
.stack-form .small.muted { margin: 0; }
.danger-box { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.temp-pw code { font-size: 1.2rem; font-weight: 800; letter-spacing: .06em; padding: 2px 8px; background: var(--surface); border-radius: 6px; user-select: all; }
.log-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .94rem; }
.filter-row input, .filter-row select { width: auto; margin: 0; }
.filter-row select { flex: 0 1 auto; }
.stack-form label .small { font-weight: 400; }
.kpi-date strong { font-size: 1.15rem; }
.actions-row .actions-end { margin-left: auto; }
