/*!
 * strategies.html — «أكاديمية استراتيجيات الدخل» (academy landing)
 * Page-scoped styles only: tokens from style.css, no raw colours. Logical properties (RTL-first).
 *  1 Hero + strategy map   2 Jump nav   3 Learning path   4 Filters + grid   5 Compare table
 *  6 Debit vs credit + IV card   7 Picker   8 Sharia note   9 Before you start   10 Responsive
 */

/* ---------- 1 · hero ---------- */
.ahero .page-hero__grid { align-items: center; }
.ahero .page-hero__lead b { color: var(--text); font-weight: 600; }
.ahero__copy { min-width: 0; }
.ahero__ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--sp-6); }
.ahero__stats {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 0; margin: var(--sp-8) 0 0; padding: var(--sp-5) 0 0; list-style: none;
  border-top: 1px solid var(--border); max-width: 560px;
}
.ahero__stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-inline-end: 22px; margin-inline-end: 22px; border-inline-end: 1px solid var(--border); }
.ahero__stat:last-child { padding-inline-end: 0; margin-inline-end: 0; border-inline-end: 0; }
.ahero__stat-value { font-family: var(--font-head); font-size: 34px; font-weight: 800; line-height: 1.1; color: var(--text); align-self: flex-start; }
.ahero__stat-label { font-size: 13.5px; font-weight: 500; line-height: 1.45; color: var(--text-2); }
.ahero__stat-glyph { display: block; width: 76px; height: 37px; }
.ahero__stat-glyph .pf-glyph, .smap__glyph .pf-glyph, .lpath__glyph .pf-glyph, .prec__glyph .pf-glyph, .ptools__glyph .pf-glyph { width: 100%; height: 100%; max-width: none; }

/* strategy map: 13 live payoff glyphs (TNPayoff glyph mode) */
.smap {
  position: relative; padding: 16px; border-radius: 24px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 52%, transparent); box-shadow: var(--shadow);
}
html[data-theme="light"] .smap { background: color-mix(in srgb, var(--surface) 74%, transparent); }
.smap__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-inline: 2px; }
.smap__title { font-family: var(--font-head); font-size: 18px; font-weight: 700; line-height: 1.35; }
.smap__sub { margin-top: 2px; font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
.smap__legend { display: flex; flex: none; gap: 12px; padding-top: 4px; font-size: 12px; color: var(--text-3); }
.smap__key { display: inline-flex; align-items: center; gap: 6px; }
.smap__key::before { content: ""; width: 14px; height: 3px; border-radius: 2px; background: var(--pos); }
.smap__key--neg::before { background: var(--neg); }
.smap__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(92px, auto); gap: 8px; margin: 0; padding: 0; list-style: none; }
.smap__item { min-width: 0; }
.smap__item--lead { grid-column: span 2; grid-row: span 2; }
.smap__link {
  position: relative; display: flex; flex-direction: column; height: 100%; padding: 10px 10px 8px; border-radius: 16px;
  border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 84%, transparent); color: inherit; text-decoration: none;
  transition: transform var(--t-med) var(--ease), border-color var(--t-med) var(--ease), background-color var(--t-med);
}
.smap__link:hover { transform: translateY(-2px); background: var(--surface); border-color: color-mix(in srgb, var(--academy) 45%, var(--border)); }
.smap .smap__glyph { position: relative; display: block; flex: 1 1 auto; min-height: 40px; direction: ltr; }
.smap__glyph .pf-glyph { position: absolute; inset: 0; }
.smap .smap__glyph--icon { display: grid; place-items: center; color: var(--academy-ink); }
.smap__glyph--icon .icon { width: 30px; height: 30px; stroke-width: 1.6; }
.smap__name {
  margin-top: 6px; font-size: 12.5px; font-weight: 600; line-height: 1.4; color: var(--text-2);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.smap__link:hover .smap__name { color: var(--text); }
.smap__item--lead .smap__link {
  gap: 8px; padding: 14px 14px 12px;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--academy) 16%, transparent), transparent 62%), color-mix(in srgb, var(--surface) 90%, transparent);
  border-color: color-mix(in srgb, var(--academy) 30%, var(--border));
}
.smap__item--lead .start-here { align-self: flex-start; }
.smap__item--lead .smap__name { margin-top: 2px; font-family: var(--font-head); font-size: 21px; font-weight: 700; line-height: 1.35; color: var(--text); -webkit-line-clamp: 3; }
.smap__item--lead .smap__name small { display: block; margin-top: 2px; font-family: var(--font-body); font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.smap__item--lead .smap__glyph { min-height: 64px; }
.smap__metrics { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.smap__metrics b { margin-inline-start: 4px; font-weight: 700; color: var(--text); }
.smap__metrics b.pos { color: var(--pos); }

/* ---------- 2 · jump nav ---------- */
.jumpnav { margin-top: var(--sp-8); }
.jumpnav ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.jumpnav li { flex: none; }
.jumpnav a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 15px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-size: 14px; font-weight: 600; color: var(--text-2); text-decoration: none; white-space: nowrap;
  transition: color var(--t-fast), background-color var(--t-fast), border-color var(--t-fast);
}
.jumpnav a:hover { color: var(--text); background: var(--surface); border-color: var(--border-strong); }
.jumpnav .num { font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--text-3); }

