/* ================================================================
   COMPONENTS.CSS — Strategy Cards, Formulas, Quiz, Notes, Modals
   Grammar Strategies — Ayed Academy
   ================================================================ */

/* ── UNIT HEADER ── */
.unit-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--r-xl); padding: 2rem 2.5rem; margin-bottom: 2rem;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: flex-start; gap: 2rem;
}
.unit-header::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--teal), var(--green)); }
.unit-header::after { content: ''; position: absolute; top: -60px; left: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(245,166,35,0.12) 0%, transparent 70%); pointer-events: none; }
.unit-tag { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: 800; background: rgba(245,166,35,0.15); border: 1px solid rgba(245,166,35,0.25); padding: 3px 10px; border-radius: var(--r-pill); display: inline-block; margin-bottom: 0.6rem; }
.unit-h-title { font-size: 2rem; font-weight: 900; color: #fff; line-height: 1.2; margin-bottom: 0.3rem; }
.unit-h-en { font-family: var(--ff-en); font-size: 1rem; color: rgba(255,255,255,0.45); }
.unit-h-mascot { font-size: 4.5rem; opacity: 0.9; flex-shrink: 0; }

/* ── COLLAPSIBLE STRATEGY SECTIONS (closed by default) ── */
.sc-header, .rd-strategy-banner, .ls-strategy-banner { cursor: pointer; user-select: none; }
.sc-caret { display: inline-flex; align-items: center; justify-content: center; opacity: 0.75; font-size: 1.1rem; transition: transform 0.3s ease; }
.rd-strategy-banner .sc-caret, .ls-strategy-banner .sc-caret { margin-inline-start: auto; }
.strategy-card:not(.sc-collapsed) .sc-header .sc-caret,
.rd-strategy-section:not(.sc-collapsed) .rd-strategy-banner .sc-caret,
.ls-strategy-section:not(.sc-collapsed) .ls-strategy-banner .sc-caret { transform: rotate(-90deg); }
.sc-collapsed > *:not(.sc-header):not(.rd-strategy-banner):not(.ls-strategy-banner) { display: none !important; }
.strategy-card.sc-collapsed .sc-header { border-bottom: none; }

/* ── STRATEGY CARD ── */
/* No overflow:hidden here on purpose — it would trap position:sticky
   descendants (.sc-keywords) inside a non-scrolling box. Corners are
   rounded explicitly on the edge children instead (below). */
.strategy-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); margin-bottom: 2rem; box-shadow: var(--sh-sm); transition: box-shadow 0.3s; }
.strategy-card:hover { box-shadow: var(--sh-md); }
.sc-header { padding: 1.1rem 1.5rem; display: flex; align-items: center; gap: 0.75rem; border-bottom: 1px solid var(--border); border-start-start-radius: var(--r-xl); border-start-end-radius: var(--r-xl); }
.strategy-card.sc-collapsed .sc-header { border-end-start-radius: var(--r-xl); border-end-end-radius: var(--r-xl); }
.sc-header-icon { font-size: 1.5rem; }
.sc-header-texts { flex: 1; }
.sc-title { font-size: 1.1rem; font-weight: 800; }
.sc-subtitle { font-size: 0.82rem; color: var(--text-muted); margin-top: 1px; }
.sc-badge { font-family: var(--ff-en); font-size: 0.7rem; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); letter-spacing: 0.06em; text-transform: uppercase; }

