/* ==========================================================================
   مکتب فارکس — Forex School | forexschool.store
   Design system v2 — bilingual (LTR English / RTL Dari), mobile-first.
   Motion is layered on by assets/js/site.js (GSAP); everything here renders
   fully without JavaScript and respects prefers-reduced-motion.
   ========================================================================== */

/* ---- Fonts (self-hosted) ---- */
@font-face {
  font-family: 'Jakarta';
  src: url('../fonts/jakarta-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  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: 'Vazirmatn';
  src: url('../fonts/vazirmatn-arabic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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;
}

/* ---- Design tokens ---- */
:root {
  /* Surfaces — deep navy, taken from the logo */
  --bg:          #060C17;
  --bg-2:        #0A1424;
  --surface:     #0E1A2D;
  --surface-2:   #13233B;
  --surface-3:   #1A2E4B;
  --glass:       rgba(14, 26, 45, 0.62);
  --line:        rgba(148, 170, 210, 0.12);
  --line-strong: rgba(148, 170, 210, 0.22);

  /* Text */
  --text:  #EEF2F8;
  --muted: #9DABC0;
  --dim:   #6F7E96;

  /* Brand — the logo's orange, with an amber partner */
  --brand:       #FA9939;
  --brand-2:     #FFBE5C;
  --brand-deep:  #E3761A;
  --brand-ink:   #0A1424;          /* text on orange */
  --brand-soft:  rgba(250, 153, 57, 0.12);
  --brand-glow:  rgba(250, 153, 57, 0.35);
  --grad-brand:  linear-gradient(120deg, #FFC56B 0%, #FA9939 45%, #F0691C 100%);

  /* Market semantics */
  --bull: #25D0A0;
  --bull-soft: rgba(37, 208, 160, 0.12);
  --bear: #F2555E;
  --bear-soft: rgba(242, 85, 94, 0.12);

  /* Legacy aliases (inline styles in pages use these) */
  --color-bg: var(--bg);
  --color-bg-alt: var(--surface);
  --color-bg-alt2: var(--surface-2);
  --color-gold: var(--brand);
  --color-gold-dark: var(--brand-deep);
  --color-teal: var(--bull);
  --color-orange: var(--brand);
  --color-red: var(--bear);
  --color-white: var(--text);
  --color-muted: var(--muted);
  --color-line: var(--line);

  /* Typography */
  --font-latin: 'Jakarta', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-dari:  'Vazirmatn', 'Jakarta', Tahoma, Arial, sans-serif;
  --font: var(--font-latin);

  /* Spacing */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4.5rem;
  --space-2xl: 7rem;

  /* Layout */
  --maxw: 1200px;
  --radius-xl: 28px;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --nav-h: 88px;

  /* Elevation */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, 0.75);
  --ring: 0 0 0 3px rgba(250, 153, 57, 0.35);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur: 0.35s;
  --transition: var(--dur) var(--ease-out);
}
html[lang="fa"] { --font: var(--font-dari); }

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1.5rem);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.75;
  text-align: start;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html[lang="fa"] body { line-height: 1.9; }
/* Soft vignette + fine grain behind every page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 100% -10%, rgba(250, 153, 57, 0.07), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(37, 208, 160, 0.05), transparent 60%),
    var(--bg);
}
img, svg, canvas { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--brand); color: var(--brand-ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
html[lang="fa"] h1, html[lang="fa"] h2, html[lang="fa"] h3, html[lang="fa"] h4 { letter-spacing: 0; line-height: 1.5; }
strong, b { font-weight: 700; }

.latin { font-family: var(--font-latin); direction: ltr; unicode-bidi: isolate; }

/* ---- Bilingual visibility ---- */
html[lang="en"] .lang-fa { display: none !important; }
html[lang="fa"] .lang-en { display: none !important; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.section { padding-block: clamp(4rem, 9vw, var(--space-2xl)); position: relative; }
.section-tight { padding-block: clamp(3rem, 6vw, var(--space-xl)); position: relative; }

/* Eyebrow label above section titles */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--brand-2);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}
html[lang="fa"] .eyebrow { letter-spacing: 0; font-size: 0.92rem; text-transform: none; }
.eyebrow::before {
  content: "";
  width: 22px; height: 2px; border-radius: 2px;
  background: var(--grad-brand);
}
.center > .eyebrow, .eyebrow.center { justify-content: center; }

.section-title {
  font-size: clamp(1.8rem, 4.4vw, 3rem);
  color: var(--text);
  margin-bottom: var(--space-md);
  max-width: 22ch;
}
html[lang="fa"] .section-title { max-width: 26ch; }
.section-title.center { text-align: center; margin-inline: auto; }
.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head.center { text-align: center; }
.section-head.center .section-title, .section-head.center .lead { margin-inline: auto; }
.section-head .section-title { margin-bottom: var(--space-sm); }

.accent, .grad {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  max-width: 62ch;
}

/* ==========================================================================
   Scroll progress (injected by JS)
   ========================================================================== */
.scroll-progress {
  position: fixed;
  top: 0; inset-inline: 0;
  height: 3px;
  z-index: 200;
  background: var(--grad-brand);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}
html[dir="rtl"] .scroll-progress { transform-origin: 100% 50%; }

/* ==========================================================================
   Navigation — floating glass bar
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-block: 0.75rem;
  transition: padding var(--transition);
}
.nav-inner {
  position: relative;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-inline: 1rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), max-width var(--transition);
}
/* Blur lives on a pseudo-layer so the fixed mobile menu isn't trapped */
.nav-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(8, 15, 28, 0);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  transition: background var(--transition), backdrop-filter var(--transition);
}
.nav.scrolled { padding-block: 0.5rem; }
.nav.scrolled .nav-inner {
  border-color: var(--line);
  box-shadow: 0 12px 40px -16px rgba(0, 0, 0, 0.7);
  max-width: calc(var(--maxw) - 2rem);
}
.nav.scrolled .nav-inner::before {
  background: rgba(8, 15, 28, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}

.brand { display: flex; align-items: center; gap: 0.7rem; flex: none; }
.brand img {
  width: 42px; height: 42px; flex: none;
  border-radius: 12px;
  box-shadow: 0 6px 18px -6px var(--brand-glow);
  transition: transform 0.5s var(--ease-spring);
}
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand .brand-name { font-size: 1.12rem; color: var(--text); font-weight: 800; white-space: nowrap; letter-spacing: -0.01em; }
html[lang="fa"] .brand .brand-name { letter-spacing: 0; font-size: 1.18rem; }
.brand .brand-sub { display: none; }

.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a {
  position: relative;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-links a.active { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.nav-links a.active::before {
  content: "";
  position: absolute;
  bottom: 4px;
  inset-inline: 0;
  margin-inline: auto;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 10px var(--brand);
}

.nav-cta {
  margin-inline-start: 0.5rem;
  background: var(--grad-brand);
  color: var(--brand-ink) !important;
  padding: 0.55rem 1.2rem !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 24px -10px var(--brand-glow);
  transition: box-shadow var(--transition) !important;
}
.nav-cta:hover { box-shadow: 0 12px 30px -10px var(--brand-glow); background: var(--grad-brand) !important; }
.nav-cta.active::before { display: none; }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.lang-toggle .lt-label { font-family: var(--font-dari); }
html[lang="fa"] .lang-toggle .lt-label { font-family: var(--font-latin); }
.lang-toggle:hover { border-color: var(--brand); color: var(--brand-2); }
.lang-toggle svg { width: 1.05em; height: 1.05em; fill: currentColor; transition: transform 0.6s var(--ease-out); }
.lang-toggle:hover svg { transform: rotate(180deg); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  z-index: 102;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 18px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-backdrop { display: none; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  --bx: 50%; --by: 50%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.1;
  white-space: nowrap;
  transition: scale var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}
html[lang="fa"] .btn { font-weight: 700; }
/* Light that follows the pointer (JS sets --bx/--by) */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120px circle at var(--bx) var(--by), rgba(255, 255, 255, 0.35), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}
.btn:hover::after { opacity: 1; }
.btn:active { scale: 0.97; }

.btn-gold, .btn-primary {
  background: var(--grad-brand);
  color: var(--brand-ink);
  box-shadow: 0 10px 30px -12px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-gold:hover, .btn-primary:hover { box-shadow: 0 16px 40px -12px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35); color: var(--brand-ink); }

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand-2); background: var(--brand-soft); }

.btn-teal {
  background: var(--bull-soft);
  color: var(--bull);
  border-color: rgba(37, 208, 160, 0.35);
}
.btn-teal:hover { background: var(--bull); color: var(--brand-ink); border-color: var(--bull); }

.btn-block { width: 100%; }
.btn-lg { padding: 1.05rem 1.9rem; font-size: 1.05rem; }

.icon-arrow { display: inline-block; transition: transform var(--transition); }
html[dir="rtl"] .icon-arrow { transform: scaleX(-1); }
.btn:hover .icon-arrow { transform: translateX(4px); }
html[dir="rtl"] .btn:hover .icon-arrow { transform: scaleX(-1) translateX(4px); }
.icon-wa { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }

/* ==========================================================================
   Cards — glass surface with pointer spotlight (JS sets --mx/--my)
   ========================================================================== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }

.card, .lp-feature, .term, .step, .calc-card, .acc-item, .founder, .empty-state, .bento {
  --mx: 50%; --my: 0%;
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.card::before, .lp-feature::before, .term::before, .step::before, .bento::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(250, 153, 57, 0.10), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  pointer-events: none;
}
.card:hover::before, .lp-feature:hover::before, .term:hover::before, .step:hover::before, .bento:hover::before { opacity: 1; }
.card:hover, .lp-feature:hover, .bento:hover { border-color: rgba(250, 153, 57, 0.35); box-shadow: var(--shadow); }

.card { padding: clamp(1.5rem, 3vw, 2.25rem); }
.card h3 { font-size: 1.35rem; margin-bottom: var(--space-xs); }
.card p { color: var(--muted); margin-bottom: var(--space-md); }
.card-course, .card-tool { display: flex; flex-direction: column; }
.card-course > p, .card-tool > p { flex: 1; }
.card-course > .btn, .card-tool > .btn { align-self: flex-start; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--brand-soft);
  color: var(--brand-2);
  border: 1px solid rgba(250, 153, 57, 0.28);
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  align-self: flex-start;
}
.badge-teal { background: var(--bull-soft); color: var(--bull); border-color: rgba(37, 208, 160, 0.3); }

/* ==========================================================================
   Page header (interior pages)
   ========================================================================== */
.page-head {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4rem);
  text-align: center;
  isolation: isolate;
}
.page-head::before {                     /* market grid */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 30%, transparent 75%);
  animation: gridDrift 30s linear infinite;
}
.page-head::after {                      /* glow */
  content: "";
  position: absolute;
  z-index: -1;
  width: 720px; height: 380px;
  top: -200px; inset-inline: 0; margin-inline: auto;
  background: radial-gradient(closest-side, rgba(250, 153, 57, 0.28), transparent);
  filter: blur(20px);
}
@keyframes gridDrift { to { background-position: 56px 56px, 56px 56px; } }
.page-head h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin-bottom: var(--space-sm);
  max-width: 20ch;
  margin-inline: auto;
}
html[lang="fa"] .page-head h1 { max-width: 24ch; }
.page-head p { color: var(--muted); max-width: 60ch; margin-inline: auto; font-size: clamp(1.02rem, 1.8vw, 1.18rem); }

