@import url("/ds/bf-tokens.css"); /* bf-ds v2 */
/* Bayt Al-Fuad · Semester 1 study library — one consolidated stylesheet.
   Academic reading style: warm near-white page, white reading surfaces, navy actions,
   modest subject accents, serif headings, sans-serif body, Cambria Math for notation.
   Sizes are in rem so they follow the reader's browser text size and zoom. */

:root {
  --page: #f7f7f3; --surface: #ffffff; --ink: #172b3a; --muted: #4d5d69; --line: #d8dee3;
  --action: #203e56; --action-hover: #2c5170; --focus: #203e56;
  --accent: #203e56; --tint: #edf1f4;
  --serif: Georgia, 'Times New Roman', serif; --sans: 'Segoe UI', Arial, sans-serif; --math: 'Cambria Math', Georgia, serif;
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4rem;
  --radius: 10px; --radius-s: 8px;
  --prose: 1.125rem;
  color-scheme: light;
}
body.math { --accent: #1f655c; --tint: #e8f1ef; }
body.physics { --accent: #365a7d; --tint: #eaf0f5; }
body.chemistry { --accent: #7a552f; --tint: #f5eee6; }
body.english { --accent: #67436c; --tint: #f3edf3; }
.subject-card.math { --accent: #1f655c; --tint: #e8f1ef; }
.subject-card.physics { --accent: #365a7d; --tint: #eaf0f5; }
.subject-card.chemistry { --accent: #7a552f; --tint: #f5eee6; }
.subject-card.english { --accent: #67436c; --tint: #f3edf3; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-family: var(--sans); color: var(--ink); background: var(--page); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); font-size: 1rem; line-height: 1.65; font-synthesis: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.25; letter-spacing: 0; color: var(--ink); margin: 0 0 var(--s3); }
h1 { font-size: 2.625rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }
p { margin: 0 0 var(--s4); }
li { line-height: 1.7; }
a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible, textarea:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px;
}
img, svg { max-width: 100%; height: auto; }
figure { margin: var(--s5) 0; }
figcaption { font-size: .9375rem; color: var(--muted); line-height: 1.6; margin-top: var(--s3); }
section, article, [id] { scroll-margin-top: var(--s5); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: var(--s4); top: -6rem; z-index: 20; padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); }
.skip:focus { top: var(--s4); }
.muted { color: var(--muted); }
.eyebrow { font-family: var(--sans); font-size: .875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--s2); }
.lead { font-size: 1.1875rem; line-height: 1.7; color: var(--muted); max-width: 44rem; }

/* ---------- mathematics ---------- */
.formula { font-family: var(--math); font-size: 1.1875rem; line-height: 1.8; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: var(--s3) var(--s4); overflow-x: auto; overflow-wrap: anywhere; }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 .15em; font-size: .92em; line-height: 1.25; }
.frac > .num { border-bottom: 1px solid currentColor; padding: 0 .2em; }
.frac > .den { padding: 0 .2em; }
.rad { border-top: 1px solid currentColor; padding-top: .05em; }
sup, sub { line-height: 0; font-size: .75em; }

/* ---------- buttons ---------- */
.button { display: inline-block; background: var(--action); color: #fff; border: 1px solid var(--action); border-radius: var(--radius-s);
  padding: var(--s3) var(--s5); font-family: var(--sans); font-size: 1rem; font-weight: 600; line-height: 1.4; text-decoration: none; text-align: center; }
.button:hover { background: var(--action-hover); border-color: var(--action-hover); color: #fff; text-decoration: none; }
.button:focus-visible { outline-color: var(--action); }

/* ---------- header, footer, page frame ---------- */
.site-header { max-width: 1440px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: var(--s5); padding: var(--s5) 4%; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand span { display: block; font-family: var(--sans); font-size: .875rem; font-weight: 400; color: var(--muted); margin-top: var(--s1); }
.brand:hover { color: var(--ink); }
.site-header nav { display: flex; flex-wrap: wrap; gap: var(--s1); }
.site-header nav a { font-size: 1rem; padding: var(--s2) var(--s4); border-radius: var(--radius-s); text-decoration: none; color: var(--ink); }
.site-header nav a:hover { background: var(--tint); color: var(--ink); }
.site-header nav a[aria-current] { background: var(--tint); color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.site-footer { max-width: 1440px; margin: var(--s7) auto 0; display: flex; justify-content: space-between; gap: var(--s5); padding: var(--s5) 4%; border-top: 1px solid var(--line); font-size: .9375rem; color: var(--muted); }
.page { max-width: 1440px; margin: 0 auto; padding: 0 4% var(--s7); }
.reader { max-width: 1440px; margin: 0 auto; padding: 0 4% var(--s7); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: var(--s2); font-size: .9375rem; color: var(--muted); padding: var(--s5) 0 var(--s4); }
.breadcrumbs a { color: var(--muted); }

/* ---------- entrance ---------- */
.home-hero { padding: var(--s7) 0 var(--s6); max-width: 48rem; }
.home-hero h1 { font-size: 2.75rem; margin-bottom: var(--s4); }
.subject-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); align-items: stretch; }
.subject-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s; }
.subject-card:hover { border-color: var(--accent); }
.subject-card:focus-within { border-color: var(--accent); }
.subject-art { height: 6rem; display: flex; align-items: center; padding: 0 var(--s5); background: var(--tint); color: var(--accent); font-family: var(--math); font-size: 2.75rem; line-height: 1; border-bottom: 1px solid var(--line); }
.subject-body { display: flex; flex-direction: column; flex: 1; padding: var(--s5); }
.subject-body .eyebrow { margin-bottom: var(--s2); }
.subject-body h2 { font-size: 1.625rem; margin-bottom: var(--s3); }
.subject-body > p:not(.eyebrow) { font-size: 1.0625rem; line-height: 1.6; color: var(--muted); margin: 0 0 var(--s5); }
.subject-body > .button { margin-top: auto; display: block; }
.home-footnote { text-align: center; color: var(--muted); margin: var(--s6) 0 0; }

/* ---------- subject contents ---------- */
.subject-heading { display: flex; justify-content: space-between; align-items: center; gap: var(--s6); padding: var(--s4) 0 var(--s6); }
.subject-heading h1 { margin-bottom: var(--s4); }
.subject-symbol { flex: none; display: flex; align-items: center; justify-content: center; width: 8rem; height: 8rem; border-radius: 50%; background: var(--tint); color: var(--accent); font-family: var(--math); font-size: 2.5rem; white-space: nowrap; }
.topic-section { margin-top: var(--s4); }
.group-title { font-size: 1.25rem; color: var(--accent); margin: var(--s6) 0 var(--s3); }
.topic-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.topic-row { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--s4); align-items: start; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.topic-row:last-child { border-bottom: 0; }
.topic-row:hover { background: var(--tint); }
.topic-row > span { font-family: var(--serif); font-size: 1.125rem; color: var(--accent); padding-top: .1rem; }
.topic-row h3 { font-size: 1.1875rem; margin: 0 0 var(--s1); }
.topic-row h3 a { text-decoration: none; }
.topic-row h3 a:hover { text-decoration: underline; }
.topic-row p { font-size: 1rem; color: var(--muted); margin: 0; max-width: 72ch; }
.tag { display: inline-block; font-style: normal; font-size: .875rem; color: var(--accent); background: var(--tint); border-radius: 4px; padding: 0 var(--s2); margin-left: var(--s1); }
.scope-footer { font-size: 1rem; color: var(--muted); max-width: 72ch; margin-top: var(--s6); }

/* ---------- lesson layout ---------- */
.reader-layout { display: grid; grid-template-columns: 16.5rem minmax(0, 1fr); gap: var(--s7); padding-top: var(--s4); }
.contents { align-self: start; position: sticky; top: var(--s4); max-height: calc(100vh - 2rem); overflow: auto; padding-right: var(--s4); border-right: 1px solid var(--line); }
.contents summary { font-weight: 600; padding: var(--s2) 0; cursor: pointer; }
.contents nav > a, .toc-group > a { display: block; padding: var(--s1) var(--s2); font-size: .9375rem; line-height: 1.5; color: var(--muted); text-decoration: none; border-radius: 6px; }
.contents a:hover { background: var(--tint); color: var(--ink); }
.contents a[aria-current] { background: var(--tint); color: var(--accent); font-weight: 600; }
.toc-group { margin: var(--s5) 0 var(--s4); }
.toc-group .eyebrow { display: block; padding-left: var(--s2); }
.reading-body { min-width: 0; max-width: 54rem; }
.reading-heading { padding: var(--s2) 0 var(--s5); }
.reading-heading h1 { font-size: 2.375rem; margin-bottom: var(--s4); }
.lesson-nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: 1rem; }
.reading-section { border-top: 1px solid var(--line); padding: var(--s6) 0 var(--s3); }
.reading-section > h2 { font-size: 1.625rem; margin-bottom: var(--s4); }
.reading-body p, .reading-body li, .reading-body dd { font-size: var(--prose); line-height: 1.75; }
.reading-body p, .reading-body ul, .reading-body ol, .reading-body dl { max-width: 72ch; }
.reading-body .formula, .reading-body figure, .reading-body .table-wrap { max-width: none; }
.reading-body ul, .reading-body ol { padding-left: 1.4rem; }
.background-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4) var(--s5); margin: var(--s4) 0; }
.background-item h3 { font-size: 1.125rem; margin-bottom: var(--s2); }
.background-item p:last-child { margin-bottom: 0; }

/* figures and tables */
.concept-figure { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); }
.concept-figure svg { display: block; width: 100%; height: auto; }
.table-wrap { overflow-x: auto; margin: var(--s5) 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); }
table { border-collapse: collapse; width: 100%; font-size: 1rem; line-height: 1.6; }
caption { text-align: left; padding: var(--s3) var(--s4); font-weight: 600; font-family: var(--serif); }
th, td { padding: var(--s3) var(--s4); border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: var(--tint); }
.table-note { font-size: .9375rem !important; color: var(--muted); }

