/* ═══════════════════════════════════════════════
   راتبي بذكاء — التصميم
   ═══════════════════════════════════════════════ */

/* الخطوط (IBM Plex Sans Arabic — مستضافة محلياً، رخصة OFL) */
@font-face { font-family: "Plex Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/plex-arabic-400-arabic.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/plex-arabic-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/plex-arabic-500-arabic.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/plex-arabic-500-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/plex-arabic-600-arabic.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/plex-arabic-600-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/plex-arabic-700-arabic.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/plex-arabic-700-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #0b1630;
  --navy: #12264a;
  --navy-2: #1b3663;
  --navy-3: #2a4a7d;
  --navy-soft: #e8edf6;
  --bg: #f6f6f2;
  --tint: #eef0ec;
  --surface: #ffffff;
  --line: #e2e5e9;
  --line-2: #d3d8de;
  --text: #16213a;
  --muted: #5a677c;
  --muted-2: #8591a3;

  --green: #2d8a68;
  --green-2: #3aa57e;
  --green-soft: #e3f1ea;
  --gold: #b48a3a;
  --gold-2: #d2ae62;
  --gold-3: #ecd7a6;
  --gold-soft: #f8f0de;
  --danger: #b3423a;
  --danger-soft: #fbeceb;
  --warn: #9a5f0c;
  --warn-soft: #fdf3e1;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --shadow-1: 0 1px 2px rgba(11, 22, 48, .05), 0 1px 1px rgba(11, 22, 48, .03);
  --shadow-2: 0 10px 30px -12px rgba(11, 22, 48, .18), 0 2px 6px rgba(11, 22, 48, .05);
  --shadow-3: 0 30px 60px -20px rgba(4, 10, 26, .55);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --font: "Plex Arabic", "Segoe UI", Tahoma, "Geeza Pro", system-ui, sans-serif;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.75; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; color: var(--ink); }
p { margin: 0; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img, svg { display: block; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; font-feature-settings: "tnum"; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--gold-2); outline-offset: 2px; border-radius: 6px; }

.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; text-decoration: none; }
.skip-link:focus { top: 12px; }

.t-navy { color: var(--navy); } .t-green { color: #7fd1ae; } .t-gold { color: var(--gold-2); } .t-navy-light { color: #fff; }

/* ───── الأزرار ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, box-shadow .2s, color .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1d1404; box-shadow: 0 6px 18px -8px rgba(180, 138, 58, .8), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-gold:hover { box-shadow: 0 10px 24px -8px rgba(180, 138, 58, .9), inset 0 1px 0 rgba(255,255,255,.35); transform: translateY(-1px); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 8px 20px -10px rgba(45, 138, 104, .9); }
.btn-green:hover:not(:disabled) { background: #277a5c; }
.btn-outline { background: var(--surface); border-color: var(--line-2); color: var(--navy); }
.btn-outline:hover:not(:disabled) { border-color: var(--navy-3); background: #fbfcfe; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: rgba(18, 38, 74, .06); color: var(--navy); }
.btn-ghost-light { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.18); }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: rgba(179, 66, 58, .3); }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--muted); transition: background-color .2s, color .2s; }
.icon-btn:hover { background: rgba(18, 38, 74, .07); color: var(--navy); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.link-btn { background: none; border: 0; padding: 0; margin-top: 8px; color: var(--navy-3); font-size: 13.5px; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(42, 74, 125, .35); }
.link-btn:hover { color: var(--navy); }

/* ───── الترويسة ───── */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(11, 22, 48, .92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-mark svg { width: 32px; height: 32px; }
.bm-bg { fill: var(--navy-2); stroke: rgba(210, 174, 98, .5); }
.bm-line { stroke: rgba(255,255,255,.35); stroke-width: 1.5; stroke-linecap: round; fill: none; }
.bm-green { fill: var(--green-2); } .bm-gold { fill: var(--gold-2); }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -.2px; }
.main-nav { display: flex; gap: 2px; margin-inline-start: auto; }
.main-nav a { padding: 7px 12px; border-radius: 9px; color: rgba(255,255,255,.72); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: color .2s, background-color .2s; }
.main-nav a:hover, .main-nav a.active { color: #fff; background: rgba(255,255,255,.08); }
.nav-toggle { display: none; color: #fff; }
.nav-toggle:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ───── الرئيسية (Hero) ───── */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(45, 138, 104, .22), transparent 60%),
    radial-gradient(700px 500px at 90% 90%, rgba(180, 138, 58, .16), transparent 60%),
    linear-gradient(160deg, var(--ink) 0%, #10224a 60%, #0d1c3c 100%);
  padding: 72px 0 88px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(40px, 6vw, 64px); letter-spacing: -1px; line-height: 1.15; }
.hero-sub { margin-top: 14px; font-size: clamp(19px, 2.2vw, 24px); font-weight: 500; color: var(--gold-3); }
.hero-text { margin-top: 16px; max-width: 54ch; font-size: 17px; color: rgba(255,255,255,.78); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: rgba(255,255,255,.66); font-size: 14px; }
.hero-points li { display: flex; align-items: center; gap: 7px; }
.hero-points .ic { width: 17px; height: 17px; color: var(--gold-2); }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--gold); letter-spacing: .2px; margin-bottom: 10px; }
.eyebrow span { width: 22px; height: 2px; border-radius: 2px; background: currentColor; opacity: .8; }
.eyebrow-light { color: var(--gold-2); }

.hero-visual { position: relative; padding: 28px 10px; }
.hv-card {
  position: relative; border-radius: var(--r-lg); padding: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.12); box-shadow: var(--shadow-3);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hv-head { display: flex; justify-content: space-between; align-items: center; }
.hv-label { font-size: 14px; color: rgba(255,255,255,.7); }
.hv-chip { font-size: 12px; padding: 2px 10px; border-radius: 99px; background: rgba(210, 174, 98, .16); color: var(--gold-3); border: 1px solid rgba(210, 174, 98, .3); }
.hv-amount { margin: 6px 0 18px; font-size: 44px; font-weight: 700; letter-spacing: -.5px; }
.hv-amount .cur { font-size: 18px; font-weight: 500; color: rgba(255,255,255,.6); }
.hv-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.hv-legend div { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.05); }
.hv-legend span { font-size: 13px; color: rgba(255,255,255,.7); }
.hv-legend b { grid-column: 2; font-size: 20px; font-weight: 600; text-align: start; }
.hv-foot { margin-top: 18px; padding-top: 16px; border-top: 1px dashed rgba(255,255,255,.14); }
.hv-foot-row { display: flex; justify-content: space-between; font-size: 13.5px; color: rgba(255,255,255,.7); }
.hv-foot-row b { color: #fff; font-weight: 600; }
.mini-progress { height: 6px; border-radius: 99px; background: rgba(255,255,255,.1); margin: 10px 0 12px; overflow: hidden; }
.mini-progress span { display: block; height: 100%; width: 50%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--gold-2)); animation: grow-50 1.6s var(--ease) .5s both; }
.hv-days { display: grid; grid-template-columns: repeat(15, 1fr); gap: 4px; }
.hv-days i { aspect-ratio: 1; border-radius: 4px; background: rgba(255,255,255,.08); }
.hv-days i.on { background: rgba(58, 165, 126, .75); }
.hv-days i.now { background: transparent; box-shadow: inset 0 0 0 1.5px var(--gold-2); }
.hv-float {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px;
  background: #fff; color: var(--ink); box-shadow: var(--shadow-2); font-size: 13px; animation: float 6s ease-in-out infinite;
}
.hv-float small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.hv-float b { font-size: 15px; }
.hv-float .ic { width: 34px; height: 34px; padding: 7px; border-radius: 10px; }
.hv-float-a { top: 0; inset-inline-start: -14px; }
.hv-float-a .ic { background: var(--gold-soft); color: var(--gold); }
.hv-float-b { bottom: 0; inset-inline-end: -10px; animation-delay: -3s; }
.hv-float-b .ic { background: var(--green-soft); color: var(--green); }

