@import url("/ds/bf-tokens.css"); /* bf-ds v2 */
/* صفحات الحركة العشر والأسبوع والمراجع. نهاري هادئ: خلفية رمادية دافئة، نص داكن، شريط بنفسجي، إبراز خوخي بنص داكن. */
:root {
  --bg: #f0f0f0; --ink: #383239; --ink2: #615a62; --bar: #49354b; --bar-ink: #fbf5fb;
  --accent: #ffb06b; --accent-ink: #2b1d10; --brand-bg: #1b1a18; --ivory: #f2ebdd; --terra: #d97757;
  --card: #fff; --soft: #f5eff6; --line: #d9d3da; --line2: #857389; --ok: #2f6b45; --warn: #8a3b12;
  --radius: 18px; --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.85 var(--font); }
html.mv-large body { font-size: 1.22rem; }
a { color: #5b3f5e; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.45; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 4.4vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.65rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--bar); outline-offset: 2px; box-shadow: 0 0 0 6px rgba(255, 176, 107, .55); border-radius: 6px; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* الرأس: شريط الهوية الداكن ثم شريط الصفحات البنفسجي */
.bf-head { position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 14px rgba(27, 26, 24, .18); }
.bf-bar { background: var(--brand-bg); color: var(--ivory); }
.bf-bar-in { max-width: 1180px; margin: 0 auto; padding: 8px 18px; display: flex; align-items: center; gap: 14px; min-height: 64px; }
.bf-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ivory); text-decoration: none; flex: none; }
.bf-brand:hover { color: var(--ivory); }
.bf-brand svg { width: 40px; height: 40px; flex: none; }
.bf-brand .brand-core { fill: var(--terra); }
.bf-brand span { display: grid; font-size: 1.05rem; font-weight: 700; line-height: 1.25; }
.bf-brand small { color: var(--terra); font-size: .66rem; letter-spacing: .14em; font-weight: 600; direction: ltr; text-align: end; }
.bf-where { display: flex; align-items: baseline; gap: 8px; min-width: 0; padding-inline-start: 14px; border-inline-start: 1px solid rgba(242, 235, 221, .28); }
.bf-where a { color: var(--ivory); text-decoration: none; font-weight: 600; white-space: nowrap; }
.bf-where b { color: #ffd2ad; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-where b::before { content: "·"; margin-inline-end: 8px; color: rgba(242, 235, 221, .6); }
.bf-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.bf-back { color: #ffd2ad; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.bf-back:hover { color: var(--ivory); text-decoration: underline; }
.bf-tabs { background: var(--bar); }
.bf-tabs ul { list-style: none; margin: 0 auto; padding: 0 12px; max-width: 1180px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .4) transparent; }
.bf-tabs ul::-webkit-scrollbar { height: 6px; }
.bf-tabs ul::-webkit-scrollbar-track { background: transparent; }
.bf-tabs ul::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .4); border-radius: 6px; }
.bf-tabs a { display: flex; align-items: center; gap: 6px; min-height: 46px; padding: 6px 12px; color: var(--bar-ink); text-decoration: none; font-size: .93rem; white-space: nowrap; border-bottom: 3px solid transparent; }
.bf-tabs a small { opacity: .75; font-size: .78rem; }
.bf-tabs a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.bf-tabs a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 700; background: rgba(255, 255, 255, .1); }
.bf-tabs li.sep { width: 1px; background: rgba(255, 255, 255, .25); margin: 10px 6px; flex: none; }
@media (max-width: 760px) {
  html { scroll-padding-top: 150px; }
  .bf-bar-in { flex-wrap: wrap; padding: 8px 14px; gap: 6px 12px; min-height: 0; }
  .bf-brand svg { width: 34px; height: 34px; }
  .bf-where { order: 3; flex-basis: 100%; border: 0; padding: 0; font-size: .92rem; }
  .bf-back { font-size: .84rem; }
  .bf-tabs a { min-height: 44px; font-size: .88rem; padding: 6px 10px; }
}
.bf-back .short { display: none; }
@media (max-width: 420px) { .bf-back .long { display: none; } .bf-back .short { display: inline; } }