/* terms, formulas, derivations */
.definitions > div, .language-pattern > div { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.definitions > div:last-child, .language-pattern > div:last-child { border-bottom: 0; }
dt { font-weight: 700; margin-bottom: var(--s1); }
dd { margin: 0; }
.formula-list > article { margin: var(--s4) 0 var(--s5); }
.formula-list h3 { font-size: 1.125rem; margin-bottom: var(--s2); }
.conditions { color: var(--muted); }
.derivation, .method { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4) var(--s5); margin: var(--s5) 0; }
.derivation h3, .method h3 { font-size: 1.1875rem; }
.formula-compact { list-style: none; padding: 0 !important; }
.formula-compact li { margin: var(--s3) 0; }
.formula-compact .formula { display: block; }
.formula-compact .muted { display: block; font-size: .9375rem; margin-top: var(--s1); }

/* worked examples */
.worked-example { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); margin: var(--s5) 0; }
.worked-example h3 { font-size: 1.25rem; }
.worked-steps { padding-left: 1.4rem; }
.worked-steps li { padding: var(--s1) 0 var(--s2); }
.worked-steps p { margin: var(--s1) 0; }
.reason { color: var(--muted); font-size: 1rem !important; }
.result { border-top: 1px solid var(--line); padding-top: var(--s3); }
.meaning { color: var(--muted); }
.mistakes { list-style: none; padding: 0 !important; }
.mistakes > li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4) var(--s5); margin: var(--s3) 0; }
.mistakes .wrong { margin-bottom: var(--s2); }
.mistakes > li p:last-child { margin-bottom: 0; }
details.extra { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3) var(--s5); margin: var(--s4) 0; }
details.extra summary { cursor: pointer; font-weight: 600; padding: var(--s2) 0; }
.lesson-sources { font-size: 1rem !important; color: var(--muted); margin-top: var(--s6); }
.moved-note { border-left: 3px solid var(--accent); padding-left: var(--s4); color: var(--muted); }
.next-topic { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s5); margin: var(--s6) 0; }

