/* =========================================================
   EGZAMIN ÓSMOKLASISTY – Wspólne style
   style.css v1.0
   ========================================================= */

:root {
  --green:       #5a8a3c;
  --green-light: #e8f4e0;
  --green-dark:  #3d6b27;
  --blue:        #1a4a7a;
  --blue-eng:    #1a5a9a;
  --red-mat:     #b71c1c;
  --gray:        #666;
  --gray-light:  #f5f5f5;
  --border:      #ccc;
  --correct:     #2e7d32;
  --wrong:       #c62828;
  --partial:     #e65100;
  --shadow:      0 4px 24px rgba(0,0,0,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Georgia', serif;
  background: #eef0f3;
  color: #222;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── PAGE WRAPPER ── */
.page-wrapper {
  max-width: 880px;
  margin: 0 auto;
  background: white;
  box-shadow: var(--shadow);
  min-height: 100vh;
}

/* ── EXAM HEADER (rendered by engine) ── */
#exam-header {
  border-bottom: 4px solid var(--green);
}

/* ── SCORE BAR ── */
.score-bar {
  background: var(--blue);
  color: white;
  padding: 11px 40px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: Arial, sans-serif;
  font-size: .9rem;
  position: sticky;
  top: 0;
  z-index: 200;
  flex-wrap: wrap;
}
.score-bar span { flex: 1; min-width: 120px; }
#score-display { font-size: 1rem; }

.check-btn {
  background: var(--green);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: .88rem;
  font-family: Arial, sans-serif;
  font-weight: bold;
  transition: background .2s;
  white-space: nowrap;
}
.check-btn:hover { background: var(--green-dark); }

.reset-btn {
  background: transparent;
  color: rgba(255,255,255,.85);
  border: 1.5px solid rgba(255,255,255,.4);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: .82rem;
  font-family: Arial, sans-serif;
  transition: border-color .2s, color .2s;
  white-space: nowrap;
}
.reset-btn:hover { border-color: white; color: white; }

/* ── CONTENT ── */
.content { padding: 0 40px 32px; }

/* ── SECTION HEADERS ── */
.section-header {
  background: #333;
  color: white;
  padding: 10px 40px;
  font-family: Arial, sans-serif;
  font-size: .88rem;
  font-weight: bold;
  letter-spacing: .5px;
  margin: 32px -40px 24px -40px;
  text-transform: uppercase;
}

.content > .section-header:first-child,
.content > .task:first-child,
.content > .text-block:first-child {
  margin-top: 0;
}

/* ── TEXT BLOCKS ── */
.text-block {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-left: 5px solid var(--green);
  padding: 20px 26px;
  margin-bottom: 28px;
  font-size: .95rem;
  line-height: 1.85;
  border-radius: 0 6px 6px 0;
}
.text-block .text-title {
  font-weight: bold;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  color: var(--blue);
  margin-bottom: 3px;
}
.text-block .text-author {
  font-family: Arial, sans-serif;
  font-size: .82rem;
  color: var(--gray);
  font-style: italic;
  margin-bottom: 14px;
}
.text-block p { margin-bottom: 8px; text-align: justify; }
.text-block .dialog { margin-left: 14px; }
.footnote {
  font-size: .78rem;
  color: var(--gray);
  margin-top: 14px;
  border-top: 1px solid #ddd;
  padding-top: 8px;
}

/* ── TASKS ── */
.task {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 22px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.task:focus-within { box-shadow: 0 0 0 2px rgba(90,138,60,.25); }

.task-header {
  background: var(--green-light);
  border-bottom: 1px solid #c8deb8;
  padding: 11px 18px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.task-num {
  font-family: Arial, sans-serif;
  font-size: .98rem;
  font-weight: bold;
  color: var(--green);
  white-space: nowrap;
}
.task-pts {
  font-family: Arial, sans-serif;
  font-size: .76rem;
  color: var(--gray);
  white-space: nowrap;
}
.task-instruction { font-size: .9rem; color: #333; line-height: 1.5; }
.task-body { padding: 16px 18px; }

/* ── TRUE / FALSE ── */
.pf-table { width: 100%; border-collapse: collapse; }
.pf-table td { padding: 10px 12px; font-size: .9rem; vertical-align: middle; }
.pf-table tr { border-bottom: 1px solid #eee; }
.pf-table tr:last-child { border-bottom: none; }
.pf-table .stmt { width: 72%; }
.pf-btns { display: flex; gap: 8px; justify-content: center; }

.pf-btn {
  width: 38px; height: 38px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-weight: bold;
  font-size: .9rem;
  font-family: Arial, sans-serif;
  transition: all .15s;
  display: flex; align-items: center; justify-content: center;
}
.pf-btn:hover { border-color: var(--blue); color: var(--blue); }
.pf-btn.selected-P { background: #e3f2fd; border-color: var(--blue); color: var(--blue); }
.pf-btn.selected-F { background: #fce4ec; border-color: #c2185b; color: #c2185b; }
.pf-btn.correct     { background: #e8f5e9 !important; border-color: var(--correct) !important; color: var(--correct) !important; }
.pf-btn.wrong       { background: #ffebee !important; border-color: var(--wrong)   !important; color: var(--wrong)   !important; }

/* ── SINGLE CHOICE ── */
.choices { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }

.choice-btn {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: white;
  cursor: pointer;
  text-align: left;
  font-size: .9rem;
  font-family: Georgia, serif;
  transition: all .15s;
  line-height: 1.45;
  width: 100%;
}
.choice-btn .letter {
  width: 26px; height: 26px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold;
  font-size: .82rem;
  font-family: Arial, sans-serif;
  transition: all .15s;
}
.choice-btn:hover                { border-color: var(--blue); }
.choice-btn:hover .letter        { border-color: var(--blue); color: var(--blue); }
.choice-btn.selected             { border-color: var(--blue); background: #e8f0fb; }
.choice-btn.selected .letter     { background: var(--blue); border-color: var(--blue); color: white; }
.choice-btn.correct              { border-color: var(--correct) !important; background: #e8f5e9 !important; }
.choice-btn.correct .letter      { background: var(--correct) !important; border-color: var(--correct) !important; color: white !important; }
.choice-btn.wrong                { border-color: var(--wrong) !important; background: #ffebee !important; }
.choice-btn.wrong .letter        { background: var(--wrong) !important; border-color: var(--wrong) !important; color: white !important; }

/* ── DUAL CHOICE ── */
.dual-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0; }
.dual-group > label {
  font-family: Arial, sans-serif;
  font-size: .78rem;
  color: var(--gray);
  font-weight: bold;
  margin-bottom: 6px;
  display: block;
}

/* ── TEXTAREA ── */
.answer-area {
  width: 100%;
  min-height: 90px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-family: Georgia, serif;
  font-size: .9rem;
  line-height: 1.7;
  resize: vertical;
  transition: border-color .2s;
  margin: 6px 0;
}
.answer-area:focus { outline: none; border-color: var(--blue); }
.open-hint {
  font-family: Arial, sans-serif;
  font-size: .76rem;
  color: var(--gray);
  font-style: italic;
  margin-top: 4px;
}

/* ── RESULT INDICATOR ── */
.result-indicator {
  display: none;
  padding: 10px 14px;
  border-radius: 6px;
  font-family: Arial, sans-serif;
  font-size: .86rem;
  margin-top: 12px;
  line-height: 1.5;
}
.result-indicator.correct { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.result-indicator.partial { background: #fff8e1; color: #e65100; border: 1px solid #ffe082; }
.result-indicator.wrong   { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }

/* ── COMMA TASK ── */
.comma-text {
  background: #fffde7;
  border: 1px solid #f9a825;
  border-radius: 6px;
  padding: 16px 20px;
  line-height: 2.4;
  font-size: .92rem;
  margin: 8px 0;
}
.comma-hint {
  font-family: Arial, sans-serif;
  font-size: .78rem;
  color: var(--gray);
  font-style: italic;
  margin-bottom: 8px;
}
.comma-count-line {
  font-family: Arial, sans-serif;
  font-size: .8rem;
  color: var(--gray);
  margin-top: 8px;
}

.comma-slot {
  display: inline-block;
  width: 16px; height: 22px;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  margin: 0 1px;
  border-radius: 3px;
  transition: background .12s;
}
.comma-slot:hover { background: rgba(249,168,37,.25); }
.comma-slot.has-comma { background: rgba(249,168,37,.12); }
.comma-mark {
  position: absolute;
  bottom: 1px; left: 4px;
  font-size: 1.1rem;
  color: #e65100;
  font-weight: bold;
  display: none;
  pointer-events: none;
}
.comma-slot.has-comma .comma-mark    { display: block; }
.comma-slot.correct-comma .comma-mark { color: var(--correct); }
.comma-slot.wrong-comma .comma-mark   { color: var(--wrong); }

/* ── CARDS TASK (zad. 11) ── */
.cards-img {
  width: 100%; max-width: 480px;
  display: block; margin: 10px auto;
  border-radius: 8px; border: 1px solid #ddd;
}
.card-selectors { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.card-sel-btn {
  padding: 8px 18px;
  border: 2px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  background: white;
  font-weight: bold;
  font-family: Arial, sans-serif;
  font-size: .95rem;
  transition: all .15s;
}
.card-sel-btn:hover    { border-color: var(--blue); color: var(--blue); }
.card-sel-btn.selected { border-color: var(--blue); background: var(--blue); color: white; }

/* ── FRAGMENT QUOTE ── */
.fragment-quote {
  background: #f3e5f5;
  border-left: 4px solid #8e24aa;
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  margin: 10px 0;
  font-size: .92rem;
  line-height: 1.7;
}

/* ── FILL SUMMARY (zad. 12) ── */
.summary-fill .fill-line {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 12px; flex-wrap: wrap;
}
.fill-prompt { font-size: .9rem; }
.fill-input {
  flex: 1; min-width: 180px;
  border: none; border-bottom: 2px solid var(--border);
  padding: 4px 6px;
  font-family: Georgia, serif; font-size: .9rem;
  background: transparent; outline: none;
  transition: border-color .2s;
}
.fill-input:focus { border-color: var(--blue); }

/* ── MULTI-INPUT (zad. 7, 11, 15) ── */
.multi-input { display: flex; flex-direction: column; gap: 10px; }
.labeled-input { display: flex; align-items: center; gap: 10px; }
.labeled-input label {
  font-size: .82rem; font-family: Arial, sans-serif;
  color: var(--gray); white-space: nowrap; min-width: 140px;
}
.labeled-input input {
  flex: 1; border: none; border-bottom: 2px solid var(--border);
  padding: 6px 8px; font-family: Georgia, serif; font-size: .9rem;
  outline: none; background: transparent; transition: border-color .2s;
}
.labeled-input input:focus { border-color: var(--blue); }

/* ── ESSAY (zad. 18, 19) ── */
.essay-topics {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin: 12px 0;
}
.topic-btn {
  padding: 14px; border: 2px solid var(--border);
  border-radius: 8px; cursor: pointer; background: white;
  text-align: left; font-family: Georgia, serif;
  font-size: .86rem; line-height: 1.5; transition: all .15s;
}
.topic-btn .topic-label {
  font-family: Arial, sans-serif; font-size: .78rem;
  color: var(--gray); font-weight: bold; margin-bottom: 6px;
}
.topic-btn:hover    { border-color: var(--blue); }
.topic-btn.selected { border-color: var(--blue); background: #e8f0fb; }

.word-counter {
  font-family: Arial, sans-serif; font-size: .8rem;
  color: var(--gray); text-align: right; margin-top: 4px;
}
.word-counter.ok   { color: var(--correct); }
.word-counter.warn { color: var(--partial); }

/* ── ILLUSTRATIONS (zad. 19) ── */
.illus-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin: 10px 0;
}
.illus-box {
  border: 3px solid var(--border);
  border-radius: 8px; overflow: hidden;
  cursor: pointer; transition: border-color .15s;
}
.illus-box:hover    { border-color: var(--blue); }
.illus-box.selected { border-color: var(--blue); }
.illus-box img { width: 100%; display: block; }
.illus-label {
  text-align: center; font-family: Arial, sans-serif;
  font-size: .8rem; color: var(--gray); padding: 6px;
}

/* ── PROGRESS SECTION ── */
.progress-section {
  padding: 24px 40px;
  background: #f8f8f8;
  border-top: 3px solid var(--green);
}
.progress-section h3 {
  font-family: Arial, sans-serif; font-size: .95rem;
  color: var(--blue); margin-bottom: 16px;
}
.progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}
.prog-item {
  background: white; border: 1px solid #ddd;
  border-radius: 6px; padding: 8px 10px;
  font-family: Arial, sans-serif; font-size: .76rem;
  color: var(--gray); cursor: pointer;
  transition: border-color .15s, color .15s;
}
.prog-item:hover { border-color: var(--blue); }
.prog-item .prog-num { font-weight: bold; color: #333; font-size: .86rem; margin-bottom: 2px; }
.prog-item.answered { border-color: var(--green); }
.prog-item.answered .prog-num { color: var(--green); }

.bottom-check-wrap {
  margin-top: 22px;
  display: flex;
  justify-content: center;
}

.bottom-check-btn {
  width: min(100%, 420px);
  padding: 18px 28px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, #6ba545 0%, #4f812f 100%);
  color: white;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: .02em;
  box-shadow: 0 14px 28px rgba(90, 138, 60, .24);
  transition: transform .15s, box-shadow .15s, filter .15s;
}

.bottom-check-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(90, 138, 60, .3);
  filter: brightness(.98);
}

.bottom-check-btn:active {
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(90, 138, 60, .22);
}

/* ── FOOTER ── */
footer {
  text-align: center; padding: 18px 20px;
  font-family: Arial, sans-serif; font-size: .72rem;
  color: #aaa; border-top: 1px solid #eee;
}

/* ── INDEX PAGE ── */
.hub-header {
  background: var(--blue);
  color: white;
  padding: 36px 40px;
}
.hub-header h1 {
  font-family: Arial, sans-serif;
  font-size: 1.8rem; font-weight: 900;
  margin-bottom: 6px;
}
.hub-header p { font-size: .95rem; opacity: .8; }

.hub-filters {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding: 20px 40px; background: #f0f0f0;
  border-bottom: 1px solid #ddd;
}
.filter-btn {
  padding: 7px 18px; border-radius: 20px;
  border: 2px solid transparent;
  cursor: pointer; font-family: Arial, sans-serif;
  font-size: .85rem; font-weight: bold;
  transition: all .15s;
}
.filter-btn.all       { background: #333; color: white; }
.filter-btn.polski    { background: var(--green-light); color: var(--green); border-color: var(--green); }
.filter-btn.angielski { background: #e3f2fd; color: var(--blue-eng); border-color: var(--blue-eng); }
.filter-btn.matematyka{ background: #fce4ec; color: var(--red-mat); border-color: var(--red-mat); }
.filter-btn.active    { color: white !important; }
.filter-btn.all.active       { background: #333; }
.filter-btn.polski.active    { background: var(--green); }
.filter-btn.angielski.active { background: var(--blue-eng); }
.filter-btn.matematyka.active{ background: var(--red-mat); }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  padding: 28px 40px;
}
.exam-card {
  border: 1px solid #e0e0e0; border-radius: 10px;
  overflow: hidden; background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: box-shadow .2s, transform .15s;
  display: flex; flex-direction: column;
}
.exam-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.12); transform: translateY(-2px); }

.card-stripe { height: 6px; }
.card-stripe.polski    { background: var(--green); }
.card-stripe.angielski { background: var(--blue-eng); }
.card-stripe.matematyka{ background: var(--red-mat); }

.card-body { padding: 18px; flex: 1; }
.card-badge {
  display: inline-block;
  padding: 2px 10px; border-radius: 12px;
  font-family: Arial, sans-serif; font-size: .72rem;
  font-weight: bold; margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: .5px;
}
.card-badge.polski    { background: var(--green-light); color: var(--green); }
.card-badge.angielski { background: #e3f2fd; color: var(--blue-eng); }
.card-badge.matematyka{ background: #fce4ec; color: var(--red-mat); }
.card-badge.coming    { background: #f5f5f5; color: #aaa; }

.card-title { font-family: Arial, sans-serif; font-size: .95rem; font-weight: bold; color: #222; margin-bottom: 4px; }
.card-date  { font-size: .8rem; color: var(--gray); font-family: Arial, sans-serif; }
.card-pts   { font-size: .78rem; color: var(--gray); font-family: Arial, sans-serif; margin-top: 6px; }

.card-footer { padding: 12px 18px; border-top: 1px solid #f0f0f0; }
.start-btn {
  display: block; width: 100%;
  padding: 9px; border: none; border-radius: 6px;
  font-family: Arial, sans-serif; font-size: .88rem; font-weight: bold;
  cursor: pointer; text-align: center;
  text-decoration: none; transition: background .15s;
}
.start-btn.polski    { background: var(--green); color: white; }
.start-btn.polski:hover { background: var(--green-dark); }
.start-btn.angielski { background: var(--blue-eng); color: white; }
.start-btn.angielski:hover { background: #1248a8; }
.start-btn.matematyka{ background: var(--red-mat); color: white; }
.start-btn.matematyka:hover { background: #8b0000; }
.start-btn.disabled  { background: #eee; color: #aaa; cursor: default; pointer-events: none; }

/* ── MODAL OVERLAY ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(3px);
}
.modal-overlay.visible { display: flex; }

/* ── MODAL BOX ── */
.modal-box {
  background: white;
  border-radius: 14px;
  max-width: 660px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .32);
  position: relative;
  animation: modal-in .22s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* ── MODAL CLOSE BUTTON ── */
.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: #aaa;
  padding: 4px 8px;
  border-radius: 50%;
  z-index: 10;
  transition: color .15s, background .15s;
}
.modal-close:hover { color: #333; background: #f0f0f0; }

/* ── MODAL SCORE HEADER ── */
.modal-header-score {
  padding: 30px 40px 22px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}
.modal-score-big {
  font-family: Arial, sans-serif;
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 8px;
}
.modal-score-label {
  font-family: Arial, sans-serif;
  font-size: 1.05rem;
  color: #555;
}

/* ── MODAL STATS ROW ── */
.modal-stats {
  display: flex;
  gap: 10px;
  padding: 18px 24px;
  border-bottom: 1px solid #f0f0f0;
}
.modal-stat {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  background: #f7f8fa;
  border-radius: 10px;
}
.modal-stat-num {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 4px;
}
.modal-stat-desc {
  font-family: Arial, sans-serif;
  font-size: .72rem;
  color: #777;
  line-height: 1.4;
}

/* ── MODAL SECTION TITLE ── */
.modal-section-title {
  font-family: Arial, sans-serif;
  font-size: .9rem;
  font-weight: bold;
  color: #333;
  padding: 16px 24px 8px;
}

/* ── MODAL TASK LIST ── */
.modal-task-list {
  padding: 0 24px 16px;
  max-height: 340px;
  overflow-y: auto;
}
.modal-task-list::-webkit-scrollbar { width: 5px; }
.modal-task-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

.modal-task-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 7px;
  margin-bottom: 4px;
  font-family: Arial, sans-serif;
  font-size: .84rem;
  line-height: 1.45;
}
.modal-row-ok      { background: #e8f5e9; }
.modal-row-fail    { background: #ffebee; }
.modal-row-open    { background: #fff8e1; }
.modal-row-missing { background: #fce4ec; }

.modal-row-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 22px;
  padding-top: 1px;
}
.modal-row-ok   .modal-row-icon { color: var(--correct); }
.modal-row-fail .modal-row-icon { color: var(--wrong); }
.modal-row-open .modal-row-icon { color: var(--partial); }
.modal-row-missing .modal-row-icon { color: var(--wrong); }

.modal-row-label {
  font-weight: bold;
  white-space: nowrap;
  color: #333;
  min-width: 86px;
}
.modal-pts {
  white-space: nowrap;
  color: #666;
  min-width: 58px;
  font-size: .8rem;
  padding-top: 2px;
}
.modal-row-comment {
  color: #555;
  flex: 1;
}

/* ── MODAL ACTION BUTTONS ── */
.modal-actions {
  display: flex;
  gap: 12px;
  padding: 16px 24px 22px;
  border-top: 1px solid #f0f0f0;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.modal-retry-btn {
  padding: 10px 22px;
  border: 2px solid #bbb;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: .88rem;
  font-weight: bold;
  color: #555;
  transition: border-color .15s, color .15s;
}
.modal-retry-btn:hover { border-color: #555; color: #222; }

.modal-pdf-btn {
  padding: 10px 22px;
  border: none;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: .88rem;
  font-weight: bold;
  transition: background .15s;
}
.modal-pdf-btn:hover    { background: #12345e; }
.modal-pdf-btn:disabled { background: #aaa; cursor: default; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .content, .hub-grid, .hub-filters, .hub-header, .progress-section { padding-left: 16px; padding-right: 16px; }
  .section-header { margin-left: -16px; margin-right: -16px; }
  .score-bar { padding: 8px 16px; gap: 8px; }
  .dual-choice, .illus-grid, .essay-topics { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: 1fr; }
  .pf-table .stmt { width: 60%; }
  /* modal responsive */
  .modal-header-score { padding: 22px 20px 16px; }
  .modal-stats        { padding: 12px 14px; gap: 6px; }
  .modal-stat-num     { font-size: 1.2rem; }
  .modal-score-big    { font-size: 1.5rem; }
  .modal-task-list    { padding: 0 14px 12px; max-height: 260px; }
  .modal-actions      { padding: 14px 16px 18px; justify-content: stretch; }
  .modal-retry-btn,
  .modal-pdf-btn      { flex: 1; text-align: center; }
  .bottom-check-btn   { width: 100%; font-size: 1.08rem; padding: 16px 20px; }
}
