/* موسوعة التمويلات — تطبيق الموبايل. تصميم مستوحى من iOS: خط النظام، بطاقات زجاجية، تباين هادئ. */
:root {
  --bg: #f2f2f7;
  --bg-grad: radial-gradient(120% 70% at 85% -10%, #dff1f3 0%, rgba(223,241,243,0) 60%),
             radial-gradient(90% 60% at 0% 0%, #eef0fb 0%, rgba(238,240,251,0) 55%), #f2f2f7;
  --card: rgba(255,255,255,.78);
  --card-solid: #ffffff;
  --glass-border: rgba(255,255,255,.65);
  --hair: rgba(60,60,67,.14);
  --ink: #0b0b0f;
  --ink-2: rgba(60,60,67,.72);
  --ink-3: rgba(60,60,67,.48);
  --tint: #0b7a86;
  --tint-press: #08646e;
  --tint-soft: rgba(11,122,134,.12);
  --amber: #a15c00;
  --amber-soft: rgba(255,159,10,.14);
  --violet: #5e47c9;
  --violet-soft: rgba(94,71,201,.12);
  --field: rgba(118,118,128,.12);
  --shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 8px 30px rgba(15,30,40,.07), 0 1px 3px rgba(15,30,40,.05);
  --radius: 22px;
  --font: -apple-system, "SF Arabic", "SF Pro Text", "IBM Plex Sans Arabic", "Segoe UI", "Noto Sans Arabic", Arial, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000;
    --bg-grad: radial-gradient(120% 70% at 85% -10%, #062a2f 0%, rgba(6,42,47,0) 60%),
               radial-gradient(90% 60% at 0% 0%, #13132b 0%, rgba(19,19,43,0) 55%), #000;
    --card: rgba(28,28,30,.72);
    --card-solid: #1c1c1e;
    --glass-border: rgba(255,255,255,.08);
    --hair: rgba(84,84,88,.5);
    --ink: #f5f5f7;
    --ink-2: rgba(235,235,245,.7);
    --ink-3: rgba(235,235,245,.42);
    --tint: #3fc1cc;
    --tint-press: #2aa9b4;
    --tint-soft: rgba(63,193,204,.16);
    --amber: #ffb340;
    --amber-soft: rgba(255,179,64,.16);
    --violet: #a493ff;
    --violet-soft: rgba(164,147,255,.16);
    --field: rgba(118,118,128,.24);
    --shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 10px 30px rgba(0,0,0,.45);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); background-image: var(--bg-grad); background-attachment: fixed;
  color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
.app { max-width: 640px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }

/* top bar */
.bar {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: calc(env(safe-area-inset-top) + 8px) 16px 8px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--tint); font-size: 17px; min-height: 44px; justify-self: start; }
.back svg { width: 22px; height: 22px; }
.back:active { opacity: .5; }
.dots { display: flex; gap: 6px; justify-self: center; }
.dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--hair); transition: all .35s var(--ease); }
.dots i.on { background: var(--tint); width: 20px; }
.dots i.done { background: color-mix(in srgb, var(--tint) 45%, transparent); }
.bar-end { justify-self: end; }
.link { color: var(--tint); font-size: 16px; min-height: 44px; display: inline-flex; align-items: center; }
.link:active { opacity: .5; }

/* screens */
.screen { flex: 1; padding: 4px 16px calc(180px + env(safe-area-inset-bottom)); }
.enter { animation: enter .42s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.enter-back { animation: enterb .42s var(--ease) both; }
@keyframes enterb { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .enter, .enter-back { animation: none; } }

.eyebrow { color: var(--tint); font-size: 13px; font-weight: 600; letter-spacing: .02em; margin: 6px 4px 0; }
h1 { font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; margin: 2px 4px 6px; }
.lead { color: var(--ink-2); font-size: 16px; margin: 0 4px 16px; }

/* search */
.search {
  position: sticky; top: calc(env(safe-area-inset-top) + 60px); z-index: 10; display: flex; align-items: center; gap: 8px;
  background: var(--field); border-radius: 12px; padding: 0 12px; height: 44px; margin-bottom: 14px;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.search svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.search input { flex: 1; border: 0; background: none; outline: none; font: inherit; color: var(--ink); height: 100%; min-width: 0; }
.search input::placeholder { color: var(--ink-3); }
.search .clear { width: 28px; height: 28px; border-radius: 99px; color: var(--ink-3); display: none; align-items: center; justify-content: center; }
.search.has .clear { display: inline-flex; }

/* grouped lists */
.section-h { position: sticky; top: calc(env(safe-area-inset-top) + 112px); z-index: 5; font-size: 13px; font-weight: 600;
  color: var(--ink-2); padding: 14px 8px 6px; }
.group { background: var(--card); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow);
  -webkit-backdrop-filter: saturate(160%) blur(24px); backdrop-filter: saturate(160%) blur(24px); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: right; padding: 13px 16px; min-height: 56px; position: relative;
  transition: background .2s; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 0; right: 16px; height: 1px; background: var(--hair); transform: scaleY(.6); }
.row:active { background: var(--tint-soft); }
.row .txt { flex: 1; min-width: 0; }
.row .t, .row .s, .row .why { display: block; }
.search input::-webkit-search-cancel-button, .search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.row .t { font-size: 17px; font-weight: 500; overflow-wrap: anywhere; }
.row .s { font-size: 14px; color: var(--ink-2); margin-top: 1px; }
.row .why { font-size: 13px; color: var(--tint); margin-top: 2px; }
.chev { width: 14px; height: 14px; color: var(--ink-3); flex: none; transform: scaleX(-1); }
.empty { text-align: center; color: var(--ink-2); padding: 40px 16px; }

/* funding cards */
.fund { display: flex; gap: 14px; width: 100%; text-align: right; padding: 16px; margin-bottom: 10px;
  background: var(--card); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow);
  -webkit-backdrop-filter: saturate(160%) blur(24px); backdrop-filter: saturate(160%) blur(24px);
  transition: transform .18s var(--ease), box-shadow .25s, border-color .25s; }
.fund:active { transform: scale(.985); }
.fund.sel { border-color: color-mix(in srgb, var(--tint) 55%, transparent); box-shadow: 0 0 0 3px var(--tint-soft), var(--shadow); }
.check { width: 26px; height: 26px; flex: none; border-radius: 99px; border: 2px solid var(--hair); margin-top: 2px;
  display: grid; place-items: center; transition: all .22s var(--ease); }
.check svg { width: 15px; height: 15px; color: #fff; opacity: 0; transform: scale(.4); transition: all .22s var(--ease); }
.sel .check { background: var(--tint); border-color: var(--tint); }
.sel .check svg { opacity: 1; transform: none; }
.fund .body { flex: 1; min-width: 0; }
.fund .yr { font-size: 13px; font-weight: 600; color: var(--tint); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; display: inline-block; }
.fund .donor { font-size: 17px; font-weight: 600; margin-top: 1px; overflow-wrap: anywhere; }
.fund .ttl { font-size: 15px; color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }
.amts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.amt { font-size: 15px; font-weight: 600; background: var(--field); border-radius: 10px; padding: 3px 10px; direction: ltr; unicode-bidi: isolate;
  font-variant-numeric: tabular-nums; }
.amt small { font-weight: 500; color: var(--ink-2); }
.na { font-size: 14px; color: var(--ink-3); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.badge { font-size: 12px; font-weight: 600; border-radius: 99px; padding: 2px 9px; background: var(--field); color: var(--ink-2); }
.badge.arch { background: var(--amber-soft); color: var(--amber); }
.badge.res { background: var(--violet-soft); color: var(--violet); }
.note { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.fold { width: 100%; text-align: center; color: var(--tint); font-size: 16px; padding: 14px; min-height: 48px; margin: 6px 0 10px; border-radius: 14px; }
.fold:active { background: var(--tint-soft); }

/* authority choice */
.choice .row { min-height: 64px; }
.radio { width: 24px; height: 24px; border-radius: 99px; border: 2px solid var(--hair); flex: none; display: grid; place-items: center; transition: all .2s; }
.radio::after { content: ""; width: 12px; height: 12px; border-radius: 99px; background: var(--tint); transform: scale(0); transition: transform .22s var(--ease); }
.row.on .radio { border-color: var(--tint); }
.row.on .radio::after { transform: scale(1); }

/* summary */
.summary { padding: 20px; }
.summary .k { font-size: 13px; color: var(--ink-2); }
.summary .v { font-size: 19px; font-weight: 600; margin: 2px 0 14px; overflow-wrap: anywhere; }
.summary .v:last-child { margin-bottom: 0; }
.hint { color: var(--ink-2); font-size: 14px; text-align: center; margin: 16px 8px 0; }
.done-mark { width: 72px; height: 72px; border-radius: 99px; margin: 18px auto 8px; display: grid; place-items: center;
  background: var(--tint-soft); color: var(--tint); animation: pop .5s var(--ease) both; }
.done-mark svg { width: 36px; height: 36px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.center { text-align: center; }

/* bottom call to action */
.cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 55%, color-mix(in srgb, var(--bg) 0%, transparent)); }
.cta .primary { display: block; width: 100%; max-width: 608px; margin: 0 auto; }
.primary { background: var(--tint); color: #fff; font-size: 17px; font-weight: 600; min-height: 54px; border-radius: 16px; padding: 0 20px;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--tint) 35%, transparent); transition: transform .15s var(--ease), background .2s, opacity .2s; }
.primary:active { transform: scale(.98); background: var(--tint-press); }
.primary:disabled { opacity: .35; box-shadow: none; }
/* ---------- selection, evidence, statistics, motion ---------- */
:root { --spring: cubic-bezier(.34,1.56,.64,1); --alert: #ff8a00; --alert-2: #ff5e3a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --alert: #ff9f0a; --alert-2: #ff6b4a; } }

/* «اختيار الكل»: right above the first checkbox, warm contrasting colour, gentle attention pulse */
.selall-wrap { display: flex; justify-content: flex-start; margin: 2px 0 10px; padding-inline-start: 6px; }
.selall { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px 0 14px; border-radius: 99px;
  color: #fff; font-size: 15px; font-weight: 600; background: linear-gradient(135deg, var(--alert), var(--alert-2));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--alert) 40%, transparent); animation: selallIn .55s var(--spring) both, glow 2.8s ease-in-out 1s 3;
  transition: transform .18s var(--ease), background .3s, color .3s, box-shadow .3s; }
.selall::before { content: ""; width: 16px; height: 16px; border-radius: 99px; border: 2px solid rgba(255,255,255,.9); flex: none;
  background: transparent; transition: background .25s var(--ease); }
.selall.on::before { background: #fff; box-shadow: inset 0 0 0 3px var(--alert); }
.selall .ring { position: absolute; inset: -4px; border-radius: 99px; border: 2px solid var(--alert); opacity: 0; pointer-events: none;
  animation: ring 1.6s ease-out .7s 2; }
.selall:active { transform: scale(.95); }
.selall.on { background: var(--card-solid); color: var(--alert-2); box-shadow: 0 0 0 1.5px var(--alert) inset; }
@keyframes selallIn { from { opacity: 0; transform: translateY(-8px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes ring { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes glow { 0%, 100% { box-shadow: 0 6px 18px color-mix(in srgb, var(--alert) 40%, transparent); } 50% { box-shadow: 0 8px 28px color-mix(in srgb, var(--alert) 70%, transparent); } }

/* cards: staggered rise, springy check, locked state */
.fund { cursor: pointer; animation: rise .5s var(--ease) both; animation-delay: calc(min(var(--i, 0), 12) * 40ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.fund:focus-visible { outline: 3px solid var(--tint-soft); outline-offset: 2px; }
.sel .check { animation: checkPop .42s var(--spring) var(--d, 0ms) both; }
@keyframes checkPop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.fund.sel { animation: selBump .32s var(--ease) var(--d, 0ms); }
@keyframes selBump { 50% { transform: scale(1.012); } }
.fund.locked { cursor: not-allowed; opacity: .78; }
.fund.locked .check { border-style: dashed; color: var(--ink-3); }
.fund.locked .check svg { opacity: 1; transform: none; color: var(--ink-3); width: 14px; height: 14px; }
.fund.shake { animation: shake .4s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* evidence links on each funding */
.ev-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ev { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 11px; border-radius: 99px; font-size: 13px; font-weight: 600;
  color: var(--tint); background: var(--tint-soft); text-decoration: none; direction: ltr; transition: transform .15s var(--ease), background .2s; }
.ev svg { width: 14px; height: 14px; flex: none; }
.ev span { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev:active { transform: scale(.94); background: color-mix(in srgb, var(--tint) 25%, transparent); }
.ev.more { color: var(--ink-2); background: var(--field); }
.nolink { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--alert-2); }
.nolink svg { width: 15px; height: 15px; flex: none; }

/* live selection summary above the main button */
.cta { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.selbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; max-width: 608px; margin: 0 auto;
  min-height: 44px; padding: 0 14px; border-radius: 14px; font-size: 14px; color: var(--ink);
  background: var(--card); border: 1px solid var(--glass-border); box-shadow: var(--shadow);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); }
.selbar.in { animation: barIn .4s var(--spring) both; }
@keyframes barIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.selbar-go { color: var(--tint); font-weight: 600; white-space: nowrap; }
.selbar-go::after { content: " ‹"; }
.selbar:active { transform: scale(.99); }
.primary.bump { animation: bump .35s var(--spring); }
@keyframes bump { 40% { transform: scale(1.035); } }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* statistics */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tile { background: var(--field); border-radius: 14px; padding: 10px 12px; }
.tile b { display: block; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tile span { font-size: 13px; color: var(--ink-2); }
.tile b.ltr { font-size: 19px; white-space: nowrap; padding-top: 4px; }
.sums { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.sum { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--tint-soft); }
.sum .amt { background: none; padding: 0; font-size: 19px; align-self: flex-start; }
.sum-l { font-size: 13px; color: var(--ink-2); }
.fine { font-size: 12.5px; color: var(--ink-2); margin: 12px 2px 0; line-height: 1.6; }
.summary.rise { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 120ms); margin-bottom: 12px; }

/* bottom sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.32); opacity: 0; transition: opacity .3s var(--ease); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto; max-height: 86vh; overflow: auto;
  background: var(--card-solid); border-radius: 26px 26px 0 0; padding: 8px 18px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(105%); transition: transform .42s var(--spring); box-shadow: 0 -10px 40px rgba(0,0,0,.18); }
.sheet h2 { font-size: 20px; margin: 6px 4px 14px; }
.sheet .primary { width: 100%; margin-top: 16px; }
.grab { width: 38px; height: 5px; border-radius: 99px; background: var(--hair); margin: 4px auto 6px; }
.sheet-wrap.open .sheet-bg { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }

/* step 1 rows: soft stagger */
#list .group { animation: rise .45s var(--ease) both; }

/* ---------- segmented tab: كل الجهات | الكيانات النسوية ---------- */
:root { --fem: #b4237a; --fem-soft: rgba(180,35,122,.12); --femp: #7a4fc2; --femp-soft: rgba(122,79,194,.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --fem: #ff6fb7; --fem-soft: rgba(255,111,183,.16); --femp: #b59bff; --femp-soft: rgba(181,155,255,.16); } }
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--field); border-radius: 12px; padding: 3px; margin: -4px 0 14px; }
.seg button { position: relative; z-index: 1; min-height: 38px; font-size: 15px; font-weight: 600; color: var(--ink-2); border-radius: 9px; transition: color .25s; }
.seg button[aria-selected="true"] { color: var(--ink); }
.seg button[data-v="fem"][aria-selected="true"] { color: var(--fem); }
.seg-thumb { position: absolute; top: 3px; bottom: 3px; width: calc(50% - 3px); left: 3px; border-radius: 9px; background: var(--card-solid);
  box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: transform .38s var(--spring); }
.seg.right .seg-thumb { transform: translateX(100%); }
.badge.fem { background: var(--fem-soft); color: var(--fem); }
.badge.femp { background: var(--femp-soft); color: var(--femp); }
.row .s .badge { margin-inline-start: 4px; vertical-align: 1px; }
.note-fem { font-size: 13px; color: var(--ink-2); background: var(--fem-soft); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }

/* ---------- home: category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 2px; }
.tile-cat { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 128px; padding: 14px;
  text-align: right; border-radius: 22px; background: var(--card); border: 1px solid var(--glass-border); box-shadow: var(--shadow);
  -webkit-backdrop-filter: saturate(160%) blur(24px); backdrop-filter: saturate(160%) blur(24px); overflow: hidden;
  animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); transition: transform .18s var(--ease); }
.tile-cat.wide { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; gap: 12px; }
.tile-cat.wide .tl { flex: 1; }
.tile-cat:active { transform: scale(.97); }
.tile-cat::after { content: ""; position: absolute; inset: auto -30% -55% auto; width: 120px; height: 120px; border-radius: 99px;
  background: var(--k); opacity: .1; pointer-events: none; }
.tile-cat .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; font-weight: 700;
  color: #fff; background: var(--k); box-shadow: 0 6px 14px color-mix(in srgb, var(--k) 35%, transparent); flex: none; }
.tile-cat .tl { font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.tile-cat .tn { font-size: 12.5px; color: var(--ink-2); margin-top: auto; }
.tile-cat.wide .tn { margin-top: 0; white-space: nowrap; }
.c-fem { --k: var(--fem); } .c-rights { --k: #2f6fde; } .c-community { --k: #1f9d6b; } .c-econ { --k: #d08a00; }
.c-child { --k: #e0567a; } .c-edu { --k: #6a5acd; } .c-media { --k: #d0532a; } .c-gov { --k: #4b5d73; }
.c-intl { --k: #0a84c6; } .c-coalition { --k: #8a6d3b; } .c-other { --k: #8e8e93; } .c-unknown { --k: #a0a0a8; } .c-all { --k: var(--tint); }

/* ---------- selectable recipient rows ---------- */
.row.pick { cursor: pointer; animation: rise .45s var(--ease) both; animation-delay: calc(min(var(--i, 0), 14) * 22ms); }
.row.pick .check { margin-top: 0; }
.row.pick.sel { background: var(--tint-soft); }
.row.pick:focus-visible { outline: 3px solid var(--tint-soft); outline-offset: -3px; }
.rec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 18px 4px 8px; font-size: 17px; font-weight: 700; }
.rec-h small { font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.rec-h.small { font-size: 14px; margin-top: 12px; }

/* ---------- dashboard ---------- */
.dash { display: flex; flex-direction: column; gap: 12px; }
.tiles.six { grid-template-columns: repeat(3, 1fr); }
.tiles.six .tile b { font-size: 22px; }
.tiles.six .tile b.ltr { font-size: 15px; }
.dcard { background: var(--field); border-radius: 18px; padding: 14px; }
.dcard h3 { font-size: 15px; margin: 0 0 10px; }
.dcard h3 small { font-weight: 500; color: var(--ink-2); font-size: 12px; }
.dcard .sums { margin-top: 0; }
.bars { display: flex; flex-direction: column; gap: 7px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 40%) 1fr auto; align-items: center; gap: 8px; font-size: 13px; }
.bar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.bar-t { height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 7%, transparent); overflow: hidden; }
.bar-f { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--tint); transition: width .7s var(--ease); transition-delay: calc(var(--i, 0) * 45ms); }
.bar-f.alt { background: linear-gradient(90deg, var(--alert), var(--alert-2)); }
.grown .bar-f { width: var(--w); }
.bar-v { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 24px; text-align: left; }
.years { display: flex; align-items: flex-end; gap: 2px; height: 110px; padding-top: 6px; direction: ltr; }
.ycol { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.yb { display: block; width: 100%; height: 0; border-radius: 4px 4px 1px 1px; background: var(--tint); opacity: .85; transition: height .7s var(--spring); transition-delay: calc(min(var(--i, 0), 40) * 15ms); }
.grown .yb { height: var(--h); min-height: 2px; }
.yaxis { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-top: 4px; direction: ltr; }
.ql { margin-top: 12px; }
.ql:first-of-type { margin-top: 0; }
.ql > span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.stack { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.stack span { width: 0; transition: width .8s var(--ease); }
.grown .stack span { width: var(--w); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 5px; vertical-align: 0; }
.seg-a { background: var(--tint); } .seg-b { background: var(--alert); } .seg-c { background: color-mix(in srgb, var(--ink) 25%, transparent); }
.seg-f { background: var(--fem); } .seg-g { background: var(--femp); }
.sheet { max-height: 92vh; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.spinner { display: inline-block; width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 99px;
  animation: spin .8s linear infinite; vertical-align: -3px; margin-inline-start: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { text-align: center; color: var(--ink-2); padding: 60px 0; }