/* ==========================================================================
   HOME — hero
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(4rem, 9vw, 7rem);
  margin-top: calc(-1 * var(--nav-h));
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 7vw, 5rem));
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%; height: 100%;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
  mask-image: linear-gradient(180deg, #000 60%, transparent);
}
.hero-aura {
  position: absolute;
  z-index: -1;
  width: 900px; height: 900px;
  top: -380px; inset-inline-end: -260px;
  background: radial-gradient(closest-side, rgba(250, 153, 57, 0.22), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}
.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin-bottom: var(--space-md);
}
html[lang="fa"] .hero h1 { line-height: 1.45; letter-spacing: 0; font-size: clamp(2.2rem, 5.4vw, 4.1rem); }
.hero h1 .accent { display: inline; }
.hero .sub {
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  color: var(--muted);
  margin-bottom: var(--space-lg);
  max-width: 44ch;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.95rem 0.4rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
html[dir="rtl"] .hero-eyebrow { padding: 0.4rem 0.5rem 0.4rem 0.95rem; }
.live-dot {
  position: relative;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bull-soft);
  display: grid; place-items: center;
}
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bull); }
.live-dot::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid var(--bull);
  animation: ping 2s var(--ease-out) infinite;
}
@keyframes ping { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: var(--space-lg);
  color: var(--muted);
  font-size: 0.92rem;
}
.hero-proof li { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero-proof svg { width: 18px; height: 18px; stroke: var(--bull); fill: none; stroke-width: 2.4; flex: none; }

/* Hero visual: tilting logo card + floating topic chips */
.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1000px;
  min-height: 420px;
}
.hero-visual::before {                  /* orbit rings */
  content: "";
  position: absolute;
  width: min(440px, 92%); aspect-ratio: 1;
  border-radius: 50%;
  border: 1px dashed rgba(250, 153, 57, 0.25);
  animation: spin 60s linear infinite;
}
.hero-visual::after {
  content: "";
  position: absolute;
  width: min(560px, 118%); aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line);
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-card {
  position: relative;
  z-index: 2;
  width: min(300px, 70%);
  border-radius: 34px;
  transform-style: preserve-3d;
  will-change: transform;
  box-shadow: 0 40px 80px -30px rgba(250, 153, 57, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: float 7s ease-in-out infinite;
}
.hero-card img { border-radius: inherit; width: 100%; }
.hero-card::after {                      /* glossy sheen */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.28) 0%, transparent 35%, transparent 65%, rgba(255, 255, 255, 0.08) 100%);
  mix-blend-mode: overlay;
  pointer-events: none;
}
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }

.chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.9rem;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.chip .ci {
  width: 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--brand-soft);
  color: var(--brand-2);
}
.chip .ci svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.chip.bull .ci { background: var(--bull-soft); color: var(--bull); }
.chip-1 { top: 8%; inset-inline-start: 0; animation-delay: -1s; }
.chip-2 { top: 42%; inset-inline-end: -4%; animation-delay: -3s; }
.chip-3 { bottom: 6%; inset-inline-start: 6%; animation-delay: -2s; }

.scroll-cue {
  position: absolute;
  bottom: 22px;
  inset-inline: 0;
  margin-inline: auto;
  width: 26px; height: 42px;
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  opacity: 0.8;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  top: 7px; inset-inline: 0; margin-inline: auto;
  width: 4px; height: 8px; border-radius: 2px;
  background: var(--brand);
  animation: cue 1.8s var(--ease-out) infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 75% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ==========================================================================
   HOME — topic marquee
   ========================================================================== */
.marquee {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  padding-block: 1.1rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  animation: marquee 40s linear infinite;
}
html[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
  color: var(--muted);
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.25rem);
  white-space: nowrap;
}
.marquee-item::after { content: "✦"; color: var(--brand); font-size: 0.8em; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }

/* ==========================================================================
   Stats (count-up)
   ========================================================================== */
.trustbar { position: relative; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: var(--bg-2);
  padding: clamp(1.5rem, 3vw, 2.25rem) 1.25rem;
  text-align: center;
  transition: background var(--transition);
}
.stat:hover { background: var(--surface); }
.stat .num {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
html[lang="fa"] .stat .num { letter-spacing: 0; }
.stat .label { color: var(--muted); font-size: 0.95rem; margin-top: 0.35rem; }

/* ==========================================================================
   HOME — course bento
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-md);
}
.bento { padding: clamp(1.5rem, 3vw, 2.5rem); overflow: hidden; display: flex; flex-direction: column; }
.bento-6 { grid-column: span 6; }
.bento-7 { grid-column: span 7; }
.bento-5 { grid-column: span 5; }
.bento-12 { grid-column: span 12; }
.bento h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin-bottom: var(--space-xs); }
.bento p { color: var(--muted); margin-bottom: var(--space-md); }
.bento .grow { flex: 1; }
.bento .btn { align-self: flex-start; }

/* Lesson dots: one dot per lesson, filled on reveal */
.lesson-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0.25rem 0 var(--space-md);
}
.lesson-dots i {
  width: 14px; height: 14px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  transition: background 0.4s var(--ease-out), transform 0.4s var(--ease-spring), box-shadow 0.4s;
}
.lesson-dots.is-on i { background: var(--grad-brand); border-color: transparent; box-shadow: 0 0 12px -2px var(--brand-glow); }
.lesson-dots.teal.is-on i { background: var(--bull); box-shadow: 0 0 12px -2px rgba(37, 208, 160, 0.6); }
.course-meta {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  color: var(--dim); font-size: 0.88rem; font-weight: 600;
  margin-bottom: var(--space-md);
}
.course-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.course-meta svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.bento-num {
  position: absolute;
  inset-inline-end: clamp(1rem, 3vw, 2rem);
  top: clamp(0.5rem, 2vw, 1.25rem);
  font-size: clamp(5rem, 11vw, 8.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(250, 153, 57, 0.22);
  pointer-events: none;
  font-family: var(--font-latin);
}

/* ==========================================================================
   HOME — learning path (line draws on scroll)
   ========================================================================== */
.path { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }
.path-line {
  position: absolute;
  top: 27px;
  inset-inline: 12%;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.path-line span {
  position: absolute; inset: 0;
  background: var(--grad-brand);
  transform-origin: 0 50%;
  transform: scaleX(1);
}
html[dir="rtl"] .path-line span { transform-origin: 100% 50%; }
.path-step { position: relative; text-align: center; padding-inline: 0.5rem; }
.path-node {
  position: relative;
  z-index: 1;
  width: 56px; height: 56px;
  margin: 0 auto var(--space-sm);
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg);
  border: 2px solid rgba(250, 153, 57, 0.5);
  color: var(--brand-2);
  font-weight: 800;
  font-size: 1.2rem;
  font-family: var(--font-latin);
  box-shadow: 0 0 0 6px var(--bg), 0 0 30px -6px var(--brand-glow);
  transition: transform 0.5s var(--ease-spring), background var(--transition), color var(--transition);
}
html[lang="fa"] .path-node { font-family: var(--font-dari); }
.path-step:hover .path-node { transform: scale(1.1); background: var(--brand); color: var(--brand-ink); }
.path-step h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.path-step p { color: var(--muted); font-size: 0.93rem; line-height: 1.65; }

/* ==========================================================================
   HOME — Islamic finance feature
   ========================================================================== */
.band {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.02), transparent);
  border-block: 1px solid var(--line);
}
.band-islamic {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(37, 208, 160, 0.2);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(600px 300px at 85% 10%, rgba(37, 208, 160, 0.14), transparent 60%),
    radial-gradient(500px 300px at 10% 100%, rgba(250, 153, 57, 0.08), transparent 60%),
    var(--surface);
  padding: clamp(2rem, 5vw, 3.75rem);
}
.band-inner { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.crescent {
  position: relative;
  width: clamp(110px, 16vw, 170px); aspect-ratio: 1;
  display: grid; place-items: center;
  color: var(--bull);
}
.crescent svg { width: 70%; height: 70%; filter: drop-shadow(0 0 24px rgba(37, 208, 160, 0.45)); }
.crescent::before, .crescent::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(37, 208, 160, 0.25);
}
.crescent::after { inset: -14%; border-style: dashed; animation: spin 40s linear infinite; }
.band-islamic .section-title { max-width: none; }

/* ==========================================================================
   HOME — tools with live mini-demo
   ========================================================================== */
.demo {
  margin-block: 0.25rem var(--space-md);
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
}
.demo-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: 0.9rem; color: var(--muted); }
.demo-row b { color: var(--text); font-size: 1.05rem; font-variant-numeric: tabular-nums; font-family: var(--font-latin); direction: ltr; unicode-bidi: isolate; }
.demo-row b.hot { color: var(--brand-2); font-size: 1.35rem; }
.demo input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; margin: 0.9rem 0;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--brand) var(--p, 20%), rgba(255, 255, 255, 0.1) var(--p, 20%));
  cursor: pointer;
}
html[dir="rtl"] .demo input[type="range"] { background: linear-gradient(270deg, var(--brand) var(--p, 20%), rgba(255, 255, 255, 0.1) var(--p, 20%)); }
.demo input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 4px solid var(--brand);
  box-shadow: 0 0 0 6px rgba(250, 153, 57, 0.2);
  transition: transform 0.2s var(--ease-spring);
}
.demo input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.demo input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 4px solid var(--brand);
}
.demo-verdict { margin-top: 0.6rem; font-size: 0.85rem; font-weight: 700; display: flex; align-items: center; gap: 0.4rem; }
.demo-verdict::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.demo-verdict.ok { color: var(--bull); }
.demo-verdict.warn { color: var(--brand-2); }
.demo-verdict.bad { color: var(--bear); }

/* Mini economic-calendar visual */
.cal {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-block: 0.25rem var(--space-md);
}
.cal-day {
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  padding: 0.6rem 0.4rem 0.7rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--dim);
  font-weight: 700;
}
.cal-day .bars { display: flex; justify-content: center; align-items: flex-end; gap: 3px; height: 42px; margin-top: 0.45rem; }
.cal-day .bars i { width: 6px; border-radius: 3px; background: var(--surface-3); transform-origin: bottom; }
.cal-day .bars i.h { background: var(--bear); }
.cal-day .bars i.m { background: var(--brand); }
.cal-day .bars i.l { background: var(--bull); }
.cal-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--dim); margin-bottom: var(--space-md); }
.cal-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.cal-legend span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }

/* ==========================================================================
   Lessons (course page)
   ========================================================================== */
.lesson-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
.lesson {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}
.lesson::before {
  content: "";
  position: absolute;
  inset-block: 0; inset-inline-start: 0;
  width: 3px;
  background: var(--grad-brand);
  transform: scaleY(0.35);
  transition: transform 0.45s var(--ease-out);
}
.lesson:hover { border-color: rgba(250, 153, 57, 0.35); background: var(--surface-2); transform: translateY(-2px); }
.lesson:hover::before { transform: scaleY(1); }
.lesson-num {
  flex: none;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand-2);
  font-weight: 800;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  transition: background var(--transition), color var(--transition);
}
.lesson:hover .lesson-num { background: var(--grad-brand); color: var(--brand-ink); }
.lesson-body { flex: 1; min-width: 0; }
.lesson-body h4 { font-size: 1.02rem; font-weight: 600; letter-spacing: 0; line-height: 1.5; }
.lesson .btn { flex: none; padding: 0.55rem 1rem; font-size: 0.85rem; }