/* ---------- 3 · learning path ---------- */
/* cards hang from the timeline at their natural height (the four-lesson spreads station is much longer than the rest) */
.lpath { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: start; gap: var(--gap); margin: 0; padding: 0; list-style: none; }
.lpath__step { display: flex; flex-direction: column; min-width: 0; }
.lpath__head { display: flex; align-items: center; height: 44px; margin-bottom: 14px; }
.lpath__node {
  position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.lpath__step:first-child .lpath__node { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.lpath__line {
  flex: 1; height: 2px; margin-inline: 8px calc(var(--gap) * -1); border-radius: 2px;
  background: linear-gradient(to left, color-mix(in srgb, var(--accent) 55%, transparent), var(--border-strong));
}
.lpath__step:last-child .lpath__line { margin-inline-end: 0; background: linear-gradient(to left, var(--border-strong), transparent); }
.lpath__card {
  flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 18px 16px 14px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.lpath__kicker { font-size: 12px; font-weight: 600; line-height: 1.5; color: var(--text-3); }
.lpath__title { font-family: var(--font-head); font-size: 18px; font-weight: 700; line-height: 1.4; }
.lpath__desc { font-size: 13.5px; line-height: 1.75; color: var(--text-2); }
.lpath__sub { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.lpath__lessons { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.lpath__desc + .lpath__lessons { margin-top: 4px; }
.lpath__lesson {
  display: flex; align-items: center; gap: 10px; min-height: 44px; margin-inline: -8px; padding: 6px 8px; border-radius: 12px;
  font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--text); text-decoration: none;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.lpath__lesson:hover { background: var(--accent-soft); color: var(--accent-ink); }
.lpath__lname { min-width: 0; }
.lpath__glyph { position: relative; flex: none; display: block; width: 44px; height: 26px; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); direction: ltr; }
.lpath__glyph .pf-glyph { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); }
.lpath__glyph--icon { display: grid; place-items: center; color: var(--accent-ink); }
.lpath__glyph--icon .icon { width: 16px; height: 16px; }

/* ---------- 4 · filters + strategy grid ---------- */
.sfilter { margin-bottom: var(--sp-6); padding: 16px 18px 12px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.sfilter__groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; }
.sfilter__group { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sfilter__label { flex: none; width: 58px; font-size: 13px; font-weight: 700; color: var(--text-3); }
.sfilter__chips { flex: 1; min-width: 0; gap: 6px; }
.sfilter .fchip { min-height: 44px; padding: 0 14px; gap: 7px; }
.sfilter .fchip .icon { width: 16px; height: 16px; }
.fchip[aria-pressed="false"] .icon { color: var(--text-3); }
/* no match with the other filters: quieter, but text keeps AA contrast (no opacity) */
.fchip.is-zero { color: var(--text-3); border-style: dashed; background: transparent; }
.fchip.is-zero .fchip__count { background: transparent; color: var(--text-3); }
.fchip.level .bars { margin-inline-end: 1px; }
.sfilter__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 44px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.sfilter__status { font-size: 14px; line-height: 1.6; color: var(--text-2); }
.sfilter__status b { color: var(--text); font-weight: 700; }

.sgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.sgrid .scard > .sthumb { flex: none; height: 150px; min-height: 0; max-height: none; }
.sgrid .scard__body { flex: 1 1 auto; }
.sgrid .scard__title { font-size: 17.5px; }
/* lesson number, as in each lesson's kicker («الدرس 3 من 13») */
.scard__no { margin-bottom: -6px; font-size: 12.5px; font-weight: 700; line-height: 1.5; color: var(--accent-ink, var(--text-3)); }
.scard__risk { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--border); }
.scard__risk > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.scard__risk dt { font-size: 12px; line-height: 1.5; color: var(--text-3); }
.scard__risk dd { margin: 0; font-size: 13.5px; font-weight: 700; line-height: 1.5; color: var(--text); }
.scard__risk dd.is-high { color: var(--warn); }
.scard__risk dd.is-open { color: var(--pos); }
.sgrid .scard.is-entering { animation: ac-in .42s var(--ease) both; }
@keyframes ac-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.sgrid__empty { margin-top: var(--gap); }
/* "next step" tiles that complete the last row when nothing is filtered (13 cards + 3 / + 2 / + 1) */
.sfill { display: flex; flex-direction: column; gap: 10px; padding: 22px 20px 18px; color: inherit; text-decoration: none; }
.sfill--alt { background: transparent; border-style: dashed; border-color: var(--border-strong); box-shadow: none; }
.sfill--alt:hover { background: var(--surface); }
.sfill__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); }
.sfill--guide .sfill__icon { background: var(--surface); }
.sfill__icon .icon { width: 22px; height: 22px; }
.sfill__title { margin-top: 6px; font-family: var(--font-head); font-size: 18px; font-weight: 700; line-height: 1.45; color: var(--text); }
.sfill__text { font-size: 14px; line-height: 1.8; color: var(--text-2); }
.sfill .link-arrow { margin-top: auto; min-height: 44px; }
.sfill__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.sfill__mini { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-2); text-align: center; }
.sfill__glyph { position: relative; display: block; height: 56px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; direction: ltr; }
.sfill__glyph--wide { height: 84px; margin-top: 4px; }
.sfill__glyph .pf-glyph { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); max-width: none; }
.sgrid.is-filtered .sfill { display: none; }
.sgrid__empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }

/* ---------- 5 · compare table ---------- */
.cmp__table th, .cmp__table td { vertical-align: top; }
.cmp__table thead th { white-space: normal; line-height: 1.45; }
.cmp__table tbody th[scope="row"] { min-width: 170px; }
.cmp__table td { min-width: 104px; }
.cmp__table td b { font-weight: 700; color: var(--text); }
.cmp__table td small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.55; color: var(--text-3); }
.cmp__table td small.num, .cmp__table td small .num { color: var(--text-2); }
.cmp__name { display: inline-block; padding-block: 11px; margin-block: -11px; font-weight: 700; color: var(--text); text-decoration: none; }
.cmp__name:hover { color: var(--academy-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; }
.cmp__group > th { padding: 9px 16px; background: var(--bg-soft); font-size: 13px; font-weight: 700; color: var(--text-2); text-align: start; }
.cmp__group-label { position: sticky; inset-inline-start: 16px; display: inline-flex; align-items: center; gap: 8px; }
.cmp__group-step { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 9px; border-radius: var(--radius-pill); background: var(--academy-soft); color: var(--academy-ink); font-size: 12px; font-weight: 700; }
.cmp__view { display: inline-flex; align-items: flex-start; gap: 6px; color: var(--text); }
.cmp__view .icon { flex: none; width: 16px; height: 16px; margin-top: 4px; color: var(--text-3); }
.cmp__view--up .icon, .cmp__view--mild .icon { color: var(--pos); }
.cmp__view--down .icon { color: var(--neg); }
.cmp__flow { font-weight: 700; color: var(--text); }
.cmp__flow--debit { color: var(--us-ink); }
.cmp__flow--credit { color: var(--saudi-ink); }
.cmp__high { color: var(--warn) !important; }
.cmp__open { color: var(--pos) !important; }
.cmp__cap { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.cmp__cap i { display: inline-flex; font-style: normal; font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: .5px; color: var(--text); direction: ltr; }
.cmp__cap i b { font-weight: 600; }
.cmp__cap[data-cap="1"] i b:nth-child(n+2), .cmp__cap[data-cap="2"] i b:nth-child(3) { opacity: .28; }
.cmp__iv { font-weight: 600; color: var(--text); }
.cmp__table .badge { white-space: nowrap; }
.cmp__note { display: flex; gap: 10px; max-width: 110ch; margin-top: 12px; font-size: 13px; line-height: 1.8; color: var(--text-3); }
.cmp__note .icon { flex: none; margin-top: 5px; }
.cmp__hint { display: none; }

/* ---------- 6 · debit vs credit ---------- */
.dc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.dc__card { display: flex; flex-direction: column; gap: 16px; padding: clamp(18px, 2vw, 26px); }
.dc__head { display: grid; justify-items: start; gap: 6px; }
.dc__title { margin-top: 4px; font-family: var(--font-head); font-size: clamp(20px, .6vw + 16px, 26px); font-weight: 700; line-height: 1.4; }
.dc__sub { font-size: 14px; color: var(--text-2); }
.dc__figure { margin: 0; }
.dc__art { padding: 14px 12px 8px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.dc__art svg { display: block; width: 100%; max-width: 460px; height: auto; margin-inline: auto; }
.dc__art .ill-text { font-size: 15px; }
.dc__kline { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 2 3; opacity: .8; }
.dc__hint { color: var(--text-3); stroke-width: 1.5; }
.dc__bracket { color: var(--text-3); stroke-width: 1.5; }
.dc__glass { color: var(--text-2); stroke-width: 1.6; }
.dc__flowline { stroke-width: 2.5; stroke-linecap: round; }
.dc__figure .figure__caption { margin-top: 8px; }
.dc__facts { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.dc__facts li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; font-size: 15px; line-height: 1.75; color: var(--text-2); }
.dc__facts .icon { width: 20px; height: 20px; margin-top: 4px; color: var(--text-3); }
.dc__facts b { color: var(--text); font-weight: 700; }
.dc__eq { white-space: nowrap; }
.dc__more { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); font-size: 14px; line-height: 1.9; color: var(--text-3); }
.dc__row { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: var(--gap); align-items: start; margin-top: var(--gap); }
.dc__table caption { padding: 16px 18px 6px; font-family: var(--font-head); font-size: 16px; }
.dc__table td { color: var(--text-2); }
.dc__table td b { color: var(--text); }
.dc__table td b.pos { color: var(--pos); }
.dc__table td b.neg { color: var(--neg); }
.dc__table td small { margin-inline-start: 6px; font-size: 12.5px; color: var(--text-3); }
.dc__table-note { padding: 12px 18px 16px; border-top: 1px solid var(--border); font-size: 13px; line-height: 1.8; color: var(--text-3); }

/* live IV environment card (VIX from TN_MARKET) */
.ivcard { display: flex; flex-direction: column; gap: 14px; }
.ivcard__head { display: grid; gap: 2px; }
.ivcard__title .icon { color: var(--accent); }
.ivcard__stamp { min-height: 19px; }
.ivcard__body { min-height: 268px; }
.ivcard__skel { display: grid; gap: 12px; }
.ivcard__skel-a { width: 46%; height: 30px; }
.ivcard__skel-b { height: 52px; }
.ivcard__skel-c { width: 70%; }
.ivq { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 4px 16px; }
.ivq__id { display: grid; gap: 4px; }
.ivq__name { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--text-3); }
.ivq__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ivq__px { font-family: var(--font-head); font-size: 34px; font-weight: 700; line-height: 1.1; color: var(--text); }
.ivq__spark { position: relative; height: 52px; min-width: 0; }
.ivq__spark .spark { position: absolute; inset: 0; }
.ivrank { margin-top: 18px; }
.ivrank__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.ivrank__top b { font-weight: 700; color: var(--text); }
.ivrank__top .ivrank__pct { font-family: var(--font-head); font-size: 22px; line-height: 1.2; }
.ivrank__bar { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; height: 10px; margin-top: 10px; direction: ltr; }
.ivrank__bar > span { border-radius: 5px; background: var(--surface-3); }
.ivrank__bar > span.is-on { background: color-mix(in srgb, var(--accent) 50%, var(--surface-3)); }
.ivrank__mark { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--surface); border: 3px solid var(--text); box-shadow: var(--shadow-sm); }
.ivrank__labels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 7px; font-size: 12px; line-height: 1.4; color: var(--text-3); text-align: center; direction: ltr; }
.ivrank__labels span { direction: rtl; }
.ivrank__labels .is-on { font-weight: 700; color: var(--text); }
.ivrank__ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 2px; font-size: 12px; color: var(--text-3); direction: ltr; }
.ivrank__ends > span { direction: rtl; }
.ivcard__read { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; line-height: 1.8; color: var(--text-2); }
.ivcard__read b { color: var(--text); }
.ivcard__note { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; line-height: 1.8; color: var(--text-3); }
.ivcard__formula { display: block; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border-strong); color: var(--text-2); }
.ivcard .state { padding: 26px 16px; }
/* if the page script never runs (blocked / failed), the skeleton gives way to a designed message after 8 s;
   on success the script replaces #iv-body, so this never shows */