/* المحتوى */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
main { display: block; padding-bottom: 40px; }
.hero { padding: 34px 0 10px; max-width: 860px; }
.eyebrow { color: var(--ink2); font-weight: 600; font-size: .95rem; margin-bottom: .3em; }
.eyebrow .n { display: inline-block; background: var(--bar); color: var(--bar-ink); border-radius: 8px; padding: 0 8px; margin-inline-end: 8px; font-variant-numeric: tabular-nums; }
.lead { font-size: 1.12rem; color: var(--ink); }
.facts { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: .94rem; }
.section { margin: 30px 0; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel + .panel { margin-top: 16px; }
.muted { color: var(--ink2); }
.note { border-inline-start: 4px solid var(--accent); background: #fff8f1; padding: 10px 14px; border-radius: 10px; }
.gate { border: 2px solid #b4532a; background: #fff6f0; border-radius: var(--radius); padding: 18px 22px; }
.gate h2 { font-size: 1.2rem; color: #7a2e0c; }
.caution { background: #f7f3f8; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
ul.list, ol.list { padding-inline-start: 1.3em; margin: 0 0 1em; }
ul.list li, ol.list li { margin-bottom: .35em; }
.about-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.about-grid .wide { grid-column: 1 / -1; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: start; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--soft); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.stack td { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; border: 0; padding: 4px 12px; }
  table.stack td::before { content: attr(data-h); font-weight: 700; color: var(--ink2); }
  table.stack td:first-child { font-weight: 700; }
  .table-wrap { overflow-x: visible; }
}

/* اختيار اليوم أو المرحلة */
.picker { position: sticky; top: var(--head-h, 110px); z-index: 20; background: var(--bg); padding: 10px 0; margin: 0 0 8px; }
@media (max-width: 760px), (max-height: 560px) { .picker { position: static; } }
.picker-label { font-weight: 700; margin: 0 0 6px; }
.picker-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.picker a { display: inline-flex; align-items: center; font-size: .97rem; min-height: 46px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); text-decoration: none; white-space: nowrap; flex: none; }
.picker a:hover { background: var(--soft); }
.js .picker a[aria-current="true"] { background: var(--accent); border-color: #c97a35; color: var(--accent-ink); font-weight: 700; }
.picker a .count { font-size: .8rem; margin-inline-start: 6px; color: var(--ok); font-weight: 700; }
.js .unit[hidden] { display: none; }
.unit { margin: 0 0 30px; scroll-margin-top: 170px; }
.unit-head { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px; }
.unit-head h2 { margin-bottom: .2em; }
.unit-head .meta { color: var(--ink2); font-weight: 600; margin-bottom: .4em; }
.unit-head p:last-child { margin-bottom: 0; }
.unit-points { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin: 12px 0 0; }
.unit-points div { background: var(--soft); border-radius: 12px; padding: 12px 16px; }
.unit-points h3 { font-size: 1rem; }
.unit-points ul { margin: 0; padding-inline-start: 1.2em; }
.empty-unit { color: var(--ink2); }
.unit-sessions h3 { margin: 16px 0 8px; font-size: 1.05rem; }
details.more { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 20px; margin-bottom: 12px; }
details.more > summary { cursor: pointer; font-weight: 700; font-size: 1.08rem; min-height: 46px; display: flex; align-items: center; }
details.more[open] { padding-bottom: 18px; }
details.more > .panel { border: 0; padding: 8px 0 0; }
.alert { border: 2px solid #b4532a; background: #fff6f0; border-radius: 14px; padding: 12px 18px; margin: 14px 0 0; }
.alert p { margin: 0; }
.alert details { margin-top: 6px; }
.alert summary { cursor: pointer; font-weight: 600; min-height: 40px; display: flex; align-items: center; color: #7a2e0c; }
.src-label { display: inline-block; background: #eef3ee; border: 1px solid #b9cdbb; color: #234d2e; border-radius: 8px; padding: 0 8px; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.src-label.added { background: #fff4e6; border-color: #e5b98a; color: #6b3a0c; }

/* بطاقة التمرين */
.ex { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 20px; margin-bottom: 16px; display: grid; gap: 4px 26px; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); grid-template-areas: "head head" "body fig"; }
.ex, .unit, .panel { scroll-margin-top: calc(var(--head-h, 130px) + 14px); }
.ex.done { border-color: #6aa27f; box-shadow: inset 0 0 0 1px #6aa27f; }
.ex-head { grid-area: head; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 10px; }
.ex-head .idx { color: var(--ink2); font-variant-numeric: tabular-nums; font-size: .95rem; }
.ex-head h3 { margin: 0; font-size: 1.28rem; }
.ex-head .tag { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font-size: .85rem; color: var(--ink2); }
.ex-fig { grid-area: fig; margin: 0; background: var(--soft); border-radius: 14px; padding: 8px 8px 6px; align-self: start; }
.ex-fig img { display: block; width: 100%; height: auto; aspect-ratio: 420 / 242; }
.ex-fig figcaption { font-size: .82rem; color: var(--ink2); text-align: center; }
.ex-body { grid-area: body; min-width: 0; }
.ex-use { margin: 0 0 .6em; }
.ex-use b { font-weight: 700; }
.dose { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 10px 0 12px; }
.dose div { padding: 8px 10px; border-inline-start: 1px solid var(--line); }
.dose div:first-child { border-inline-start: 0; padding-inline-start: 0; }
.dose dt { font-size: .82rem; color: var(--ink2); }
.dose dd { margin: 0; font-weight: 700; line-height: 1.5; }
.ex-start { margin: 0 0 .5em; }
.ex-steps { padding-inline-start: 1.3em; margin: 0 0 .8em; }
.ex-steps li { margin-bottom: .3em; }
.ex-alt { display: grid; gap: 6px; margin: 0 0 .6em; }
.ex-alt p { margin: 0; padding: 6px 12px; border-inline-start: 4px solid var(--line2); background: #faf8fa; border-radius: 8px; }
.ex-alt p.easy { border-color: var(--accent); background: #fff8f1; }
.ex-alt b { font-weight: 700; }
.ex-cue { color: var(--ink2); margin: 0 0 .6em; }
.ex-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.btn { font: inherit; font-size: .97rem; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 6px 18px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--soft); color: var(--ink); }
.btn-main { background: var(--accent); border-color: #c97a35; color: var(--accent-ink); font-weight: 700; }
.btn-main:hover { background: #ffc08a; }
.btn[aria-pressed="true"] { background: #e3f1e7; border-color: #6aa27f; color: #1f4d30; font-weight: 700; }
.btn-danger { border-color: #a23b2c; color: #8a2a1d; }
.timer { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 12px; background: #faf8fa; }
.timer output { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 3.2em; text-align: center; direction: ltr; }
.timer .btn { min-height: 40px; padding: 4px 12px; font-size: .9rem; }
.timer.end output { color: var(--ok); }
@media (max-width: 820px) {
  .ex { grid-template-columns: 1fr; grid-template-areas: "head" "fig" "body"; padding: 16px; }
  .ex-fig { max-width: 520px; width: 100%; justify-self: center; }
}
@media (max-width: 520px) {
  .dose { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dose div:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line); }
  .dose div:nth-child(4) { border-top: 1px solid var(--line); }
}

/* البطاقات العشر */
.dest { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.dest a { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; height: 100%; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.dest a:hover { border-color: var(--line2); box-shadow: 0 6px 18px rgba(73, 53, 75, .12); }
.dest .n { grid-row: span 2; align-self: start; background: var(--bar); color: var(--bar-ink); border-radius: 12px; padding: 4px 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dest h3 { margin: 0; font-size: 1.2rem; }
.dest p { margin: 0; color: var(--ink2); font-size: .97rem; }
.week-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: var(--bar); color: var(--bar-ink); border-radius: var(--radius); padding: 18px 22px; }
.week-link h2 { margin: 0; font-size: 1.3rem; }
.week-link p { margin: 0; opacity: .9; }
.links-inline { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0; list-style: none; }

/* المتابعة */
.track summary { cursor: pointer; font-weight: 700; font-size: 1.15rem; padding: 4px 0; min-height: 44px; }
.track[open] summary { margin-bottom: 10px; }
.track-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.track fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 0; min-width: 0; }
.track legend { font-weight: 700; padding: 0 6px; }
.field { display: grid; gap: 4px; margin-bottom: 10px; }
.field label, .field .lbl { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea { font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1px solid var(--line2); border-radius: 10px; padding: 8px 10px; min-height: 44px; width: 100%; }
.field textarea { min-height: 70px; }
.choices { display: grid; gap: 6px; }
.choices label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.choices input { width: 20px; height: 20px; min-height: 0; margin-top: 6px; flex: none; }
.log { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; font-size: .95rem; }
.log li { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: #faf8fa; border-radius: 10px; padding: 6px 10px; }
.log button { font: inherit; font-size: .85rem; background: none; border: 0; color: #8a2a1d; text-decoration: underline; cursor: pointer; min-height: 36px; }
.status { min-height: 1.6em; font-weight: 600; color: var(--ok); }
.status.err { color: #8a2a1d; }

/* التذييل */
.mv-foot { border-top: 1px solid var(--line); margin-top: 30px; padding: 22px 0 40px; color: var(--ink2); font-size: .95rem; }
.mv-foot nav { margin-bottom: 10px; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { .bf-head, .picker, .ex-tools, .track, bayt-global-search { display: none !important; } .js .unit[hidden] { display: block !important; } .ex { break-inside: avoid; } }
.refs li { overflow-wrap: anywhere; text-align: start; }


/* bf-ds v2 map: start — يولّده _unify/sync-ds.mjs؛ لا تعدّل هنا */
:root{--bg:var(--bf-bg);--ink:var(--bf-text);--ink2:var(--bf-text-2);--bar:var(--bf-movement);--bar-ink:#FFFFFF;--accent:var(--bf-primary);--accent-ink:#FFFFFF;--brand-bg:var(--bf-text);--ivory:var(--bf-bg);--terra:var(--bf-gold);--card:var(--bf-surface);--soft:var(--bf-movement-tint);--line:var(--bf-border);--line2:var(--bf-border-strong);--ok:var(--bf-success);--warn:var(--bf-warning);--radius:var(--bf-r-card);--font:var(--bf-font)}
/* bf-ds v2 map: end */