/* ==========================================================================
   Tables
   ========================================================================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; min-width: 640px; }
table.data th, table.data td { padding: 1rem 1.2rem; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { background: var(--surface-2); color: var(--brand-2); font-weight: 700; white-space: nowrap; font-size: 0.92rem; }
table.data tbody tr { transition: background var(--transition); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: rgba(250, 153, 57, 0.04); }
.cell-green { color: var(--bull); font-weight: 600; }
.cell-red { color: var(--bear); font-weight: 600; }

/* ==========================================================================
   Accordion
   ========================================================================== */
.accordion { display: flex; flex-direction: column; gap: 0.75rem; }
.acc-item { border-radius: var(--radius-sm); overflow: hidden; }
.acc-item:has(.acc-head[aria-expanded="true"]) { border-color: rgba(250, 153, 57, 0.35); background: var(--surface-2); }
.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1.08rem;
  font-weight: 700;
  text-align: start;
  padding: 1.2rem 1.4rem;
  cursor: pointer;
  transition: color var(--transition);
}
.acc-head:hover { color: var(--brand-2); }
.acc-head > span:first-child { flex: 1 1 auto; min-width: 0; }
.acc-head .acc-icon {
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  color: var(--brand-2);
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.45s var(--ease-spring), background var(--transition), color var(--transition);
}
.acc-head[aria-expanded="true"] .acc-icon { transform: rotate(135deg); background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.acc-head .acc-count { font-size: 0.82rem; color: var(--dim); font-weight: 600; margin-inline-start: auto; white-space: nowrap; }
.acc-panel { max-height: 0; overflow: hidden; transition: max-height 0.45s var(--ease-out); }
.acc-panel-inner { padding: 0 1.4rem 1.4rem; color: var(--muted); }
.acc-panel-inner .lesson + .lesson { margin-top: 0.6rem; }
.acc-panel-inner .lesson { background: var(--bg-2); }

/* ==========================================================================
   Alerts / disclaimer
   ========================================================================== */
.disclaimer-band { border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); }
.disclaimer-band .container { padding-block: var(--space-md); }
.disclaimer-text { color: var(--dim); font-size: 0.9rem; text-align: center; }
.alert {
  background: var(--bear-soft);
  border: 1px solid rgba(242, 85, 94, 0.4);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.4rem;
  color: #FFD9DC;
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}
.alert-warn { background: var(--brand-soft); border-color: rgba(250, 153, 57, 0.4); color: #FFE4C4; }
.alert .a-icon { font-size: 1.3rem; flex: none; }

/* ==========================================================================
   Prose
   ========================================================================== */
.prose p { color: var(--muted); margin-bottom: var(--space-md); font-size: 1.04rem; }
.prose h3 { color: var(--text); font-size: 1.35rem; margin: var(--space-lg) 0 var(--space-sm); }
.prose ul.check { display: flex; flex-direction: column; gap: 0.75rem; }
.prose ul.check li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem 1rem 3.2rem;
  color: var(--text);
}
html[dir="rtl"] .prose ul.check li { padding: 1rem 3.2rem 1rem 1.2rem; }
.prose ul.check li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 1rem; top: 1rem;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bull-soft);
  color: var(--bull);
  font-size: 0.8rem; font-weight: 800;
}
.prose ul.bullets li { position: relative; padding-inline-start: 1.6rem; color: var(--muted); margin-bottom: 0.6rem; }
.prose ul.bullets li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0; top: 0.72em;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--grad-brand);
  transform: rotate(45deg);
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonial { display: flex; flex-direction: column; }
.testimonial .quote {
  position: relative;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.8;
  padding-top: 2.5rem;
  margin-bottom: var(--space-md);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 9;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.testimonial.expanded .quote { -webkit-line-clamp: unset; }
.testimonial .quote::before {
  content: "\201C";
  position: absolute;
  top: -0.4rem;
  inset-inline-start: -0.1rem;
  font-size: 4.2rem;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.testimonial .more {
  align-self: flex-start;
  background: none; border: none; cursor: pointer;
  color: var(--brand-2); font-weight: 700; font-size: 0.88rem;
  margin: -0.75rem 0 var(--space-md);
}
.testimonial .who { color: var(--text); font-weight: 700; font-size: 0.95rem; border-top: 1px solid var(--line); padding-top: var(--space-sm); }
.testimonial .who span { color: var(--dim); font-weight: 500; }
.testimonial .who.has-avatar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.t-avatar {
  width: 42px; height: 42px; flex: none;
  border-radius: 14px;
  background: var(--grad-brand);
  color: var(--brand-ink) !important;
  display: inline-grid; place-items: center;
  font-weight: 800 !important; font-size: 1.1rem;
}

.carousel { position: relative; }
.carousel-viewport { overflow: hidden; padding: 0.5rem 0.25rem 1rem; margin: -0.5rem -0.25rem -1rem; }
.carousel-track { display: flex; gap: var(--space-md); transition: transform 0.7s var(--ease-out); will-change: transform; }
.carousel .testimonial { flex: 0 0 calc((100% - 2 * var(--space-md)) / 3); }
.carousel-nav { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: var(--space-lg); }
.carousel-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  color: var(--text);
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 1.6rem; line-height: 1;
  transition: background var(--transition), border-color var(--transition), color var(--transition), opacity var(--transition), transform var(--transition);
}
.carousel-btn:hover:not([disabled]) { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); transform: scale(1.06); }
.carousel-btn[disabled] { opacity: 0.3; cursor: default; }
.carousel-btn .chev { display: block; margin-top: -2px; }
html[dir="rtl"] .carousel-btn .chev { transform: scaleX(-1); }
.carousel > .carousel-btn { position: absolute; top: 45%; transform: translateY(-50%); z-index: 3; }
.carousel > .carousel-btn.prev { inset-inline-start: -22px; }
.carousel > .carousel-btn.next { inset-inline-end: -22px; }
.carousel > .carousel-btn:hover:not([disabled]) { transform: translateY(-50%) scale(1.06); }
.carousel-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: var(--space-md); }
.carousel-dots button {
  width: 8px; height: 8px; padding: 0;
  border-radius: 8px;
  border: none; cursor: pointer;
  background: var(--line-strong);
  transition: background var(--transition), width 0.4s var(--ease-out);
}
.carousel-dots button.active { background: var(--brand); width: 28px; }

/* ==========================================================================
   Final CTA / WhatsApp band
   ========================================================================== */
.wa-band { padding-block: clamp(3rem, 7vw, 5rem); }
.wa-inner {
  --mx: 50%; --my: 50%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 3.5rem) !important;
  border-radius: var(--radius-xl);
  background: var(--grad-brand);
  color: var(--brand-ink);
  box-shadow: 0 30px 80px -30px var(--brand-glow);
}
.wa-inner::before {                     /* pointer glow */
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(500px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.35), transparent 50%);
}
.wa-inner::after {                      /* candle pattern */
  content: "";
  position: absolute; z-index: -1;
  inset-block: 0; inset-inline-end: 0;
  width: 55%;
  opacity: 0.16;
  background:
    repeating-linear-gradient(90deg, transparent 0 22px, var(--brand-ink) 22px 24px, transparent 24px 46px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent), linear-gradient(90deg, transparent, #000);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.wa-band h2 { font-size: clamp(1.5rem, 3.6vw, 2.4rem); color: var(--brand-ink); max-width: 20ch; }
html[lang="fa"] .wa-band h2 { max-width: 26ch; }
.wa-band .btn-gold { background: var(--brand-ink); color: #fff; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.6); }
.wa-band .btn-gold:hover { background: #000; color: #fff; }

/* ==========================================================================
   Founder
   ========================================================================== */
.founder {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.founder-photo {
  width: 220px; height: 220px;
  border-radius: 32px;
  object-fit: cover;
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--line-strong), 0 30px 60px -25px var(--brand-glow);
  transform: rotate(-3deg);
  transition: transform 0.6s var(--ease-spring);
}
.founder:hover .founder-photo { transform: rotate(0deg) scale(1.02); }
.founder-photo.placeholder { display: grid; place-items: center; color: var(--muted); font-size: 0.85rem; text-align: center; padding: var(--space-sm); }
.founder h3 { font-size: 1.6rem; margin-bottom: 0.2rem; }
.founder .founder-role { color: var(--brand-2); font-size: 0.98rem; font-weight: 600; margin-bottom: var(--space-sm); }
.founder p { color: var(--muted); }
.founder .founder-quote {
  border-inline-start: 3px solid var(--brand);
  padding-inline-start: var(--space-md);
  color: var(--text);
  font-style: italic;
  margin-top: var(--space-md);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  position: relative;
  margin-top: var(--space-lg);
  padding-block: clamp(3rem, 7vw, 5rem) var(--space-md);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  top: -1px; inset-inline: 0; margin-inline: auto;
  width: min(600px, 80%); height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
}
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1.1fr; gap: var(--space-lg); align-items: start; }
.footer .brand img { width: 50px; height: 50px; }
.footer-col h4 {
  color: var(--text);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}
html[lang="fa"] .footer-col h4 { letter-spacing: 0; font-size: 0.95rem; }
.footer-col > a:not(.brand) {
  display: block;
  width: fit-content;
  color: var(--muted);
  padding-block: 0.3rem;
  transition: color var(--transition), transform var(--transition);
}
.footer-col > a:not(.brand):hover { color: var(--brand-2); transform: translateX(3px); }
html[dir="rtl"] .footer-col > a:not(.brand):hover { transform: translateX(-3px); }
.footer-note { color: var(--muted); font-size: 0.95rem; margin-top: var(--space-sm); max-width: 34ch; }
.footer-copy {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem;
  color: var(--dim);
  font-size: 0.86rem;
  border-top: 1px solid var(--line);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: var(--space-md);
}
.to-top {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: none; border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--muted); padding: 0.4rem 0.9rem; cursor: pointer; font-size: 0.82rem; font-weight: 600;
  transition: color var(--transition), border-color var(--transition);
}
.to-top:hover { color: var(--brand-2); border-color: var(--brand); }
.footer-wordmark {
  margin-top: var(--space-lg);
  font-size: clamp(3.5rem, 15vw, 12rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(180deg, rgba(250, 153, 57, 0.34), rgba(250, 153, 57, 0.02) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
  pointer-events: none;
}
html[lang="fa"] .footer-wordmark { letter-spacing: 0; line-height: 1.3; }

.socials { display: flex; gap: 0.5rem; margin-top: var(--space-md); flex-wrap: wrap; }
.socials a {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  transition: color var(--transition), border-color var(--transition), background var(--transition), transform 0.4s var(--ease-spring);
}
.socials a:hover { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); transform: translateY(-3px) rotate(-6deg); }
.socials svg { width: 19px; height: 19px; fill: currentColor; }

/* ==========================================================================
   Forms / risk calculator
   ========================================================================== */
.calc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); align-items: start; }
.calc-card { padding: clamp(1.5rem, 3vw, 2.25rem); }
.field { margin-bottom: var(--space-md); }
.field:last-child { margin-bottom: 0; }
.field label { display: block; color: var(--text); font-size: 0.92rem; font-weight: 600; margin-bottom: 0.45rem; }
.field .hint { color: var(--dim); font-size: 0.8rem; margin-top: 0.35rem; }
.field input, .field select {
  width: 100%;
  font-family: var(--font-latin);
  font-size: 1.05rem;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  padding: 0.8rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
html[lang="fa"] .field input, html[lang="fa"] .field select { font-family: var(--font-dari); }
.field input:hover, .field select:hover { border-color: rgba(250, 153, 57, 0.4); }
.field input:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); background: var(--bg); }
.field .with-unit { position: relative; }
.field .with-unit .unit {
  position: absolute; inset-inline-end: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--dim); font-size: 0.88rem; font-weight: 600; pointer-events: none;
}
.field .with-unit input { padding-inline-end: 3.4rem; }

