/* ============ Free study pages (Super Goal review, worksheets, tests) ============ */
.print-only { display: none; }

.s-hero { background: var(--cream); padding: 22px 0 48px; }
.s-hero--tight { padding-bottom: 36px; }
.s-kicker { color: var(--teal-deep); font-weight: 700; font-size: .95rem; margin-top: 12px; }
.s-hero h1 { font-size: clamp(1.7rem, 4.2vw, 2.7rem); margin-top: 8px; max-width: 900px; }
.s-lead { font-size: 1.1rem; color: var(--ink-2); margin-top: 14px; max-width: 760px; }
.s-section { padding: 56px 0; }
.s-section--cream { background: var(--cream); }
.s-section--sheet { padding-top: 36px; background: #efe6d3; }
.s-h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-bottom: 18px; }
.s-p { color: var(--ink-2); margin-bottom: 20px; max-width: 680px; }

/* tool switcher */
.s-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 26px; }
.s-tool { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-md); text-decoration: none; transition: border-color .15s, transform .15s; }
.s-tool:hover { border-color: var(--ink); transform: translateY(-2px); }
.s-tool b { font-family: var(--font-display); font-size: 1.15rem; }
.s-tool span { color: var(--muted); font-size: .92rem; line-height: 1.6; }
.s-tool[aria-current="page"] { border-color: var(--teal); background: var(--teal-soft); }
.s-tool[aria-current="page"] b::after { content: " (أنت هنا)"; font-family: var(--font-body); font-size: .8rem; font-weight: 500; color: var(--teal-deep); }
.s-tool--test b::before { content: "✓ "; color: var(--teal); }
@media (max-width: 1020px) { .s-tools { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .s-tools { grid-template-columns: 1fr; } }

/* unit index */
.unit-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; position: sticky; top: 70px; z-index: 5; background: var(--paper); padding: 10px 0; }
.unit-toc a { text-decoration: none; padding: 6px 14px; border: 2px solid var(--line); border-radius: 999px; font-weight: 600; font-size: .92rem; background: #fff; }
.unit-toc a:hover { border-color: var(--teal); }
@media (max-width: 860px) { .unit-toc { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .unit-toc a { flex: none; } }

.unit { background: #fff; border: 2px solid var(--line); border-radius: var(--r-lg); padding: 28px; margin-bottom: 22px; scroll-margin-top: 140px; }
.unit-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.unit-no { flex: none; width: 54px; height: 54px; border-radius: 16px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; }
.unit-head h3 { font-size: clamp(1.2rem, 2.6vw, 1.5rem); }
.unit-head p { color: var(--muted); }
.unit-sub { font-size: 1rem; color: var(--teal-deep); margin: 18px 0 10px; }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.g-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; }
.g-card h4 { font-size: 1.02rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 6px; text-align: start; }
.g-card h4 span { display: inline-block; }
.g-card > p { color: var(--ink-2); font-size: .96rem; }
.g-ex { margin: 10px 0 0; padding: 10px 14px; background: #fff; border-inline-start: 4px solid var(--marigold); border-radius: 8px; list-style: none; text-align: left; font-size: .96rem; }
.g-ex li + li { margin-top: 4px; }
.vocab { width: 100%; max-width: 520px; border-collapse: collapse; font-size: .96rem; }
.vocab th, .vocab td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: start; }
.vocab th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.vocab td[lang="en"] { font-weight: 600; text-align: left; }
@media (max-width: 600px) { .unit { padding: 20px 16px; border-radius: var(--r-md); } }

/* course call-to-action */
.s-cta { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: center; background: var(--ink); color: var(--paper); border-radius: var(--r-lg); padding: 28px; margin: 30px 0; }
.s-cta img { border-radius: var(--r-md); width: 200px; height: auto; }
.s-cta h2 { color: var(--paper); font-size: clamp(1.35rem, 3vw, 1.8rem); margin: 4px 0 10px; }
.s-cta p { color: #e3d6bd; }
.s-cta-kicker { color: var(--marigold) !important; font-weight: 700; font-size: .9rem; }
.s-cta-points { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 4px; }
.s-cta-points li::before { content: "✓"; color: var(--marigold); font-weight: 800; margin-inline-end: 8px; }
.s-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.s-cta .btn--ghost { border-color: var(--paper); color: var(--paper); }
.s-cta .btn--ghost:hover { background: var(--paper); color: var(--ink); }
@media (max-width: 700px) { .s-cta { grid-template-columns: 1fr; padding: 22px 18px; gap: 16px; } .s-cta img { width: 140px; } .s-cta-actions .btn { flex: 1 1 100%; } }

.s-others { display: flex; flex-wrap: wrap; gap: 12px; }
.s-other { text-decoration: none; padding: 14px 20px; border: 2px solid var(--line); border-radius: var(--r-md); background: #fff; display: inline-flex; gap: 8px; align-items: center; }
.s-other:hover { border-color: var(--ink); }

/* worksheet / test sheet */
.ws-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 22px; }
.sheet { background: #fff; max-width: 820px; margin: 0 auto 26px; padding: 40px 44px; border-radius: 6px; box-shadow: 0 2px 0 var(--line), 0 18px 40px -24px rgba(44,35,24,.35); text-align: left; font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; }
.sheet[hidden] { display: none; }
.sheet-head { border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 18px; }
.sheet-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--teal-deep); font-size: .9rem; }
.sheet-head h2 { font-family: var(--font-body); font-size: 1.3rem; margin: 8px 0 10px; }
.sheet-fields { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: .95rem; color: var(--ink-2); }
.sheet-inst { margin-top: 10px; font-weight: 700; }
.ws-sec { margin-top: 22px; break-inside: avoid-page; }
.ws-sec h3 { font-family: var(--font-body); font-size: 1.08rem; }
.ws-ar { color: var(--muted); font-size: .9rem; text-align: left; }
.ws-sec ol { margin: 10px 0 0; padding-left: 26px; display: grid; gap: 12px; }
.ws-sec li { line-height: 1.7; }
.ws-sec .opts { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 2px; color: var(--ink-2); }
.ws-sec .words { font-style: italic; }
.ws-sec .line, .blank { display: inline-block; }
.ws-sec .line { display: block; border-bottom: 1px solid #9a8b73; height: 26px; margin-top: 2px; }
.blank { color: #9a8b73; letter-spacing: -1px; }
.sheet-foot { margin-top: 28px; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--muted); font-size: .82rem; text-align: center; }
.key-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 28px; }
.key-grid h4, .sheet--key h4 { font-family: var(--font-body); font-size: 1rem; }
.key-grid ol, .key-list { padding-left: 32px; margin: 6px 0 0; }
@media (max-width: 640px) { .sheet { padding: 24px 18px; } .key-grid { grid-template-columns: 1fr; } }

/* interactive test */
.t-q { border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 16px 0; }
.t-q legend { font-weight: 600; padding: 0; line-height: 1.7; }
.t-no { color: var(--muted); margin-right: 4px; }
.t-unit { font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-left: 6px; white-space: nowrap; }
.t-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.t-opt { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; min-height: 44px; }
.t-opt:hover { border-color: var(--teal); }
.t-opt input { accent-color: var(--teal); width: 18px; height: 18px; margin: 0; }
.t-opt:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }
.t-q.is-ok .t-opt:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }
.t-q.is-bad .t-opt:has(input:checked) { border-color: #c0533a; background: #fbe3dc; }
.t-q .t-opt.is-answer { border-color: var(--teal); border-style: dashed; }
.t-feedback { font-size: .9rem; margin-top: 6px; font-weight: 600; min-height: 0; }
.t-q.is-ok .t-feedback { color: var(--teal-deep); }
.t-q.is-bad .t-feedback { color: #a8432c; }
.t-submit { margin-top: 24px; }
.t-left { text-align: center; color: var(--muted); font-size: .92rem; margin-top: 8px; }
.t-result { max-width: 820px; margin: 0 auto 26px; background: #fff; border-radius: var(--r-lg); padding: 30px; border: 2px solid var(--ink); }
.t-score { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.t-score-num { font-family: var(--font-display); font-size: 3.4rem; font-weight: 800; line-height: 1; color: var(--teal-deep); }
.t-score-num small { font-size: 1.4rem; color: var(--muted); }
.t-score h2 { font-size: 1.5rem; }
.t-weak { margin-top: 18px; }
.t-weak ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.t-weak a { display: inline-block; text-decoration: none; padding: 6px 14px; border-radius: 999px; background: var(--warn-bg); border: 1px solid var(--warn-line); font-weight: 600; font-size: .92rem; }
.t-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.t-result .s-cta { margin-bottom: 0; }

/* hub */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.hub-card { display: grid; grid-template-columns: 120px 1fr; gap: 18px; background: #fff; border: 2px solid var(--line); border-radius: var(--r-lg); padding: 20px; align-items: start; }
.hub-card img { border-radius: var(--r-sm); width: 120px; height: auto; }
.hub-card h2 { font-size: 1.3rem; }
.hub-card p { color: var(--muted); font-size: .95rem; }
.hub-card ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.hub-card ul a { color: var(--teal-deep); font-weight: 700; text-underline-offset: 4px; }
.s-tips { list-style: none; counter-reset: tip; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.s-tips li { counter-increment: tip; background: var(--paper); border-radius: var(--r-md); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.s-tips li::before { content: counter(tip, arabic-indic); font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--teal); line-height: 1; }
.s-tips b { font-family: var(--font-display); font-size: 1.1rem; }
.s-tips span { color: var(--ink-2); font-size: .95rem; }

.s-note { margin-top: 10px; font-size: .9rem; color: var(--muted); }
.passage { margin: 12px 0 6px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); line-height: 1.85; }
.ws-h4 { font-family: var(--font-body); font-size: .98rem; margin: 16px 0 0; }
.ws-sec .tf { margin-left: 12px; color: var(--ink-2); white-space: nowrap; }
.spell-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.spell { font-size: 1.15rem; letter-spacing: 2px; }
.spell .gap { display: inline-block; width: 22px; border-bottom: 2px solid var(--ink); margin: 0 2px; height: 1em; vertical-align: -2px; }
.w-prompt { font-weight: 600; margin-top: 10px; }
.w-help { color: var(--muted); font-size: .92rem; font-style: italic; }
.w-lines .line { display: block; border-bottom: 1px solid #9a8b73; height: 30px; }
.w-model { margin-top: 18px; }
.w-model h4 { font-family: var(--font-body); font-size: 1rem; }
.w-model p { margin-top: 6px; line-height: 1.8; }

/* ============ Print: only the sheet ============ */
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; font-size: 12.5pt; padding: 0 !important; }
  .skip, .ribbon, .site-header, .site-footer, .crumbs, .no-print, .mobile-cta, .s-cta, .s-tools, .t-result, template { display: none !important; }
  .s-section, .s-section--sheet { padding: 0 !important; background: #fff !important; }
  .wrap { max-width: none; padding: 0; }
  .sheet { box-shadow: none; padding: 0; margin: 0; max-width: none; border-radius: 0; }
  .sheet--key { display: none !important; }
  body.print-answers .sheet--key { display: block !important; break-before: page; }
  .t-opt { border: 0; padding: 2px 10px 2px 0; min-height: 0; background: none !important; }
  .t-feedback, .t-submit { display: none !important; }
  .t-q { break-inside: avoid; padding: 6px 0; }
  .t-opts { margin-top: 2px; }
  .ws-sec li { break-inside: avoid; }
  .s-note { display: none; }
  .passage { background: #fff; }
  a { text-decoration: none; }
}