/* Card Themes */
.sc-theme-blue .sc-header { background: var(--navy); color: #fff; }
.sc-theme-blue .sc-subtitle { color: rgba(255,255,255,0.55); }
.sc-theme-blue .sc-badge { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9); }
.sc-theme-gold .sc-header { background: linear-gradient(135deg,#F5A623,#FFD07A); color: var(--navy); }
.sc-theme-gold .sc-subtitle { color: rgba(10,25,41,0.6); }
.sc-theme-gold .sc-badge { background: rgba(10,25,41,0.12); color: var(--navy); }
.sc-theme-teal .sc-header { background: linear-gradient(135deg,#0077B6,#00B4D8); color: #fff; }
.sc-theme-teal .sc-subtitle { color: rgba(255,255,255,0.6); }
.sc-theme-teal .sc-badge { background: rgba(255,255,255,0.18); color: #fff; }
.sc-theme-green .sc-header { background: linear-gradient(135deg,#05A881,#06D6A0); color: var(--navy); }
.sc-theme-green .sc-subtitle { color: rgba(10,25,41,0.6); }
.sc-theme-green .sc-badge { background: rgba(10,25,41,0.1); color: var(--navy); }
.sc-theme-purple .sc-header { background: linear-gradient(135deg,#5B21B6,#7C3AED); color: #fff; }
.sc-theme-purple .sc-subtitle { color: rgba(255,255,255,0.55); }
.sc-theme-purple .sc-badge { background: rgba(255,255,255,0.15); color: #fff; }
.sc-theme-red .sc-header { background: linear-gradient(135deg,#BE123C,#EF233C); color: #fff; }
.sc-theme-red .sc-subtitle { color: rgba(255,255,255,0.55); }
.sc-theme-red .sc-badge { background: rgba(255,255,255,0.15); color: #fff; }

.sc-body { display: grid; grid-template-columns: 240px 1fr; }
@media (max-width: 780px) { .sc-body { grid-template-columns: 1fr; } .sc-keywords { position: static; } }

/* Keywords Sidebar — stays pinned in view while the (usually taller)
   rule content on the other side scrolls past it. */
.sc-keywords {
  background: var(--navy); padding: 1.25rem; border-left: 1px solid rgba(255,255,255,0.06);
  border-end-start-radius: var(--r-xl);
  position: sticky; top: 1rem; align-self: start;
}
.sc-keywords-title { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; display: flex; align-items: center; gap: 6px; }
.kw-grid { display: flex; flex-direction: column; gap: 0.6rem; }

.kw-reveal { display: flex; flex-direction: column; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--r-sm); overflow: hidden; cursor: pointer; transition: all 0.3s; margin-bottom: 8px; }
.kw-en-box { padding: 0.8rem 1rem; font-family: var(--ff-en); font-weight: 700; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.kw-en-box::after { content: '+'; color: var(--gold); font-size: 1.4rem; transition: transform 0.3s; font-weight: normal; }
.kw-reveal.expanded .kw-en-box::after { transform: rotate(45deg); color: var(--red); }
.kw-ar-box { background: linear-gradient(135deg, rgba(245,166,35,0.15), rgba(245,166,35,0.05)); color: var(--gold-lt); font-size: 0.95rem; font-weight: 700; padding: 0 1rem; max-height: 0; opacity: 0; transition: all 0.3s ease-out; text-align: right; line-height: 1.5; }
.kw-reveal.expanded .kw-ar-box { padding: 0.5rem 1rem 0.8rem 1rem; max-height: 200px; opacity: 1; border-top: 1px dashed rgba(245,166,35,0.3); }

/* Content Side */
.sc-content { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.usage-banner { background: linear-gradient(135deg, rgba(0,180,216,0.07), rgba(0,180,216,0.02)); border: 1px solid rgba(0,180,216,0.2); border-radius: var(--r-md); padding: 1rem 1.25rem; font-size: 0.97rem; line-height: 1.7; color: var(--text-sec); display: flex; gap: 0.75rem; align-items: flex-start; }
.usage-banner::before { content: ''; width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300B4D8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3Cpath d='M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 0 1 8.91 14'/%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; }

/* ── FORMULA BLOCKS ── */
.formula-visual-wrap { display: flex; flex-direction: column; gap: 1rem; margin-top: 0.5rem; }
.formula-v-title { font-weight: 800; color: var(--navy); margin-bottom: -0.5rem; font-size: 1.05rem; }
.formula-block { display: flex; align-items: stretch; background: var(--surface2); border: 1.5px solid var(--border); border-radius: var(--r-md); overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.04); position: relative; }
@media (max-width: 768px) { .formula-block { flex-direction: column; } }
.fb-subj { background: linear-gradient(135deg, var(--navy), var(--navy-mid)); color: #fff; padding: 1.25rem 1rem; font-weight: 800; display: flex; align-items: center; justify-content: center; text-align: center; min-width: 160px; border-left: 4px solid var(--gold); font-size: 1.05rem; }
.fb-form { padding: 1.25rem 1.5rem; font-family: var(--ff-en); font-weight: 800; font-size: 1.15rem; color: var(--teal); background: rgba(0,180,216,0.05); border-left: 1px dashed var(--border); border-right: 1px dashed var(--border); display: flex; align-items: center; justify-content: center; min-width: 250px; position: relative; }
.fb-form::before { content: '➔'; position: absolute; left: -12px; top: 50%; transform: translateY(-50%); font-size: 1.2rem; color: var(--gold); background: var(--surface2); border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; z-index: 2; border: 1px solid var(--border); }
.fb-form .s { color: var(--red); font-size: 1.15em; font-weight: 900; }
.fb-ex { padding: 1.25rem; font-size: 0.98rem; color: var(--text-sec); display: flex; align-items: center; flex: 1; line-height: 1.6; }
.fb-ex strong { color: var(--navy); font-weight: 900; }
.fb-ex em { color: var(--purple); font-style: normal; font-weight: 700; }

/* ── EXCEPTION BOX ── */
.exception-box { background: rgba(239,35,60,0.04); border-right: 4px solid var(--red); border-radius: var(--r-md) 0 0 var(--r-md); padding: 1.25rem 1.5rem; margin: 0; margin-top: 0.5rem; }
.ex-title { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; color: var(--red); margin-bottom: 0.8rem; font-size: 1.05rem; }
.ex-body { font-size: 0.95rem; line-height: 2; color: var(--text-sec); }
.ex-body strong { color: var(--red); background: rgba(239,35,60,0.08); padding: 2px 8px; border-radius: 6px; font-weight: 700; font-family: var(--ff-en); margin: 0 4px; display: inline-block; vertical-align: middle; }
.ex-body em { font-style: normal; font-weight: 700; color: var(--navy); border-bottom: 1.5px dashed var(--purple); padding-bottom: 1px; }

/* ── MINI QUIZ ── */
.mini-quiz-wrap { background: linear-gradient(135deg, rgba(245,166,35,0.07), rgba(245,166,35,0.02)); border: 1.5px dashed rgba(245,166,35,0.4); border-radius: var(--r-lg); padding: 1.25rem; }
.mini-quiz-header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.25rem; color: var(--navy); font-weight: 800; font-size: 1rem; }
.mini-quiz-header .mq-badge { background: var(--gold); color: var(--navy); font-size: 0.72rem; padding: 2px 8px; border-radius: var(--r-pill); font-weight: 800; letter-spacing: 0.05em; }
.mini-q { margin-bottom: 1.25rem; }
.mini-q:last-child { margin-bottom: 0; }
.mini-q-text { font-family: var(--ff-en); direction: ltr; font-weight: 700; font-size: 1.08rem; color: var(--text-primary); margin-bottom: 0.9rem; padding: 0.75rem 1rem 0.75rem 0.75rem; background: var(--surface2); border-radius: var(--r-md); border-left: 4px solid var(--gold); line-height: 1.5; white-space: pre-wrap; }
.mini-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; direction: ltr; }
@media (max-width: 600px) { .mini-opts { grid-template-columns: 1fr; } }
.mini-opt { padding: 0.65rem 0.9rem; border-radius: var(--r-sm); border: 1.5px solid var(--border); background: var(--surface); font-family: var(--ff-en); font-weight: 700; font-size: 0.95rem; color: var(--text-primary); text-align: left; direction: ltr; transition: all 0.2s var(--spring); display: flex; align-items: center; gap: 0.5rem; }
.mini-opt:hover:not(:disabled) { border-color: var(--gold); background: var(--gold-dim); transform: translateY(-2px); }
.mini-opt.opt-correct { border-color: var(--green); background: rgba(16,185,129,0.2); color: #fff; }
.mini-opt.opt-wrong { border-color: var(--red); background: rgba(239,68,68,0.2); color: #fff; text-decoration: line-through; }
.mini-opt:disabled { cursor: default; }
.opt-letter { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; background: rgba(10,25,41,0.07); font-size: 0.75rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.mini-opt.opt-correct .opt-letter { background: var(--green); color: #fff; }
.mini-opt.opt-wrong .opt-letter { background: var(--red); color: #fff; }
.mini-expl { margin-top: 0.85rem; padding: 0.85rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); font-size: 0.9rem; line-height: 1.7; color: var(--text-sec); display: none; }
.mini-expl.show { display: block; animation: fadeUp 0.3s var(--ease); }
.mini-q-actions { margin-top: 1rem; }
.btn-check-ans { width: 100%; }
.return-rule-btn { margin-top: 0.5rem; display: inline-block; }

/* ── UNIT END CTA ── */
.unit-end-cta { text-align: center; padding: 2rem; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%); border-radius: var(--r-xl); margin: 1rem 0 2rem; position: relative; overflow: hidden; }
.unit-end-cta::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(245,166,35,0.15) 0%, transparent 70%); pointer-events: none; }
.unit-end-cta h3 { color: rgba(255,255,255,0.7); font-size: 1rem; margin-bottom: 0.5rem; }
.unit-end-cta p { color: rgba(255,255,255,0.45); font-size: 0.88rem; margin-bottom: 1.5rem; }
.unit-end-cta button { background: linear-gradient(135deg, var(--gold), var(--gold-lt)); color: var(--navy); padding: 0.9rem 2.5rem; border-radius: var(--r-pill); font-size: 1.05rem; font-weight: 800; box-shadow: 0 6px 24px rgba(245,166,35,0.4); transition: all 0.25s var(--spring); }
.unit-end-cta button:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(245,166,35,0.5); }

/* ── NOTES PANEL ── */
.notes-panel { position: fixed; top: var(--topbar-h); right: 0; bottom: 0; width: 340px; background: var(--surface); box-shadow: var(--sh-xl); z-index: 600; transform: translateX(100%); transition: transform 0.38s var(--ease); display: flex; flex-direction: column; }
.notes-panel.open { transform: translateX(0); }
.notes-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 500; }
.notes-panel-head { padding: 1.25rem 1.25rem 1rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.notes-panel-title { font-size: 1.1rem; font-weight: 800; }
.notes-close { font-size: 1rem; color: var(--text-muted); }
.notes-close:hover { color: var(--text-primary); }
.notes-unit-label { padding: 0.75rem 1.25rem; font-size: 0.82rem; font-weight: 700; color: var(--gold); background: var(--gold-dim); border-bottom: 1px solid var(--border); }
.notes-area { flex: 1; padding: 1.25rem; resize: none; border: none; outline: none; font-size: 0.97rem; line-height: 1.8; color: var(--text-primary); background: var(--surface2); }
.notes-actions { padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 1rem; }
.notes-save-btn { background: var(--gold); color: var(--navy); padding: 0.65rem 1.5rem; border-radius: var(--r-md); font-weight: 800; transition: filter 0.2s; }
.notes-save-btn:hover { filter: brightness(1.05); }
.notes-saved-indicator { color: var(--green); font-weight: 700; font-size: 0.9rem; }

/* ── COMPREHENSIVE QUIZ MODAL ── */
.quiz-overlay { position: fixed; inset: 0; background: rgba(10,25,41,0.7); z-index: 900; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(8px); padding: 1.5rem; }
.quiz-modal { background: var(--surface); border-radius: var(--r-xl); width: 100%; max-width: 800px; max-height: calc(100vh - 3rem); display: flex; flex-direction: column; box-shadow: var(--sh-xl); animation: modalIn 0.4s var(--spring); overflow: hidden; }
@keyframes modalIn { from { opacity:0; transform: scale(0.95) translateY(20px); } to { opacity:1; transform: scale(1) translateY(0); } }
.quiz-modal-header { background: var(--navy); padding: 1.25rem 1.5rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.08); }
.quiz-unit-badge { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); background: rgba(245,166,35,0.15); padding: 3px 10px; border-radius: var(--r-pill); margin-bottom: 0.3rem; }
.quiz-modal-title { font-size: 1.2rem; font-weight: 900; color: #fff; }
.quiz-close-btn { color: rgba(255,255,255,0.5); font-size: 1.1rem; transition: color 0.2s; }
.quiz-close-btn:hover { color: #fff; }
.quiz-modal-body { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; }

.quiz-q-card { background: var(--surface2); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 1.5rem; overflow: hidden; }
.quiz-q-num { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; color: var(--text-muted); background: var(--border); padding: 3px 10px; border-radius: var(--r-pill); text-transform: uppercase; }
.quiz-q-result { font-weight: 800; font-size: 0.88rem; }
.quiz-q-text { font-family: var(--ff-en); direction: ltr; font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; padding: 0.85rem 1rem; background: var(--surface); border-radius: var(--r-md); border-left: 4px solid var(--gold); white-space: pre-wrap; line-height: 1.6; }

.quiz-opts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; direction: ltr; }
@media (max-width: 500px) { .quiz-opts-grid { grid-template-columns: 1fr; } }
.q-opt { padding: 0.8rem 1rem; border-radius: var(--r-md); border: 1.5px solid var(--border); background: var(--surface); font-family: var(--ff-en); font-weight: 700; font-size: 0.97rem; color: var(--text-primary); text-align: left; direction: ltr; transition: all 0.2s var(--spring); display: flex; align-items: center; gap: 0.6rem; }
.q-opt:hover:not(:disabled) { border-color: var(--gold); background: var(--gold-dim); transform: translateY(-2px); }
.q-opt.selected { border-color: var(--teal); background: rgba(0,180,216,0.08); }
.q-opt.correct { border-color: var(--green); background: rgba(16,185,129,0.2); color: #fff; }
.q-opt.wrong { border-color: var(--red); background: rgba(239,68,68,0.2); color: #fff; }
.q-opt:disabled { cursor: default; }
.q-opt-letter { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; background: rgba(10,25,41,0.07); font-size: 0.78rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.q-opt.correct .q-opt-letter { background: var(--green); color: #fff; }
.q-opt.wrong .q-opt-letter { background: var(--red); color: #fff; }
.q-opt.selected:not(.correct):not(.wrong) .q-opt-letter { background: var(--teal); color: #fff; }

.quiz-expl { margin-top: 1.25rem; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); font-size: 0.92rem; line-height: 1.75; display: none; }
.quiz-expl.show { display: block; animation: fadeUp 0.3s; }
.expl-text { color: var(--text-sec); line-height: 1.7; }

/* ── AUDIO PLAYER ── */
.listening-audio-wrap { display: flex; align-items: center; gap: 1.2rem; background: linear-gradient(135deg, #0a1929 0%, #1a3050 100%); border: 1px solid rgba(245,166,35,0.35); border-radius: 14px; padding: 1rem 1.4rem; margin-bottom: 1.5rem; box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
.listening-audio-label { color: var(--gold); font-weight: 800; font-size: 0.82rem; white-space: nowrap; letter-spacing: 0.3px; text-align: right; }
.listening-audio-wrap audio { flex: 1; height: 38px; border-radius: 30px; accent-color: var(--gold); min-width: 0; }

/* ── MOBILE RESPONSIVE COMPONENTS ── */
@media (max-width: 768px) {
  .unit-header { padding: 1.25rem 1rem; border-radius: var(--r-lg); margin-bottom: 1.25rem; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .unit-h-mascot { position: absolute; right: 1rem; top: 1rem; font-size: 2.5rem; opacity: 0.4; }
  .unit-h-title { font-size: 1.4rem; }
  .strategy-card { margin-bottom: 1.25rem; border-radius: var(--r-lg); }
  .sc-header { padding: 0.85rem 1rem; }
  .sc-title { font-size: 1rem; }
  .sc-keywords { border-left: none; border-bottom: 1px solid rgba(255,255,255,0.06); padding: 1rem; }
  .kw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .sc-content { padding: 1rem; gap: 1rem; }
  .formula-block { flex-direction: column; }
  .fb-subj { min-width: unset; width: 100%; padding: 0.75rem 1rem; border-left: none; border-bottom: 3px solid var(--gold); font-size: 0.9rem; text-align: right; }
  .fb-form { min-width: unset; border-left: none; border-right: none; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); padding: 0.75rem 1rem; font-size: 0.95rem; justify-content: flex-start; }
  .fb-form::before { content: '⬇'; left: 50%; top: -12px; transform: translateX(-50%); }
  .mini-quiz-wrap { padding: 1rem; border-radius: var(--r-md); }
  .mini-q-text { font-size: 0.95rem; padding: 0.6rem 0.8rem; }
  .mini-opts { grid-template-columns: 1fr; gap: 0.5rem; }
  .mini-opt { padding: 0.6rem 0.8rem; font-size: 0.9rem; }
  .unit-end-cta { padding: 1.5rem 1rem; border-radius: var(--r-lg); }
  .unit-end-cta button { padding: 0.75rem 1.75rem; font-size: 0.95rem; }
  .quiz-modal-header { padding: 1rem 1.25rem; }
  .quiz-modal-body { padding: 1rem; }
  .quiz-q-text { font-size: 1rem; }
  .q-opt { font-size: 0.9rem; padding: 0.7rem 0.9rem; }
}
@media (max-width: 480px) {
  .kw-grid { grid-template-columns: 1fr; }
  .sc-header { padding: 0.75rem 0.85rem; }
  .sc-content { padding: 0.85rem; }
  .formula-block { border-radius: var(--r-sm); }
  .fb-subj, .fb-form, .fb-ex { padding: 0.65rem 0.85rem; }
}