.ivcard__body { position: relative; }
.ivcard__late { position: absolute; inset: 0; align-content: center; visibility: hidden; opacity: 0; animation: iv-late .35s var(--ease) 8s forwards; }
.ivcard__skel { animation: iv-skel-out .35s var(--ease) 8s forwards; }
@keyframes iv-late { to { visibility: visible; opacity: 1; } }
@keyframes iv-skel-out { to { opacity: 0; } }

/* ---------- 7 · picker ---------- */
.picker { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--sp-6); align-items: start; }
.picker__form { display: grid; gap: 12px; min-width: 0; }
.pq { min-width: 0; margin: 0; padding: 16px 18px 18px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.pq__legend { float: inline-start; display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 12px; padding: 0; font-family: var(--font-head); font-size: 17px; font-weight: 700; line-height: 1.45; color: var(--text); }
.pq__num { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.pq__opts { clear: both; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.popt { position: relative; display: block; min-width: 0; }
.popt input { position: absolute; inset-inline-start: 12px; top: 12px; width: 1px; height: 1px; margin: 0; opacity: 0; }
.popt__box {
  position: relative; display: flex; align-items: center; gap: 10px; height: 100%; min-height: 64px; padding: 10px 12px; padding-inline-end: 34px;
  border-radius: 14px; border: 1.5px solid var(--border-strong); background: var(--surface-2); cursor: pointer;
  transition: border-color var(--t-fast), background-color var(--t-fast), box-shadow var(--t-fast);
}
.popt__box::after {
  content: ""; position: absolute; top: 10px; inset-inline-end: 10px; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--border-strong); background: var(--surface); transition: background-color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.popt__box > .icon { flex: none; width: 22px; height: 22px; color: var(--text-3); }
.popt__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.popt__text b { font-size: 15px; font-weight: 700; color: var(--text); }
.popt__text small { font-size: 12.5px; color: var(--text-3); }
.popt:hover .popt__box { border-color: var(--text-3); }
.popt input:checked + .popt__box { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.popt input:checked + .popt__box::after { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3.5px var(--surface); }
.popt input:checked + .popt__box > .icon { color: var(--accent-ink); }
.popt input:focus-visible + .popt__box { outline: 2px solid var(--focus); outline-offset: 2px; }

.picker__out { position: sticky; top: calc(var(--header-h) + 16px); min-width: 0; padding: 18px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.picker__out-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.picker__out-title { font-family: var(--font-head); font-size: 19px; font-weight: 700; line-height: 1.4; }
.picker__progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 12px; }
.picker__progress i { height: 4px; border-radius: 4px; background: var(--surface-3); transition: background-color var(--t-med) var(--ease); }
.picker__progress i.is-on { background: var(--accent); }
.picker__status { margin-top: 10px; font-size: 14px; line-height: 1.7; color: var(--text-2); }
.picker__status b { color: var(--text); }
.picker__empty { display: grid; justify-items: center; gap: 12px; margin-top: 14px; padding: 22px 16px; border-radius: 14px; border: 1px dashed var(--border-strong); text-align: center; }
.picker__empty p { max-width: 36ch; font-size: 14px; line-height: 1.8; color: var(--text-3); }
.picker__empty-art { display: flex; gap: 8px; }
.picker__empty-art span { width: 54px; height: 38px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); position: relative; overflow: hidden; }
.picker__empty-art span::after { content: ""; position: absolute; inset-inline: 8px; top: 50%; height: 2px; border-radius: 2px; background: var(--border-strong); }
.picker__context { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--info-soft); border: 1px solid color-mix(in srgb, var(--info) 25%, transparent); font-size: 13.5px; line-height: 1.75; color: var(--text-2); }
.picker__list { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.prec {
  position: relative; display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border); transition: border-color var(--t-fast), transform var(--t-med) var(--ease);
}
.prec:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.prec.is-entering { animation: ac-in .4s var(--ease) both; }
.prec__glyph { position: relative; display: block; height: 60px; border-radius: 10px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); direction: ltr; }
.prec__glyph .pf-glyph { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }
.prec__glyph--icon { display: grid; place-items: center; color: var(--accent-ink); }
.prec__glyph--icon .icon { width: 26px; height: 26px; }
.prec__rank { position: absolute; top: -7px; inset-inline-start: -7px; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-family: var(--font-mono); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; box-shadow: var(--shadow-sm); }
.prec__body { display: grid; gap: 6px; min-width: 0; }
.prec__title { font-family: var(--font-head); font-size: 16px; font-weight: 700; line-height: 1.45; }
.prec__title a { color: var(--text); text-decoration: none; }
.prec__title a:hover { color: var(--accent-ink); }
.prec__why { font-size: 13.5px; line-height: 1.75; color: var(--text-2); }
.prec__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.picker__foot { margin-top: 12px; font-size: 12.5px; line-height: 1.6; color: var(--text-3); }

/* ---------- 8 · sharia note ---------- */
.sharia { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.sharia__callout { margin: 0; padding: 22px 24px; }
.sharia__callout .callout__body { font-size: 16px; line-height: 1.95; }
.sharia__callout .callout__body > * + * { margin-top: .8em; }
.sharia__side { padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.sharia__label { font-size: 13px; font-weight: 700; color: var(--text-3); }
.sharia__sources { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.sharia__sources a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: border-color var(--t-fast), background-color var(--t-fast);
}
.sharia__sources a:hover { border-color: var(--border-strong); background: var(--surface-3); }
.sharia__sources b { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.5; }
.sharia__sources small { display: block; font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
.sharia__sources .icon { flex: none; color: var(--text-3); }
.sharia__why { margin-top: 14px; font-size: 13.5px; line-height: 1.8; color: var(--text-2); }
.sharia__copy { min-height: 44px; margin-top: 12px; }

/* ---------- 9 · before you start ---------- */
.prules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin: 0; padding: 0; list-style: none; counter-reset: prule; }
.prule { counter-increment: prule; display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.prule::after { content: counter(prule, decimal-leading-zero); position: absolute; top: 20px; inset-inline-end: 20px; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.prule__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--academy-soft); color: var(--academy-ink); }
.prule__icon .icon { width: 22px; height: 22px; }
.prule__title { margin-top: 4px; font-family: var(--font-head); font-size: 17.5px; font-weight: 700; line-height: 1.45; }
.prule__text { font-size: 14.5px; line-height: 1.8; color: var(--text-2); }
.prules__src { margin-top: 12px; font-size: 12.5px; line-height: 1.7; color: var(--text-3); }
.ptools { margin-top: var(--sp-10); }
.ptools__title { margin-bottom: 14px; font-family: var(--font-head); font-size: 20px; font-weight: 700; line-height: 1.4; }
.ptools .ttile__art { position: relative; }
.ptools__glyph { position: absolute; inset: 0; display: block; }
/* the yield ring shows a worked example, labelled as one */
.ptools__yield .ttile__art-label { direction: rtl; inset-inline: 0 auto; flex-direction: column; align-items: flex-start; justify-content: center; line-height: 1.15; }
.ptools__eg { font-family: var(--font-body); font-size: 12px; font-weight: 600; color: var(--text-3); }

/* payoff.js missing: icons instead of empty glyph / thumbnail frames (set by the page script) */
.glyph-fallback, .sthumb--fallback { display: grid; place-items: center; color: var(--text-3); }
.glyph-fallback .icon { width: 20px; height: 20px; }
.sthumb--fallback > .icon { position: static; width: 30px; height: 30px; }

/* ---------- 10 · responsive ---------- */
@media (max-width: 1279px) {
  .cmp { overflow-x: auto; overscroll-behavior-x: contain; }
  .cmp__table th, .cmp__table td { padding-inline: 12px; }
  .cmp__table td { min-width: 0; }
  .cmp__table tbody th[scope="row"] { min-width: 140px; }
  .cmp__table thead th { position: static; }
  .lpath { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--sp-6); }
  .lpath__step:nth-child(3n) .lpath__line { margin-inline-end: 0; background: linear-gradient(to left, var(--border-strong), transparent); }
  .sgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sfill--tool { display: none; }
  .prules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1099px) {
  .ahero__aside { margin-top: var(--sp-2); }
  .jumpnav ul { gap: 6px; }
  .jumpnav a { gap: 6px; padding: 0 12px; }
  .smap__grid { grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-rows: minmax(88px, auto); }
  .dc__row, .picker, .sharia { grid-template-columns: minmax(0, 1fr); }
  .picker__out { position: static; }
  .sfilter__groups { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 999px) {
  .sgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sfill--basics { display: none; }
  .dc { grid-template-columns: minmax(0, 1fr); }
  .dc__art svg { max-width: 420px; }
}
@media (max-width: 899px) {
  /* strategy map becomes a swipe rail (tablet portrait + phones) */
  .smap { padding: 12px 0; }
  .smap__head { padding-inline: 14px; margin-bottom: 10px; }
  .smap__grid {
    display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
    padding: 6px 12px; margin-block: -4px; scroll-padding-inline: 12px; /* 6px: room for focus rings */
  }
  .smap__grid::-webkit-scrollbar { display: none; }
  .smap__item { flex: 0 0 116px; scroll-snap-align: start; }
  .smap__item--lead { flex-basis: 240px; }
  .smap__link { min-height: 108px; }
  .smap__item:not(.smap__item--lead) .smap__glyph { flex: 0 0 auto; height: 64px; margin-block: auto; }
  .smap__item--lead .smap__link { gap: 6px; padding: 12px; }
  .smap__item--lead .smap__glyph { min-height: 46px; }
  .cmp .table { min-width: 960px; }
  .cmp__hint { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 13px; line-height: 1.5; color: var(--text-3); }
  /* balanced columns while scrolling: the outlook may wrap, the small figures stay on one line */
  .cmp__table td:nth-child(2) { min-width: 150px; }
  .cmp__table td small { white-space: nowrap; }
  .cmp__table thead th:first-child, .cmp__table tbody th[scope="row"] { position: sticky; inset-inline-start: 0; z-index: 2; background: var(--surface); box-shadow: inset 1px 0 0 var(--border); }
  .cmp__table thead th:first-child { z-index: 3; background: var(--surface-2); }
  .cmp__table tbody tr:hover th[scope="row"] { background: var(--surface-2); }
}
@media (max-width: 699px) {
  /* hero: compact, CTAs first, map becomes a swipe rail */
  .ahero .ahero__title { font-size: clamp(29px, 8.2vw, 36px); line-height: 1.4; }
  .ahero__ctas .btn { flex: 1 1 auto; padding-inline: 16px; }
  .ahero__ctas .btn--lg { --btn-h: 52px; font-size: 15.5px; }
  .ahero__stats { margin-top: var(--sp-6); gap: 0; max-width: none; flex-wrap: nowrap; }
  .ahero__stat { flex: 1 1 0; padding-inline-end: 12px; margin-inline-end: 12px; }
  .ahero__stat-value { font-size: 26px; }
  .ahero__stat-label { font-size: 12.5px; }
  .ahero__stat-glyph { width: 58px; height: 29px; }
  .smap { border-radius: 20px; }
  .smap__title { font-size: 16.5px; }
  .smap__item--lead .smap__name { font-size: 18px; }
  .jumpnav { margin-top: var(--sp-6); }
  .jumpnav ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); margin-block: -5px; padding-block: 5px; }
  .jumpnav ul::-webkit-scrollbar { display: none; }

  /* path: vertical stepper */
  .lpath { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .lpath__step { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; }
  .lpath__head { flex-direction: column; height: auto; margin: 0; }
  .lpath__line, .lpath__step:nth-child(3n) .lpath__line { flex: 1; width: 2px; height: auto; min-height: 12px; margin: 6px 0 0; background: linear-gradient(to bottom, color-mix(in srgb, var(--accent) 55%, transparent), var(--border-strong)); }
  .lpath__step:last-child .lpath__line { display: none; }
  .lpath__card { margin-bottom: 12px; padding: 12px 14px 10px; gap: 6px; }
  .lpath__kicker { display: none; }
  .lpath__title { font-size: 17px; }
  .lpath__desc { font-size: 13px; line-height: 1.7; }
  .lpath__lessons { display: flex; flex-wrap: wrap; gap: 6px; }
  .lpath__lesson { margin: 0; padding: 4px 12px 4px 6px; border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; }
  .lpath__glyph { width: 36px; height: 24px; border-radius: 999px; }

  /* filters: one swipe row per group */
  .sfilter { padding: 12px 12px 8px; }
  .sfilter__groups { gap: 8px; }
  .sfilter__label { width: 52px; font-size: 12.5px; }
  .sfilter__chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-block: -5px; margin-inline: -5px -12px; padding-block: 5px; padding-inline: 5px 24px; /* room for the focus ring inside the scroller */
    /* soft edge where the row continues (the mask only uses alpha) */
    -webkit-mask-image: linear-gradient(to right, transparent, var(--text) 26px); mask-image: linear-gradient(to right, transparent, var(--text) 26px);
  }
  .sfilter__chips::-webkit-scrollbar { display: none; }
  .sfilter .fchip { flex: none; padding: 0 12px; font-size: 13.5px; }

  /* strategy cards: compact rows (text first, thumbnail at the end) */
  .sgrid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .sgrid .scard { display: grid; grid-template-columns: minmax(0, 1fr) 126px; grid-template-areas: "body thumb"; gap: 12px; padding: 12px; }
  .sgrid .scard > .sthumb { grid-area: thumb; height: auto; min-height: 124px; border-radius: 12px; }
  .sgrid .scard__body { grid-area: body; gap: 8px; padding: 2px 0 0; }
  .sgrid .scard__title { font-size: 16.5px; }
  .sgrid .scard__en { display: none; }
  .sgrid .scard__desc { display: none; }
  .sgrid .scard__badges { gap: 4px; }
  .sgrid .scard__badges .badge { min-height: 24px; padding: 1px 7px; }
  .sgrid .scard .wheel { padding: 6px 4px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; justify-items: center; gap: 4px; }
  .sgrid .scard .wheel__node { width: 40px; height: 40px; font-size: 12.5px; }
  .sgrid .scard .wheel__mid { gap: 2px; }
  .sgrid .scard .wheel__arrow > span { display: none; }
  .sgrid .scard .wheel__arrow svg { width: 40px; transform: rotate(-90deg); }
  .sgrid .scard .wheel__arrow--back svg { transform: rotate(90deg); }

  .cmp .table { min-width: 900px; }
  .cmp__table tbody th[scope="row"] { min-width: 132px; max-width: 150px; white-space: normal; }
  .dc__card { padding: 16px 14px; }
  .dc__art { padding: 10px 4px 6px; }
  .dc__facts li { font-size: 14.5px; }
  .dc__table caption { padding: 14px 14px 4px; font-size: 15px; }
  /* the two examples fit the phone width (no sideways scroll): cells may wrap */
  .dc__table .table th, .dc__table .table td { padding: 10px; white-space: normal; }
  .dc__table .table thead th { font-size: 12px; line-height: 1.5; }
  .dc__table .table tbody th { width: 31%; font-size: 13.5px; line-height: 1.5; }
  .dc__table td small { display: block; margin: 2px 0 0; }

  .ivq__px { font-size: 30px; }
  .pq { padding: 14px 12px 14px; }
  .pq__legend { font-size: 16px; }
  .pq__opts { gap: 6px; }
  .popt__box { flex-direction: column; justify-content: center; gap: 6px; min-height: 82px; padding: 12px 6px 10px; text-align: center; }
  .popt__box::after { top: 7px; inset-inline-end: 7px; width: 14px; height: 14px; }
  .popt__box > .icon { width: 20px; height: 20px; }
  .popt__text b { font-size: 14px; line-height: 1.35; }
  .popt__text small { display: none; }
  .picker__out { padding: 14px; }
  .prec { grid-template-columns: 64px minmax(0, 1fr); padding: 10px; }
  .prec__glyph { height: 52px; }
  .sharia__callout { padding: 16px; }
  .sharia__callout .callout__body { font-size: 15.5px; line-height: 1.9; }
  .prules { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .prule { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; padding: 16px; }
  .prule__icon { grid-row: span 2; width: 44px; height: 44px; }
  .prule__title { margin-top: 0; padding-inline-end: 24px; font-size: 16.5px; }
  .prule__text { font-size: 14px; }
  .prule::after { top: 16px; inset-inline-end: 16px; }
  .ptools .ttile:first-child { grid-column: span 2; }
  .ptools .ttile:first-child .ttile__desc { display: block; font-size: 13.5px; }
}
@media (max-width: 380px) {
  .ahero__stat { padding-inline-end: 10px; margin-inline-end: 10px; }
  .ahero__stat-value { font-size: 24px; }
  .sgrid .scard { grid-template-columns: minmax(0, 1fr) 112px; }
}
@media (prefers-reduced-motion: reduce) {
  .sgrid .scard.is-entering, .prec.is-entering { animation: none; }
}
@media print {
  .jumpnav, .sfilter, .picker, .smap { display: none !important; }
}
