/* Mizan — subject and level pages (built by tools/build_pages.js). Same palette as the app. */
:root {
    --parchment: #F5F0E6; --parchment-2: #FBF8F1; --line: #E4DCCB; --ink: #1C2140; --ink-2: #4A4856; --muted: #6E6A74;
    --brass: #806535; --gold: #E2C68C; --gold-soft: #CBB27C; --white: #FFFFFF;
    --f-display: 'Bodoni Moda', 'Didot', 'Times New Roman', serif;
    --f-ui: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --f-ar: 'Amiri', 'Times New Roman', serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--parchment); color: var(--ink); font-family: var(--f-ui); font-size: 17px; line-height: 1.7; }
html[lang="ar"] body { font-size: 18px; line-height: 1.9; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }
a { color: inherit; }
:focus-visible { outline: 2px solid #8C6F38; outline-offset: 3px; }
.top :focus-visible, .hero :focus-visible { outline-color: var(--gold); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: var(--parchment); padding: 10px 16px; z-index: 9; }
.skip:focus { top: 12px; }

.top { background: var(--ink); color: var(--parchment); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.brand span { font-family: var(--f-ar); font-size: 28px; font-weight: 700; line-height: 1; }
.brand .en { font-family: var(--f-display); font-size: 15px; font-weight: 400; letter-spacing: 4px; color: var(--gold-soft); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 22px; background: var(--ink); color: var(--parchment);
    border: 1px solid var(--ink); text-decoration: none; font-weight: 500; font-size: 16px; line-height: 1.2; margin: 4px 0; }
.btn:hover { background: #2A3058; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.gold:hover { background: #EBD3A2; }
.btn.on-dark { background: transparent; color: var(--parchment); border-color: rgba(245, 240, 230, .55); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.small { min-height: 40px; padding: 7px 15px; font-size: 15px; }
.top .btn { min-height: 40px; font-size: 15px; }

.crumbs { padding-block: 12px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--ink-2); }
.hero { background: var(--ink); color: var(--parchment); border-top: 6px solid var(--room, var(--gold)); }
.hero .wrap { padding-block: clamp(44px, 7vw, 84px); }
.kicker { margin: 0 0 10px; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 500; }
html[lang="ar"] .kicker { letter-spacing: 0; text-transform: none; font-size: 16px; }
h1, h2, h3 { line-height: 1.2; }
h1 { margin: 0; font-family: var(--f-display); font-weight: 500; font-size: clamp(34px, 5vw, 60px); }
html[lang="ar"] h1 { font-family: var(--f-ar); font-weight: 700; font-size: clamp(36px, 5.4vw, 64px); }
h2 { font-family: var(--f-display); font-weight: 500; font-size: clamp(26px, 3vw, 36px); margin: 0 0 18px; }
html[lang="ar"] h2 { font-family: var(--f-ar); font-weight: 700; }
h3 { font-size: 19px; margin: 0 0 6px; }
.lede { max-width: 720px; font-size: 19px; margin: 18px 0 0; color: #EDE7DA; }
.alt { margin: 14px 0 0; color: var(--gold); font-size: 17px; }
.alt[lang="ar"] { font-family: var(--f-ar); font-size: 21px; }
.cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.block { padding-block: clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.muted { color: var(--muted); }

.stats { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-wrap: wrap; gap: 12px 34px; }
.stats b { font-family: var(--f-display); font-size: 34px; font-weight: 500; color: var(--room, var(--ink)); margin-inline-end: 6px; }
html[lang="ar"] .stats b { font-family: var(--f-ui); font-weight: 600; font-size: 30px; }
.skills, .feats, .lvls { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.skill, .feat { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--room, var(--ink)); padding: 20px; }
.skill p { margin: 4px 0; }
.titles { margin: 8px 0 0; padding-inline-start: 20px; font-size: 15px; }
.titles a { text-decoration: none; border-bottom: 1px solid var(--line); }
.feat h3 { font-family: var(--f-display); font-weight: 500; font-size: 21px; }
html[lang="ar"] .feat h3 { font-family: var(--f-ui); font-weight: 600; font-size: 19px; }
.feat p { margin: 0; color: var(--ink-2); font-size: 16px; }
.lvl { display: flex; flex-direction: column; gap: 6px; padding: 22px; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--room, var(--ink)); text-decoration: none; }
.lvl:hover { border-color: var(--room, var(--ink)); }
.lvl-n { font-family: var(--f-display); font-size: 26px; font-weight: 500; }
html[lang="ar"] .lvl-n { font-family: var(--f-ar); font-weight: 700; }
.lvl-d { color: var(--ink-2); font-size: 16px; }
.lvl-c { color: var(--muted); font-size: 14px; margin-top: auto; }

.sample { background: var(--white); border: 1px solid var(--line); padding: clamp(18px, 3vw, 32px); margin-bottom: 18px; }
.sample[lang="ar"] { font-size: 19px; line-height: 2; }
.sample h3 { font-family: var(--f-display); font-weight: 500; font-size: 24px; }
.sample[lang="ar"] h3 { font-family: var(--f-ar); font-weight: 700; }
.q { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.qq { font-weight: 600; margin: 0 0 6px; }
.opts { list-style: none; margin: 0 0 8px; padding: 0; }
.opts li { padding: 2px 0; }
.let { display: inline-block; min-width: 26px; color: var(--brass); font-weight: 600; }
details summary { cursor: pointer; color: var(--brass); font-weight: 500; }
.faq { background: var(--white); border: 1px solid var(--line); padding: 14px 18px; margin-bottom: 10px; }
.faq summary { color: var(--ink); font-weight: 600; }
.faq p { margin: 10px 0 0; color: var(--ink-2); }
.lessons { columns: 2 260px; gap: 30px; padding-inline-start: 20px; margin: 0 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 8px 16px; border: 1px solid var(--line); background: var(--white); text-decoration: none; }
.chip:hover { border-color: var(--ink); }

.foot { background: var(--ink); color: #CFC9BC; font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 22px; }
.foot a { color: var(--parchment); }
