/* Sınava Hazırlan (IELTS Academic Writing-style mock exam). Approved mobile mockup v2, 6 Nov 2026. */
.practice-kind-switch button[data-route="practice-exam"][aria-pressed="true"] { border-bottom-color: #d9643a; }
@media (min-width: 768px) {
  html:has(body[data-student-view="practice-exam"]) { scrollbar-gutter: stable; }
}
.exam-screen { max-width: 720px; margin: auto; overflow-wrap: anywhere; }
.exam-screen .writing-toolbar { padding: 0; margin: 0; }
.exam-screen h1 { margin: 12px 0 10px; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.exam-screen h2 { margin: 0 0 12px; font-size: 1.25rem; }
.exam-intro { max-width: 600px; margin: 0 0 18px; color: #3d3b36; line-height: 1.55; }
.exam-card { position: relative; background: #fdfcf8; border: 1px solid #d8d3c6; border-radius: 12px; padding: 14px 16px; }
.exam-info { display: grid; gap: 8px; max-width: 600px; margin: 0 0 22px; }
.exam-info p { display: flex; align-items: center; gap: 10px; margin: 0; font-size: .9375rem; line-height: 1.4; }
.exam-info svg { flex: 0 0 auto; color: #3d3b36; }
.exam-start, .exam-start:hover { display: block; width: 100%; max-width: 400px; background: #e0cb80; letter-spacing: .04em; }
.exam-start:hover { background: #e8d695; }
/* Owner's request (10 Nov): "YENİ SINAV" after the evaluation is green, in the classic button style. */
.exam-start.exam-new, .exam-start.exam-new:hover { margin-top: 18px; background: #b5d69f; }
.exam-start.exam-new:hover { background: #c3dfb0; }
/* Waiting card (owner's option A): centred over a dimmed page while the AI works. */
.exam-wait { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(28, 28, 26, .45); }
.exam-wait-card { width: min(340px, 100%); text-align: center; border: 2px solid #1d1c1a; box-shadow: 0 3px 0 #1d1c1a; padding: 22px 18px; }
.exam-hourglass { display: block; margin: 0 auto; }
.exam-wait-title { margin: 12px 0 4px; font-size: 1.0625rem; font-weight: 600; }
.exam-wait-note { margin: 0; font-size: .875rem; line-height: 1.5; color: #55524b; }
.exam-muted { color: var(--muted); font-size: .875rem; line-height: 1.5; }
.exam-status { color: var(--teal-deep); margin: 14px 0 0; }
.exam-status:empty { display: none; }
.exam-task-switch { display: inline-flex; gap: 2px; padding: 2px; margin: 4px 0 14px; border-radius: 9px; background: #e8e3d7; }
.exam-task-switch button { min-height: 36px; min-width: 76px; padding: 4px 14px; border: 1px solid transparent; border-radius: 7px; background: transparent; box-shadow: none; color: #6b675f; font-size: .875rem; font-weight: 500; }
.exam-task-switch button[aria-pressed="true"] { background: #fdfcf8; border-color: #cfc9bb; color: var(--ink); font-weight: 600; }
.exam-question { margin: 0 0 14px; }
.exam-question p { margin: 0 0 8px; line-height: 1.55; }
.exam-question .exam-question-main { font-weight: 600; }
.exam-question .exam-question-frame { color: #55524b; font-size: .9375rem; }
.exam-question .exam-question-topic { padding: 10px 14px; margin: 4px 0 10px; border-left: 3px solid #d9643a; background: #fdfcf8; font-weight: 600; }
.exam-chart-card { padding: 12px 12px 10px; margin: 0 0 14px; }
.exam-fullscreen-toggle { position: absolute; top: 6px; right: 6px; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; min-height: 40px; padding: 8px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: var(--ink); }
.exam-fullscreen-toggle:hover { background: #efeadf; }
.exam-chart { margin: 0; }
.exam-chart-title { margin: 0 34px 8px 2px; font-size: .875rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.exam-chart-unit { margin: 0 0 6px; font-size: .8125rem; color: #55524b; }
.exam-chart-svg { display: block; width: 100%; height: auto; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.exam-chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; font-size: .75rem; color: #55524b; }
.exam-chart-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.exam-pies { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; }
.exam-pie { flex: 1 1 140px; max-width: 220px; height: auto; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.exam-table-wrap { overflow-x: auto; }
.exam-table { width: 100%; border-collapse: collapse; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.exam-table th, .exam-table td { padding: 7px 8px; border: 1px solid #d8d3c6; text-align: right; }
.exam-table thead th { background: #efeadf; font-weight: 600; text-align: center; }
.exam-table tbody th { text-align: left; font-weight: 600; background: #f7f4ec; }
.exam-process { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.exam-process-step { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid #cfc9bb; border-radius: 10px; background: #f7f4ec; }
.exam-process-step:not(:last-child)::after, .exam-process-cycle .exam-process-step:last-of-type::after { content: "↓"; position: absolute; left: 50%; bottom: -21px; transform: translateX(-50%); font-size: 1rem; line-height: 1; color: #6b675f; }
.exam-process-number { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fdfcf8; font-size: .75rem; font-weight: 600; }
.exam-process-body { display: grid; gap: 2px; font-size: .875rem; line-height: 1.4; }
.exam-process-body span { color: #55524b; }
.exam-process-return { text-align: center; font-size: .8125rem; font-weight: 600; color: #55524b; }
.exam-preview-note { margin: 4px 0 18px; padding: 10px 14px; border-radius: 10px; background: #f5e6da; font-size: .875rem; line-height: 1.5; }
.exam-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 22px; }
.exam-history { margin: 28px 0 0; border-top: 1px solid var(--line); padding-top: 16px; }
.exam-history summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.exam-history-list { display: grid; gap: 6px; margin: 8px 0 12px; }
.exam-history-list > button { text-align: left; font-weight: 500; min-height: 44px; }
/* Stage 2: timer, finish button, writing area (approved mockup v2: orange timer, plain "Bitir"). */
.exam-timer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 12px; }
.exam-timer { display: inline-flex; align-items: center; gap: 6px; color: #d9643a; font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.exam-finish { min-height: 36px; padding: 4px 16px; border: 1px solid var(--ink); border-radius: 8px; background: transparent; box-shadow: none; color: var(--ink); font-size: .875rem; font-weight: 500; }
.exam-writing-card { padding: 10px 46px 6px 14px; margin: 0 0 14px; }
.exam-writing-card:focus-within, .exam-writing-full:focus-within { border-color: var(--ink); }
textarea.exam-writing { display: block; width: 100%; min-height: 240px; margin: 0; padding: 4px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--ink); font: inherit; font-size: 1rem; line-height: 1.6; resize: vertical; }
textarea.exam-writing:focus, textarea.exam-writing:focus-visible { outline: none; }
.exam-writing-meta { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; color: #9b978d; font-size: .75rem; font-variant-numeric: tabular-nums; }
.exam-save-state { color: #b4372d; }
.exam-save-state:not(:empty)::before { content: "·"; margin-right: 6px; color: #9b978d; }
.exam-writing-full { background: #fdfcf8; border: 1px solid #d8d3c6; border-radius: 12px; padding: 12px 14px 8px; }
.exam-writing-full textarea.exam-writing { min-height: calc(100dvh - 170px); font-size: 1.0625rem; resize: none; }
/* The exit icon sits above the writing card, never over the learner's text. */
.exam-fullscreen.exam-fullscreen-writing { padding-top: calc(58px + env(safe-area-inset-top)); }
.exam-summary { display: grid; gap: 4px; margin: 0 0 14px; }
.exam-summary p { margin: 0; line-height: 1.5; }
.exam-warning { color: #b4372d; font-weight: 600; }
.exam-answer-card { margin: 0 0 14px; }
.exam-answer { margin: 0; white-space: pre-wrap; line-height: 1.6; }
/* Stage 3: results (approved mockup v2, screen 5). Letter colors follow the app's chat grade. */
.exam-evaluate-box { display: grid; gap: 10px; max-width: 520px; margin: 0 0 18px; }
.exam-evaluate-box p { margin: 0; }
.exam-screen .exam-result-title { margin: 12px 0 12px; font-size: clamp(1.7rem, 4vw, 2.3rem); }
.exam-grade-card { display: flex; align-items: center; gap: 18px; margin: 0 0 14px; }
.exam-grade { flex: 0 0 auto; min-width: 64px; text-align: center; font: 500 2.75rem/1 Georgia, "Times New Roman", serif; color: #8a6500; }
.exam-grade[data-grade="A+"], .exam-grade[data-grade="A"] { color: #b4372d; }
.exam-grade[data-grade="A−"] { color: #de922c; }
.exam-grade[data-grade="B"], .exam-grade[data-grade="B−"] { color: #f2c200; }
.exam-grade[data-grade="F"] { color: #2672a3; }
.exam-criteria { flex: 1 1 auto; display: grid; gap: 6px; font-size: .875rem; }
.exam-criteria-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.exam-chip { display: inline-block; min-width: 34px; padding: 2px 8px; border-radius: 8px; background: #faeeda; color: #8a6500; font-size: .75rem; font-weight: 600; line-height: 1.5; text-align: center; font-variant-numeric: tabular-nums; }
.exam-chip[data-grade="A+"], .exam-chip[data-grade="A"] { background: #b4372d; color: #ffffff; }
.exam-chip[data-grade="A−"] { background: #de922c; color: #1d1c1a; }
.exam-chip[data-grade="B"], .exam-chip[data-grade="B−"] { background: #f2c200; color: #1d1c1a; }
.exam-chip[data-grade="F"] { background: #2672a3; color: #ffffff; }
.exam-task-grade { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .9375rem; font-weight: 600; }
.exam-task-grade .exam-muted { font-weight: 400; }
.exam-marked-card { padding: 12px 44px 12px 14px; margin: 0 0 8px; }
.exam-marked { white-space: pre-wrap; font-size: .9375rem; line-height: 1.8; overflow-wrap: anywhere; }
.exam-correction { cursor: pointer; border-radius: 3px; }
.exam-correction:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.exam-correction[aria-pressed="true"] { background: #fcebeb; }
.exam-del { color: #b4372d; text-decoration: line-through; }
.exam-fix { color: #1f6b3a; font-style: italic; text-decoration: none; }
.exam-explain { margin: 0 0 14px; padding: 8px 12px; border-radius: 10px; background: #fcebeb; color: #791f1f; font-size: .8125rem; line-height: 1.5; }
.exam-explain strong { font-weight: 600; }
.exam-explain.is-hint { padding: 0 2px; background: transparent; color: #9b978d; }
.exam-issues { margin: 0 0 12px; }
.exam-issues h3, .exam-comment-card h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 6px; font-size: .9375rem; }
.exam-issues ul { margin: 0; padding-left: 18px; font-size: .875rem; line-height: 1.55; color: #55524b; }
.exam-issues li + li { margin-top: 4px; }
.exam-comment-card { margin: 0 0 10px; }
.exam-comment-card p { margin: 0; color: #55524b; font-size: .875rem; line-height: 1.6; }
.exam-question-details { margin: 6px 0 14px; }
.exam-question-details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
/* Stage 4: A+ rewrite (approved mockup: sparkle card, blue classic button, numbered highlights). */
.exam-aplus-card { margin: 4px 0 14px; }
.exam-aplus-title { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-weight: 600; }
.exam-aplus-title svg, .exam-aplus-open svg { color: #185fa5; }
.exam-aplus-card .exam-aplus-intro { margin: 0 0 12px; font-size: .8125rem; line-height: 1.5; color: #55524b; }
.exam-aplus-button, .exam-aplus-button:hover { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 1.5px solid #1d1c1a; border-radius: 10px; background: #a9d3f5; color: #0b2f4f; box-shadow: 0 3px 0 #1d1c1a; letter-spacing: .04em; font-weight: 600; }
.exam-aplus-button:hover { background: #bcdcf7; }
.exam-aplus-open { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 14px; }
.exam-aplus-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 10px; }
.exam-screen .exam-aplus-head h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.3rem); }
.exam-aplus-grade { font: 500 1.75rem/1 Georgia, "Times New Roman", serif; color: #b4372d; }
.exam-aplus-text-card { margin: 0 0 12px; }
.exam-aplus-text { white-space: pre-wrap; font-size: .9375rem; line-height: 1.75; overflow-wrap: anywhere; }
.exam-aplus-change { padding: 0 2px; border-radius: 3px; border-bottom: 1.5px solid #378add; background: #e6f1fb; }
.exam-aplus-number { margin-left: 1px; font-size: .625rem; font-weight: 600; color: #185fa5; }
.exam-aplus-words { margin: 8px 0 0; text-align: right; font-size: .75rem; color: #6b675f; }
.exam-changes-title { margin: 4px 0 6px; font-size: .875rem; font-weight: 600; }
.exam-change-card { margin: 0 0 6px; padding: 8px 10px; border: 1px solid #d8d3c6; border-left: 3px solid #378add; background: #fdfcf8; font-size: .8125rem; line-height: 1.5; }
.exam-change-card b { font-weight: 600; color: #0c447c; }
/* Fullscreen: a fixed overlay (iPhone Safari has no element Fullscreen API). */
.exam-fullscreen { position: fixed; inset: 0; z-index: 60; margin: 0; overflow: auto; border-radius: 0; border: 0; padding: calc(14px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom)); background: #f3f0e8; }
.exam-fullscreen > .exam-chart, .exam-fullscreen > .exam-fullscreen-body { max-width: 760px; margin: 0 auto; }
.exam-fullscreen .exam-chart-title { font-size: 1rem; }
.exam-fullscreen .exam-fullscreen-toggle { position: fixed; top: calc(8px + env(safe-area-inset-top)); right: 10px; background: #f3f0e8; }
body.exam-fullscreen-open { overflow: hidden; }
/* Credit pill and sticky header, same as Sohbet / Yaz. */
body[data-student-view="practice-exam"] #exam-token-indicator {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px;
  border-radius: 24px; background: #f5e6da; color: #22221f;
  font-size: .875rem; font-weight: 600; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums;
}
body[data-student-view="practice-exam"] .student-header { position: sticky; top: 0; z-index: 12; background: var(--paper); padding-top: calc(24px + env(safe-area-inset-top)); border-bottom-color: transparent; }
body[data-student-view="practice-exam"] .header-meta > :is(#shell-profile-level, #profile-status) { display: none; }
@media (max-width: 767px) {
  body[data-student-view="practice-exam"] #exam-token-indicator { font-size: .75rem; padding: 8px 10px; gap: 5px; white-space: normal; max-width: 180px; }
  body[data-student-view="practice-exam"] .student-header { padding-top: calc(16px + env(safe-area-inset-top)); gap: 8px; }
  body[data-student-view="practice-exam"] #student-main { padding-top: 6px; }
}
@media (max-width: 380px) {
  body[data-student-view="practice-exam"] .student-header { flex-wrap: nowrap; }
  body[data-student-view="practice-exam"] #exam-token-indicator { display: grid; grid-template-columns: 18px minmax(0, 1fr); max-width: 148px; column-gap: 5px; row-gap: 1px; padding: 7px 9px; }
  body[data-student-view="practice-exam"] .practice-token-pill svg { grid-row: 1 / 3; width: 18px; }
  body[data-student-view="practice-exam"] .practice-token-pill small { grid-column: 2; }
}