.result-list { display: flex; flex-direction: column; gap: 0.6rem; }
.result-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm);
  padding: 0.95rem 1.2rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  transition: border-color var(--transition), background var(--transition);
}
.result-row.primary { border-color: rgba(250, 153, 57, 0.4); background: linear-gradient(90deg, var(--brand-soft), transparent); }
.result-row .r-label { color: var(--muted); font-size: 0.93rem; }
.result-row .r-value { color: var(--text); font-weight: 800; font-size: 1.25rem; font-family: var(--font-latin); direction: ltr; font-variant-numeric: tabular-nums; }
.result-row.primary .r-value { font-size: 1.6rem; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.r-value.flash { animation: flash 0.5s var(--ease-out); }
@keyframes flash { 0% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* ==========================================================================
   Steps (how to start)
   ========================================================================== */
.steps { position: relative; display: flex; flex-direction: column; gap: var(--space-md); }
.steps::before {
  content: "";
  position: absolute;
  inset-block: 2rem;
  inset-inline-start: calc(clamp(1.5rem, 3vw, 2.25rem) + 25px);
  width: 2px;
  background: linear-gradient(180deg, var(--brand), rgba(250, 153, 57, 0.05));
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-md);
  align-items: start;
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.step-num {
  position: relative;
  z-index: 1;
  flex: none;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: var(--grad-brand);
  color: var(--brand-ink);
  border-radius: 16px;
  font-weight: 800;
  font-size: 1.35rem;
  box-shadow: 0 10px 30px -10px var(--brand-glow);
}
.step h3 { font-size: 1.3rem; margin-bottom: 0.35rem; }
.step p { color: var(--muted); }

/* ==========================================================================
   Glossary
   ========================================================================== */
.glossary { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
.term { padding: 1.4rem 1.5rem; border-radius: var(--radius-sm); }
.term h3 { color: var(--brand-2); font-size: 1.12rem; margin-bottom: 0.35rem; letter-spacing: 0; }
.term p { color: var(--muted); font-size: 0.96rem; }
.term:hover { border-color: rgba(250, 153, 57, 0.35); transform: translateY(-2px); }

/* ==========================================================================
   Articles / empty state / embed
   ========================================================================== */
.article-card { display: flex; flex-direction: column; }
.article-card .a-meta { color: var(--bull); font-size: 0.8rem; font-weight: 700; margin-bottom: 0.5rem; }
.article-card h3 { font-size: 1.2rem; margin-bottom: var(--space-xs); }
.article-card p { color: var(--muted); margin-bottom: var(--space-md); flex: 1; }
.article-card .a-link { color: var(--brand-2); font-weight: 700; }
.empty-state { text-align: center; max-width: 660px; margin-inline: auto; padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 3rem); }
.empty-ic { font-size: 3rem; margin-bottom: var(--space-sm); display: inline-block; animation: float 5s ease-in-out infinite; }
.empty-state h2 { font-size: clamp(1.4rem, 4vw, 1.8rem); margin-bottom: var(--space-sm); }
.empty-state p { color: var(--muted); margin-bottom: var(--space-lg); }
.embed-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 640px; }
.embed-wrap iframe, .embed-wrap .tradingview-widget-container { width: 100%; }

/* ==========================================================================
   Landing page
   ========================================================================== */
.lp-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 92vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--space-xl);
}
.lp-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  animation: gridDrift 30s linear infinite;
}
.lp-hero::after {
  content: "";
  position: absolute; z-index: -1;
  width: 900px; height: 600px;
  top: -260px; inset-inline: 0; margin-inline: auto;
  background: radial-gradient(closest-side, rgba(250, 153, 57, 0.3), transparent);
}
.lp-hero .container { position: relative; z-index: 1; max-width: 960px; }
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  color: var(--brand-2);
  padding: 0.45rem 1.1rem; border-radius: 999px;
  font-size: 0.88rem; font-weight: 700; margin-bottom: var(--space-md);
}
.lp-hero h1 { font-size: clamp(2.6rem, 7.5vw, 5.4rem); line-height: 1.05; letter-spacing: -0.035em; margin-bottom: var(--space-md); }
html[lang="fa"] .lp-hero h1 { line-height: 1.45; letter-spacing: 0; font-size: clamp(2.2rem, 6vw, 4.2rem); }
.lp-hero .lp-sub { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--muted); max-width: 46ch; margin: 0 auto var(--space-lg); }
.lp-cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.lp-note { margin-top: var(--space-md); color: var(--dim); font-size: 0.9rem; }
.lp-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1.5rem, 5vw, 4rem); margin-top: var(--space-xl); }
.lp-stat { min-width: 110px; }
.lp-stat .n { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-stat .l { color: var(--muted); font-size: 0.95rem; margin-top: 0.4rem; }
.lp-scroll { position: absolute; bottom: 22px; inset-inline: 0; margin-inline: auto; width: 26px; height: 42px; border: 2px solid var(--line-strong); border-radius: 14px; z-index: 1; }
.lp-scroll::after { content: ""; position: absolute; top: 7px; inset-inline: 0; margin-inline: auto; width: 4px; height: 8px; border-radius: 2px; background: var(--brand); animation: cue 1.8s var(--ease-out) infinite; }
.lp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.lp-feature { padding: clamp(1.5rem, 3vw, 2.25rem); }
.lp-ic {
  width: 54px; height: 54px; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-2);
  border: 1px solid rgba(250, 153, 57, 0.25);
  margin-bottom: var(--space-md);
  transition: transform 0.5s var(--ease-spring), background var(--transition), color var(--transition);
}
.lp-feature:hover .lp-ic { transform: rotate(-8deg) scale(1.08); background: var(--brand); color: var(--brand-ink); }
.lp-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; }
.lp-feature h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.lp-feature p { color: var(--muted); }
.lp-quote { max-width: 840px; margin-inline: auto; text-align: center; }
.lp-quote .q { font-size: clamp(1.2rem, 2.8vw, 1.6rem); color: var(--text); line-height: 1.7; font-weight: 500; }
.lp-quote .q::before { content: "\201C"; font-family: Georgia, serif; font-size: 4.5rem; display: block; line-height: 0.5; margin-bottom: 1.5rem; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-quote .qby { color: var(--brand-2); font-weight: 700; margin-top: var(--space-md); }
.lp-quote .qby span { color: var(--muted); font-weight: 500; }

/* ==========================================================================
   Motion helpers (JS adds these)
   ========================================================================== */
.split-word { display: inline-block; white-space: pre; }
.reveal-clip { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; margin-bottom: -0.08em; }
html[lang="fa"] .reveal-clip { padding-block: 0.15em; margin-block: -0.15em; }
/* Gradient text split into words: each word carries the gradient */
.accent-split { background: none; color: inherit; }
.accent-split .split-word {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Intro state for the hero (html.motion is set in <head> only when motion is allowed) */
.motion [data-intro] { opacity: 0; transform: translateY(26px); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .nav-links a { padding: 0.5rem 0.65rem; font-size: 0.9rem; }
  .path { grid-template-columns: repeat(2, 1fr); row-gap: var(--space-lg); }
  .path-line { display: none; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 101;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.25rem;
    padding: calc(var(--nav-h) + 1rem) clamp(1.5rem, 8vw, 3rem) 2rem;
    background: rgba(6, 12, 23, 0.94);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    clip-path: circle(0% at calc(100% - 44px) 44px);
    transition: clip-path 0.6s var(--ease-out), opacity 0.4s var(--ease-out), visibility 0.6s;
    overflow-y: auto;
  }
  html[dir="rtl"] .nav-links { clip-path: circle(0% at 44px 44px); }
  .nav-links.open { opacity: 1; visibility: visible; clip-path: circle(150% at calc(100% - 44px) 44px); }
  html[dir="rtl"] .nav-links.open { clip-path: circle(150% at 44px 44px); }
  .nav-links a:not(.nav-cta) { background: none !important; }
  .brand { position: relative; z-index: 102; }
  .nav-links a {
    font-size: clamp(1.5rem, 6vw, 2.1rem);
    font-weight: 800;
    color: var(--text);
    padding: 0.55rem 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    white-space: normal;
  }
  .nav-links a.active { color: var(--brand-2); }
  .nav-links a.active::before { display: none; }
  .nav-links .nav-cta { margin: var(--space-md) 0 0; text-align: center; border-bottom: none; border-radius: 999px; padding: 1rem !important; font-size: 1.2rem; color: var(--brand-ink); }
  .nav-actions { position: relative; z-index: 102; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero .sub { margin-inline: auto; }
  .hero-cta, .hero-proof, .hero-eyebrow { justify-content: center; }
  .hero-visual { order: -1; min-height: 320px; }
  .bento-7, .bento-5, .bento-6 { grid-column: span 12; }
  .calc-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .band-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .band-islamic .section-title { margin-inline: auto; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md) var(--space-lg); }
  .footer-col:first-child { grid-column: 1 / -1; }
  .carousel .testimonial { flex-basis: calc((100% - var(--space-md)) / 2); }
  .carousel > .carousel-btn { display: none; }
  .lp-features { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .lesson-grid, .glossary, .lp-features { grid-template-columns: 1fr; }
  .path { grid-template-columns: 1fr; }
  .path-step { display: grid; grid-template-columns: auto 1fr; gap: 0 1rem; text-align: start; align-items: start; }
  .path-node { margin: 0; grid-row: span 2; }
  .wa-inner { flex-direction: column; text-align: center; align-items: stretch; }
  .wa-band h2 { margin-inline: auto; }
  .wa-inner .btn { width: 100%; }
  .lesson { flex-wrap: wrap; }
  .lesson .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-copy { justify-content: center; text-align: center; }
  .carousel .testimonial { flex-basis: 100%; }
  .founder { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .founder-photo { width: 180px; height: 180px; }
  .founder .founder-quote { text-align: start; }
  .chip { font-size: 0.75rem; padding: 0.45rem 0.7rem; }
  .chip .ci { width: 24px; height: 24px; }
  .chip-2 { inset-inline-end: 0; }
  .hero-visual { min-height: 280px; }
  .hero-card { width: min(220px, 60%); }
  .steps::before { display: none; }
  .step { grid-template-columns: 1fr; }
  .lp-cta-row .btn { width: 100%; }
  .lp-hero { min-height: auto; }
  .cal { gap: 5px; }
  .lp-scroll, .scroll-cue { display: none; }
}

@media (max-width: 430px) {
  .brand .brand-name { font-size: 1rem; }
  .brand img { width: 36px; height: 36px; }
  .lang-toggle { padding: 0.45rem 0.7rem; }
  .lang-toggle svg { display: none; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .card { padding: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
  .hero-canvas { display: none; }
}

/* Body scroll lock when mobile menu is open */
body.menu-open { overflow: hidden; }

/* Content directly under an interior page header doesn't need a full section gap */
.page-head + .section, .page-head + .section-tight { padding-top: clamp(1rem, 3vw, 2rem); }

/* ==========================================================================
   Student Stories page (students.html)
   ========================================================================== */
.stories-stats { grid-template-columns: repeat(3, 1fr); margin-bottom: clamp(2rem, 5vw, 3rem); }
.lead-num { color: var(--brand-2); font-weight: 800; }
.story-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.filter-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-weight: 700; font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.filter-chip:hover { color: var(--text); border-color: rgba(250, 153, 57, 0.5); }
.filter-chip.active { background: var(--grad-brand); color: var(--brand-ink); border-color: transparent; }
.filter-chip .fc-n {
  min-width: 1.5em; padding: 0 0.4em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem; text-align: center;
}
.filter-chip.active .fc-n { background: rgba(10, 20, 36, 0.18); }
.stories { columns: 3 300px; column-gap: var(--space-md); }
.stories .testimonial { break-inside: avoid; display: flex; margin-bottom: var(--space-md); width: 100%; }
.stories .testimonial .quote { -webkit-line-clamp: unset; display: block; }
.stories .testimonial.is-hidden { display: none; }
@media (max-width: 640px) { .stories-stats { grid-template-columns: repeat(3, 1fr); } .stories-stats .stat { padding-inline: 0.5rem; } }

/* ==========================================================================
   Trading tools: pip value, margin & leverage, market hours
   ========================================================================== */
.field select {
  width: 100%;
  font-family: var(--font-latin);
  font-size: 1.05rem;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  padding: 0.8rem 1rem;
  cursor: pointer;
}
.field[hidden] { display: none; }
.tool-explain { max-width: 820px; margin: clamp(2.5rem, 6vw, 4rem) auto 0; }
.tool-explain h3 { margin-top: 0; }

/* Leverage meter */
.lev-meter { margin-top: 1.25rem; padding: 1.1rem 1.2rem; border-radius: var(--radius-sm); background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line); }
.lev-meter-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 0.92rem; margin-bottom: 0.7rem; }
.lev-meter-head b { color: var(--text); font-size: 1.3rem; font-family: var(--font-latin); }
.lev-bar { position: relative; height: 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.lev-bar span { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w, 0%); border-radius: inherit; background: var(--bull); transition: width 0.6s var(--ease-out), background 0.3s; }
.lev-bar.warn span { background: var(--brand); }
.lev-bar.bad span { background: var(--bear); }
.lev-scale { display: flex; justify-content: space-between; color: var(--dim); font-size: 0.72rem; margin-top: 0.35rem; font-family: var(--font-latin); }

/* Market hours */
.mh-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: var(--radius-xl);
  background: radial-gradient(600px 240px at 0% 0%, rgba(250, 153, 57, 0.14), transparent 60%), var(--surface);
  border: 1px solid var(--line);
  margin-bottom: var(--space-md);
}
.mh-label { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.mh-clock { font-family: var(--font-latin); font-size: clamp(2.6rem, 8vw, 4.2rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[lang="fa"] .mh-clock { font-family: var(--font-dari); letter-spacing: 0; }
.mh-date { color: var(--text); font-weight: 600; }
.mh-you { color: var(--dim); font-size: 0.88rem; margin-top: 0.2rem; }
.mh-status { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1.2rem; border-radius: 999px; font-weight: 700; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-strong); }
.mh-status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dim); }
.mh-status.is-open { color: var(--bull); border-color: rgba(37, 208, 160, 0.4); background: var(--bull-soft); }
.mh-status.is-open::before { background: var(--bull); box-shadow: 0 0 0 4px rgba(37, 208, 160, 0.2); animation: ping 2s var(--ease-out) infinite; }
.mh-status.is-closed { color: var(--brand-2); }
.mh-status.is-closed::before { background: var(--brand); }

.ses-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-sm); margin-bottom: var(--space-md); }
.ses-card { position: relative; padding: 1.25rem 1.3rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: border-color var(--transition), background var(--transition); }
.ses-card.is-open { border-color: rgba(37, 208, 160, 0.45); background: linear-gradient(180deg, var(--bull-soft), transparent 70%), var(--surface); }
.ses-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.ses-top h3 { font-size: 1.15rem; }
.ses-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.ses-card.is-open .ses-dot { background: var(--bull); box-shadow: 0 0 10px var(--bull); }
.ses-hours { font-family: var(--font-latin); font-size: 1.35rem; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
html[lang="fa"] .ses-hours { font-family: var(--font-dari); text-align: end; }
.ses-local { color: var(--dim); font-size: 0.8rem; margin-bottom: 0.5rem; }
.ses-state { color: var(--muted); font-size: 0.88rem; font-weight: 600; min-height: 1.6em; }
.ses-card.is-open .ses-state { color: var(--bull); }
.ses-progress { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); margin-top: 0.7rem; overflow: hidden; }
.ses-progress span { display: block; height: 100%; width: var(--p, 0%); background: var(--bull); border-radius: inherit; transition: width 1s linear; }

.tl-card { padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.tl-headline { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.tl-headline h3 { font-size: 1.15rem; }
.tl-legend { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.85rem; }
.tl-legend i { width: 22px; height: 12px; border-radius: 4px; background: rgba(250, 153, 57, 0.3); border: 1px dashed var(--brand); }
.tl { display: grid; grid-template-columns: 90px 1fr; grid-template-rows: auto auto; column-gap: 1rem; }
.tl-labels { display: grid; grid-template-rows: repeat(4, 34px); align-items: center; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
html[lang="fa"] .tl-labels { font-family: var(--font-dari); }
.tl-track { position: relative; height: calc(4 * 34px); border-radius: var(--radius-xs); background: rgba(0, 0, 0, 0.22); overflow: hidden; }
.tl-grid { position: absolute; inset: 0; background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: calc(100% / 8) 100%; }
.tl-bars { position: absolute; inset: 0; }
.tl-seg { position: absolute; top: calc(var(--row) * 34px + 8px); height: 18px; left: var(--a); width: calc(var(--b) - var(--a)); border-radius: 6px; }
.tl-sydney { background: #5B8DEF; }
.tl-tokyo { background: #E85D8A; }
.tl-london { background: var(--bull); }
.tl-newyork { background: var(--brand); }
.tl-overlap { position: absolute; top: 0; bottom: 0; left: var(--a); width: calc(var(--b) - var(--a)); background: rgba(250, 153, 57, 0.14); border-inline: 1px dashed var(--brand); }
.tl-now { position: absolute; top: 0; bottom: 0; left: var(--x, 0%); width: 2px; background: #fff; box-shadow: 0 0 10px #fff; }
.tl-now::before { content: ""; position: absolute; top: -1px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.tl-hours { grid-column: 2; display: flex; justify-content: space-between; color: var(--dim); font-size: 0.75rem; margin-top: 0.4rem; font-family: var(--font-latin); }

@media (max-width: 960px) { .ses-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .tl { grid-template-columns: 64px 1fr; column-gap: 0.6rem; }
  .tl-labels { font-size: 0.75rem; }
  .tl-hours span:nth-child(even) { visibility: hidden; }
  .mh-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 430px) { .ses-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; } .ses-card { padding: 1rem; } .ses-hours { font-size: 1.1rem; } }

/* ==========================================================================
   Lesson pages (lessons/*.html, generated by build-lessons.py)
   ========================================================================== */
.lesson-head .container { display: flex; flex-direction: column; align-items: center; }
.lesson-head h1 { max-width: 22ch; }
.crumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; color: var(--dim); font-size: 0.88rem; margin-bottom: 1.1rem; position: relative; z-index: 1; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-2); }
.lmeta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.25rem; position: relative; z-index: 1; }
.chip-lite { display: inline-flex; align-items: center; padding: 0.35rem 0.85rem; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03); color: var(--muted); font-size: 0.85rem; font-weight: 600; }

.lesson-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; max-width: 1120px; }
.lesson-toc { position: sticky; top: calc(var(--nav-h) + 1rem); max-height: calc(100vh - var(--nav-h) - 2rem); overflow-y: auto; padding: 1.1rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.toc-title { color: var(--dim); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.6rem; }
html[lang="fa"] .toc-title { text-transform: none; letter-spacing: 0; font-size: 0.88rem; }
.lesson-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.lesson-toc a { display: block; padding: 0.4rem 0.6rem; border-radius: 8px; color: var(--muted); font-size: 0.88rem; line-height: 1.45; text-decoration: none; border-inline-start: 2px solid transparent; }
.lesson-toc a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.lesson-toc a.is-active { color: var(--brand-2); border-inline-start-color: var(--brand); background: var(--brand-soft); }

.lesson-article { min-width: 0; display: flex; flex-direction: column; gap: clamp(2.25rem, 5vw, 3.25rem); }
.lesson-article > * { scroll-margin-top: calc(var(--nav-h) + 1rem); }
.lsec h2 { display: flex; align-items: center; gap: 0.75rem; font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin-bottom: 1.1rem; }
.lsec-num { flex: none; display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 10px; background: var(--brand-soft); color: var(--brand-2); font-size: 0.95rem; font-weight: 800; border: 1px solid rgba(250, 153, 57, 0.3); }
.lesson-article .prose > * + * { margin-top: 1rem; }
.lesson-article .prose p { margin-bottom: 0; }
.lesson-article .prose strong { color: var(--text); }
.lesson-article .prose ul.bullets li { margin-bottom: 0.45rem; }
.lkeys-title, .lhw h2, .lquiz h2 { font-size: 1.35rem; margin-bottom: 1rem; }
.lkeys { border-color: rgba(37, 208, 160, 0.25); }

.steps-list { counter-reset: st; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.steps-list > li { counter-increment: st; position: relative; padding-inline-start: 2.6rem; color: var(--muted); line-height: 1.7; }
.steps-list > li::before { content: counter(st); position: absolute; inset-inline-start: 0; top: 0.1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--brand-2); font-weight: 800; font-size: 0.85rem; border: 1px solid var(--line-strong); }
html[lang="fa"] .steps-list > li::before { content: counter(st, persian); }

.callout { display: flex; gap: 0.85rem; padding: 1rem 1.15rem; border-radius: var(--radius-sm); border: 1px solid rgba(250, 153, 57, 0.3); background: var(--brand-soft); }
.callout p { color: var(--text) !important; }
.callout-ic { flex: none; font-size: 1.15rem; line-height: 1.6; }
.callout-title { display: block; color: var(--brand-2); margin-bottom: 0.2rem; }
.callout-warn { border-color: rgba(242, 85, 94, 0.35); background: var(--bear-soft); }
.callout-warn .callout-title { color: #FF9AA0; }
.callout-tip { border-color: rgba(37, 208, 160, 0.3); background: var(--bull-soft); }
.callout-tip .callout-title { color: var(--bull); }
.lquote { margin: 0; padding: 1rem 1.25rem; border-inline-start: 3px solid var(--brand); background: rgba(255, 255, 255, 0.03); border-radius: 0 var(--radius-xs) var(--radius-xs) 0; }
html[dir="rtl"] .lquote { border-radius: var(--radius-xs) 0 0 var(--radius-xs); }
.lquote p { color: var(--text) !important; font-size: 1.08rem; font-style: italic; }
html[lang="fa"] .lquote p { font-style: normal; }
.lquote cite { display: block; margin-top: 0.4rem; color: var(--brand-2); font-style: normal; font-size: 0.9rem; font-weight: 700; }

.ltable table.data { min-width: 0; }
.ltable table.data th, .ltable table.data td { padding: 0.75rem 1rem; font-size: 0.95rem; }
.ltable table.data td { color: var(--muted); }
.ltable table.data td:first-child { color: var(--text); font-weight: 600; }
table.data[dir="ltr"] th, table.data[dir="ltr"] td { text-align: left; font-family: var(--font-latin); }

.cmp { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.9rem; }
.cmp-col { padding: 1.1rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.cmp-col h4 { font-size: 1.02rem; margin-bottom: 0.6rem; }
.cmp-col ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.cmp-col li { position: relative; padding-inline-start: 1.2rem; color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.cmp-col li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.cmp-good { border-color: rgba(37, 208, 160, 0.3); }
.cmp-good h4 { color: var(--bull); }
.cmp-good li::before { background: var(--bull); }
.cmp-bad { border-color: rgba(242, 85, 94, 0.3); }
.cmp-bad h4 { color: #FF8C93; }
.cmp-bad li::before { background: var(--bear); }
.cmp-brand { border-color: rgba(250, 153, 57, 0.3); }
.cmp-brand h4 { color: var(--brand-2); }
.cmp-brand li::before { background: var(--brand); }

.lstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.8rem; }
.lstat { padding: 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); text-align: center; }
.lstat b { display: block; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.25; }
.lstat span { color: var(--muted); font-size: 0.88rem; }

.formula { padding: 1rem 1.2rem; border-radius: var(--radius-sm); border: 1px dashed rgba(250, 153, 57, 0.45); background: rgba(250, 153, 57, 0.05); }
.formula-eq { font-family: var(--font-latin); font-weight: 700; color: var(--text); font-size: clamp(1rem, 2.2vw, 1.15rem); text-align: center; overflow-x: auto; }
.formula-exp { margin-top: 0.5rem; color: var(--muted) !important; font-size: 0.92rem !important; text-align: center; }

.case { padding: 1.2rem 1.3rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: linear-gradient(180deg, rgba(91, 141, 239, 0.07), transparent), var(--surface); }
.case-tag { display: inline-block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #8FB1FF; margin-bottom: 0.3rem; }
html[lang="fa"] .case-tag { letter-spacing: 0; text-transform: none; font-size: 0.85rem; }
.case h4 { font-size: 1.05rem; margin-bottom: 0.6rem; }
.case ul { margin: 0 0 0.7rem; padding-inline-start: 1.1rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.35rem; }
.case-out { color: var(--text) !important; font-weight: 600; }

.lfig { margin: 0.5rem 0 0; padding: clamp(0.75rem, 2vw, 1.25rem); border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); }
.lfig figcaption { margin-top: 0.6rem; color: var(--dim); font-size: 0.85rem; text-align: center; }
.dg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.dg text { fill: var(--muted); font-size: 13px; paint-order: stroke; stroke: var(--bg-2); stroke-width: 4px; stroke-linejoin: round; }
.dg .t-strong { fill: var(--text); }
.dg .t-muted { fill: var(--muted); }
.dg .t-dim { fill: var(--dim); }
.dg .t-brand { fill: var(--brand-2); }
.dg .t-bull { fill: var(--bull); }
.dg .t-bear { fill: #FF7A82; }
.dg .grid { stroke: rgba(148, 170, 210, 0.08); stroke-width: 1; }
.dg .axis, .dg .ln { stroke: var(--line-strong); stroke-width: 1.5; }
.dg .ln-dim { stroke: rgba(148, 170, 210, 0.3); stroke-width: 1; }
.dg .dashed { stroke-dasharray: 5 5; }
.dg .pl { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.dg .pl-price { stroke: #DCE6F5; }
.dg .pl-ma { stroke: var(--brand); stroke-width: 2.6; }
.dg .pl-rsi { stroke: #8FB1FF; stroke-width: 2; }
.dg .pl-bull { stroke: var(--bull); stroke-width: 3; }
.dg .pl-bear { stroke: var(--bear); stroke-width: 3; }
.dg .trendline { stroke: var(--brand); stroke-width: 2; }
.dg .lvl-bull { stroke: var(--bull); stroke-width: 1.5; }
.dg .lvl-bear { stroke: var(--bear); stroke-width: 1.5; }
.dg .lvl-mid { stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 6 4; }
.dg .dot { fill: #DCE6F5; }
.dg .dot-brand { fill: var(--brand); }
.dg .dot-bear { fill: var(--bear); }
.dg .ah { fill: var(--muted); }
.dg .arw { stroke: var(--muted); stroke-width: 2; }
.dg .arw-brand { stroke: var(--brand); }
.dg .arw-bull { stroke: var(--bull); }
.dg .arw-bear { stroke: var(--bear); }
.dg .cdl .wick { stroke-width: 2; }
.dg .cdl.bull .wick { stroke: var(--bull); } .dg .cdl.bull .body { fill: var(--bull); }
.dg .cdl.bear .wick { stroke: var(--bear); } .dg .cdl.bear .body { fill: var(--bear); }
.dg .cdl.neutral .wick { stroke: #C7D2E3; } .dg .cdl.neutral .body { fill: #C7D2E3; }
.dg .wick-bull { stroke: var(--bull); stroke-width: 3; } .dg .body-bull { fill: var(--bull); }
.dg .wick-bear { stroke: var(--bear); stroke-width: 3; } .dg .body-bear { fill: var(--bear); }
.dg [class^="box-"] { stroke-width: 1.5; }
.dg .box-brand { fill: rgba(250, 153, 57, 0.12); stroke: rgba(250, 153, 57, 0.55); }
.dg .box-bull, .dg .box-good { fill: rgba(37, 208, 160, 0.12); stroke: rgba(37, 208, 160, 0.55); }
.dg .box-bear, .dg .box-bad { fill: rgba(242, 85, 94, 0.12); stroke: rgba(242, 85, 94, 0.55); }
.dg .box-warn { fill: rgba(255, 190, 92, 0.1); stroke: rgba(255, 190, 92, 0.5); }
.dg .box-dim { fill: rgba(148, 170, 210, 0.06); stroke: rgba(148, 170, 210, 0.3); }
.dg .bar-good { fill: var(--bull); } .dg .bar-warn { fill: #FFBE5C; } .dg .bar-bad { fill: var(--bear); }
.dg .ses-asia { fill: #5B8DEF; } .dg .ses-london { fill: var(--bull); } .dg .ses-ny { fill: var(--brand); } .dg .ses-dim { fill: rgba(148, 170, 210, 0.35); }
.dg .overlap { fill: rgba(250, 153, 57, 0.12); stroke: var(--brand); stroke-dasharray: 4 4; }
.dg .panel { fill: rgba(255, 255, 255, 0.02); stroke: var(--line); }
.dg .zone-bull { fill: rgba(37, 208, 160, 0.14); }
.dg .zone-bear { fill: rgba(242, 85, 94, 0.1); }
.dg .zone-brand { fill: rgba(250, 153, 57, 0.18); }
.dg .zone-dim { fill: rgba(148, 170, 210, 0.07); }
.dg .hl-box { fill: none; stroke: var(--brand); stroke-width: 2; stroke-dasharray: 4 3; }
.dg .hub { fill: rgba(250, 153, 57, 0.14); stroke: var(--brand); stroke-width: 2; }
html[lang="fa"] .dg text { font-family: var(--font-dari); }

/* homework answers */
.hw-ans { margin-top: 0.5rem; }
.hw-ans summary { cursor: pointer; color: var(--brand-2); font-weight: 700; font-size: 0.9rem; width: fit-content; }
.hw-ans p { margin-top: 0.4rem; padding: 0.7rem 0.9rem; border-radius: var(--radius-xs); background: var(--bull-soft); color: var(--text); }

/* quiz */
.quiz-intro { color: var(--muted); margin-bottom: 1.2rem; }
.q + .q { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.q-text { display: flex; gap: 0.6rem; color: var(--text); font-weight: 700; margin-bottom: 0.8rem; line-height: 1.6; }
.q-n { flex: none; color: var(--brand-2); }
.q-n::after { content: "."; }
.q-opts { display: grid; gap: 0.55rem; }
.q-opt { display: flex; align-items: flex-start; gap: 0.7rem; width: 100%; text-align: start; padding: 0.75rem 0.9rem; border-radius: var(--radius-xs); border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.02); color: var(--text); font: inherit; font-size: 0.97rem; line-height: 1.55; cursor: pointer; transition: border-color var(--transition), background var(--transition); }
.q-opt:hover:not([disabled]) { border-color: rgba(250, 153, 57, 0.5); background: var(--brand-soft); }
.q-opt:focus-visible { outline: none; box-shadow: var(--ring); }
.q-opt[disabled] { cursor: default; }
.q-letter { flex: none; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 0.8rem; font-weight: 800; }
.q-opt.is-correct { border-color: var(--bull); background: var(--bull-soft); }
.q-opt.is-correct .q-letter { background: var(--bull); color: var(--brand-ink); }
.q-opt.is-wrong { border-color: var(--bear); background: var(--bear-soft); }
.q-opt.is-wrong .q-letter { background: var(--bear); color: #fff; }
.q-why { margin-top: 0.7rem; padding: 0.7rem 0.9rem; border-radius: var(--radius-xs); background: rgba(255, 255, 255, 0.04); color: var(--muted); font-size: 0.93rem; }
.q-why b { color: var(--text); }
.quiz-result { margin-top: 1.5rem; padding: 1.1rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem; }
.quiz-result.is-pass { border-color: var(--bull); background: var(--bull-soft); }
.quiz-score { color: var(--text); font-weight: 700; }

.lremember { text-align: center; padding: clamp(1.5rem, 4vw, 2.25rem); border-radius: var(--radius); border: 1px solid rgba(250, 153, 57, 0.3); background: radial-gradient(500px circle at 50% 0%, rgba(250, 153, 57, 0.12), transparent 70%), var(--surface); }
.lremember .eyebrow { justify-content: center; }
.lremember p { font-size: clamp(1.25rem, 2.8vw, 1.6rem); font-weight: 800; color: var(--text); margin-top: 0.4rem; }

.lesson-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.lesson-pager a { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem 1.15rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: border-color var(--transition), background var(--transition); }
.lesson-pager a:hover { border-color: rgba(250, 153, 57, 0.45); background: var(--surface-2); }
.pager-next { text-align: end; grid-column: 2; }
.pager-dir { color: var(--brand-2); font-size: 0.85rem; font-weight: 700; }
.pager-title { color: var(--text); font-weight: 600; line-height: 1.5; }
.lesson-back { text-align: center; }
.lesson-back a { color: var(--muted); }

/* courses page: open-lesson state */
.lesson.is-done .lesson-num { background: var(--bull); color: var(--brand-ink); }
.lesson.is-done .lesson-body h4::after { content: " ✓"; color: var(--bull); }
.course-progress { color: var(--muted); font-size: 0.92rem; margin: -1rem 0 1.5rem; }
.course-progress b { color: var(--bull); }

@media (max-width: 960px) {
  .lesson-layout { grid-template-columns: minmax(0, 1fr); }
  .lesson-toc { display: none; }
}
@media (max-width: 640px) {
  .lesson-pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: auto; }
  .lsec h2 { font-size: 1.3rem; }
  .lfig { overflow-x: auto; }
  .dg { min-width: 540px; }
}
.lesson-head .badge { align-self: center; }
.quiz-result[hidden], .course-progress[hidden] { display: none; }
.lfig { direction: ltr; }              /* charts read left-to-right; mobile scroll starts at the left */
html[dir="rtl"] .lfig figcaption { direction: rtl; }

/* Lesson pages — public introduction mode */
.lesson-intro { max-width: 820px; display: flex; flex-direction: column; gap: clamp(1.5rem, 4vw, 2.25rem); }
.lintro-card h2 { font-size: 1.35rem; margin-bottom: 1rem; }
.lintro-text { color: var(--text); font-size: 1.08rem; line-height: 1.9; }
.lintro-cta { text-align: center; padding: clamp(1.75rem, 4vw, 2.5rem); border-radius: var(--radius); border: 1px solid rgba(250, 153, 57, 0.35); background: radial-gradient(600px circle at 50% 0%, rgba(250, 153, 57, 0.14), transparent 70%), var(--surface); }
.lintro-cta h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: 0.6rem; }
.lintro-cta p { color: var(--muted); max-width: 56ch; margin: 0 auto 1.4rem; }
.lintro-btns { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

/* ==========================================================================
   Live price ticker (home page, under the menu) — TradingView ticker tape
   ========================================================================== */
.tickerbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: stretch;
  height: 52px;
  margin-top: 0.25rem;
  background: linear-gradient(90deg, rgba(250, 153, 57, 0.07), rgba(14, 26, 45, 0.85) 18%, rgba(14, 26, 45, 0.85) 82%, rgba(37, 208, 160, 0.06)), var(--bg-2);
  border-block: 1px solid var(--line);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.tickerbar::after {                      /* glowing brand line along the bottom edge */
  content: "";
  position: absolute; inset-inline: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand) 30%, var(--bull) 70%, transparent);
  opacity: 0.7;
}
.tickerbar-label {
  flex: none;
  display: flex; align-items: center; gap: 0.55rem;
  padding-inline: clamp(0.75rem, 2.5vw, 1.4rem);
  background: linear-gradient(135deg, rgba(37, 208, 160, 0.16), rgba(37, 208, 160, 0.04));
  border-inline-end: 1px solid var(--line-strong);
  position: relative; z-index: 2;
}
.tickerbar-label .live-dot { width: 18px; height: 18px; }
.tb-live { color: var(--bull); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
.tb-sub { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
html[lang="fa"] .tb-live { letter-spacing: 0; font-size: 0.9rem; }
html[lang="fa"] .tb-sub { font-size: 0.88rem; }
.tickerbar-track {
  position: relative; flex: 1; min-width: 0;
  direction: ltr;                       /* prices always read left-to-right */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.tickerbar .tradingview-widget-container { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s var(--ease-out); }
.tickerbar .tradingview-widget-container iframe { height: 100% !important; }
.tickerbar.is-ready .tradingview-widget-container { opacity: 1; }
/* placeholder: symbol names scroll while the live widget loads */
.tickerbar-ph { position: absolute; inset: 0; display: flex; align-items: center; overflow: hidden; transition: opacity 0.4s; }
.tickerbar.is-ready .tickerbar-ph { opacity: 0; pointer-events: none; }
.tb-ph-run { display: flex; flex: none; gap: 2.25rem; padding-inline-start: 1.5rem; animation: tb-run 40s linear infinite; white-space: nowrap; }
.tb-ph-item { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--text); font-weight: 700; font-size: 0.88rem; }
.tb-ph-item i { width: 56px; height: 9px; border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.16), rgba(255,255,255,0.06)); background-size: 200% 100%; animation: tb-shimmer 1.4s linear infinite; }
html[lang="fa"] .tb-ph-item { font-family: var(--font-dari); }
@keyframes tb-run { to { transform: translateX(-50%); } }
@keyframes tb-shimmer { to { background-position: -200% 0; } }
.tickerbar-off { display: none; position: absolute; inset: 0; align-items: center; padding-inline: 1.25rem; color: var(--muted); font-size: 0.88rem; }
html[lang="fa"] .tickerbar-off { direction: rtl; }
.tickerbar.is-offline .tickerbar-ph, .tickerbar.is-offline .tradingview-widget-container { display: none; }
.tickerbar.is-offline .tickerbar-off { display: flex; }
/* the hero normally slides under the transparent menu; with the ticker it starts below it */
.tickerbar + .hero { margin-top: 0; padding-top: clamp(2.5rem, 7vw, 5rem); }
@media (max-width: 640px) {
  .tickerbar { height: 46px; }
  .tb-sub { display: none; }
  .tickerbar-track { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .tb-ph-run, .tb-ph-item i { animation: none; } }

/* ==========================================================================
   WhatsApp contact — floating chat button + footer number
   ========================================================================== */
.wa-float { position: fixed; z-index: 90; bottom: clamp(14px, 3vw, 24px); inset-inline-end: clamp(14px, 3vw, 24px); }
.wa-fab {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.55rem;
  height: 56px; padding-inline: 1.05rem 1.3rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #2BE07A, #1DA851);
  color: #062B14; font-weight: 800; font-size: 0.95rem; text-decoration: none;
  box-shadow: 0 14px 34px -10px rgba(29, 168, 81, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  animation: wa-in 0.7s var(--ease-spring) 1.2s both;
  transition: box-shadow var(--transition), filter var(--transition);
}
.wa-fab:hover { filter: brightness(1.06); box-shadow: 0 18px 40px -10px rgba(29, 168, 81, 0.85); }
.wa-fab:focus-visible { outline: none; box-shadow: var(--ring); }
.wa-fab .icon-wa { width: 26px; height: 26px; fill: currentColor; flex: none; }
.wa-fab::before {                       /* soft pulse ring */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid #2BE07A; opacity: 0;
  animation: wa-pulse 2.6s var(--ease-out) 2s infinite;
}
html[lang="fa"] .wa-fab { font-family: var(--font-dari); }
@keyframes wa-in { from { opacity: 0; transform: translateY(24px) scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes wa-pulse { 0% { opacity: 0.7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.25); } }
@media (max-width: 640px) {
  .wa-fab { width: 56px; padding: 0; justify-content: center; }
  .wa-fab-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .wa-fab, .wa-fab::before { animation: none; } }
@media print { .wa-float { display: none; } }

.footer-contact { margin: 0.6rem 0 1.1rem; }
.footer-contact a { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); font-weight: 600; text-decoration: none; }
.footer-contact a:hover { color: #2BE07A; }
.footer-contact .icon-wa { width: 18px; height: 18px; fill: #2BE07A; flex: none; }
.join-chat { margin-top: 1.1rem; color: var(--muted); }
.join-chat a { color: #2BE07A; font-weight: 700; }

/* ==========================================================================
   Brokers page (brokers.html, built by build-brokers.py)
   ========================================================================== */
.bk-tips { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-sm); }
.bk-tip { padding: 1.2rem 1.25rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.bk-tip .bk-ic { width: 30px; height: 30px; padding: 6px; border-radius: 10px; background: var(--brand-soft); fill: var(--brand-2); margin-bottom: 0.7rem; }
.bk-tip h3 { font-size: 1.02rem; margin-bottom: 0.35rem; }
.bk-tip p { color: var(--muted); font-size: 0.92rem; line-height: 1.65; }

.bk-wrap { max-width: 1000px; }
.bk-listhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.bk-listhead .section-title { margin-bottom: 0; }
.bk-toggle-all { padding: 0.55rem 1.1rem; font-size: 0.88rem; }
.bk-hint { color: var(--dim); font-size: 0.9rem; margin: 0.5rem 0 1.25rem; }

.bk-head { gap: 1rem; padding: 1rem 1.2rem; }
.bk-title { display: flex; align-items: center; gap: 0.9rem; }
.bk-logo {
  flex: none; width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--bk-bg); color: var(--bk-ink);
  font-family: var(--font-latin); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 8px 18px -10px rgba(0, 0, 0, 0.7);
}
.bk-name-wrap { display: flex; flex-direction: column; min-width: 0; }
.bk-name { font-size: 1.12rem; font-weight: 800; color: var(--text); }
.bk-head:hover .bk-name { color: var(--brand-2); }
.bk-tag { color: var(--muted); font-size: 0.86rem; font-weight: 500; line-height: 1.5; margin-top: 0.1rem; }
.bk-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem; max-width: 46%; }
.bk-chip, .bk-tier { display: inline-flex; align-items: center; padding: 0.22rem 0.6rem; border-radius: 999px; font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.bk-chip { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-strong); color: var(--muted); }
.bk-chip .lang-en, .bk-chip .lang-fa { font-family: inherit; }
.bk-tier-t1 { background: var(--bull-soft); color: var(--bull); border: 1px solid rgba(37, 208, 160, 0.35); }
.bk-tier-mix { background: rgba(91, 141, 239, 0.12); color: #8FB1FF; border: 1px solid rgba(91, 141, 239, 0.35); }
.bk-tier-off { background: var(--brand-soft); color: var(--brand-2); border: 1px solid rgba(250, 153, 57, 0.4); }

.bk-panel { padding-top: 0.25rem; }
.bk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; align-items: start; }
.bk-box { padding: 1.05rem 1.15rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-2); }
.bk-box h4 { display: flex; align-items: center; gap: 0.55rem; font-size: 0.98rem; color: var(--text); margin-bottom: 0.7rem; }
.bk-box .bk-ic { width: 20px; height: 20px; fill: var(--brand-2); flex: none; }
.bk-box dl { margin: 0; }
.bk-row { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 0.75rem; padding: 0.55rem 0; border-top: 1px solid var(--line); }
.bk-row:first-child { border-top: none; padding-top: 0; }
.bk-row dt { color: var(--dim); font-size: 0.85rem; font-weight: 600; }
.bk-row dd { margin: 0; color: var(--text); font-size: 0.92rem; line-height: 1.6; }
.bk-cmp { margin-top: 0.9rem; }
.bk-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.9rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line-strong); }
.bk-best { color: var(--muted); flex: 1 1 320px; }
.bk-best strong { color: var(--brand-2); }
.bk-site { flex: none; padding: 0.6rem 1.15rem; font-size: 0.9rem; }
/* "Open an account" strip under a broker row — only when the broker has a register_url */
.bk-reg { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; padding: 0.75rem 1.2rem; border-top: 1px solid rgba(250, 153, 57, 0.25); background: linear-gradient(90deg, rgba(250, 153, 57, 0.1), transparent 70%); }
.bk-reg p { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.bk-reg-btn { padding: 0.6rem 1.3rem; font-size: 0.92rem; }
.bk-empty { margin-inline: auto; max-width: 720px; }
.bk-empty p { margin-bottom: 0; }
.bk-note { margin-top: 1.75rem; }
.bk-note p { line-height: 1.75; }
.bk-ask { margin-top: 1.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.4rem; border-radius: var(--radius); border: 1px solid rgba(43, 224, 122, 0.3); background: linear-gradient(135deg, rgba(43, 224, 122, 0.08), transparent 60%), var(--surface); }
.bk-ask p { color: var(--text); font-weight: 600; }

@media (max-width: 960px) { .bk-tips { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
  .bk-head { flex-wrap: wrap; position: relative; padding-inline-end: 4rem; }
  .bk-head .acc-icon { position: absolute; top: 1.15rem; inset-inline-end: 1rem; }
  .bk-meta { max-width: none; justify-content: flex-start; padding-inline-start: calc(48px + 0.9rem); }
  .bk-grid { grid-template-columns: 1fr; }
  .bk-reg-btn { flex: 1 1 100%; justify-content: center; }
  .bk-row { grid-template-columns: 1fr; gap: 0.15rem; }
}
@media (max-width: 480px) { .bk-tips { grid-template-columns: 1fr; } .bk-tag { display: none; } }

/* ==========================================================================
   Services page (services.html)
   ========================================================================== */
.sv-wrap { max-width: 1080px; }
.sv-lead { margin-bottom: 2rem; }
.sv-grid { align-items: stretch; }
.sv-card { display: flex; flex-direction: column; }
.sv-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.1rem; }
.sv-top .badge { margin-bottom: 0; }
.sv-ic { width: 52px; height: 52px; padding: 12px; border-radius: 16px; background: var(--brand-soft); fill: var(--brand-2); flex: none; }
.sv-adv .sv-ic { background: rgba(91, 141, 239, 0.14); fill: #8FB1FF; }
.sv-badge-adv { background: rgba(91, 141, 239, 0.12); color: #8FB1FF; border-color: rgba(91, 141, 239, 0.35); }
.sv-card h3 { font-size: 1.4rem; margin-bottom: 0.3rem; }
.sv-card .sv-sub { color: var(--brand-2); font-weight: 600; font-size: 0.95rem; margin-bottom: 0.85rem; }
.sv-adv .sv-sub { color: #8FB1FF; }
.sv-card p { margin-bottom: 1.1rem; }
.sv-h { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); margin-bottom: 0.6rem; }
html[lang="fa"] .sv-h { text-transform: none; letter-spacing: 0; font-size: 0.9rem; }
.sv-list { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: 0.55rem; flex: 1; align-content: start; }
.sv-list li { position: relative; padding-inline-start: 1.7rem; color: var(--text); font-size: 0.95rem; line-height: 1.6; }
.sv-list li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0.3em;
  width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: var(--bull-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2325D0A0' d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6L21 7.5l-1.4-1.4z'/%3E%3C/svg%3E") center / 72% no-repeat;
}
.sv-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem; padding-top: 1.1rem; border-top: 1px dashed var(--line-strong); }
.sv-when { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.sv-when-k { color: var(--dim); font-weight: 500; }
.sv-btn { gap: 0.5rem; padding: 0.7rem 1.3rem; font-size: 0.95rem; }
.sv-btn .icon-wa { width: 18px; height: 18px; fill: currentColor; }
.sv-adv-note { margin-top: 1.5rem; color: var(--muted); text-align: center; }
.sv-adv-note a { color: var(--brand-2); font-weight: 600; }
.sv-steps { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); counter-reset: none; }
.sv-step { display: flex; gap: 1rem; align-items: flex-start; padding: 1.3rem 1.4rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.sv-step-n { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--grad-brand); color: var(--brand-ink); font-weight: 800; font-size: 1.15rem; }
.sv-step h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.sv-step p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
@media (max-width: 860px) { .sv-grid, .sv-steps { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .sv-btn { flex: 1 1 100%; justify-content: center; } }

/* ==========================================================================
   Articles (articles.html list + articles/*.html, built by build-articles.py)
   ========================================================================== */
.art-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.art-chip { padding: 0.45rem 1rem; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03); color: var(--muted); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.art-chip:hover { color: var(--text); border-color: rgba(250, 153, 57, 0.45); }
.art-chip[aria-pressed="true"] { background: var(--brand); border-color: transparent; color: var(--brand-ink); }
.art-chip:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.art-grid { align-items: stretch; }
.art-card { display: flex; flex-direction: column; }
.art-card[hidden] { display: none; }
.art-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.art-card-top .badge { margin-bottom: 0; }
.art-ic { font-size: 1.6rem; line-height: 1; }
.art-card h3 { font-size: 1.2rem; line-height: 1.45; margin-bottom: 0.6rem; }
.art-card h3 a { color: var(--text); text-decoration: none; }
.art-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }   /* whole card is clickable */
.art-card:hover h3 a { color: var(--brand-2); }
.art-card p { flex: 1; font-size: 0.95rem; }
.art-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding-top: 0.9rem; border-top: 1px solid var(--line); margin-top: auto; }
.art-card-meta { color: var(--dim); font-size: 0.82rem; }
.art-more { color: var(--brand-2); font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.art-card a:focus-visible { outline: none; }
.art-card:focus-within { outline: 2px solid var(--brand-2); outline-offset: 3px; }

.art-wrap { max-width: 820px; }
.art-tool { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border-radius: var(--radius-sm); border: 1px solid rgba(37, 208, 160, 0.3); background: linear-gradient(135deg, rgba(37, 208, 160, 0.08), transparent 60%), var(--surface); text-decoration: none; }
.art-tool:hover { border-color: rgba(37, 208, 160, 0.6); }
.art-tool-ic { flex: none; font-size: 1.6rem; }
.art-tool-txt { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.art-tool-k { color: var(--bull); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
html[lang="fa"] .art-tool-k { text-transform: none; letter-spacing: 0; font-size: 0.85rem; }
.art-tool b { color: var(--text); font-size: 1.05rem; }
.art-tool-txt > span:last-child { color: var(--muted); font-size: 0.92rem; }
.art-tool-go { flex: none; color: var(--bull); font-size: 1.3rem; font-weight: 700; }
html[dir="rtl"] .art-tool-go { transform: scaleX(-1); }
.art-disc { color: var(--dim); font-size: 0.85rem; text-align: center; }
.nw { white-space: nowrap; }

/* ==========================================================================
   Podcast (podcast.html — episode list built by build-podcast.py)
   ========================================================================== */
.pod-list { display: flex; flex-direction: column; gap: var(--space-md); max-width: 1040px; margin-inline: auto; }
.pod-ep { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.25rem); align-items: center; }
.pod-latest { border-color: rgba(250, 153, 57, 0.35); }
.pod-art { position: relative; }
.pod-art img { width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--radius-sm); display: block; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.8); }
.pod-new { display: inline-flex; align-items: center; padding: 0.28rem 0.75rem; border-radius: 999px; background: var(--bull); color: var(--brand-ink); font-size: 0.8rem; font-weight: 800; }
.pod-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.9rem; }
.pod-meta .badge { margin-bottom: 0; }
.pod-title { font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.4; margin-bottom: 0.35rem; }
.pod-sub { color: var(--brand-2) !important; font-weight: 600; margin-bottom: 0.75rem !important; }
.pod-desc { color: var(--muted); line-height: 1.8; margin-bottom: 1.25rem !important; }
.pod-follow { text-align: center; color: var(--muted); margin-top: var(--space-md); }
.pod-follow a { color: var(--brand-2); font-weight: 600; }

/* player */
.pod-player { display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1.1rem; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); }
.pp-play { flex: none; width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: var(--grad-brand); color: var(--brand-ink); box-shadow: 0 12px 28px -10px var(--brand-glow); }
.pp-play svg { width: 26px; height: 26px; fill: currentColor; }
.pp-play .pp-i-pause, .pod-player.is-playing .pp-play .pp-i-play { display: none; }
.pod-player.is-playing .pp-play .pp-i-pause { display: block; }
.pp-play:focus-visible, .pp-btn:focus-visible, .pp-seek:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 3px; }
.pp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.pp-seek { --p: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; cursor: pointer;
  background: linear-gradient(90deg, var(--brand) var(--p), rgba(255, 255, 255, 0.14) var(--p)); }
.pp-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); }
.pp-seek::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); }
.pp-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.pp-time { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; font-family: var(--font-latin); }
html[lang="fa"] .pp-time { font-family: inherit; }
.pp-ctrls { display: flex; align-items: center; gap: 0.3rem; }
.pp-btn { display: inline-grid; place-items: center; min-width: 38px; height: 34px; padding: 0 0.5rem; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; text-decoration: none; }
.pp-btn:hover { border-color: rgba(250, 153, 57, 0.5); color: var(--brand-2); }
.pp-btn svg { width: 20px; height: 20px; fill: currentColor; }
.pp-btn svg text { fill: currentColor; }
@media (max-width: 760px) {
  .pod-ep { grid-template-columns: 1fr; }
  .pod-art { max-width: 340px; margin-inline: auto; width: 100%; }
}
@media (max-width: 420px) { .pod-player { padding: 0.8rem; gap: 0.75rem; } .pp-play { width: 50px; height: 50px; } .pp-btn { min-width: 34px; } }
.chip-series { border-color: rgba(250, 153, 57, 0.45); color: var(--brand-2); }
.art-sources a { color: var(--brand-2); word-break: break-word; }

/* ==========================================================================
   Books (books.html — built by build-books.py from _books/books.py)
   ========================================================================== */
.bk2-wrap { max-width: 1040px; }
.bk2-list { display: flex; flex-direction: column; gap: var(--space-md); }
.bk2-book { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.25rem); align-items: start; scroll-margin-top: calc(var(--nav-h) + 1rem); }
.bk2-cover img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; display: block; border-radius: 10px;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.bk2-title { font-size: clamp(1.45rem, 3vw, 1.95rem); line-height: 1.35; margin-bottom: 0.25rem; }
.bk2-author { color: var(--brand-2) !important; font-weight: 600; margin-bottom: 0.9rem !important; }
.bk2-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.2rem; }
.bk2-focus { border-color: rgba(250, 153, 57, 0.45); color: var(--brand-2); }
.bk2-h { font-size: 1.02rem; color: var(--text); margin: 0 0 0.45rem; }
.bk2-book p { color: var(--muted); line-height: 1.85; margin-bottom: 1.1rem; }
.bk2-summary p:last-child { margin-bottom: 1.3rem; }
.bk2-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; padding-top: 1.1rem; border-top: 1px dashed var(--line-strong); }
.bk2-dl { gap: 0.5rem; }
.bk2-dl svg { width: 20px; height: 20px; fill: currentColor; }
.bk2-meta { font-weight: 600; opacity: 0.75; font-size: 0.88em; }
@media (max-width: 720px) {
  .bk2-book { grid-template-columns: 1fr; }
  .bk2-cover { max-width: 220px; margin-inline: auto; width: 100%; }
}