/* English language lessons */
.model-text { margin: var(--s4) 0; }
.model-text figcaption { font-size: .875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--s2); }
.model-text blockquote { margin: 0; padding: var(--s4) var(--s5); background: var(--tint); border-left: 4px solid var(--accent); border-radius: 0 var(--radius-s) var(--radius-s) 0; font-family: var(--serif); overflow-wrap: anywhere; }
.model-text blockquote p { margin: 0 0 var(--s3); }
.model-text blockquote p:last-child { margin-bottom: 0; }
.language-example h4 { font-size: 1.0625rem; margin: var(--s4) 0 var(--s1); }
.annotations li { margin: var(--s1) 0; }
.language-pattern { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s2) var(--s5); }
.draft-text { background: #fbeeea; border-bottom: 2px dotted #a13b2a; padding: 0 .2em; }
.media-note { border-left: 3px solid var(--accent); background: var(--tint); padding: var(--s3) var(--s4); border-radius: 0 var(--radius-s) var(--radius-s) 0; }

/* sources and old-link pages */
.source-list, .compat-list { list-style: none; padding: 0 !important; }
.source-item { border-top: 1px solid var(--line); padding: var(--s4) 0; }
.source-item h3 { font-size: 1.125rem; margin-bottom: var(--s1); }
.compat-list li { padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.compat-list li:target { background: var(--tint); }

/* ---------- feedback (optional, after each lesson) ---------- */
.feedback { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: var(--s6) 0; padding: 0 var(--s5); }
.feedback > summary { cursor: pointer; font-weight: 600; font-size: 1.0625rem; padding: var(--s4) 0; }
.feedback-form { padding-bottom: var(--s5); max-width: 40rem; }
.feedback-form fieldset { border: 0; padding: 0; margin: 0 0 var(--s4); }
.feedback-form legend, .feedback-form label.field { display: block; font-weight: 600; margin-bottom: var(--s2); }
.feedback-form .choice { display: flex; gap: var(--s2); align-items: center; font-size: 1rem; padding: var(--s1) 0; }
.feedback-form input[type="radio"] { width: 1.1rem; height: 1.1rem; accent-color: var(--action); }
.feedback-form select, .feedback-form textarea { display: block; width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); border: 1px solid #8a969f; border-radius: var(--radius-s); padding: var(--s2) var(--s3); }
.feedback-form textarea { min-height: 8rem; resize: vertical; line-height: 1.6; }
.feedback-form .field-group { margin-bottom: var(--s4); }
.feedback-form .hint { font-size: .9375rem; color: var(--muted); margin: var(--s1) 0 0; }
.feedback-form button { cursor: pointer; }
.feedback-form button[disabled] { opacity: .75; cursor: progress; }
.feedback-status { margin-top: var(--s3); font-weight: 600; }
.feedback-status.ok { color: #1f5b33; }
.feedback-status.error { color: #9a2c1e; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reader-layout { grid-template-columns: 14rem minmax(0, 1fr); gap: var(--s6); }
}
@media (max-width: 760px) {
  :root { --prose: 1.0625rem; }
  h1, .home-hero h1 { font-size: 2rem; }
  .reading-heading h1 { font-size: 1.875rem; }
  h2, .reading-section > h2 { font-size: 1.5rem; }
  .lead { font-size: 1.0625rem; }
  .site-header { flex-direction: column; align-items: flex-start; gap: var(--s3); padding: var(--s4) 5%; }
  .page, .reader { padding-left: 5%; padding-right: 5%; }
  .home-hero { padding: var(--s5) 0 var(--s4); }
  .subject-grid { grid-template-columns: 1fr; gap: var(--s4); }
  .subject-art { height: 4.5rem; font-size: 2.25rem; }
  .subject-heading { padding: var(--s2) 0 var(--s4); }
  .subject-symbol { display: none; }
  .reader-layout { display: block; }
  .contents { position: static; max-height: 16rem; border: 1px solid var(--line); border-radius: var(--radius-s); padding: var(--s2) var(--s4); margin-bottom: var(--s5); background: var(--surface); }
  .worked-example, .derivation, .method, .background-item, .mistakes > li, .feedback { padding-left: var(--s4); padding-right: var(--s4); }
  .topic-row { grid-template-columns: 2rem minmax(0, 1fr); padding: var(--s4); gap: var(--s3); }
  .site-footer { flex-direction: column; gap: var(--s2); padding: var(--s5) 5%; }
  .formula { font-size: 1.0625rem; }
}
@media print {
  .site-header, .site-footer, .contents, .reader-top, .next-topic, .skip, .feedback { display: none; }
  .reader-layout { display: block; }
  .worked-example, figure { break-inside: avoid; }
  body { background: #fff; }
}

/* Bayt Al-Fuad: the Arabic brand and breadcrumb items inside this English library. */
.brand[lang="ar"], .breadcrumbs [lang="ar"] { font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif; letter-spacing: 0; text-transform: none; }

/* ---------- dark reading theme (screen only) ----------
   Warm charcoal page, lighter cards, soft light text and one clay accent for links and active
   states. Print and PDF keep the light design above, so nothing here applies to paper. */
@media screen {
  :root, body.math, body.physics, body.chemistry, body.english,
  .subject-card.math, .subject-card.physics, .subject-card.chemistry, .subject-card.english {
    --page: #191919; --surface: #242424; --ink: #e8e6e3; --muted: #b5b2ad; --line: #3a3a3a;
    --control-line: #77736e;
    --action: #d49a7a; --action-hover: #e2b194; --on-action: #191919; --focus: #d49a7a;
    --accent: #d49a7a; --tint: #2e2824;
  }
  :root { color-scheme: dark; }
  a:hover { color: var(--accent); }
  .button, .button:hover { color: var(--on-action); }
  .site-header nav a[aria-current], .contents a[aria-current] { color: var(--accent); }
  .feedback-form select, .feedback-form textarea { border-color: var(--control-line); background: var(--page); }
  .feedback-status.ok { color: #7dc59a; }
  .feedback-status.error { color: #ee8f7a; }
  .draft-text { background: #3a2622; border-bottom-color: #ee8f7a; }
  ::selection { background: #5a3f31; color: #f4f2ef; }

  /* Inline diagrams were drawn for a light page. Map each drawing colour to a version
     with the same meaning that reads on the dark surface; text, axes and labels go light. */
  svg [fill="#183b3f"] { fill: #e8e6e3; }  svg [stroke="#183b3f"] { stroke: #e8e6e3; }
  svg [fill="#5e7376"] { fill: #b5b2ad; }  svg [stroke="#5e7376"] { stroke: #b5b2ad; }
  svg [fill="#9aa5a8"] { fill: #8a8580; }
  svg [stroke="#e1e8e3"] { stroke: #3d3d3d; } svg [fill="#e1e8e3"] { fill: #3d3d3d; }
  svg [stroke="#d0ddd7"] { stroke: #4a4a4a; }
  svg [fill="#b3412e"] { fill: #ee8f7a; }  svg [stroke="#b3412e"] { stroke: #ee8f7a; }
  svg [fill="#355b90"] { fill: #8fb0e0; }  svg [stroke="#355b90"] { stroke: #8fb0e0; }
  svg [fill="#176e66"] { fill: #6cc2b5; }  svg [stroke="#176e66"] { stroke: #6cc2b5; }
  svg [fill="#9b6328"] { fill: #d9a066; }  svg [stroke="#9b6328"] { stroke: #d9a066; }
  svg [fill="#b8733a"] { fill: #dda36d; }
  svg [fill="#f1e2cc"] { fill: #3b3026; }
  svg [fill="#f7ece2"] { fill: #382d26; }
  svg [fill="#d8e0ef"] { fill: #2b3346; }
  svg [fill="#e8f1f7"] { fill: #27303a; }
  svg [fill="#cfe3dc"] { fill: #263a33; }
  svg [fill="#e6f0ea"] { fill: #243029; }
  svg [fill="#f1f4ef"] { fill: #2b2d2a; }
  svg [fill="#fff"], svg [fill="#ffffff"] { fill: #242424; }
}

/* ==== bf-identity v1: start ==== */
/* Shared tokens. Warm charcoal, stone surfaces, ivory text, clay accent; one accent per path:
   جسدي (MasarCare) sage · علمي (Semester 1) ochre · نفسي (Quran & Tadabbur) blue. All text pairs ≥ 4.5:1. */
:root{
  --bf-quran:"Amiri Quran","Amiri","Noto Naskh Arabic","Traditional Arabic",serif;
  --bf-math:"Cambria Math","STIX Two Math","Latin Modern Math",Georgia,serif;
  --bf-fs-sm:.9375rem;--bf-fs-base:1.0625rem;--bf-fs-lg:1.1875rem;
  --bf-fs-h3:1.3125rem;--bf-fs-h2:clamp(1.5rem,1.1rem + 1.4vw,2.125rem);--bf-fs-h1:clamp(1.875rem,1.2rem + 2.6vw,3rem);
  --bf-lh:1.8;--bf-lh-head:1.4;--bf-radius:14px;--bf-radius-s:10px;--bf-header-h:72px;
}
html{scroll-padding-top:calc(var(--bf-header-h) + 16px)}

/* علمي — Semester 1. Dark reading theme on screen (print keeps the light design). */
:root{--sans:var(--bf-font);--serif:var(--bf-font);--math:var(--bf-math)}
@media screen{
  :root, body.math, body.physics, body.chemistry, body.english,
  .subject-card.math, .subject-card.physics, .subject-card.chemistry, .subject-card.english{
    --page:var(--bf-bg);--surface:var(--bf-surface);--ink:var(--bf-text);--muted:var(--bf-muted);--line:var(--bf-line);
    --control-line:var(--bf-border-strong);--action:var(--bf-ilm);--action-hover:var(--bf-ilm-strong);--on-action:var(--bf-bg);
    --focus:var(--bf-ilm);--accent:var(--bf-ilm);--tint:var(--bf-ilm-soft);
  }
  body{font-size:var(--bf-fs-base);line-height:1.75}
  h1,h2,h3,h4{font-family:var(--bf-font);font-weight:700;letter-spacing:0;line-height:var(--bf-lh-head)}
  ::selection{background:#5A4628;color:var(--bf-text)}
}
/* ==== bf-identity v1: end ==== */
