@font-face { font-family: "AHN"; font-weight: 400; font-display: swap; src: url(/static/fonts/ahn-latin-400.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+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "AHN"; font-weight: 400; font-display: swap; src: url(/static/fonts/ahn-latin-ext-400.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "AHN"; font-weight: 600; font-display: swap; src: url(/static/fonts/ahn-latin-600.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+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "AHN"; font-weight: 600; font-display: swap; src: url(/static/fonts/ahn-latin-ext-600.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "AHN"; font-weight: 700; font-display: swap; src: url(/static/fonts/ahn-latin-700.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+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "AHN"; font-weight: 700; font-display: swap; src: url(/static/fonts/ahn-latin-ext-700.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #f2f4f1;
  --surface: #ffffff;
  --ink: #1a2230;
  --muted: #5a6472;
  --line: #d8ded7;
  --blue: #2c46b0;
  --blue-soft: #e6eaf8;
  --blue-ink: #1d2f7a;
  --red: #cf3b2e;
  --red-soft: #fbe9e6;
  --green: #2d7a57;
  --green-soft: #e3f1ea;
  --amber: #9a5a0c;
  --amber-soft: #fbf0dc;
  --r-control: 8px;
  --r-panel: 14px;
  --font: "AHN", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-underline-offset: 2px; }
small, .small { font-size: .88rem; }
.muted { color: var(--muted); }
.pre { white-space: pre-wrap; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------------------------------------------------------------- kontroller */
button, .btn {
  font: 600 1rem/1 var(--font);
  border-radius: var(--r-control);
  border: 1.5px solid transparent;
  padding: .85em 1.25em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-ink); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-record { background: var(--red); color: #fff; }
.btn-record:hover { background: #b2301f; }
.btn-danger { background: transparent; color: var(--red); border-color: #e7b7b1; }
.btn-small { min-height: 36px; padding: .5em .9em; font-size: .9rem; }
button:disabled { opacity: .45; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

label { display: block; font-weight: 600; margin-bottom: .35rem; }
input:not([type]), input[type=text], input[type=email], input[type=url], input[type=password], input[type=number], input[type=datetime-local], textarea, select {
  width: 100%;
  font: 400 1rem/1.4 var(--font);
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-control);
  padding: .7em .8em;
}
input:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-soft); }
textarea { min-height: 7em; resize: vertical; }
.hint { color: var(--muted); font-size: .88rem; margin-top: .3rem; }
.field { margin-bottom: 1.1rem; }

.notice { border-radius: var(--r-control); padding: .85rem 1rem; margin: 0 0 1.25rem; }
.notice-info { background: var(--blue-soft); color: var(--blue-ink); }
.notice-warn { background: var(--amber-soft); color: #5e3606; }
.notice-error { background: var(--red-soft); color: #7a1f16; }
.notice-ok { background: var(--green-soft); color: #1d4f38; }

/* ---------------------------------------------------------------- öğrenci sayfası */
.wrap { max-width: 640px; margin: 0 auto; padding: 0 20px; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .wrap { padding-top: 14px; padding-bottom: 12px; }
.course { margin: 0 0 10px; font-weight: 600; font-size: .95rem; color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); min-height: 28px; gap: 6px; counter-reset: step; }
.steps li { font-size: .78rem; color: var(--muted); padding-top: 8px; border-top: 4px solid var(--line); counter-increment: step; }
.steps li::before { content: counter(step) ". "; }
.steps li.done { border-color: var(--blue); color: var(--ink); }
.steps li.current { border-color: var(--blue); color: var(--blue-ink); font-weight: 700; }
@media (max-width: 420px) {
  .steps li { font-size: 0; white-space: nowrap; }
  .steps li::before { content: none; }
  .steps li.current { font-size: .78rem; overflow: visible; }
  .steps li.current::before { content: counter(step) ". "; }
}

main.wrap { padding-top: 32px; padding-bottom: 64px; }
.lead { font-size: 1.1rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 22px; margin-bottom: 1.25rem; }
.consent-text { max-height: 46vh; overflow: auto; padding-right: 6px; }
.topic { border-left: 4px solid var(--blue); padding: .2rem 0 .2rem 1rem; margin: 0 0 1.25rem; font-size: 1.1rem; font-weight: 600; }

.ref-list { margin: 0; padding-left: 1.3rem; }
.ref-list li { margin-bottom: .35rem; }
.ref-fieldset { border: 0; margin: 0 0 1.25rem; padding: 0; }
.ref-fieldset legend { font-weight: 700; margin-bottom: .5rem; }

.meter { height: 10px; background: var(--paper); border-radius: 5px; overflow: hidden; margin: .75rem 0 .5rem; border: 1px solid var(--line); }
.meter > span { display: block; height: 100%; width: 0; background: var(--green); transition: width .08s linear; }
.check { display: flex; gap: .6rem; align-items: center; font-weight: 600; }
.check-ok { color: var(--green); }

/* kayıt saati: halka geçen süreyi, içteki disk sesinizi gösterir */
.studio { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
@media (max-width: 520px) { .studio { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.halo { position: relative; width: 168px; height: 168px; }
.halo svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.halo .track { fill: none; stroke: var(--line); stroke-width: 8; }
.halo .arc { fill: none; stroke: var(--red); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.halo .voice { position: absolute; inset: 26px; border-radius: 50%; background: var(--red-soft); transform: scale(.72); transition: transform .08s linear; }
.halo .clock { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.1rem; font-weight: 700; letter-spacing: -0.02em; }
.halo.idle .arc { stroke: var(--blue); }
.halo.idle .voice { background: var(--blue-soft); }
.rec-label { display: inline-flex; align-items: center; gap: .5rem; color: var(--red); font-weight: 700; margin-bottom: .4rem; }
.rec-label::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--red); }
@media (prefers-reduced-motion: no-preference) { .rec-label::before { animation: blink 1.2s ease-in-out infinite; } }
@keyframes blink { 50% { opacity: .25; } }
.limit { color: var(--muted); font-size: .92rem; }

.question { font-size: 1.45rem; line-height: 1.35; font-weight: 600; margin: .25rem 0 1.25rem; }
.qnum { color: var(--muted); font-weight: 600; margin-bottom: .25rem; }
.countdown { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: .5rem 0 .75rem; }
.countdown > span { display: block; height: 100%; background: var(--blue); width: 100%; transition: width 1s linear; }

.progress { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; margin: .75rem 0; }
.progress > span { display: block; height: 100%; background: var(--blue); width: 0; transition: width .2s; }
.wait-dots span { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); margin-right: 6px; opacity: .3; }
@media (prefers-reduced-motion: no-preference) {
  .wait-dots span { animation: dot 1.4s ease-in-out infinite; }
  .wait-dots span:nth-child(2) { animation-delay: .2s; }
  .wait-dots span:nth-child(3) { animation-delay: .4s; }
}
@keyframes dot { 40% { opacity: 1; } }

dialog { border: 0; border-radius: var(--r-panel); padding: 24px; max-width: 460px; width: calc(100% - 32px); color: var(--ink); }
dialog::backdrop { background: rgba(26, 34, 48, .45); }

/* ---------------------------------------------------------------- panel (öğretmen) */
.admin { font-size: 15px; }
.admin .bar { background: var(--ink); color: #fff; }
.admin .bar .in { max-width: 1240px; margin: 0 auto; padding: 12px 24px; display: flex; gap: 20px; align-items: center; }
.admin .bar a { color: #fff; text-decoration: none; font-weight: 600; }
.admin .bar .grow { flex: 1; }
.admin .page { max-width: 1240px; margin: 0 auto; padding: 28px 24px 80px; }
.admin h1 { font-size: 1.5rem; }
.admin .head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.admin button, .admin .btn { min-height: 38px; padding: .55em 1em; font-size: .92rem; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .82rem; color: var(--muted); font-weight: 600; background: #fafbfa; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
tbody tr:hover { background: #f8faf8; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pill-muted { background: #eceeea; color: var(--muted); }
.pill-info { background: var(--blue-soft); color: var(--blue-ink); }
.pill-ok { background: var(--green-soft); color: #1d4f38; }
.pill-warn { background: var(--amber-soft); color: #5e3606; }
.pill-bad { background: var(--red-soft); color: #7a1f16; }
.stats { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: .4rem 0 0; color: var(--muted); font-size: .88rem; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 960px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.sticky { position: sticky; top: 16px; }
.transcript { overflow-wrap: anywhere; background: #fafbfa; border: 1px solid var(--line); border-radius: var(--r-control); padding: 12px 14px; white-space: pre-wrap; max-height: 320px; overflow: auto; font-size: .95rem; }
audio { width: 100%; margin: .4rem 0 .6rem; }
.crit { border-top: 1px solid var(--line); padding: 12px 0; }
.crit:first-child { border-top: 0; padding-top: 0; }
.crit-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; font-weight: 600; }
.crit-head .pill { flex: none; }
.crit-score { white-space: nowrap; }
.evidence { margin: .4rem 0; padding-left: 1rem; border-left: 3px solid var(--blue-soft); color: #33404f; font-size: .92rem; }
.evidence p { margin: 0 0 .3rem; }
.bigscore { font-size: 2rem; font-weight: 700; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
details summary { cursor: pointer; font-weight: 600; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
form.inline { display: inline; }
.statusline { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .9rem; color: var(--muted); margin-bottom: 18px; }

/* ---------------------------------------------------------------- ödev türleri (öğrenci) */
.reading { white-space: pre-wrap; font-size: 1.02rem; line-height: 1.75; margin-top: .75rem; max-height: 60vh; overflow: auto; padding-right: 6px; }
.text-item summary { font-weight: 700; }
.thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin: .75rem 0; }
.thumbs img { max-width: 100%; width: 260px; height: auto; border: 1px solid var(--line); border-radius: var(--r-control); display: block; background: #fff; }
.thumb { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.file-chip { display: inline-block; padding: .5em .8em; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--paper); font-weight: 600; text-decoration: none; color: var(--ink); }
.dropzone { position: relative; display: grid; place-items: center; text-align: center; border: 2px dashed var(--line); border-radius: var(--r-panel); padding: 28px 16px; margin: .75rem 0; cursor: pointer; font-weight: 600; color: var(--muted); background: var(--paper); }
.dropzone:hover, .dropzone.over { border-color: var(--blue); color: var(--blue-ink); background: var(--blue-soft); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
kbd { font: 600 .85em var(--font); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 .35em; background: var(--surface); }
.prompt-box { border-left: 4px solid var(--blue); padding: .1rem 0 .1rem 1rem; margin: 0 0 1.25rem; }
.prompt-box .question { margin-bottom: .25rem; }
.result .score { margin: .25rem 0 1rem; }
.score-num { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.02em; }
.breakdown { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.breakdown th, .breakdown td { padding: 9px 0; border-bottom: 1px solid var(--line); font-weight: 400; font-size: 1rem; color: var(--ink); background: none; position: static; text-align: left; }
.breakdown td { text-align: right; white-space: nowrap; font-weight: 600; }

/* ---------------------------------------------------------------- panel: ödev formu */
.type-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .type-cards { grid-template-columns: 1fr; } }
.type-card { display: flex; flex-direction: column; gap: 4px; border: 1.5px solid var(--line); border-radius: var(--r-panel); padding: 14px 16px; cursor: pointer; font-weight: 400; margin: 0; background: var(--surface); }
.type-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.type-card .type-name { font-weight: 700; font-size: 1.02rem; }
.type-card .type-hint { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.type-card.selected { border-color: var(--blue); background: var(--blue-soft); }
.type-card.selected .type-name { color: var(--blue-ink); }
.type-card:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.wizard { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-control); background: var(--paper); border: 1px solid var(--line); }
.text-danger { color: var(--red); }
fieldset.plain { border: 0; padding: 0; margin: 0 0 1.1rem; }
fieldset.plain legend { font-weight: 600; margin-bottom: .35rem; padding: 0; }
.inline-radio { display: flex; align-items: center; gap: .5rem; font-weight: 400; margin: .3rem 0; cursor: pointer; }
.inline-radio input { width: auto; margin: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 22px; }
@media (max-width: 760px) { .grid3 { grid-template-columns: 1fr; } }
.text-row { border: 1px solid var(--line); border-radius: var(--r-control); padding: 14px; margin-bottom: 12px; background: #fbfcfb; }
.crit-row { border: 1px solid var(--line); border-radius: var(--r-control); padding: 12px 14px 4px; margin-bottom: 12px; background: #fbfcfb; }
.crit-row-head { display: flex; gap: 12px; align-items: flex-end; }
.crit-row-head .grow { flex: 1; }
.crit-row-head .pts { width: 7em; }
.crit-row-head .rm { margin-bottom: 1.1rem; }
.crit-row .grid2 { gap: 0 16px; }
.rubric-total { font-weight: 700; color: var(--green); }
.rubric-total.warn { color: var(--amber); }

/* ---------------------------------------------------------------- panel: ödev ve öğrenci sayfası */
.results-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: var(--r-control); background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; }
.results-bar.open { background: var(--green-soft); border-color: #bcdcca; color: #1d4f38; }
.results-bar form { margin: 0; }
.upload-img { max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-control); margin: .4rem 0; display: block; }
.score-table { width: 100%; }
.score-table th, .score-table td { padding: 7px 6px; }
.score-table td label { font-weight: 400; margin: 0; }
.score-table .crit-input { width: 5.5em; padding: .4em .5em; text-align: right; }
.score-table tfoot th, .score-table tfoot td { border-top: 2px solid var(--line); border-bottom: 0; }

.thumbs.large img { width: 100%; max-width: 640px; }
.score-table tfoot th, .score-table tfoot td { background: none; font-size: 1rem; color: var(--ink); }
.crit-row textarea { min-height: 7.5em !important; }

.admin .head > div { min-width: 0; }
.admin .head p { overflow-wrap: anywhere; }