/* ───── الشريط المقسوم ───── */
.split-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: rgba(18, 38, 74, .08); gap: 3px; }
.split-bar-lg { height: 16px; }
.split-bar-xl { height: 54px; border-radius: 16px; gap: 4px; background: transparent; }
.seg { display: flex; align-items: center; justify-content: center; min-width: 0; height: 100%; transition: flex-basis .6s var(--ease), width .6s var(--ease); }
.seg em { font-style: normal; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.92); white-space: nowrap; }
.seg-avail { background: linear-gradient(180deg, var(--green-2), var(--green)); border-radius: 99px 0 0 99px; }
.seg-bills { background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-radius: 0 99px 99px 0; }
[dir="rtl"] .seg-avail { border-radius: 0 99px 99px 0; }
[dir="rtl"] .seg-bills { border-radius: 99px 0 0 99px; }
.split-bar-xl .seg-avail { border-radius: 0 16px 16px 0; }
.split-bar-xl .seg-bills { border-radius: 16px 0 0 16px; }
.split-bar-xl .seg-bills em { color: #2a1d05; }
.seg-example-avail { flex: 0 0 calc(82.5% - 2px); }
.seg-example-bills { flex: 0 0 calc(17.5% - 2px); }
.seg.full { border-radius: 99px !important; }
.seg.zero { flex-basis: 0 !important; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-avail { background: var(--green-2); }
.dot-bills { background: var(--gold-2); }

/* ───── الأقسام ───── */
.section { padding: 88px 0; }
.section-compact { padding: 56px 0; }
.section-tint { background: var(--tint); border-block: 1px solid #e6e8e3; }
.section-dark { background: linear-gradient(170deg, var(--ink), #10224a); color: #fff; position: relative; overflow: hidden; }
.section-dark::after { content: ""; position: absolute; width: 600px; height: 600px; inset-inline-end: -200px; top: -250px; border-radius: 50%; background: radial-gradient(circle, rgba(210, 174, 98, .12), transparent 65%); pointer-events: none; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 38px); letter-spacing: -.4px; }
.section-lead { margin-top: 10px; color: var(--muted); font-size: 17px; }
.section-head-light h2 { color: #fff; }
.section-head-row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 18px; }
.card-title .ic { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--navy-soft); color: var(--navy); }

/* الخطوات */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.step-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.step-no { font-size: 30px; font-weight: 700; line-height: 1; color: transparent; -webkit-text-stroke: 1.2px var(--gold-2); font-variant-numeric: tabular-nums; }
.step-top .ic { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--navy-soft); color: var(--navy); }
.step:nth-child(5) .step-top .ic, .step:nth-child(6) .step-top .ic { background: var(--gold-soft); color: var(--gold); }
.step h3 { font-size: 15px; color: var(--gold); font-weight: 600; margin-bottom: 4px; }
.step p { color: var(--text); font-size: 16px; }

.callout { display: flex; gap: 14px; align-items: flex-start; margin-top: 24px; padding: 18px 20px; border-radius: var(--r); }
.callout .ic { margin-top: 3px; }
.callout-gold { background: var(--gold-soft); border: 1px solid var(--gold-3); color: #5c4416; }
.callout-gold .ic { color: var(--gold); }
.callout-gold strong { color: #3f2e0c; }
.callout-dark { background: rgba(255,255,255,.06); border: 1px solid rgba(210, 174, 98, .35); color: #fff; font-size: 17px; font-weight: 500; }
.callout-dark .ic { color: var(--gold-2); }

/* المثال */
.example-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 16px; }
.ex-inputs, .ex-calc { padding: 26px; }
.kv { margin: 0; display: grid; gap: 10px; }
.kv div, .bill-list li, .bill-total { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.sub-title { font-size: 14px; color: var(--muted); font-weight: 600; margin: 22px 0 8px; }
.bill-list { list-style: none; margin: 0; padding: 0; }
.bill-list li { padding: 10px 0; border-bottom: 1px dashed var(--line-2); }
.bill-list b { font-weight: 600; }
.bill-total { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--gold-soft); color: #4d3a12; font-weight: 600; }
.calc-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.cs { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); border-inline-start: 4px solid; background: #fcfcfb; }
.cs-navy { border-inline-start-color: var(--navy-3); }
.cs-gold { border-inline-start-color: var(--gold-2); }
.cs-green { border-inline-start-color: var(--green-2); }
.cs p { color: var(--muted); font-size: 15px; margin-top: 4px; }
.cs p strong { color: var(--text); }
.eq { font-size: 22px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; letter-spacing: .2px; }
.eq b { font-weight: 700; }
.cs-navy .eq b { color: var(--navy-3); } .cs-gold .eq b { color: var(--gold); } .cs-green .eq b { color: var(--green); }
.results-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 16px; }
.rs { padding: 16px; border-radius: var(--r); display: flex; flex-direction: column; gap: 6px; justify-content: space-between; min-height: 104px; }
.rs-label { font-size: 13.5px; line-height: 1.5; }
.rs b { font-size: 22px; font-weight: 700; }
.rs-navy { background: var(--navy); color: #fff; } .rs-navy .rs-label { color: rgba(255,255,255,.75); }
.rs-gold { background: var(--gold-soft); color: #4d3a12; border: 1px solid var(--gold-3); }
.rs-green { background: var(--green-soft); color: #154a37; border: 1px solid #c7e3d6; }
.rs-outline { background: var(--surface); border: 1px solid var(--line); } .rs-outline .rs-label { color: var(--muted); }

/* التقسيم البصري */
.split-visual { position: relative; z-index: 1; max-width: 860px; margin-inline: auto; }
.sv-total { text-align: center; }
.sv-amount { font-size: clamp(44px, 7vw, 68px); font-weight: 700; letter-spacing: -1px; line-height: 1.1; }
.sv-amount .cur { font-size: .36em; font-weight: 500; color: rgba(255,255,255,.65); letter-spacing: 0; }
.sv-caption { color: var(--gold-3); font-size: 17px; margin-top: 4px; }
.sv-bracket { height: 22px; margin: 16px 0 10px; border: 1.5px solid rgba(255,255,255,.25); border-bottom: 0; border-radius: 12px 12px 0 0; position: relative; }
.sv-bracket::before { content: ""; position: absolute; top: -12px; inset-inline-start: 50%; width: 1.5px; height: 12px; background: rgba(255,255,255,.25); }
.sv-parts { display: grid; grid-template-columns: 82.5fr 17.5fr; gap: 12px; margin-top: 14px; }
.sv-part { display: flex; flex-direction: column; align-items: flex-start; }
.sv-part-bills { align-items: flex-end; text-align: end; }
.sv-part .dot { margin-bottom: 8px; }
.sv-part-amount { font-size: clamp(24px, 3.4vw, 32px); font-weight: 700; }
.sv-part-avail .sv-part-amount { color: #7fd1ae; }
.sv-part-bills .sv-part-amount { color: var(--gold-2); white-space: nowrap; }
.sv-part-label { color: rgba(255,255,255,.72); font-size: 14.5px; }
.sv-equations { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.sv-eq { padding: 20px; border-radius: var(--r); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.sv-eq-label { display: block; font-size: 13.5px; color: rgba(255,255,255,.6); margin-bottom: 6px; }
.sv-eq .eq { color: rgba(255,255,255,.8); }
.eq-xl { font-size: clamp(24px, 3.4vw, 32px); }
.sv-eq-note { display: block; margin-top: 4px; font-size: 13.5px; color: var(--gold-3); }

/* الشرح المبسط */
.simple-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.story { margin-top: 18px; display: grid; gap: 10px; font-size: 17.5px; line-height: 1.9; }
.story p { color: #2a3550; }
.story-key { margin-top: 6px; padding: 16px 18px; border-radius: var(--r); background: var(--green-soft); color: #154a37 !important; font-weight: 500; border-inline-start: 4px solid var(--green-2); }

.flow-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.flow { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.flow-node {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: #fbfbfa; opacity: 0; transform: translateY(12px) scale(.98);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.flow-node b { display: block; font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.flow-node small { display: block; font-size: 13.5px; color: var(--muted); }
.flow-node .ic { width: 38px; height: 38px; padding: 8px; border-radius: 11px; }
.fn-salary .ic, .fn-daily .ic { background: var(--navy-soft); color: var(--navy); }
.fn-daily { border-color: #c9d3e6; }
.fn-avail { background: var(--green-soft); border-color: #c7e3d6; } .fn-avail .ic { background: #fff; color: var(--green); }
.fn-bills { background: var(--gold-soft); border-color: var(--gold-3); } .fn-bills .ic { background: #fff; color: var(--gold); }
.fn-month { background: var(--navy); border-color: var(--navy); } .fn-month b { color: #fff; } .fn-month small { color: rgba(255,255,255,.7); }
.fn-month .ic { background: rgba(210, 174, 98, .18); color: var(--gold-2); }
.jar { margin-inline-start: auto; width: 26px; height: 38px; border-radius: 6px 6px 9px 9px; border: 1.5px solid rgba(210, 174, 98, .7); position: relative; overflow: hidden; }
.jar span { position: absolute; inset-inline: 0; bottom: 0; height: 0; background: linear-gradient(180deg, var(--gold-2), var(--gold)); transition: height 1.2s var(--ease); }
.flow-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.flow-pair .flow-node { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
.flow-pair .flow-node b { font-size: 17px; }
.flow-label { font-size: 12.5px; font-weight: 600; color: var(--gold); margin: -2px 0 6px; opacity: 0; transition: opacity .5s; }
.flow-link { position: relative; width: 2px; height: 30px; background: var(--line-2); overflow: hidden; transform: scaleY(0); transform-origin: top; transition: transform .45s var(--ease); }
.flow-link i { position: absolute; inset-inline-start: -2px; width: 6px; height: 8px; border-radius: 3px; background: var(--gold-2); top: -8px; }
.flow-link-bills { align-self: flex-start; margin-inline-start: 25%; }
[dir="rtl"] .flow-link-bills { align-self: flex-end; margin-inline-start: 0; margin-inline-end: 25%; }
.flow.play .flow-link i { animation: drip 1.6s linear infinite; }
/* ترتيب الظهور */
.flow.play .flow-node, .flow.play .flow-label { opacity: 1; transform: none; }
.flow.play .flow-link { transform: scaleY(1); }
.flow.play > :nth-child(1) { transition-delay: .05s; }
.flow.play > :nth-child(2) { transition-delay: .45s; }
.flow.play > :nth-child(3) { transition-delay: .7s; }
.flow.play > :nth-child(4) { transition-delay: 1.1s; }
.flow.play > :nth-child(5) { transition-delay: 1.3s; }
.flow.play .flow-pair .flow-node:nth-child(1) { transition-delay: 1.45s; }
.flow.play .flow-pair .flow-node:nth-child(2) { transition-delay: 1.65s; }
.flow.play > :nth-child(7) { transition-delay: 2.05s; }
.flow.play > :nth-child(8) { transition-delay: 2.3s; }
.flow.play .jar span { height: 100%; transition-delay: 2.7s; }

/* ───── الحاسبة ───── */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.calc-form { padding: 26px; display: grid; gap: 22px; }
.calc-results { padding: 26px; display: grid; gap: 18px; position: sticky; top: calc(var(--header-h) + 16px); }
.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend, .label-like { display: block; font-weight: 600; font-size: 15px; color: var(--ink); margin-bottom: 8px; padding: 0; }
.field-head { display: flex; justify-content: space-between; align-items: center; }
.field-head .label-like { margin-bottom: 8px; }
.count-badge { font-size: 12.5px; color: var(--muted); background: var(--tint); padding: 1px 10px; border-radius: 99px; }
.field-err { color: var(--danger); font-size: 13.5px; min-height: 0; margin-top: 6px; }
.field-err:empty { display: none; }
.field-hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
input[type="text"], input[type="date"] {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff;
  font-size: 16px; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
input[type="date"] { text-align: right; }
input:focus { outline: none; border-color: var(--navy-3); box-shadow: 0 0 0 4px rgba(42, 74, 125, .12); }
input.invalid { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(179, 66, 58, .1); }
.input-affix { position: relative; }
.input-affix input { padding-left: 52px; padding-right: 14px; font-weight: 600; font-size: 18px; text-align: right; }
.input-affix .affix { left: 14px; right: auto; }
.input-affix .affix { position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 13px; background: var(--tint); border: 1px solid var(--line); }
.segmented label { margin: 0; position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: grid; place-items: center; height: 40px; border-radius: 10px; font-weight: 600; color: var(--muted); transition: background-color .2s, color .2s, box-shadow .2s; font-variant-numeric: tabular-nums; }
.segmented input:checked + span { background: #fff; color: var(--navy); box-shadow: var(--shadow-1), 0 0 0 1px var(--line-2); }
.segmented input:focus-visible + span { outline: 2.5px solid var(--gold-2); outline-offset: 1px; }

.exp-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.exp-row { display: grid; grid-template-columns: 1fr 150px 40px; gap: 8px; align-items: start; animation: row-in .35s var(--ease); }
.exp-row input { height: 44px; font-size: 15px; }
.exp-row .input-affix input { font-size: 15.5px; }
.exp-row .icon-btn { height: 44px; }
.exp-row .field-err { grid-column: 1 / -1; margin-top: -2px; }
.exp-row.removing { animation: row-out .25s ease forwards; }
.empty-note { padding: 14px; text-align: center; color: var(--muted); font-size: 14px; border: 1px dashed var(--line-2); border-radius: 12px; margin-bottom: 12px; }
.exp-total { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--gold-soft); color: #4d3a12; font-weight: 600; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.form-foot .btn { margin-inline-start: -10px; }
.save-state { font-size: 13px; color: var(--green); display: inline-flex; align-items: center; gap: 6px; opacity: 0; transition: opacity .3s; }
.save-state.show { opacity: 1; }
.save-state .ic { width: 15px; height: 15px; }

.cr-main { text-align: center; padding: 6px 0 2px; }
.cr-label { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--muted); font-weight: 500; }
.cr-main .cr-label { justify-content: center; }
.cr-amount { font-size: clamp(38px, 5vw, 52px); font-weight: 700; letter-spacing: -.8px; line-height: 1.2; }
.cr-amount .cur, .cr-amount-sm .cur, .stat-val .cur { font-size: .42em; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.cr-hint { display: block; font-size: 12.5px; color: var(--muted-2); }
.cr-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cr-box { padding: 14px; border-radius: 14px; border: 1px solid; }
.cr-bills { background: var(--gold-soft); border-color: var(--gold-3); }
.cr-avail { background: var(--green-soft); border-color: #c7e3d6; }
.cr-avail.bad { background: var(--danger-soft); border-color: #f0c9c5; }
.cr-amount-sm { font-size: 27px; font-weight: 700; line-height: 1.35; margin: 2px 0; color: var(--ink); }
.cr-bills .cr-amount-sm { color: #6e5218; } .cr-avail .cr-amount-sm { color: #175a41; }
.cr-avail.bad .cr-amount-sm { color: var(--danger); font-size: 20px; }
.eq-card { font-size: 17px; padding: 12px 14px; border-radius: 12px; background: var(--tint); text-align: center; color: var(--muted); }
.eq-card b { color: var(--ink); }
.eq-card .g { color: var(--green); } .eq-card .y { color: var(--gold); }
.cr-month { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.cr-month div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.cr-month dt { color: var(--muted); font-size: 14.5px; }
.cr-month dd { margin: 0; font-weight: 700; }
.cr-month dd.neg { color: var(--danger); }
.cr-note { font-size: 13px; color: var(--muted); background: #fafaf8; border: 1px dashed var(--line-2); padding: 10px 12px; border-radius: 10px; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; font-size: 14.5px; border: 1px solid; animation: row-in .3s var(--ease); }
.alert .ic { margin-top: 2px; }
.alert strong { display: block; font-size: 15px; }
.alert-danger { background: var(--danger-soft); border-color: #f0c9c5; color: #7a2620; }
.alert-warn { background: var(--warn-soft); border-color: #f2dcb3; color: #6b4208; }
.alert-info { background: var(--navy-soft); border-color: #cfd9ea; color: var(--navy); }
.alert-ok { background: var(--green-soft); border-color: #c7e3d6; color: #154a37; }

/* ───── لوحة التحكم ───── */
.cycle-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.cycle-pill b { color: var(--ink); }
#dash-alert:not(:empty) { margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-1); transition: transform .3s var(--ease), box-shadow .3s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.stat-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--muted); font-weight: 500; line-height: 1.5; }
.stat-top .ic { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--tint); color: var(--navy-3); }
.stat-val { font-size: 28px; font-weight: 700; color: var(--ink); line-height: 1.3; margin-top: 6px; }
.stat-sub { font-size: 12.5px; color: var(--muted-2); min-height: 1.5em; }
.stat-navy { background: linear-gradient(160deg, var(--navy), var(--navy-2)); border-color: var(--navy); }
.stat-navy .stat-top, .stat-navy .stat-sub { color: rgba(255,255,255,.72); }
.stat-navy .stat-val { color: #fff; } .stat-navy .stat-val .cur { color: rgba(255,255,255,.6); }
.stat-navy .stat-top .ic { background: rgba(255,255,255,.1); color: var(--gold-2); }
.stat-gold { background: var(--gold-soft); border-color: var(--gold-3); }
.stat-gold .stat-top .ic { background: #fff; color: var(--gold); } .stat-gold .stat-val { color: #6e5218; }
.stat-green { background: var(--green-soft); border-color: #c7e3d6; }
.stat-green .stat-top .ic { background: #fff; color: var(--green); } .stat-green .stat-val { color: #175a41; }
.stat-green.bad { background: var(--danger-soft); border-color: #f0c9c5; }
.stat-green.bad .stat-val { color: var(--danger); font-size: 20px; }
.stat-green.bad .stat-top .ic { color: var(--danger); }
.stat.pulse { animation: pulse .6s var(--ease); }

.progress-card { margin-top: 16px; padding: 24px; }
.pc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.pc-head h3 { font-size: 18px; }
.pc-head p { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.pc-pct { font-size: 38px; font-weight: 700; color: var(--gold); line-height: 1; }
.progress { height: 16px; border-radius: 99px; background: var(--tint); overflow: hidden; border: 1px solid var(--line); }
.progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(270deg, var(--gold-2), var(--gold)); transition: width .8s var(--ease); position: relative; }
.progress span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: shine 2.6s ease-in-out infinite; }
.progress.done span { background: linear-gradient(270deg, var(--green-2), var(--green)); }
.days-grid-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin: 26px 0 12px; }
.days-grid-head h4 { font-size: 15px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.lg-done { background: var(--green-2); } .lg-today { box-shadow: inset 0 0 0 2px var(--gold); } .lg-missed { background: #f3dcd9; } .lg-future { background: var(--tint); border: 1px solid var(--line); }
.days-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.day {
  position: relative; display: grid; place-items: center; height: 46px; border-radius: 10px; border: 1px solid var(--line); background: var(--tint);
  font-size: 14px; font-weight: 600; color: var(--muted-2); font-variant-numeric: tabular-nums; cursor: default; padding: 0;
  transition: transform .2s var(--ease), background-color .25s, box-shadow .2s;
}
button.day { cursor: pointer; }
button.day:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.day.done { background: var(--green-2); border-color: var(--green-2); color: #fff; }
.day.missed { background: #fbefed; border-color: #f0d3cf; color: #a4534b; }
.day.today { box-shadow: inset 0 0 0 2px var(--gold); color: var(--ink); background: #fff; }
.day.today.done { background: var(--green-2); color: #fff; box-shadow: inset 0 0 0 2px var(--gold-2); }
.day.pop { animation: pop .5s var(--ease); }
.grid-hint { margin-top: 10px; font-size: 13px; color: var(--muted-2); }

/* ───── سجل التوفير ───── */
.tracker-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 16px; align-items: start; }
.today-card { padding: 26px; display: grid; gap: 12px; }
.tc-date { font-size: 14px; font-weight: 600; color: var(--gold); }
.tc-label { color: var(--muted); font-size: 14.5px; }
.tc-amount { font-size: 44px; font-weight: 700; color: #6e5218; line-height: 1.15; letter-spacing: -.5px; }
.tc-amount .cur { font-size: .4em; font-weight: 500; color: var(--muted); }
.tc-status { font-size: 14px; color: var(--muted); min-height: 1.5em; }
.tc-status.ok { color: var(--green); font-weight: 500; }
.tc-status.warn { color: var(--warn); }
.cycle-settings { margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; justify-items: start; }
.cycle-settings label { font-weight: 600; font-size: 14.5px; }
.cycle-range { font-size: 13px; color: var(--muted); }
.cycle-settings .btn { margin-inline-start: -10px; }

.log-card { padding: 22px 22px 14px; }
.log-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.log-head h3 { font-size: 18px; }
.log-total { font-size: 14.5px; color: var(--muted); }
.log-total b { color: var(--green); font-size: 17px; }
.log-list { list-style: none; padding: 0; margin: 0; max-height: 470px; overflow-y: auto; }
.log-item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line); animation: row-in .3s var(--ease); }
.log-item:last-child { border-bottom: 0; }
.log-day { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: 14px; line-height: 1; text-align: center; }
.log-day small { display: block; font-size: 10px; font-weight: 500; color: #4f8f75; margin-bottom: 2px; }
.log-date { font-size: 14.5px; font-weight: 500; }
.log-date small { display: block; color: var(--muted-2); font-size: 12.5px; font-weight: 400; }
.log-amt { font-weight: 700; color: var(--ink); white-space: nowrap; }
.log-actions { display: flex; gap: 2px; }
.log-actions .icon-btn { width: 36px; height: 36px; }
.log-actions .ic { width: 17px; height: 17px; }
.log-empty { text-align: center; padding: 40px 10px 30px; color: var(--muted); }
.log-empty .ic { width: 46px; height: 46px; margin: 0 auto 12px; padding: 11px; border-radius: 14px; background: var(--tint); color: var(--muted-2); }

/* ───── الخصوصية ───── */
.privacy-card { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 24px 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.pv-icon .ic { width: 52px; height: 52px; padding: 12px; border-radius: 15px; background: var(--green-soft); color: var(--green); }
.pv-copy h2 { font-size: 20px; margin-bottom: 4px; }
.pv-copy p { color: var(--muted); font-size: 15px; }
.pv-warn { margin-top: 8px; color: var(--warn) !important; font-weight: 500; }

/* ───── التذييل ───── */
.site-footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 40px 0 32px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 18px 30px; align-items: start; }
.footer-brand .brand-name { color: #fff; font-size: 20px; }
.footer-brand p { margin-top: 4px; font-size: 15px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; }
.footer-nav a { text-decoration: none; color: rgba(255,255,255,.7); }
.footer-nav a:hover { color: var(--gold-2); }
.footer-note { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13.5px; color: rgba(255,255,255,.55); }

/* ───── النوافذ والتنبيهات ───── */
.modal { border: 0; padding: 0; border-radius: var(--r-lg); width: min(440px, calc(100% - 28px)); box-shadow: var(--shadow-3); color: var(--text); background: var(--surface); }
.modal::backdrop { background: rgba(8, 15, 33, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in .3s var(--ease); }
.modal-body { padding: 22px; display: grid; gap: 16px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { font-size: 19px; }
.modal-text { color: var(--muted); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-start; }
.modal-actions .btn { min-width: 100px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #9b362f; }

.toast {
  position: fixed; bottom: 22px; inset-inline-start: 50%; transform: translate(50%, 20px); z-index: 90;
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14.5px; box-shadow: var(--shadow-3);
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease); max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(50%, 0); }
.toast .ic { color: var(--gold-2); }
.toast.error .ic { color: #f2a19a; }
.noscript { position: fixed; inset-inline: 0; bottom: 0; padding: 14px; text-align: center; background: var(--danger); color: #fff; z-index: 100; }

/* ───── الحركة ───── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes grow-50 { from { width: 0; } to { width: 50%; } }
@keyframes shine { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
@keyframes drip { 0% { top: -8px; } 100% { top: 30px; } }
@keyframes row-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes row-out { to { opacity: 0; transform: translateX(-10px); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(210, 174, 98, .5); } 100% { box-shadow: 0 0 0 12px rgba(210, 174, 98, 0); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ───── الاستجابة ───── */
@media (max-width: 1080px) {
  .main-nav a { padding: 7px 9px; font-size: 14px; }
  .header-cta { display: none; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .results-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  :root { --header-h: 60px; }
  .nav-toggle { display: inline-grid; margin-inline-start: auto; }
  .main-nav {
    position: absolute; top: var(--header-h); inset-inline: 0; flex-direction: column; gap: 2px; padding: 10px 16px 16px;
    background: rgba(11, 22, 48, .98); border-bottom: 1px solid rgba(255,255,255,.08);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s var(--ease), visibility .25s;
  }
  .main-nav.open { transform: none; opacity: 1; visibility: visible; }
  .main-nav a { padding: 12px 14px; font-size: 16px; }
  .hero { padding: 48px 0 64px; }
  .hero-grid, .simple-grid, .example-grid, .calc-grid, .tracker-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 30px; }
  .simple-grid { gap: 36px; }
  .hero-visual { max-width: 460px; width: 100%; margin-inline: auto; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .calc-results { position: static; }
  .section { padding: 64px 0; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .container { width: calc(100% - 28px); }
  .section { padding: 52px 0; }
  .section-head { margin-bottom: 26px; }
  .section-lead { font-size: 16px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hv-card { padding: 20px; }
  .hv-amount { font-size: 36px; }
  .hv-float { display: none; }
  .steps { grid-template-columns: 1fr; gap: 10px; }
  .step { padding: 18px; }
  .ex-inputs, .ex-calc, .calc-form, .calc-results, .today-card { padding: 20px; }
  .eq { font-size: 19px; }
  .results-strip { grid-template-columns: 1fr 1fr; }
  .results-strip .rs:first-child { grid-column: 1 / -1; }
  .rs { min-height: 0; }
  .rs b { font-size: 20px; }
  .split-bar-xl { height: 42px; }
  .seg em { font-size: 11.5px; }
  .sv-parts { grid-template-columns: 1fr 1fr; }
  .sv-equations { grid-template-columns: 1fr; }
  .flow { padding: 18px; }
  .exp-row { grid-template-columns: 1fr 40px; }
  .exp-row .input-affix { grid-column: 1; grid-row: 2; }
  .exp-row .icon-btn { grid-row: 1 / 3; grid-column: 2; height: auto; align-self: stretch; }
  .exp-row { padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fcfcfb; }
  .cr-pair { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat-val { font-size: 22px; }
  .stat-top { font-size: 13px; }
  .stat-top .ic { width: 30px; height: 30px; padding: 6px; }
  .stat-navy { grid-column: 1 / -1; }
  .stat-navy .stat-val { font-size: 30px; }
  .progress-card { padding: 18px; }
  .pc-pct { font-size: 30px; }
  .days-grid { grid-template-columns: repeat(7, 1fr); gap: 5px; }
  .day { height: 40px; font-size: 13px; }
  .log-item { grid-template-columns: auto 1fr auto; }
  .log-actions { grid-column: 2 / -1; justify-content: flex-end; margin-top: -8px; }
  .privacy-card { grid-template-columns: 1fr; text-align: start; }
  .footer-inner { grid-template-columns: 1fr; }
  .tc-amount { font-size: 38px; }
  .log-list { max-height: none; }
}
@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
  .results-strip { grid-template-columns: 1fr; }
}

/* ───── إضافات ───── */
.toast-action { margin-inline-start: 6px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: var(--gold-3); border-radius: 9px; padding: 4px 12px; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.toast-action:hover { background: rgba(255,255,255,.2); }
.split-bar.over .seg-bills { background: linear-gradient(180deg, #d0675e, var(--danger)); }
.log-item.outside { opacity: .6; }
.log-item.outside .log-day { background: var(--tint); color: var(--muted); }
.alert .link-btn { margin-top: 4px; display: inline-block; color: inherit; font-weight: 600; }
.alert .alert-body { display: block; }

/* ═════════ الإصدار 2: الفكرة في 3 خطوات ═════════ */
.t-gold-d { color: var(--gold); }
.idea { padding: 56px 0 8px; }
.idea-title { text-align: center; font-size: clamp(22px, 2.6vw, 28px); margin-bottom: 26px; }
.idea-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; position: relative; }
.idea-step {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 26px 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
.idea-step > .ic { width: 52px; height: 52px; padding: 12px; border-radius: 16px; background: var(--navy-soft); color: var(--navy); }
.idea-step:nth-child(2) > .ic { background: var(--gold-soft); color: var(--gold); }
.idea-step:nth-child(3) > .ic { background: var(--green-soft); color: var(--green); }
.idea-no { position: absolute; top: 14px; inset-inline-start: 16px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; background: var(--ink); color: var(--gold-2); }
.idea-step h3 { font-size: 18px; }
.idea-step p { color: var(--muted); font-size: 15px; margin-top: 2px; }
.idea-num { display: inline-block; margin-top: 10px; padding: 6px 14px; border-radius: 10px; background: var(--tint); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.idea-arrow { position: absolute; top: 50%; inset-inline-end: -27px; width: 20px; height: 20px; transform: translateY(-50%); color: var(--gold); }
.idea-foot { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; padding: 14px 18px; border-radius: var(--r); background: var(--green-soft); border: 1px solid #c7e3d6; color: #154a37; font-size: 17px; text-align: center; }
.idea-foot .ic { color: var(--green); }

/* أمثلة داخل الخطوات */
.step-ex { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; padding: 8px 12px; border-radius: 10px; background: var(--tint); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.step-ex small { font-size: 12.5px; font-weight: 500; color: var(--muted); }

/* بالمختصر */
.plain { padding: 14px 16px; border-radius: 14px; background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: rgba(255,255,255,.88); font-size: 16px; line-height: 1.9; }
.plain-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--gold-2); margin-bottom: 4px; }
.plain-tag .ic { width: 15px; height: 15px; }
.plain b { color: #fff; font-weight: 700; }
.plain .g { color: #7fd1ae; }
.plain .y { color: var(--gold-2); }
.plain.bad { background: linear-gradient(160deg, #5a1f1b, #7a2a24); }

/* الأرشيف */
.archive-card { margin-top: 16px; padding: 22px 22px 10px; }
.archive-card h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.archive-card h3 .ic { color: var(--gold); }
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-item { display: grid; grid-template-columns: 1fr minmax(120px, 220px) auto auto; gap: 16px; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.archive-item:last-child { border-bottom: 0; }
.archive-period { font-weight: 600; font-size: 15px; }
.archive-period small { display: block; color: var(--muted-2); font-weight: 400; font-size: 12.5px; }
.archive-bar { height: 8px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.archive-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(270deg, var(--gold-2), var(--gold)); }
.archive-bar.done span { background: linear-gradient(270deg, var(--green-2), var(--green)); }
.archive-amt { font-weight: 700; white-space: nowrap; font-size: 14.5px; }
.archive-amt small { color: var(--muted); font-weight: 500; }

/* أسئلة شائعة */
.faq-wrap { max-width: 860px; }
.faq { display: grid; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .2s, box-shadow .2s; }
.faq-item[open] { border-color: var(--gold-3); box-shadow: var(--shadow-1); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; font-weight: 600; font-size: 16.5px; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .ic { color: var(--gold); transition: transform .3s var(--ease); }
.faq-item[open] summary .ic { transform: rotate(180deg); }
.faq-item p { padding: 0 20px 18px; color: #3a465e; font-size: 16px; line-height: 1.9; }

/* بياناتك */
.data-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.data-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.data-card h3 { font-size: 18px; }
.data-card p { color: var(--muted); font-size: 15px; }
.data-card > .btn { margin-top: auto; }
.data-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.data-meta { font-size: 13px !important; color: var(--muted-2) !important; }
.data-meta:empty { display: none; }
.pv-gold .ic { background: var(--gold-soft); color: var(--gold); }
.pv-navy .ic { background: var(--navy-soft); color: var(--navy); }

/* شريط التسجيل السريع */
.quickbar { display: none; }
@media (max-width: 900px) {
  .quickbar {
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; padding-inline-start: 16px;
    background: rgba(11, 22, 48, .96); color: #fff; border-radius: 16px; border: 1px solid rgba(210, 174, 98, .3); box-shadow: var(--shadow-3);
    transform: translateY(150%); transition: transform .35s var(--ease); visibility: hidden;
  }
  .quickbar.show { transform: none; visibility: visible; }
  .qb-info { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
  .qb-info small { color: rgba(255,255,255,.65); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .qb-info b { font-size: 18px; color: var(--gold-2); }
  .quickbar .btn { flex: none; }
  .quickbar .btn.is-done { background: rgba(58, 165, 126, .18); color: #7fd1ae; box-shadow: none; }
  body.has-quickbar .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
  body.has-quickbar .site-footer { padding-bottom: 110px; }
  .idea-steps { grid-template-columns: 1fr; gap: 12px; }
  .idea-step { flex-direction: row; text-align: start; align-items: flex-start; padding: 16px; gap: 14px; }
  .idea-step > .ic { width: 46px; height: 46px; padding: 11px; flex: none; }
  .idea-no { top: -8px; inset-inline-start: -6px; width: 24px; height: 24px; font-size: 12.5px; }
  .idea-num { margin-top: 8px; font-size: 16px; }
  .idea-arrow { display: none; }
  .data-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .idea { padding: 40px 0 0; }
  .idea-title { font-size: 21px; margin-bottom: 18px; }
  .idea-foot { font-size: 15.5px; }
  /* الخطوات الست كخط زمني مختصر */
  .steps { gap: 0; }
  .step { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; padding: 0 0 18px; border: 0; background: none; border-radius: 0; }
  .step:hover { transform: none; box-shadow: none; }
  .step::before { content: ""; position: absolute; top: 40px; bottom: 0; inset-inline-start: 19px; width: 2px; background: var(--line-2); }
  .step:last-child::before { display: none; }
  .step-top { grid-row: 1 / span 3; margin: 0; flex-direction: column; justify-content: flex-start; }
  .step-top .ic { display: none; }
  .step-no { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; color: var(--gold-2); -webkit-text-stroke: 0; background: var(--ink); position: relative; z-index: 1; }
  .step h3 { margin-top: 8px; }
  .step-ex { margin-top: 8px; }
  .faq-item summary { padding: 14px 16px; font-size: 15.5px; }
  .faq-item p { padding: 0 16px 16px; font-size: 15px; }
  .archive-item { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .archive-bar { grid-column: 1 / -1; grid-row: 2; }
  .archive-item .icon-btn { grid-column: 2; grid-row: 1; }
  .archive-amt { grid-column: 1 / -1; grid-row: 3; }
}
.idea-step > .ic.idea-arrow { width: 22px; height: 22px; padding: 0; border-radius: 0; background: none; color: var(--gold); position: absolute; top: 50%; inset-inline-end: -28px; transform: translateY(-50%); }
@media (max-width: 900px) { .idea-step > .ic.idea-arrow { display: none; } }

/* ═════════ الإصدار 3: الشرح بالتفصيل في تبويبات ═════════ */
#learn .section-head { margin-bottom: 22px; }
.tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 5px; margin-bottom: 22px;
  background: var(--tint); border: 1px solid var(--line); border-radius: 16px;
  position: sticky; top: calc(var(--header-h) + 8px); z-index: 20;
}
.tab {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 6px 10px;
  border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 600; font-size: 15.5px; cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.tab:hover { color: var(--navy); }
.tab .ic { width: 19px; height: 19px; }
.tab[aria-selected="true"] { background: #fff; color: var(--navy); box-shadow: var(--shadow-1), 0 0 0 1px var(--line-2); }
.tab[aria-selected="true"] .ic { color: var(--gold); }
.tab-short { display: none; }
.tab-panel { animation: panel-in .35s var(--ease); }
.tab-panel:focus { outline: none; }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel-lead { color: var(--muted); font-size: 16px; margin-bottom: 14px; }

/* بطاقة التقسيم البصري داخل التبويب */
.split-card {
  margin-top: 16px; padding: 30px 26px; border-radius: var(--r-lg); color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(500px 300px at 90% 0%, rgba(210, 174, 98, .14), transparent 65%), linear-gradient(170deg, var(--ink), #10224a);
}
.split-card-title { color: #fff; font-size: clamp(19px, 2.4vw, 24px); text-align: center; margin-bottom: 18px; }
.split-card .sv-equations { margin-top: 24px; }
.split-card .callout-dark { margin-top: 18px; }
#simple .simple-grid { gap: 40px; }
#simple .story { margin-top: 0; }

@media (max-width: 640px) {
  .tabs { gap: 3px; padding: 4px; margin-inline: -2px; }
  .tab { flex-direction: column; gap: 2px; min-height: 56px; font-size: 13.5px; padding: 6px 4px; }
  .tab-long { display: none; }
  .tab-short { display: inline; }
  .split-card { padding: 22px 16px; margin-inline: -4px; }
  .story { font-size: 16.5px; }
}

/* ═════════ الإصدار 4: صفحات + رئيسية تشرح الفكرة فوراً + شريط سفلي ═════════ */

/* الصفحات */
.view { min-height: calc(100vh - var(--header-h)); animation: view-in .3s var(--ease); }
@keyframes view-in { from { opacity: 0; } to { opacity: 1; } }
.view > .section:first-child { padding-top: 56px; }

/* الرئيسية */
.hero { padding: 48px 0 56px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; column-gap: 56px; row-gap: 18px; align-items: start;
  grid-template-areas: "head card" "text card" "actions card" "points card";
}
.hero-head { grid-area: head; align-self: end; }
.hero-text { grid-area: text; margin-top: 0; }
.hero-actions { grid-area: actions; margin-top: 6px; }
.hero-points { grid-area: points; margin-top: 4px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 58px); }

/* بطاقة الفكرة */
.idea-card { grid-area: card; margin: 0; padding: 20px 22px 18px; border-radius: var(--r-lg); background: #fff; color: var(--text); box-shadow: var(--shadow-3); }
.idc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.idc-head > span:first-child { font-weight: 700; font-size: 17px; color: var(--ink); }
.idc-chip { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--gold-soft); color: #7a5a1c; white-space: nowrap; }
.idc-steps { list-style: none; margin: 0; padding: 0; }
.idc-step { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 14px 0; }
.idc-step:not(:last-child)::after { content: ""; position: absolute; top: 48px; bottom: -4px; inset-inline-start: 15px; width: 2px; background: var(--line); }
.idc-no { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--gold-2); font-weight: 700; font-size: 15px; position: relative; z-index: 1; }
.idc-no .ic { width: 17px; height: 17px; stroke-width: 2.6; }
.idc-body small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.idc-body p { margin-top: 2px; line-height: 1.35; }
.idc-body p b { font-size: 25px; font-weight: 700; color: var(--ink); }
.idc-body p span:not(.num) { font-size: 14.5px; color: var(--muted); }
.idc-body .split-bar { margin: 9px 0 7px; }
.idc-parts { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 500; }
.idc-part b { font-size: 19px; font-weight: 700; }
.idc-part.avail { color: #175a41; }
.idc-part.avail b { color: var(--green); }
.idc-part.bills { color: #6e5218; text-align: end; }
.idc-part.bills b { color: var(--gold); }
.idc-final { margin-top: 4px; padding: 12px; border-radius: 14px; background: var(--green-soft); }
.idc-final .idc-no { background: var(--green); color: #fff; }
.idc-final .idc-body p b { color: #175a41; }

/* بطاقة «مبلغ اليوم» */
.home-today { background: var(--ink); padding: 14px 0 0; }
.ht-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.07); border: 1px solid rgba(210, 174, 98, .35); color: #fff; }
.ht-info { min-width: 0; flex: 1; display: grid; gap: 2px; }
.ht-info small { color: rgba(255,255,255,.7); font-size: 13px; }
.ht-info b { font-size: 24px; color: var(--gold-2); line-height: 1.3; }
.ht-progress { height: 6px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 4px; max-width: 320px; }
.ht-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(270deg, var(--gold-2), var(--gold)); transition: width .6s var(--ease); }
.ht-sub { font-size: 12.5px !important; }
#ht-record { flex: none; }
#ht-record.is-done { background: rgba(58, 165, 126, .2); color: #7fd1ae; box-shadow: none; opacity: 1; }

/* شريط التنقل السفلي */
.bottom-nav { display: none; }
.main-nav a.active { color: #fff; background: rgba(255,255,255,.1); }

@media (max-width: 900px) {
  .main-nav, .header-cta { display: none !important; }
  .header-inner { justify-content: center; }
  .bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -14px rgba(11, 22, 48, .35);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  }
  .bottom-nav a {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 4px;
    border-radius: 12px; text-decoration: none; color: var(--muted-2); font-size: 11.5px; font-weight: 600; line-height: 1.2;
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-nav a .ic { width: 23px; height: 23px; transition: transform .2s var(--ease); }
  .bottom-nav a.active { color: var(--navy); }
  .bottom-nav a.active .ic { color: var(--gold); transform: translateY(-1px); }
  .bottom-nav a.active::before { content: ""; position: absolute; top: -6px; width: 30px; height: 3px; border-radius: 0 0 4px 4px; background: var(--gold); }
  .bn-dot { position: absolute; top: 4px; left: calc(50% - 15px); width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px #fff; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .view { min-height: calc(100vh - var(--header-h) - 66px); }

  .hero { padding: 22px 0 34px; }
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "head" "card" "actions" "text" "points"; row-gap: 16px; }
  .hero h1 { font-size: 32px; letter-spacing: -.5px; }
  .hero-sub { margin-top: 4px; font-size: 17px; }
  .hero-text { font-size: 15px; }
  .hero-actions { margin-top: 0; }
  .view > .section:first-child { padding-top: 30px; }
}
@media (max-width: 640px) {
  .hero-actions .btn-ghost-light { min-height: 44px; font-size: 15px; }
  .idea-card { padding: 16px 16px 14px; }
  .idc-body p b { font-size: 22px; }
  .idc-step { padding: 11px 0; }
  .idc-step:not(:last-child)::after { top: 44px; }
  .ht-card { padding: 12px 14px; }
  .ht-info b { font-size: 21px; }
  #ht-record { padding: 0 12px; font-size: 14px; min-height: 42px; }
  .data-grid { grid-template-columns: 1fr; }
}
@media (min-width: 901px) {
  .data-grid { grid-template-columns: 1fr 1fr; }
}
#view-home { display: flex; flex-direction: column; background: var(--ink); }
#view-home .hero { flex: 1; display: flex; align-items: center; }

/* ═════════ الإصدار 5: «لماذا؟» أولاً — مقارنة الطريقتين ═════════ */
.hero-grid { grid-template-areas: "head why" "text why" "actions why" "points why" "how how"; }
.why-card { grid-area: why; }
.idea-card { grid-area: how; }

.why-card { margin: 0; padding: 18px 18px 14px; border-radius: var(--r-lg); background: #fff; color: var(--text); box-shadow: var(--shadow-3); }
.why-cap { font-weight: 700; font-size: 17px; color: var(--ink); margin-bottom: 12px; }
.why-row { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; }
.why-row + .why-row { margin-top: 10px; }
.why-row.bad { background: #fbf0ee; border: 1px solid #f2d6d2; }
.why-row.good { background: var(--green-soft); border: 1px solid #c7e3d6; }
.why-label b { display: block; font-size: 15.5px; color: var(--ink); }
.why-label small { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.why-chart { display: flex; align-items: flex-end; gap: 2px; height: 54px; margin-top: 4px; }
.why-chart i { flex: 1; height: 3px; border-radius: 2px; background: rgba(11, 22, 48, .1); transform-origin: bottom; }
.why-row.bad .why-chart i.spike { height: 100%; flex: 1.8; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, #d9776e, var(--danger)); }
.why-row.good .why-chart i { height: 26%; background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.why-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted-2); line-height: 1.2; }
.why-tag { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; margin-top: 2px; }
.why-tag .ic { width: 17px; height: 17px; flex: none; }
.why-row.bad .why-tag { color: var(--danger); }
.why-row.good .why-tag { color: #175a41; }
.why-foot { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); text-align: center; font-size: 14.5px; font-weight: 600; color: var(--navy); }

/* حركة الأعمدة: الأيام تمتلئ واحداً تلو الآخر */
.why-chart.animate i { animation: bar-in .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
.why-row.bad .why-chart.animate i.spike { animation: spike-in .6s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: 1.15s; }
@keyframes bar-in { from { transform: scaleY(0); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes spike-in { from { transform: scaleY(0); } to { transform: none; } }

/* «كيف نجمع الـ700؟» على الكمبيوتر: الخطوات الثلاث جنباً إلى جنب */
@media (min-width: 901px) {
  .idea-card { margin-top: 26px; }
  .idc-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-top: 4px; }
  .idc-step:not(:last-child)::after { display: none; }
  .idc-final { margin-top: 14px; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-areas: "head" "why" "actions" "how" "text" "points"; }
}
@media (max-width: 640px) {
  .why-card { padding: 14px 14px 12px; }
  .why-cap { font-size: 16px; margin-bottom: 10px; }
  .why-row { padding: 10px 12px; }
  .why-chart { height: 46px; }
  .why-tag { font-size: 13.5px; }
  .why-foot { font-size: 14px; }
}
.why-axis b { font-size: 12.5px; font-weight: 700; }
.why-axis .ax-bad { color: var(--danger); }
.why-axis .ax-good { color: #7a5a1c; }

/* الإصدار 5.1: بطاقة «لماذا؟» مضغوطة لتظهر كاملة في أول شاشة حتى على الجوالات الصغيرة */
@media (max-width: 640px) {
  .hero { padding-top: 16px; }
  .hero h1 { font-size: 27px; }
  .hero-sub { font-size: 15.5px; margin-top: 2px; }
  .hero-grid { row-gap: 12px; }
  .why-card { padding: 12px 12px 10px; }
  .why-cap { font-size: 15px; margin-bottom: 8px; }
  .why-row { gap: 3px; padding: 8px 10px; }
  .why-row + .why-row { margin-top: 8px; }
  .why-label { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
  .why-label b { display: inline; font-size: 14.5px; }
  .why-label small { display: inline; font-size: 12.5px; }
  .why-chart { height: 30px; margin-top: 2px; }
  .why-axis { font-size: 11px; }
  .why-axis b { font-size: 11.5px; }
  .why-tag { font-size: 13px; }
  .why-foot { display: none; }
  .hero-actions .btn-gold { min-height: 48px; }
}
