/* Ditoman theme layer (Nov 2026, final palette).
   Loaded last on every page, after site.css and any inline page styles.
   Petrol ground #101F22, cards #192B2E, warm white text #F2F0E9,
   brand turquoise #57D9C7 for links and details, and yellow #FFAD00
   for primary buttons and a few accents only. The latest-stories
   section on the homepage sits on a light cream band. */

:root {
  --bg: #101f22;
  --surface: #192b2e;
  --surface-2: #213639;
  --line: rgba(242, 240, 233, 0.09);
  --line-strong: rgba(87, 217, 199, 0.36);
  --text: #f2f0e9;
  --muted: #a9b8b4;
  --mint: #57d9c7;
  --green: #57d9c7;
  --yellow: #ffad00;
  --cyan: #57d9c7;
  --violet: #ffad00;
  --spectrum: linear-gradient(100deg, #57d9c7 0%, #8be6d8 100%);
  --cream: #f3eee3;
  --ink: #101f22;
  --ink-muted: #5b6b68;
  --radius: 16px;
}

html { background: var(--bg); }
body { background: var(--bg); color: var(--text); }
::selection { background: rgba(87, 217, 199, 0.32); color: #fff; }

/* Every card that is a link shows it is one */
a.co-card, a.ir-card, a.menu-tile, a.paper, a.featured, .lesson-list a, a.hm-tile, a.ex-tile, a.stat {
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}
a.co-card:hover, a.ir-card:hover, a.menu-tile:hover, a.paper:hover, a.featured:hover, a.ex-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(87, 217, 199, 0.55);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}
a.co-card:focus-visible, a.ir-card:focus-visible, a.ex-tile:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }

/* Calmer radii */
.co-card, .ir-card, .panel, .featured, .tmn, .paper, .pillars, .menu-tile { border-radius: var(--radius); }

/* ---------- Shared header (site.css pages) ---------- */
header { background: transparent; }
header::before { background: rgba(16, 31, 34, 0.9) !important; }
header .nav-links a:hover { color: var(--mint); }
.brand img { width: 32px; height: 32px; }
@media (min-width: 961px) { .home-top .chips { display: none; } }
.brand-en { font-size: 0.95rem; letter-spacing: 0.16em; }
.btn-primary { background: var(--yellow); color: #1a1300; }
.btn-primary:hover { filter: brightness(1.06); }
.nav-tg { background: var(--yellow) !important; color: #1a1300 !important; border-color: var(--yellow) !important; }
.nav-cta { border-color: var(--line-strong); color: var(--mint); }

@media (max-width: 600px) {
  .nav { height: 56px; gap: 8px; }
  .nav-ig, .nav-tg { display: none !important; }
  .brand { gap: 8px; }
  .brand-en { font-size: 0.82rem; }
  .lang-btn { height: 34px; min-width: 40px; padding: 0 10px; }
  .block { padding: 52px 0; }
  .head { margin-bottom: 24px; gap: 10px; }
  .head h2 { font-size: clamp(1.45rem, 6.4vw, 1.9rem); }
  .head p { font-size: 0.95rem; }
  body { font-size: 16px; }
}

/* ---------- Story and lesson template pages ---------- */
header .container.nav { padding: 10px 0; }
header .container.nav .brand-logo { width: 34px; height: 34px; }
header .container.nav .logo-text { font-size: 1.05rem; }
.lesson-badge {
  background: var(--yellow) !important; color: #1a1300 !important; border: 0 !important;
  font-weight: 800; letter-spacing: 0.02em; border-radius: 6px !important; padding: 5px 12px !important; font-size: 0.82rem !important;
}
.hero-image { border-radius: var(--radius) !important; }
.lesson-content, .self-check, .instagram-box { border-radius: var(--radius) !important; }
.instagram-box { background: var(--surface) !important; border: 1px solid var(--line-strong) !important; }
.cta { background: var(--yellow) !important; color: #1a1300 !important; box-shadow: none !important; }
.lang-button.active { background: var(--mint) !important; color: #0b1a1c !important; box-shadow: none !important; }
.button { transition: background 0.2s ease, border-color 0.2s ease; }
.button:hover { background: rgba(87, 217, 199, 0.2) !important; }
.cta:hover { filter: brightness(1.08); }
.lesson-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(87, 217, 199, 0.5); }
.lesson-content a:hover { color: var(--mint); text-decoration-color: var(--mint); }

@media (max-width: 640px) {
  header .container.nav { flex-direction: row !important; flex-wrap: wrap; gap: 6px 10px !important; padding: 8px 0 4px !important; }
  header .container.nav .brand { order: 1; }
  header .container.nav .lang-btn { order: 2; margin-inline-start: auto; height: 34px; }
  header .container.nav .nav-links {
    order: 3; flex: 1 0 100%; flex-wrap: nowrap !important; overflow-x: auto; justify-content: flex-start !important;
    gap: 18px !important; padding: 4px 2px 8px; font-size: 0.9rem; scrollbar-width: none;
  }
  header .container.nav .nav-links::-webkit-scrollbar { display: none; }
  header .container.nav .nav-links a { white-space: nowrap; }
  .hero { padding: 26px 0 18px !important; }
  .hero h1, .section h1 { font-size: clamp(1.6rem, 7vw, 2rem) !important; line-height: 1.45 !important; }
  .subtitle { font-size: 1rem !important; }
  .section { padding: 26px 0 !important; }
  .section-title { font-size: 1.45rem !important; }
  .lesson-content, .self-check { padding: 20px 18px !important; }
  .lesson-content p { font-size: 1rem !important; line-height: 1.95; }
  .lesson-content h3 { font-size: 1.15rem !important; }
}

/* ---------- Join bar, now an inline block above the footer ---------- */
.jb-inline {
  width: min(1180px, 100% - 32px); margin: 40px auto 28px; padding: 22px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
html[data-lang="fa"] .jb-inline { direction: rtl; }
.jb-inline p { margin: 0; font-weight: 800; font-size: 1.05rem; color: var(--text); }
.jb-inline p small { display: block; font-weight: 400; color: var(--muted); font-size: 0.88rem; margin-top: 4px; }

/* Channels: one row of app-style icons, same on every page (join-bar.js draws it) */
.ch-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px;
  margin: 18px 0 6px; max-width: 560px; width: 100%;
}
html[data-lang="fa"] .ch-grid { direction: rtl; }
.ch {
  display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center;
  padding: 12px 4px 10px; border-radius: 16px; background: rgba(242,240,233,.04);
  border: 1px solid var(--line); color: var(--text) !important; text-decoration: none !important;
  font-weight: 700; font-size: .86rem; line-height: 1.2; min-width: 0;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.ch img { width: 52px; height: 52px; border-radius: 14px; display: block; object-fit: contain; }
.ch > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ch small { font-size: .7rem; font-weight: 600; color: var(--muted); margin-top: -3px; }
a.ch:hover { border-color: rgba(87,217,199,.55); background: rgba(87,217,199,.07); transform: translateY(-2px); }
.ch.is-soon { opacity: .55; cursor: default; }
.ch.is-soon img { filter: grayscale(.6); }
.follow-card .ch-grid { margin: 0; }
@media (max-width: 520px) {
  .ch-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .ch { flex: 0 0 calc((100% - 16px) / 3); padding: 12px 4px 10px; font-size: .84rem; }
  .ch img { width: 46px; height: 46px; }
}

/* ---------- Homepage ---------- */
/* One spacing scale for every homepage section */
.home-top, .home-feature, .home-explore, .home-stories, .home-follow { --sec: 56px; }
.home-top { position: relative; padding: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a {
  flex: 0 0 auto; white-space: nowrap; padding: 7px 14px; border-radius: 999px; font-size: 0.88rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.chips a:hover, .chips a:focus-visible { border-color: var(--mint); color: var(--mint); }
.chips a.on { border-color: var(--yellow); color: var(--yellow); font-weight: 800; }
@media (min-width: 961px) { .home-top > .wrap:first-child { display: none; } }

/* hero: Tehran photograph, headline on the reading side */
.home-hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-photo { display: block; position: absolute; inset: 0; z-index: -2; background: #1d3236; }
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 30% 58%; }
.home-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(16, 31, 34, 0) 70%, var(--bg) 100%),
    linear-gradient(to left, rgba(16, 31, 34, 0.94) 22%, rgba(16, 31, 34, 0.55) 48%, rgba(16, 31, 34, 0) 72%);
}
html[data-lang="en"] .home-hero::before {
  background:
    linear-gradient(to bottom, rgba(16, 31, 34, 0) 70%, var(--bg) 100%),
    linear-gradient(to right, rgba(16, 31, 34, 0.94) 22%, rgba(16, 31, 34, 0.55) 48%, rgba(16, 31, 34, 0) 72%);
}
.hero-inner { min-height: clamp(420px, 34vw, 520px); display: flex; align-items: center; }
.masthead { padding: 40px 0 52px; max-width: 600px; }
.masthead h1 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); line-height: 1.45; font-weight: 800; color: var(--text); letter-spacing: -0.005em; }
.masthead h1 .spectrum { color: var(--yellow); background: none; -webkit-text-fill-color: currentColor; }
.masthead p { margin-top: 14px; color: #d6dcd8; font-size: 1.02rem; line-height: 1.95; max-width: 46ch; }
.masthead .tagline {
  margin-top: 18px; font-family: var(--en); font-style: normal; font-weight: 600;
  font-size: 1rem; letter-spacing: 0.06em; color: var(--mint);
}
html[data-lang="fa"] .masthead { direction: rtl; text-align: right; }
html[data-lang="fa"] .masthead .tagline { direction: ltr; text-align: right; }
.pillar-links { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 8px; }
.pillar-links a {
  display: inline-flex; align-items: center; gap: 10px; font-size: 0.95rem; color: var(--text);
  padding: 2px 0; border-bottom: 1px solid transparent; transition: color 0.2s ease, border-color 0.2s ease;
}
.pillar-links a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); flex: none; }
.pillar-links li:last-child a::before { background: var(--yellow); }
.pillar-links a:hover { color: var(--mint); border-bottom-color: rgba(87, 217, 199, 0.5); }
.pillar-links b { font-weight: 700; }
.photo-credit {
  position: absolute; bottom: 14px; left: 16px; margin: 0; z-index: 1;
  font: 500 0.72rem/1.4 Inter, system-ui, sans-serif; color: rgba(242, 240, 233, 0.8); direction: ltr; unicode-bidi: isolate;
  background: rgba(16, 31, 34, 0.55); padding: 3px 8px; border-radius: 6px;
}
html[data-lang="en"] .photo-credit { left: auto; right: 16px; }
.photo-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(242, 240, 233, 0.4); }
.photo-credit a:hover { color: var(--mint); }
.photo-credit .lic::before { content: "·"; display: inline-block; margin: 0 6px; text-decoration: none; }
.photo-credit [lang="fa"] { font-family: IRANYekanX, Tahoma, sans-serif; }

/* featured report */
.home-feature { padding: 8px 0 0; }
.co-card.is-featured {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; padding: 0; align-items: stretch;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
}
.co-card.is-featured .co-art { border-radius: 0; aspect-ratio: 16 / 11; min-height: 0; width: 100%; height: auto; position: relative; }
.co-card.is-featured .co-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.co-card.is-featured .co-body { padding: 32px 34px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; min-width: 0; }
.co-card.is-featured .co-body h3 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); line-height: 1.55; margin: 2px 0 0; display: block; color: var(--text); }
.co-card.is-featured .co-body h3 [lang="fa"] { display: inline; font-size: inherit; color: inherit; margin: 0; }
.co-card.is-featured .co-body p { color: var(--muted); font-size: 0.98rem; line-height: 1.9; margin: 0; max-width: 52ch; }
.co-card.is-featured .co-go {
  margin-top: 8px; padding: 10px 20px; border-radius: 999px;
  background: var(--yellow); color: #1a1300; font-weight: 800; font-size: 0.93rem;
}
.co-card.is-featured .co-cat { background: rgba(87, 217, 199, 0.14); color: var(--mint); }
.co-card.is-featured .co-cat.cat-light { background: rgba(255, 173, 0, 0.14); color: var(--yellow); }
.co-card.is-featured .co-time { color: var(--muted); }
.co-kicker {
  display: inline-block; padding: 3px 10px; border-radius: 6px;
  background: var(--yellow); color: #1a1300; font-weight: 800; font-size: 0.76rem; letter-spacing: 0.02em;
}
.co-card:not(.is-featured) .co-kicker { display: none; }

/* explore tiles */
.home-explore { padding: var(--sec) 0; }
.home-explore .head, .home-stories .head { margin: 0 0 20px; }
.home-explore .head h2, .home-stories .head h2, .home-follow h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.4; letter-spacing: -0.01em; }
.home-explore .head h2 [lang="fa"], .home-stories .head h2 [lang="fa"] { font-size: 1em; font-weight: 800; margin-top: 0; }
.ex-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.ex-tile {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 12px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.ex-tile svg {
  width: 44px; height: 44px; padding: 11px; border-radius: 12px; color: var(--mint);
  background: rgba(87, 217, 199, 0.1); margin-bottom: 4px; box-sizing: border-box;
}
.ex-tile.ex-tmn svg { color: var(--mint); }
.ex-tile b { font-size: 0.97rem; color: var(--text); }
.ex-tile span { font-size: 0.8rem; color: var(--muted); line-height: 1.7; }
html[data-lang="fa"] .ex-tile { direction: rtl; text-align: center; }
html[data-lang="fa"] .follow-card { direction: rtl; text-align: right; }

/* latest stories on a warm cream sheet */
.home-stories {
  background: var(--cream); color: var(--ink); padding: var(--sec) 0 calc(var(--sec) + 4px);
  border-radius: 28px; margin: 0 clamp(0px, 1.2vw, 16px);
}
.home-stories .st-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.home-stories .head h2, .home-stories .head h2 [lang="fa"] { color: var(--ink) !important; }
.st-all {
  font: inherit; font-weight: 800; font-size: 0.9rem; cursor: pointer; padding: 8px 16px; border-radius: 999px;
  background: var(--yellow); color: #1a1300; border: 0; transition: filter 0.2s ease;
}
.st-all:hover { filter: brightness(1.05); }
.st-filter { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 18px; scrollbar-width: none; }
.st-filter::-webkit-scrollbar { display: none; }
.st-filter button {
  flex: 0 0 auto; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  padding: 6px 13px; border-radius: 999px; background: rgba(255, 255, 255, 0.6); color: var(--ink);
  border: 1px solid rgba(16, 31, 34, 0.12); transition: background 0.2s ease, border-color 0.2s ease;
}
.st-filter button:hover { border-color: rgba(16, 31, 34, 0.3); }
.st-filter button.on { background: var(--yellow); border-color: var(--yellow); color: #1a1300; font-weight: 800; }
.home-stories .story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.home-stories .co-card {
  display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 16px; align-items: center;
  padding: 12px; background: #fffdf8; border: 1px solid rgba(16, 31, 34, 0.08); border-radius: 14px; overflow: hidden;
  color: var(--ink); box-shadow: none;
}
.home-stories .co-card[hidden] { display: none !important; }
.home-stories a.co-card:hover { transform: translateY(-2px); border-color: rgba(16, 31, 34, 0.18); box-shadow: 0 10px 24px rgba(16, 31, 34, 0.08); }
.home-stories .co-art { order: 2; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #e7e1d3; min-height: 0; width: 100%; height: auto; position: relative; }
.home-stories .co-art img { width: 100%; height: 100%; object-fit: cover; }
.home-stories .co-body { order: 1; padding: 2px 4px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.home-stories .co-body h3 {
  font-size: 0.98rem; line-height: 1.7; font-weight: 800; margin: 0; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.home-stories .co-body h3 [lang="fa"] { display: inline; font-size: inherit; color: inherit; margin: 0; }
.home-stories .co-card .co-body p, .home-stories .co-card .co-go { display: none; }
.co-cat {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 800; line-height: 1.7;
  background: #dcf4ef; color: #0b5f54;
}
.co-cat.cat-light { background: #ffefc2; color: #6e4800; }
.co-time { display: block; font-size: 0.78rem; color: var(--ink-muted); line-height: 1.6; }
.home-stories:not(.all):not(.filtered) .story-grid > .co-card:nth-child(n+9) { display: none; }
.home-stories.filtered .st-more-row { display: none; }
.st-more-row { text-align: center; margin-top: 22px; }
.st-more-row .st-more {
  font: inherit; font-weight: 800; padding: 10px 22px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1.5px solid var(--ink); transition: background 0.2s ease, color 0.2s ease;
}
.st-more-row .st-more:hover { background: var(--ink); color: var(--cream); }
html[data-lang="fa"] .home-stories .co-body { direction: rtl; text-align: right; }

/* the three pillars further down: brand colours instead of the retired blue and violet */
#about .pillar-icon circle { stroke: var(--mint); }
#about .pillar-icon path { stroke: var(--mint); }
#about .pillar:last-child .pillar-icon circle, #about .pillar:last-child .pillar-icon path { stroke: var(--yellow); }

/* follow block */
.home-follow { padding: var(--sec) 0; }
.follow-card {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 26px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
}
.follow-card p { color: var(--muted); margin-top: 4px; }
.follow-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.follow-actions a { padding: 10px 20px; border-radius: 999px; font-weight: 800; font-size: 0.93rem; transition: filter 0.2s ease; }
.follow-actions a:hover { filter: brightness(1.08); }
.f-tg { background: var(--yellow); color: #1a1300; }
.f-bale { background: var(--mint); color: #0b1a1c; }
.f-ig { border: 1px solid var(--line-strong); color: var(--text); }

@media (max-width: 1100px) { .ex-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .home-top, .home-feature, .home-explore, .home-stories, .home-follow { --sec: 40px; }
  .home-hero { overflow: visible; }
  .home-hero::before, html[data-lang="en"] .home-hero::before { display: none; }
  .hero-photo { position: relative; inset: auto; z-index: 0; height: 230px; }
  .hero-photo img { object-position: 46% 62%; }
  .hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(16, 31, 34, 0) 55%, var(--bg) 100%); }
  .hero-inner { min-height: 0; display: block; }
  .masthead { padding: 6px 0 26px; max-width: none; }
  .photo-credit { top: 200px; bottom: auto; left: 12px; }
  html[data-lang="en"] .photo-credit { right: 12px; }
  .home-stories .story-grid { grid-template-columns: 1fr; }
  .co-card.is-featured, .home-stories .co-card.is-featured { grid-template-columns: 1fr; }
  .co-card.is-featured .co-art { aspect-ratio: 1 / 1; }
  .co-card.is-featured .co-art img { object-position: top; }
  .co-card.is-featured .co-body { padding: 18px 18px 22px; }
}
@media (max-width: 600px) {
  .hero-photo { height: 200px; }
  .photo-credit { top: 172px; font-size: 0.66rem; }
  .masthead h1 { font-size: 1.55rem; }
  .masthead p { font-size: 0.95rem; margin-top: 10px; }
  .masthead .tagline { font-size: 0.95rem; margin-top: 12px; }
  .pillar-links { margin-top: 16px; gap: 6px; }
  .pillar-links a { font-size: 0.9rem; }
  .ex-grid { gap: 8px; }
  .ex-tile { padding: 14px 6px 12px; }
  .ex-tile svg { width: 38px; height: 38px; padding: 9px; }
  .ex-tile b { font-size: 0.86rem; }
  .ex-tile span { display: none; }
  .home-stories { border-radius: 22px; margin: 0; }
  .home-stories .co-card { grid-template-columns: minmax(0, 1fr) 84px; padding: 10px; gap: 12px; }
  .home-stories .co-body h3 { font-size: 0.95rem; }
  .follow-card { padding: 20px 18px; }
  .follow-actions { width: 100%; }
  .follow-actions a { flex: 1 1 0; text-align: center; padding: 10px 8px; }
}

/* ---------- Site search ---------- */
.search-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  font: 600 0.88rem IRANYekanX, Inter, Tahoma, sans-serif; transition: border-color 0.2s ease, color 0.2s ease;
}
.search-btn svg { width: 18px; height: 18px; }
.search-btn:hover, .search-btn:focus-visible { border-color: var(--mint); color: var(--mint); }
.search-btn:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
@media (max-width: 960px) { .search-btn { width: 38px; padding: 0; justify-content: center; } .search-btn .sb-word { display: none; } }
@media (max-width: 600px) { .search-btn { width: 34px; height: 34px; } }
header .nav-links a.is-current { color: var(--text); box-shadow: inset 0 -2px 0 var(--yellow); }
body.sx-open { overflow: hidden; }
.sx[hidden] { display: none !important; }
.sx { position: fixed; inset: 0; z-index: 3000; font-family: IRANYekanX, Inter, Tahoma, sans-serif; color: var(--text); }
.sx-back { position: absolute; inset: 0; background: rgba(6, 14, 16, 0.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sx-panel {
  position: relative; margin: 8vh auto 0; width: min(680px, 100% - 24px); max-height: 80vh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
.sx-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sx-bar > svg { width: 20px; height: 20px; color: var(--mint); flex: none; }
.sx-q {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text);
  font: 500 1.05rem IRANYekanX, Inter, Tahoma, sans-serif; padding: 6px 0;
}
.sx-q::placeholder { color: var(--muted); }
.sx-q::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.sx-close {
  flex: none; font: inherit; font-size: 0.82rem; cursor: pointer; padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.sx-close:hover { color: var(--text); }
.sx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sx-body { overflow-y: auto; padding: 10px 10px 16px; overscroll-behavior: contain; }
.sx-hint, .sx-count { margin: 4px 6px 8px; font-size: 0.84rem; color: var(--muted); }
.sx-sugg { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 6px 6px; }
.sx-sugg button, .sx-sugg a {
  font: inherit; font-size: 0.86rem; cursor: pointer; padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
}
.sx-sugg button:hover, .sx-sugg a:hover { border-color: var(--mint); color: var(--mint); }
.sx-empty { padding: 6px; }
.sx-empty p { margin: 0 0 10px; line-height: 1.9; color: var(--muted); font-size: 0.92rem; }
.sx-empty b { color: var(--text); }
.sx-list { list-style: none; margin: 0; padding: 0; }
.sx-list a { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 10px; border-radius: 12px; align-items: start; }
.sx-list a:hover, .sx-list a:focus-visible { background: var(--surface-2); outline: none; }
.sx-list a:focus-visible { box-shadow: inset 0 0 0 2px var(--mint); }
.sx-list img, .sx-noimg { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.sx-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.sx-cat { font-size: 0.7rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: rgba(87, 217, 199, 0.14); color: var(--mint); }
.sx-cat.is-light { background: rgba(255, 173, 0, 0.14); color: var(--yellow); }
.sx-title { font-size: 0.97rem; line-height: 1.6; color: var(--text); }
.sx-sub { font-size: 0.8rem; color: var(--muted); }
.sx-snip {
  font-size: 0.82rem; line-height: 1.75; color: #b9c4c0; width: 100%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-width: 600px) {
  .sx-panel { margin: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; }
  .sx-bar { padding: 10px 12px; }
}

/* ---------- Story and lesson pages: petrol surfaces ---------- */
body:has(> header .container.nav) { background: var(--bg) !important; color: var(--text) !important; }
header:has(.container.nav) { background: rgba(16, 31, 34, 0.92) !important; border-bottom: 1px solid var(--line) !important; }
header .container.nav .logo-text { color: var(--mint) !important; }
header .container.nav .nav-links a { color: #d9e2df !important; }
header .container.nav .nav-links a:hover, header .container.nav .nav-links a.active { color: var(--mint) !important; }
.lesson-content, .card, .quiz-item, .self-check, .meta-box {
  background: var(--surface) !important; border-color: var(--line) !important;
}
.lesson-content p, .self-check p, .instagram-box p { color: #dfe3dd !important; }
.card ul, .quiz-item p, .subtitle, .section-subtitle { color: var(--muted) !important; }
.hero h1, .section-title, .lesson-content h3, .card h3, .quiz-item h3, .meta-box strong { color: var(--text) !important; }
.meta-box span, .check-number, .answer { color: var(--mint) !important; }
.stat { background: rgba(87, 217, 199, 0.07) !important; border-color: rgba(87, 217, 199, 0.18) !important; }
.button { background: rgba(87, 217, 199, 0.12) !important; color: var(--mint) !important; }

header .container.nav { height: auto !important; }

/* Homepage: one rhythm and one heading scale for the sections further down */
body:has(.home-top) main > .block:not(.home-explore):not(.home-stories):not(.home-follow) { padding: 64px 0; }
body:has(.home-top) main > .block .head h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.35; }
body:has(.home-top) main > .block .head h2 [lang="fa"] { font-size: 1em; margin-top: 0; }
@media (max-width: 600px) {
  body:has(.home-top) main > .block:not(.home-explore):not(.home-stories):not(.home-follow) { padding: 44px 0; }
}
/* Hold the featured report's space until the card is moved in, so nothing below jumps */
.feature-slot:empty { min-height: 440px; }
@media (max-width: 860px) { .feature-slot:empty { min-height: calc(100vw + 300px); } }

/* =====================================================================
   Persian geometry layer (design system)
   Pattern A  assets/geo/field.svg    seamless eight-pointed-star field
   Pattern B  assets/geo/rosette.svg  one large rosette for section edges
   Both are single-colour SVGs used as CSS masks, so colour and strength
   come from the tokens below. html[data-geo="a"|"c"] switches to the
   Minimal Heritage or Architectural Signature variants; no attribute = B.
   ===================================================================== */
:root {
  --geo-field: url("assets/geo/field.svg");
  --geo-rosette: url("assets/geo/rosette.svg");
  --geo-field-size: 136px;
  --geo-field-op: 0.06;      /* Pattern A strength on dark */
  --geo-orn-op: 0.085;       /* Pattern B strength on dark */
  --geo-orn-ink-op: 0.06;    /* Pattern B strength on cream */
  --geo-orn-size: 620px;
  --geo-m: 1;                /* mobile multiplier */
  --glow-teal: rgba(87, 217, 199, 0.07);
  --glow-warm: rgba(255, 173, 0, 0.04);
  --ease: 200ms ease;
  --saffron: #f2a01f;
  /* turquoise lines with one saffron vein running through them; the mint half-strength
     so the vein reads at twice the weight of the field */
  --geo-paint: linear-gradient(118deg, rgba(87, 217, 199, 0.5) 0%, rgba(87, 217, 199, 0.5) 40%, var(--saffron) 50%, rgba(87, 217, 199, 0.5) 60%, rgba(87, 217, 199, 0.5) 100%);
  --geo-paint-ink: linear-gradient(118deg, rgba(16, 31, 34, 0.5) 0%, rgba(16, 31, 34, 0.5) 42%, #c77d00 52%, rgba(16, 31, 34, 0.5) 62%, rgba(16, 31, 34, 0.5) 100%);
}
html[data-geo="a"] { --geo-field-op: 0.028; --geo-orn-op: 0.035; --geo-orn-ink-op: 0.03; --geo-orn-size: 520px; --glow-teal: rgba(87, 217, 199, 0.04); --glow-warm: rgba(255, 173, 0, 0); }
html[data-geo="c"] { --geo-field-op: 0.075; --geo-orn-op: 0.13; --geo-orn-ink-op: 0.09; --geo-orn-size: 820px; --glow-teal: rgba(87, 217, 199, 0.09); --glow-warm: rgba(255, 173, 0, 0.055); }
/* Final strengths as plain numbers (older phone browsers do not all accept calc() in opacity).
   The paint is half-strength turquoise with a full-strength saffron vein, so these are about
   twice the visible strength. Phones get about two-thirds. */
:root { --geo-o-field: 0.12; --geo-o-ink: 0.12; --geo-o-orn: 0.17; --geo-o-foot: 0.15; }
@media (max-width: 600px) { :root { --geo-m: 0.65; --geo-field-size: 104px; --geo-o-field: 0.08; --geo-o-ink: 0.08; --geo-o-orn: 0.11; --geo-o-foot: 0.1; } }

/* shared building blocks */
.home-explore, #about, #iran, footer, .home-stories { position: relative; isolation: isolate; }
#about, footer, .home-stories { overflow: hidden; }
.home-explore::before, #iran::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--geo-paint);
  -webkit-mask-image: var(--geo-field), radial-gradient(ellipse 75% 85% at 50% 45%, #000 20%, transparent 78%);
  -webkit-mask-size: var(--geo-field-size) var(--geo-field-size), 100% 100%;
  -webkit-mask-repeat: repeat, no-repeat;
  -webkit-mask-position: center, center;
  -webkit-mask-composite: source-in;
  mask-image: var(--geo-field), radial-gradient(ellipse 75% 85% at 50% 45%, #000 20%, transparent 78%);
  mask-size: var(--geo-field-size) var(--geo-field-size), 100% 100%;
  mask-repeat: repeat, no-repeat;
  mask-position: center, center;
  mask-composite: intersect;
  opacity: var(--geo-o-field);
}
/* around the industry banners the field only frames the top of the section */
#iran::before {
  -webkit-mask-image: var(--geo-field), radial-gradient(ellipse 90% 55% at 50% 0%, #000 15%, transparent 75%);
  mask-image: var(--geo-field), radial-gradient(ellipse 90% 55% at 50% 0%, #000 15%, transparent 75%);
}
#about::before, footer::before, .home-stories::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; aspect-ratio: 1 / 1;
  -webkit-mask: var(--geo-rosette) center / contain no-repeat;
  mask: var(--geo-rosette) center / contain no-repeat;
}

/* Chapter A: the photo settles into the petrol ground */
.hero-photo img { filter: saturate(0.92); }
.home-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; z-index: 0;
  background: linear-gradient(90deg, transparent, rgba(87, 217, 199, 0.18), transparent);
}
.hero-inner { min-height: clamp(400px, 32vw, 500px); }
.masthead { padding-top: 34px; padding-bottom: 46px; }

/* Chapter C: explore tiles on a faint star field */
.home-explore { background: radial-gradient(60% 90% at 50% 0%, var(--glow-teal), transparent 72%); }
.ex-tile { transition: border-color var(--ease), background var(--ease), transform var(--ease); }
.ex-tile svg { transition: background var(--ease), color var(--ease); }
a.ex-tile:hover { transform: translateY(-2px); border-color: rgba(87, 217, 199, 0.45); background: #1c3134; box-shadow: none; }
a.ex-tile:hover svg { background: rgba(87, 217, 199, 0.18); }

/* Chapter D: cream sheet, one ink rosette at the outer corner, away from the cards */
.home-stories { background: #f3efe5; }
:root { --cream: #f3efe5; }
.home-stories::before {
  width: calc(var(--geo-orn-size) * 0.62); top: calc(var(--geo-orn-size) * -0.36); left: calc(var(--geo-orn-size) * -0.26);
  background: var(--geo-paint-ink); opacity: var(--geo-o-ink);
}
.home-stories > .wrap { position: relative; }
.home-stories a.co-card { transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease); }

/* Chapter E: back to dark, pillars beside a large partial rosette */
#about {
  background:
    radial-gradient(45% 70% at 100% 0%, var(--glow-teal), transparent 70%),
    radial-gradient(35% 55% at 0% 100%, var(--glow-warm), transparent 70%);
}
#about::before {
  width: var(--geo-orn-size); top: 50%; left: calc(var(--geo-orn-size) * -0.5); transform: translateY(-50%);
  background: var(--geo-paint); opacity: var(--geo-o-orn);
}
html[data-lang="en"] #about::before { left: auto; right: calc(var(--geo-orn-size) * -0.5); }
#about .pillars { background: rgba(25, 43, 46, 0.72); }
#about .pillar { transition: background var(--ease); }
#about .pillar:hover { background: rgba(87, 217, 199, 0.04); }
#about .pillar-icon { transition: transform var(--ease); }

/* Chapter G: footer signature */
footer {
  background: radial-gradient(60% 120% at 85% 100%, var(--glow-teal), transparent 70%);
}
footer::before {
  width: calc(var(--geo-orn-size) * 0.8); top: 50%; right: calc(var(--geo-orn-size) * -0.4); transform: translateY(-50%);
  background: var(--geo-paint); opacity: var(--geo-o-foot);
}
html[data-lang="en"] footer::before { right: auto; left: calc(var(--geo-orn-size) * -0.4); }
footer { padding-top: 40px; padding-bottom: 48px; }

/* Architectural Signature only: an extra rosette at the edge of the industry section */
html[data-geo="c"] #iran { overflow: hidden; }
html[data-geo="c"] #iran::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; aspect-ratio: 1 / 1;
  width: calc(var(--geo-orn-size) * 0.8); top: -12%; right: calc(var(--geo-orn-size) * -0.4);
  background: var(--mint); opacity: var(--geo-o-orn);
  -webkit-mask: var(--geo-rosette) center / contain no-repeat; mask: var(--geo-rosette) center / contain no-repeat;
}
/* Minimal Heritage: no rosette on the cream sheet */
html[data-geo="a"] .home-stories::before { display: none; }

@media (max-width: 600px) {
  #about::before { width: calc(var(--geo-orn-size) * 0.6); top: 40px; transform: none; left: calc(var(--geo-orn-size) * -0.36); }
  html[data-lang="en"] #about::before { right: calc(var(--geo-orn-size) * -0.36); }
  .home-stories::before { width: calc(var(--geo-orn-size) * 0.42); top: calc(var(--geo-orn-size) * -0.22); left: calc(var(--geo-orn-size) * -0.2); }
  footer::before { width: calc(var(--geo-orn-size) * 0.5); right: calc(var(--geo-orn-size) * -0.25); }
  html[data-lang="en"] footer::before { left: calc(var(--geo-orn-size) * -0.25); }
}

/* ---------- Interaction states ---------- */
main p a:not([class]), .lesson-content a, .foot a {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: rgba(87, 217, 199, 0.4); transition: color var(--ease), text-decoration-color var(--ease);
}
.foot a { text-decoration-color: transparent; }
main p a:not([class]):hover, .foot a:hover { color: var(--mint); text-decoration-color: var(--mint); }
.home-stories p a:not([class]) { text-decoration-color: rgba(16, 31, 34, 0.35); }
.btn-primary, .co-go, .st-all, .f-tg, .nav-tg, .cta { transition: filter var(--ease), transform var(--ease), background var(--ease); }
a.co-card, a.ir-card, a.menu-tile, a.paper, a.featured { transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease); }
:where(a, button, input, summary):focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 6px; }
.home-stories :where(a, button):focus-visible { outline-color: var(--ink); }
header .nav-links a { transition: color var(--ease), box-shadow var(--ease); }
.sx:not([hidden]) .sx-back { animation: sx-fade 180ms ease both; }
.sx:not([hidden]) .sx-panel { animation: sx-rise 200ms ease both; }
@keyframes sx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sx-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  a.co-card:hover, a.ex-tile:hover, a.ir-card:hover, a.menu-tile:hover { transform: none !important; }
}

/* =====================================================================
   Image frames: every frame follows its picture's own shape, so no
   photo, cover or poster is ever cut. (Overrides site.css and the
   inline styles of generated pages.)
   ===================================================================== */

/* Homepage hero: the Tehran panorama keeps its full 3.96:1 frame.
   Wide screens lay the headline over the photo; below that the photo is a
   full-width strip with the headline under it. */
.hero-photo img { object-fit: cover; }
@media all {
  .home-hero { overflow: visible; }
  .home-hero::before, html[data-lang="en"] .home-hero::before { display: none; }
  .hero-photo { position: relative; inset: auto; z-index: 0; height: auto; aspect-ratio: 2400 / 607; }
  .hero-photo img { height: 100%; object-position: center; }
  .hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(16, 31, 34, 0) 70%, rgba(16, 31, 34, 0.6) 100%); }
  .hero-inner { min-height: 0; display: block; }
  .masthead { padding: 22px 0 30px; max-width: 680px; }
  .photo-credit { position: static; display: block; width: fit-content; margin: 6px 16px 0 auto; background: none; padding: 0; color: var(--muted); font-size: 0.68rem; }
  html[data-lang="en"] .photo-credit { margin: 6px auto 0 16px; }
}
@media (max-width: 860px) {
  .hero-photo { height: auto; }
  .masthead { padding: 16px 0 26px; }
}
/* wide screens: headline and summary on the reading side, pillars beside them */
@media (min-width: 861px) {
  .masthead { max-width: none; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 56px; align-items: end; padding: 26px 0 34px; }
  .masthead > h1, .masthead > p:not(.tagline) { grid-column: 1; }
  .masthead > .pillar-links, .masthead > .tagline { grid-column: 2; }
  .masthead > h1 { grid-row: 1; }
  .masthead > p:not(.tagline) { grid-row: 2; }
  .masthead > .pillar-links { grid-row: 1 / 3; align-self: end; margin: 0; }
  .masthead > .tagline { grid-row: 3; grid-column: 1 / -1; }
}

/* Featured report: the square cover stays square */
.co-card.is-featured, .home-stories .co-card.is-featured { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); align-items: center; }
.co-card.is-featured .co-art { aspect-ratio: 1 / 1; align-self: stretch; height: auto; }
.co-card.is-featured .co-art img { object-position: center; }
@media (max-width: 860px) {
  .co-card.is-featured, .home-stories .co-card.is-featured { grid-template-columns: 1fr; }
}

/* "What Iran has" banners: the frame takes the artwork's 1.65:1 shape */
.ir-card, .ir-card.wide { height: auto; aspect-ratio: 1.65 / 1; }
@media (max-width: 760px) {
  .ir-card, .ir-card.wide { aspect-ratio: auto; height: auto; display: flex; flex-direction: column; }
  .ir-card .ir-art { position: relative; inset: auto; aspect-ratio: 1.65 / 1; }
  .ir-card .ir-panel, .ir-card.photo .ir-panel {
    position: relative; inset: auto; width: auto; clip-path: none; padding: 14px 18px 18px;
    background: var(--surface);
  }
  .ir-card .ir-panel::before { display: none; }
  .ir-card::after { display: none; }
  .ir-card.photo .ir-panel h3, .ir-card.photo .ir-tag { text-shadow: none; }
  .ir-card .ir-kicker { margin-bottom: 4px; }
}
.ir-figure { height: auto !important; aspect-ratio: 1.65 / 1; }

/* Company pages: the main photo sets the gallery height */
.k-gallery { height: auto !important; grid-template-rows: auto auto; }
.k-shot.main { aspect-ratio: 1.6 / 1; }
.k-shot:not(.main) { min-height: 0; }
@media (max-width: 760px) {
  .k-gallery { grid-template-rows: auto auto !important; }
  .k-shot:not(.main) { aspect-ratio: 4 / 3; }
}
/* Company cards on the companies hub: square artwork in a square column */
.k-card { grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); align-items: stretch; }
.k-card .k-shot { min-height: 0 !important; align-self: center; aspect-ratio: auto !important; }
.k-card .k-shot > img, .k-card .k-shot > svg { position: static !important; width: 100%; height: auto !important; display: block; }
@media (max-width: 760px) { .k-card { grid-template-columns: 1fr; } }

/* UNESCO gallery: each photo shown whole, portraits narrower, nothing trimmed */
.un-main { aspect-ratio: auto !important; background: transparent !important; width: fit-content; max-width: 100%; margin: 0 auto; }
.un-main img { width: auto !important; max-width: 100%; height: auto !important; max-height: min(72vh, 560px); }
.un-thumbs button { background: transparent !important; }
.un-thumbs img { object-fit: contain !important; }
.home-hero { display: flex; flex-direction: column; }
.home-hero > .hero-photo { order: 0; }
.home-hero > .photo-credit { order: 1; }
.home-hero > .hero-inner { order: 2; }

/* Story stat boxes: long numbers wrap inside the box on small phones */
.stat { min-width: 0; }
.stat b { overflow-wrap: anywhere; color: var(--mint) !important; }
.stat span { color: #d3dbd7 !important; }
@media (max-width: 420px) {
  .stat { padding: 14px !important; }
  .stat b { font-size: 1.55rem !important; }
}

/* ---------- Older phone browsers (iOS 12–14, Android WebView before 2021) ---------- */
/* inset: spelled out for browsers that only know top/right/bottom/left */
.sx, .sx-back { top: 0; right: 0; bottom: 0; left: 0; }
.hero-photo::after, .home-explore::before, #iran::before { top: 0; right: 0; bottom: 0; left: 0; }
@supports not (aspect-ratio: 1 / 1) {
  .home-stories .co-art, .co-card.is-featured .co-art { height: 0 !important; padding-top: 100%; }
  .home-stories .co-art img, .co-card.is-featured .co-art img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
  .hero-photo { height: 0 !important; padding-top: 25.29%; }
  .hero-photo img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
  .ir-card, .ir-card.wide { height: 280px; }
  .ir-figure { height: 280px !important; }
  .k-shot.main { min-height: 340px; }
  .k-shot:not(.main) { min-height: 160px; }
  .feature-slot:empty { min-height: 0; }
}
@supports not (aspect-ratio: 1 / 1) {
  @media (max-width: 760px) {
    .ir-card, .ir-card.wide { height: auto; }
    .ir-card .ir-art { height: 200px; }
    .k-shot.main { min-height: 200px; }
  }
}

/* English text keeps Latin digits: when Inter is unavailable it falls back to system
   fonts, never to the Persian-digit IRANYekanX. Persian letters inside still use IRANYekanX Fa. */
:root { --en: "Inter", "IRANYekanX Fa", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif; }
html[data-lang="en"] body, html[data-lang="en"] body *:not(code):not(pre):not(.lang-btn) { font-family: var(--en); }
html[data-lang="en"] body [lang="fa"], html[data-lang="en"] body [lang="fa"] * { font-family: "IRANYekanX", Tahoma, sans-serif; }
/* calendar: English events read left to right */
html[data-lang="en"] .ev { direction: ltr; }
html[data-lang="en"] .ev-txt, html[data-lang="en"] .ev-txt b { text-align: left !important; }

/* Homepage "Meet Iran's companies": compact cards, five to a row on desktop */
#companies .co-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
#companies .co-card {
  display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; min-height: 0;
}
#companies a.co-card:hover { border-color: rgba(87, 217, 199, 0.45); transform: translateY(-2px); box-shadow: none; }
#companies .co-art { aspect-ratio: 1 / 1; min-height: 0; height: auto; width: 100%; position: relative; border-radius: 0; }
#companies .co-art img, #companies .co-art svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
#companies .co-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#companies .co-sector { display: block; font-size: 0.74rem; font-weight: 700; line-height: 1.6; color: var(--mint); }
#companies .co-body h3 { display: block; font-size: 0.98rem; line-height: 1.55; font-weight: 800; letter-spacing: 0; margin: 0; }
#companies .co-body h3 [lang="fa"] { font-family: "IRANYekanX", Tahoma, sans-serif; font-weight: 800; color: var(--text); }
#companies .co-body p, #companies .co-body .co-fa, #companies .co-go { display: none; }
html[data-lang="fa"] #companies .co-body { direction: rtl; text-align: right; }
@supports not (aspect-ratio: 1 / 1) { #companies .co-art { height: 0; padding-top: 100%; } }
@media (max-width: 1200px) { #companies .co-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { #companies .co-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  #companies .co-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #companies .co-body { padding: 10px 11px 12px; }
  #companies .co-body h3 { font-size: 0.9rem; }
}

/* Companies hub: each sector is a grid of compact cards, five to a row on desktop, two on phones */
.k-sector { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.k-sector > h2 { grid-column: 1 / -1; margin-bottom: 2px; }
.k-sector > .k-card {
  display: flex !important; flex-direction: column; gap: 0; padding: 0; margin: 0 !important; overflow: hidden; min-height: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.k-sector > a.k-card:hover { border-color: rgba(87, 217, 199, 0.45); transform: translateY(-2px); }
.k-sector > .k-card .k-shot { position: relative; width: 100%; aspect-ratio: 1 / 1 !important; min-height: 0 !important; height: auto; margin: 0; border-radius: 0; align-self: auto; }
.k-sector > .k-card .k-shot > img, .k-sector > .k-card .k-shot > svg {
  position: absolute !important; top: 0; left: 0; width: 100%; height: 100% !important; object-fit: cover;
}
.k-sector > .k-card .k-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.k-sector > .k-card h3 { font-size: 0.98rem !important; line-height: 1.55; margin: 0; }
.k-sector > .k-card p {
  font-size: 0.84rem !important; line-height: 1.75; color: var(--muted); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.k-sector > .k-card .k-go { margin-top: auto; font-size: 0.82rem; }
@supports not (aspect-ratio: 1 / 1) { .k-sector > .k-card .k-shot { height: 0 !important; padding-top: 100%; } }
@media (max-width: 1200px) { .k-sector { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .k-sector { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .k-sector { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .k-sector > .k-card .k-card-body { padding: 10px 11px 12px; }
  .k-sector > .k-card h3 { font-size: 0.9rem !important; }
  .k-sector > .k-card p { font-size: 0.8rem !important; -webkit-line-clamp: 2; }
}

/* English mode shows no Persian: the header keeps the logo and the Latin wordmark only */
html[data-lang="en"] .brand-fa { display: none !important; }


/* =====================================================================
   Mobile and tablet navigation: one row of compact tabs with small icons.
   Desktop keeps its existing text menu.
   ===================================================================== */
.nav-links a::before { content: none; }
@media (max-width: 960px) {
  /* site pages: the menu row returns under the brand bar */
  header .nav { flex-wrap: wrap; height: auto !important; row-gap: 0; }
  header .nav > .nav-links, header .container.nav > .nav-links {
    display: flex !important; order: 3; flex: 0 0 100%; width: 100%; gap: 8px; margin: 0;
    overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding: 6px 0 10px; border-top: 0 !important; height: auto !important; justify-content: flex-start !important;
    scroll-snap-type: x proximity; scroll-padding-inline: 12px; font-size: 0.9rem !important;
  }
  header .nav > .nav-links::-webkit-scrollbar, header .container.nav > .nav-links::-webkit-scrollbar { display: none; }
  header .nav-links a {
    flex: 0 0 auto; display: inline-flex !important; align-items: center; gap: 7px; height: 40px; padding: 0 14px !important;
    border-radius: 11px; border: 1px solid rgba(87, 217, 199, 0.28); background: #14282b;
    color: #e6ebe8 !important; white-space: nowrap; scroll-snap-align: start; box-shadow: none !important;
    font-weight: 600; line-height: 1; transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
  }
  header .nav-links a::after { display: none !important; }
  header .nav-links a::before {
    content: ""; flex: none; width: 16px; height: 16px; background: currentColor; opacity: 0.85;
    -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center;
  }
  header .nav-links a:hover { border-color: rgba(87, 217, 199, 0.6); color: #fff !important; }
  header .nav-links a.active, header .nav-links a.is-current, header .nav-links a[aria-current="page"] {
    background: #57d9c7 !important; border-color: #57d9c7; color: #0b1a1c !important; -webkit-text-fill-color: #0b1a1c; font-weight: 800;
  }
  header .nav-links a.active::before, header .nav-links a.is-current::before { opacity: 1; }
  header .nav-links a:focus-visible { outline: 2px solid #57d9c7; outline-offset: 2px; }
  html[data-lang="fa"] header .nav-links { direction: rtl; }
  html[data-lang="en"] header .nav-links { direction: ltr; }
  /* the menu row replaces the hamburger as the first way in; the panel stays for everything else */
  .home-top > .wrap:first-child { display: none; }
}
@media (max-width: 600px) {
  header .nav > .nav-links, header .container.nav > .nav-links { padding: 4px 0 9px; }
  header .nav-links a { height: 38px; padding: 0 12px !important; font-size: 0.86rem; }
}

/* Desktop: the same tabs, a little more compact, centred in the menu row */
@media (min-width: 961px) {
  header .nav-links { align-items: center; gap: 8px !important; }
  .nav .nav-links { height: 56px !important; }
  header .nav-links a {
    display: inline-flex !important; align-items: center; gap: 7px; height: 36px; padding: 0 14px !important;
    border-radius: 10px; border: 1px solid rgba(87, 217, 199, 0.22); background: #14282b; color: #dfe6e3 !important;
    font-size: 0.9rem; font-weight: 600; line-height: 1; box-shadow: none !important;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
  }
  header .nav-links a::after { display: none !important; }
  header .nav-links a::before {
    content: ""; flex: none; width: 15px; height: 15px; background: currentColor; opacity: 0.8;
    -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center;
  }
  header .nav-links a:hover { border-color: rgba(87, 217, 199, 0.6); color: #fff !important; }
  header .nav-links a.active, header .nav-links a.is-current, header .nav-links a[aria-current="page"] {
    background: #57d9c7 !important; border-color: #57d9c7; color: #0b1a1c !important; -webkit-text-fill-color: #0b1a1c; font-weight: 800;
  }
  header .nav-links a:focus-visible { outline: 2px solid #57d9c7; outline-offset: 2px; }
}

/* Brand lockup: Latin wordmark in warm white, a thin turquoise ring around the (unchanged) logo */
header .brand .brand-en, header .container.nav .brand .logo-text.brand-en { color: var(--text) !important; }
header .brand .brand-fa { color: var(--mint) !important; }
header .brand img { border-radius: 50%; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px rgba(87, 217, 199, 0.75); }
.nav-links a[href^="learn"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%205.5c3-1.3%206-1.3%209%20.8%203-2.1%206-2.1%209-.8v13c-3-1.3-6-1.3-9%20.8-3-2.1-6-2.1-9-.8z%22/%3E%3Cpath%20d%3D%22M12%206.3v13.5%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%205.5c3-1.3%206-1.3%209%20.8%203-2.1%206-2.1%209-.8v13c-3-1.3-6-1.3-9%20.8-3-2.1-6-2.1-9-.8z%22/%3E%3Cpath%20d%3D%22M12%206.3v13.5%22/%3E%3C/svg%3E"); }
.nav-links a[href^="iran"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2021s-6.5-5.7-6.5-11a6.5%206.5%200%200%201%2013%200c0%205.3-6.5%2011-6.5%2011z%22/%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2210%22%20r%3D%222.4%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2021s-6.5-5.7-6.5-11a6.5%206.5%200%200%201%2013%200c0%205.3-6.5%2011-6.5%2011z%22/%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2210%22%20r%3D%222.4%22/%3E%3C/svg%3E"); }
.nav-links a[href^="companies"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203%203%207.5l9%204.5%209-4.5z%22/%3E%3Cpath%20d%3D%22m3%2012%209%204.5%209-4.5%22/%3E%3Cpath%20d%3D%22m3%2016.5%209%204.5%209-4.5%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203%203%207.5l9%204.5%209-4.5z%22/%3E%3Cpath%20d%3D%22m3%2012%209%204.5%209-4.5%22/%3E%3Cpath%20d%3D%22m3%2016.5%209%204.5%209-4.5%22/%3E%3C/svg%3E"); }
.nav-links a[href^="prices"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2017.5%209%2011l4%204%208-9%22/%3E%3Cpath%20d%3D%22M15.5%206H21v5.5%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2017.5%209%2011l4%204%208-9%22/%3E%3Cpath%20d%3D%22M15.5%206H21v5.5%22/%3E%3C/svg%3E"); }
.nav-links a[href^="calendar"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223.5%22%20y%3D%225%22%20width%3D%2217%22%20height%3D%2215.5%22%20rx%3D%222.5%22/%3E%3Cpath%20d%3D%22M3.5%2010h17M8%203v4M16%203v4%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223.5%22%20y%3D%225%22%20width%3D%2217%22%20height%3D%2215.5%22%20rx%3D%222.5%22/%3E%3Cpath%20d%3D%22M3.5%2010h17M8%203v4M16%203v4%22/%3E%3C/svg%3E"); }
.nav-links a[href^="tmn"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%2020v-6M10%2020V10M15%2020V6M20%2020V3%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%2020v-6M10%2020V10M15%2020V6M20%2020V3%22/%3E%3C/svg%3E"); }
.nav-links a[href*="whitepaper"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%203h8l4.5%204.5V21H6z%22/%3E%3Cpath%20d%3D%22M14%203v4.5h4.5M9%2012h6M9%2016h6%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%203h8l4.5%204.5V21H6z%22/%3E%3Cpath%20d%3D%22M14%203v4.5h4.5M9%2012h6M9%2016h6%22/%3E%3C/svg%3E"); }
.nav-links a[href^="posts"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%205h16v11H9l-5%204z%22/%3E%3Cpath%20d%3D%22M8%209.5h8M8%2012.5h5%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%205h16v11H9l-5%204z%22/%3E%3Cpath%20d%3D%22M8%209.5h8M8%2012.5h5%22/%3E%3C/svg%3E"); }
header .nav-links a.active::before, header .nav-links a.is-current::before, header .nav-links a[aria-current="page"]::before { background: #0b1a1c; opacity: 1; }

/* Phone and tablet header: breathing room above the brand row and between it and the tabs */
@media (max-width: 960px) {
  header .nav, header .container.nav { padding-top: 10px; padding-bottom: 0; row-gap: 10px !important; }
  header .nav > .nav-links, header .container.nav > .nav-links { padding: 0 2px 12px !important; }
  header .brand img { width: 40px !important; height: 40px !important; }
}
@media (max-width: 600px) {
  header .nav, header .container.nav { padding-top: 12px; }
  header .nav > .nav-links, header .container.nav > .nav-links { padding: 0 2px 12px !important; }
}
@media (max-width: 600px) { header .container.nav { padding-top: 15px !important; } }

/* ---------- Wallet guide: easy to find ---------- */
.tmn-guide-cta {
  display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px;
  padding: 28px 30px !important; border-radius: 20px !important; border: 2px solid var(--yellow) !important;
  background: linear-gradient(135deg, rgba(255, 173, 0, 0.13), rgba(87, 217, 199, 0.05) 70%) !important;
}
.tmn-guide-cta .g-icon, .wallet-link .g-icon {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--yellow); color: #1a1300;
}
.tmn-guide-cta .g-icon svg { width: 34px; height: 34px; }
.tmn-guide-cta .g-kick { display: inline-block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; color: var(--yellow); margin-bottom: 4px; }
.tmn-guide-cta h2 { font-size: clamp(1.4rem, 3vw, 1.9rem) !important; line-height: 1.35; margin: 0 0 6px !important; }
.tmn-guide-cta p { color: #d3dbd7; margin: 0; }
.g-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; counter-reset: g; }
.g-steps li {
  counter-increment: g; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px;
  background: rgba(16, 31, 34, 0.6); border: 1px solid rgba(255, 173, 0, 0.35); font-size: 0.88rem; font-weight: 700;
}
html[dir="rtl"] .g-steps li, html[data-lang="fa"] .g-steps li { padding: 6px 6px 6px 12px; }
.g-steps li::before {
  content: counter(g); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--yellow); color: #1a1300; font-size: 0.8rem; font-weight: 800;
}
.tmn-guide-cta .btn { padding: 14px 26px; font-size: 1rem; white-space: nowrap; }
.btn-wallet { border-color: rgba(255, 173, 0, 0.6) !important; color: var(--yellow) !important; }
@media (max-width: 760px) {
  .tmn-guide-cta { grid-template-columns: auto minmax(0, 1fr); padding: 22px 18px !important; gap: 14px; }
  .tmn-guide-cta .g-icon { width: 52px; height: 52px; border-radius: 15px; align-self: start; }
  .tmn-guide-cta .g-icon svg { width: 28px; height: 28px; }
  .tmn-guide-cta .btn { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
}
/* homepage: a clear wallet-guide link inside the TMN block */
.wallet-link {
  display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 16px; border-radius: 16px;
  border: 1.5px solid rgba(255, 173, 0, 0.55); background: rgba(255, 173, 0, 0.08); color: var(--text);
  transition: border-color 200ms ease, background 200ms ease;
}
.wallet-link:hover { border-color: var(--yellow); background: rgba(255, 173, 0, 0.14); }
.wallet-link .g-icon { width: 46px; height: 46px; border-radius: 13px; flex: none; }
.wallet-link .g-icon svg { width: 26px; height: 26px; }
.wallet-link > span:not(.g-icon) { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wallet-link b { font-size: 1.02rem; font-weight: 800; }
.wallet-link small { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }
.wallet-link i { margin-inline-start: auto; font-style: normal; color: var(--yellow); font-weight: 800; font-size: 1.2rem; }
html[data-lang="en"] .wallet-link i { transform: scaleX(-1); }
/* wallet guide: supported wallets as logo tiles */
.wallet-chips { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 6px 0 18px; padding: 0; }
.wallet-chips li {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 12px;
  border: 1px solid rgba(87, 217, 199, 0.28); background: rgba(16, 31, 34, 0.55); font-size: 0.9rem; font-weight: 700; color: var(--text);
}
.wallet-chips[dir="rtl"] li { padding: 8px 8px 8px 12px; }
.wallet-chips img { width: 32px; height: 32px; border-radius: 9px; background: #fff; object-fit: contain; flex: none; }
@media (max-width: 420px) { .wallet-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wallet-chips li { font-size: 0.84rem; } }

/* Learning path: step number on each lesson card */
.lz-step { display: inline-block; align-self: flex-start; margin-bottom: 8px; padding: 3px 11px; border-radius: 999px; font-size: .78rem; font-weight: 800; color: #101f22; background: var(--yellow); }
.lesson-card h4 [lang="fa"] { font-size: inherit; color: inherit; }

/* ---------- Home hero: a lit, patterned ground instead of flat petrol (16 Nov 2026) ---------- */
.home-hero {
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 88% 50%, rgba(87, 217, 199, 0.2), transparent 66%),
    radial-gradient(42% 52% at 4% 66%, rgba(242, 160, 31, 0.12), transparent 70%),
    linear-gradient(180deg, #1c4046 0%, #153036 42%, var(--bg) 100%);
}
html[data-lang="en"] .home-hero {
  background:
    radial-gradient(60% 70% at 12% 50%, rgba(87, 217, 199, 0.2), transparent 66%),
    radial-gradient(42% 52% at 96% 66%, rgba(242, 160, 31, 0.12), transparent 70%),
    linear-gradient(180deg, #1c4046 0%, #153036 42%, var(--bg) 100%);
}
/* the photograph melts into the band below it */
.home-hero .hero-photo { position: relative; z-index: 1; }
.home-hero .hero-photo::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(28, 64, 70, 0) 58%, rgba(28, 64, 70, 0.55) 84%, #1c4046 100%);
}
.home-hero > .photo-credit, .home-hero > .hero-inner { position: relative; z-index: 1; }
.home-hero > .photo-credit { top: auto; right: auto; bottom: auto; left: auto; }
/* eight-pointed star field with the saffron vein, strongest away from the text */
.home-hero::before, html[data-lang="en"] .home-hero::before {
  content: ""; display: block; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 0; pointer-events: none;
  background: var(--geo-paint); opacity: 0.2;
  -webkit-mask-image: var(--geo-field), linear-gradient(to right, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 82%);
  -webkit-mask-size: var(--geo-field-size) var(--geo-field-size), 100% 100%;
  -webkit-mask-repeat: repeat, no-repeat; -webkit-mask-composite: source-in;
  mask-image: var(--geo-field), linear-gradient(to right, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 82%);
  mask-size: var(--geo-field-size) var(--geo-field-size), 100% 100%;
  mask-repeat: repeat, no-repeat; mask-composite: intersect;
}
html[data-lang="en"] .home-hero::before {
  -webkit-mask-image: var(--geo-field), linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 82%);
  mask-image: var(--geo-field), linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 82%);
}
/* large rosette, half off the edge, on the side away from the headline */
.home-hero .hero-inner::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: min(520px, 70vw); height: min(520px, 70vw); left: -150px; bottom: -190px;
  background: var(--geo-paint); opacity: 0.2;
  -webkit-mask: var(--geo-rosette) center / contain no-repeat; mask: var(--geo-rosette) center / contain no-repeat;
}
html[data-lang="en"] .home-hero .hero-inner::after { left: auto; right: -150px; }
.home-hero .masthead h1 { position: relative; }
.home-hero .masthead h1 .spectrum {
  background: linear-gradient(100deg, #ffad00 0%, #ffd27a 45%, #f2a01f 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #ffad00;
}
@media (max-width: 600px) {
  .home-hero::before, html[data-lang="en"] .home-hero::before { opacity: 0.26; }
  .home-hero .hero-inner::after { left: -120px; bottom: -150px; opacity: 0.24; }
  html[data-lang="en"] .home-hero .hero-inner::after { left: auto; right: -120px; }
}

/* ---------- Featured slider: newest stories side by side, swipe or use the arrows ---------- */
.feat { position: relative; }
.feat-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain; scrollbar-width: none; border-radius: var(--radius); outline-offset: 4px;
}
.feat-track::-webkit-scrollbar { display: none; }
.feat-track > .co-card { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; margin: 0; }
.feat-track > .co-card[hidden] { display: grid !important; }
.feat-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.feat-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(87, 217, 199, 0.45); background: rgba(87, 217, 199, 0.08); color: var(--text);
  font: inherit; font-weight: 800; font-size: 0.95rem; transition: background var(--ease), border-color var(--ease), transform var(--ease);
}
.feat-btn svg { width: 18px; height: 18px; flex: none; color: var(--mint); }
.feat-btn:hover:not(:disabled) { background: rgba(87, 217, 199, 0.18); border-color: var(--mint); transform: translateY(-1px); }
.feat-btn:disabled { opacity: 0.35; cursor: default; }
/* arrows point the way the cards move: newer sits at the reading start, older at the end */
html[dir="rtl"] .feat-older svg { transform: scaleX(-1); }
html:not([dir="rtl"]) .feat-newer svg { transform: scaleX(-1); }
.feat-dots { display: flex; align-items: center; gap: 7px; }
.feat-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: rgba(242, 240, 233, 0.28); cursor: pointer; transition: width var(--ease), background var(--ease); }
.feat-dots button.on { width: 26px; background: var(--yellow); }
@media (max-width: 860px) {
  .feat-track { gap: 12px; }
  .feat-track > .co-card { flex-basis: 90%; }
  .feat-btn { padding: 0 14px; font-size: 0.88rem; }
}

/* ---------- Sideways rows (16 Nov 2026): story rows, lesson row ---------- */
.hrow { margin-top: 26px; min-width: 0; scroll-margin-top: 150px; }
.hrow:first-child { margin-top: 0; }
.hrow-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.hrow-head h2, .hrow-head h3 { margin: 0; font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 800; line-height: 1.5; display: flex; align-items: baseline; gap: 10px; }
.hrow-head h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.hrow-head h3 small { font-size: 0.78rem; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: rgba(16, 31, 34, 0.08); color: inherit; opacity: 0.75; }
.hrow-arrows { display: flex; gap: 8px; flex: none; }
.hrow-arrows button {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; padding: 0;
  border: 1px solid currentColor; background: transparent; color: inherit; opacity: 0.85; transition: opacity var(--ease), transform var(--ease), background var(--ease);
}
.hrow-arrows button::before { content: ""; width: 9px; height: 9px; border-top: 2.4px solid currentColor; border-right: 2.4px solid currentColor; transform: translateX(-2px) rotate(45deg); }
.hrow-arrows .hrow-prev::before { transform: translateX(2px) rotate(-135deg); }
html[dir="rtl"] .hrow-arrows .hrow-next::before { transform: translateX(2px) rotate(-135deg); }
html[dir="rtl"] .hrow-arrows .hrow-prev::before { transform: translateX(-2px) rotate(45deg); }
.hrow-arrows button:hover:not(:disabled) { opacity: 1; transform: translateY(-1px); background: rgba(87, 217, 199, 0.16); }
.hrow-arrows button:disabled { opacity: 0.25; cursor: default; }
.hrow.no-scroll .hrow-arrows { visibility: hidden; }
.hrow-track {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain; scrollbar-width: none; padding: 4px 2px 8px;
}
.hrow-track::-webkit-scrollbar { display: none; }
.hrow-track > * { flex: 0 0 auto; scroll-snap-align: start; }
.home-stories .hrow-track { align-items: flex-start; }

/* story tiles on the cream sheet */
.home-stories .hrow-head { color: var(--ink); }
.st-tile {
  width: 232px; display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 14px; border-radius: 16px; text-decoration: none;
  background: #fffdf8; border: 1px solid rgba(16, 31, 34, 0.1); color: var(--ink);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.st-tile:hover { transform: translateY(-3px); border-color: rgba(16, 31, 34, 0.22); box-shadow: 0 12px 26px rgba(16, 31, 34, 0.1); }
/* the frame follows the picture, so a cover that is not square is still shown whole */
.st-pic { border-radius: 10px; overflow: hidden; background: #e7e1d3; }
.st-pic img { display: block; width: 100%; height: auto; }
.st-tile b { font-size: 0.98rem; font-weight: 800; line-height: 1.6; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.st-cat { align-self: flex-start; font-size: 0.72rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: rgba(15, 124, 116, 0.12); color: #0b6660; }
.st-time { font-size: 0.76rem; color: rgba(16, 31, 34, 0.6); margin-top: auto; }
html[data-lang="fa"] .st-tile { direction: rtl; text-align: right; }
.home-stories.rows:not(.all) .story-grid, .home-stories.rows .st-more-row, .home-stories.rows .st-filter { display: none !important; }
.home-stories.rows.all .story-grid { margin-top: 30px; }
.home-stories.rows.all .story-grid > .co-card { display: grid !important; }
@media (max-width: 600px) { .st-tile { width: 62vw; max-width: 250px; } .hrow-arrows button { width: 36px; height: 36px; } }

/* lesson row on the dark ground */
.home-lessons { --sec: 48px; padding: var(--sec) 0; }
.home-lessons .hrow-head { color: var(--text); }
.ls-tile {
  width: 230px; min-height: 150px; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  transition: transform var(--ease), border-color var(--ease), background var(--ease);
}
.ls-tile:hover { transform: translateY(-3px); border-color: rgba(87, 217, 199, 0.6); background: rgba(87, 217, 199, 0.07); }
.ls-step { align-self: flex-start; padding: 3px 11px; border-radius: 999px; font-size: 0.76rem; font-weight: 800; color: #101f22; background: var(--yellow); }
.ls-tile b { font-size: 1rem; font-weight: 800; line-height: 1.65; }
.ls-tile small { margin-top: auto; font-size: 0.76rem; color: var(--mint); font-weight: 700; }
.ls-tile.ls-all { justify-content: center; align-items: center; text-align: center; border-style: dashed; border-color: rgba(87, 217, 199, 0.5); color: var(--mint); }
html[data-lang="fa"] .ls-tile { direction: rtl; text-align: right; }
html[data-lang="fa"] .ls-tile.ls-all { text-align: center; }
@media (max-width: 600px) { .ls-tile { width: 58vw; max-width: 240px; } }

/* ---------- Newer / older story at the foot of every story ---------- */
.story-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(1180px, 100% - 32px); margin: 34px auto 10px; }
.story-nav .sn {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; text-decoration: none; min-width: 0;
  background: var(--surface, #192b2e); border: 1px solid rgba(87, 217, 199, 0.28); color: #f2f0e9;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.story-nav .sn:hover { transform: translateY(-2px); border-color: #57d9c7; background: rgba(87, 217, 199, 0.08); }
.story-nav .sn img { width: 72px; height: 72px; border-radius: 10px; flex: none; object-fit: cover; display: block; }
.story-nav .sn-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.story-nav .sn small { font-size: 0.76rem; font-weight: 800; color: #ffad00; }
.story-nav .sn b { font-size: 0.95rem; font-weight: 800; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story-nav .sn-older { flex-direction: row-reverse; text-align: end; }
html[data-lang="fa"] .story-nav { direction: rtl; }
@media (max-width: 640px) { .story-nav { grid-template-columns: 1fr; } .story-nav .sn-older { flex-direction: row; text-align: start; } }

/* ---------- Price strip under the header (ticker.js) ---------- */
.tk { position: relative; background: #0c181a; border-bottom: 1px solid rgba(87, 217, 199, 0.16); }
.tk::before, .tk::after { content: ""; position: absolute; top: 0; bottom: 0; width: 26px; z-index: 1; pointer-events: none; }
.tk::before { left: 0; background: linear-gradient(to right, #0c181a, rgba(12, 24, 26, 0)); }
.tk::after { right: 0; background: linear-gradient(to left, #0c181a, rgba(12, 24, 26, 0)); }
.tk-track { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 0 14px; min-height: 40px; }
.tk-track::-webkit-scrollbar { display: none; }
html[data-lang="fa"] .tk-track { direction: rtl; }
.tk-item {
  flex: none; display: inline-flex; align-items: baseline; gap: 6px; padding: 9px 12px; border-radius: 10px; white-space: nowrap;
  color: #f2f0e9 !important; text-decoration: none !important; font-size: 0.84rem; line-height: 1.3; transition: background .2s ease;
}
.tk-item:hover { background: rgba(87, 217, 199, 0.1); }
.tk-item .tk-l { color: #9fb3af; font-weight: 600; }
.tk-item b { font-weight: 800; font-family: var(--en); direction: ltr; unicode-bidi: isolate; }
.tk-item small { color: #8fa3a0; font-size: 0.72rem; }
.tk-item i { font-style: normal; font-size: 0.74rem; font-weight: 700; font-family: var(--en); direction: ltr; unicode-bidi: isolate; }
.tk-item i.up { color: #5fd39a; }
.tk-item i.dn { color: #ff8a7a; }
.tk-head { font-weight: 800; color: #57d9c7 !important; align-items: center; }
.tk-head em { width: 8px; height: 8px; border-radius: 50%; background: #6f8582; display: inline-block; }
.tk-head em.on { background: #5fd39a; box-shadow: 0 0 0 0 rgba(95, 211, 154, 0.6); animation: tkPulse 2.4s ease-out infinite; }
.tk-head small { font-family: var(--en); direction: ltr; unicode-bidi: isolate; }
.tk-all { color: #ffad00 !important; font-weight: 800; }
@keyframes tkPulse { 0% { box-shadow: 0 0 0 0 rgba(95, 211, 154, 0.55); } 100% { box-shadow: 0 0 0 9px rgba(95, 211, 154, 0); } }
@media (prefers-reduced-motion: reduce) { .tk-head em.on { animation: none; } }

/* Neon logo: a quiet glow at the end of the intro block on wide screens (not on phones, to keep pages light) */
@media (min-width: 960px) {
  .page-hero { position: relative; isolation: isolate; }
  .page-hero::after {
    content: ""; position: absolute; z-index: -1; inset-block: 0; inset-inline-end: max(24px, calc((100vw - 1180px) / 2));
    width: min(300px, 26vw); margin-block: auto; aspect-ratio: 1 / 1; height: auto; max-height: 100%;
    background: url("img/neon-logo.webp") center / contain no-repeat; opacity: .95; pointer-events: none;
  }
}

/* ===== Hybrid editorial pass (21 Nov 2026): shorter intro, stronger lead story, editorial first row, learning band ===== */
/* 1. Intro: one title, one sentence, the three pillars as small links */
.masthead .pillar-links { display: flex; flex-wrap: wrap; gap: 8px; }
.masthead .pillar-links a { font-size: 0.86rem; padding: 6px 13px; min-height: 36px; border: 1px solid rgba(242, 240, 233, 0.22); border-radius: 999px; gap: 8px; }
.masthead .pillar-links a:hover { border-color: var(--mint); }
@media (max-width: 899px) {
  .masthead { padding: 12px 0 18px; }
  .masthead h1 { font-size: 1.4rem; line-height: 1.5; }
  .masthead p { font-size: 0.92rem; line-height: 1.8; margin-top: 6px; }
  .masthead .pillar-links { margin-top: 12px; gap: 6px; }
  .masthead .pillar-links a { font-size: 0.8rem; padding: 4px 11px; }
  .masthead .tagline { font-size: 0.82rem; margin-top: 10px; }
  .home-feature { padding-top: 0; }
}
/* 2. Lead story: the whole image, never cropped; a bigger headline */
.co-card.is-featured .co-art { background: #0c181a; }
.co-card.is-featured .co-art img { object-fit: contain; object-position: center; }
.co-card.is-featured .co-body h3 { font-size: clamp(1.45rem, 2.6vw, 2.15rem); line-height: 1.45; font-weight: 800; }
@media (min-width: 900px) {
  .co-card.is-featured, .home-stories .co-card.is-featured { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .co-card.is-featured .co-body { padding: 40px 44px; gap: 14px; }
}
/* 3. Newest row as an editorial layout: one large story, two with pictures, three headlines */
.home-stories .st-rows > .hrow:first-child .hrow-head small { display: none; }
.home-stories .st-rows > .hrow:first-child .hrow-arrows { display: none; }
.home-stories .st-rows > .hrow:first-child .hrow-track { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; overflow: visible; padding: 0; }
.home-stories .st-rows > .hrow:first-child .st-tile { width: auto; max-width: none; background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; transform: none; }
.home-stories .st-rows > .hrow:first-child .st-tile:hover b { color: #087f75; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.home-stories .st-rows > .hrow:first-child .st-pic { border-radius: 6px; }
.home-stories .st-rows > .hrow:first-child .st-pic img { transition: transform 0.2s ease; }
.home-stories .st-rows > .hrow:first-child .st-tile:hover .st-pic img { transform: scale(1.02); }
/* the newest story is already the lead above, so the row starts from the second */
.home-stories .st-rows > .hrow:first-child .st-tile:nth-child(1) { display: none; }
.home-stories .st-rows > .hrow:first-child .st-tile:nth-child(2) { grid-column: 1 / -1; }
.home-stories .st-rows > .hrow:first-child .st-tile:nth-child(2) b { font-size: 1.45rem; line-height: 1.5; -webkit-line-clamp: 4; }
.home-stories .st-rows > .hrow:first-child .st-tile:nth-child(3) b,
.home-stories .st-rows > .hrow:first-child .st-tile:nth-child(4) b { font-size: 1.05rem; }
.home-stories .st-rows > .hrow:first-child .st-tile:nth-child(n+5) { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid rgba(16, 31, 34, 0.14); }
.home-stories .st-rows > .hrow:first-child .st-tile:nth-child(n+5) .st-pic { display: none; }
.home-stories .st-rows > .hrow:first-child .st-tile:nth-child(n+5) b { font-size: 1.12rem; font-weight: 700; }
.home-stories .st-rows > .hrow:first-child .st-tile:nth-child(n+8) { display: none; }
@media (min-width: 900px) {
  .home-stories .st-rows > .hrow:first-child .hrow-track { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0 34px; align-items: start; }
  .home-stories .st-rows > .hrow:first-child .st-tile:nth-child(2) { grid-column: 1; grid-row: 1 / span 4; }
  .home-stories .st-rows > .hrow:first-child .st-tile:nth-child(2) b { font-size: 1.9rem; }
  .home-stories .st-rows > .hrow:first-child .st-tile:nth-child(3) { grid-column: 2; grid-row: 1; padding-bottom: 20px; }
  .home-stories .st-rows > .hrow:first-child .st-tile:nth-child(4) { grid-column: 3; grid-row: 1; padding-bottom: 20px; }
  .home-stories .st-rows > .hrow:first-child .st-tile:nth-child(n+5) { grid-column: 2 / 4; padding-bottom: 16px; }
  .home-stories .st-rows > .hrow:first-child { margin-bottom: 44px; }
}
@media (prefers-reduced-motion: reduce) { .home-stories .st-pic img { transition: none !important; } }
/* 4. Learning band: where do I start? */
.home-lessons { --sec: 56px; background: #0c181a; border-top: 1px solid rgba(87, 217, 199, 0.18); border-bottom: 1px solid rgba(87, 217, 199, 0.18); }
.ls-intro { margin-bottom: 30px; max-width: 720px; }
.ls-intro h2 { font-size: clamp(1.8rem, 4.4vw, 2.7rem); font-weight: 900; line-height: 1.35; color: #fff; margin: 0 0 8px; }
.ls-intro p { color: #cfd8d5; font-size: 1.05rem; line-height: 1.9; margin: 0; }
.ls-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 18px; }
.ls-btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 26px; border-radius: 8px; background: var(--mint); color: #062420; font-weight: 800; text-decoration: none; transition: background 0.18s ease; }
.ls-btn:hover { background: #7be6d7; }
.ls-more { display: inline-flex; align-items: center; min-height: 44px; color: var(--mint); font-weight: 700; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.18s ease; }
.ls-more:hover { border-bottom-color: var(--mint); }
.home-lessons .hrow-head h3 { color: #cfd8d5; font-size: 1rem; font-weight: 700; }
.home-lessons .ls-step { background: none; padding: 0; border-radius: 0; color: var(--mint); font-size: 1.5rem; font-weight: 900; line-height: 1.1; }
.home-lessons .ls-tile { border-radius: 10px; border-color: rgba(242, 240, 233, 0.14); background: transparent; }
html[data-lang="fa"] .ls-intro { direction: rtl; text-align: right; }
@media (max-width: 899px) {
  .co-card.is-featured, .home-stories .co-card.is-featured { grid-template-rows: auto 1fr; }
  .co-card.is-featured .co-art { aspect-ratio: auto; height: auto !important; padding-top: 0 !important; align-self: start; }
  .co-card.is-featured .co-art img { position: static !important; height: auto; }
  .co-card.is-featured .co-body { justify-content: flex-start; }
}

/* ===== Editorial selection (21 Nov 2026, pass 2): the homepage shows a selection; the rest opens with "see all" ===== */
.co-card.is-featured .co-kicker + .co-cat, .co-card.is-featured .co-cat { display: none; }
.home-stories.rows:not(.all) .st-rows > .hrow:not(:first-child):not([data-cat="چراغ روشن"]) { display: none; }
.home-stories.rows:not(.all) .st-more-row { display: block !important; text-align: center; margin-top: 30px; }
.home-stories.rows.all .story-grid { display: none !important; }
/* Lights On: one large file and two beside it */
.home-stories:not(.all) .hrow[data-cat="چراغ روشن"] { margin-top: 40px; padding-top: 26px; border-top: 3px solid #c7a16b; }
.home-stories:not(.all) .hrow[data-cat="چراغ روشن"] .hrow-head h3 { font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 900; }
.home-stories:not(.all) .hrow[data-cat="چراغ روشن"] .hrow-head small,
.home-stories:not(.all) .hrow[data-cat="چراغ روشن"] .hrow-arrows { display: none; }
.home-stories:not(.all) .hrow[data-cat="چراغ روشن"] .hrow-track { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; overflow: visible; padding: 0; }
.home-stories:not(.all) .hrow[data-cat="چراغ روشن"] .st-tile { width: auto; max-width: none; background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; transform: none; }
.home-stories:not(.all) .hrow[data-cat="چراغ روشن"] .st-tile:hover b { color: #087f75; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.home-stories:not(.all) .hrow[data-cat="چراغ روشن"] .st-pic { border-radius: 6px; }
.home-stories:not(.all) .hrow[data-cat="چراغ روشن"] .st-tile:nth-child(1) { grid-column: 1 / -1; }
.home-stories:not(.all) .hrow[data-cat="چراغ روشن"] .st-tile:nth-child(1) b { font-size: 1.45rem; line-height: 1.5; }
.home-stories:not(.all) .hrow[data-cat="چراغ روشن"] .st-tile:nth-child(n+4) { display: none; }
@media (min-width: 900px) {
  .home-stories:not(.all) .hrow[data-cat="چراغ روشن"] .hrow-track { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0 34px; align-items: start; }
  .home-stories:not(.all) .hrow[data-cat="چراغ روشن"] .st-tile:nth-child(1) { grid-column: 1; }
  .home-stories:not(.all) .hrow[data-cat="چراغ روشن"] .st-tile:nth-child(1) b { font-size: 1.9rem; }
}

/* Quote block (Toffler) */
.quote-block { padding: 0 0 var(--sec); }
.quote-block .wrap { max-width: 880px; }
.quote-block blockquote { margin: 0; padding: 28px 32px; border-inline-start: 4px solid var(--accent, #2fbfa3); background: rgba(47,191,163,0.07); border-radius: 0 16px 16px 0; }
html[dir="rtl"] .quote-block blockquote { border-radius: 16px 0 0 16px; }
.quote-block p { margin: 0; font-size: clamp(1.15rem, 2.2vw, 1.6rem); line-height: 1.6; font-weight: 700; color: var(--text); }
.quote-block p[lang="en"] { font-family: var(--en); font-style: normal; font-weight: 600; direction: ltr; }
.quote-block p[lang="fa"] { font-family: "IRANYekanX", Tahoma, sans-serif; direction: rtl; }
.quote-block p + p { margin-top: 14px; opacity: 0.8; font-size: clamp(1rem, 1.6vw, 1.2rem); font-weight: 500; }
.quote-block cite { display: block; margin-top: 16px; font-style: normal; font-size: 0.9rem; letter-spacing: 0.06em; color: var(--ink-muted, #5b6b68); font-family: var(--en, inherit); }
.quote-block cite [lang="fa"] { font-family: "IRANYekanX", Tahoma, sans-serif; letter-spacing: 0; }

/* ---------- Home hero v2: headline with a highlighted phrase, clickable paths, no photograph (preview) ---------- */
.hero2 .masthead { display: block; max-width: none; padding: 40px 0 34px; }
.hero2 .masthead::before { content: ""; display: block; width: 56px; height: 5px; border-radius: 3px; background: var(--mint); margin-bottom: 18px; }
.hero2 .masthead h1 { font-size: clamp(1.75rem, 4.2vw, 3.3rem); line-height: 1.5; font-weight: 800; max-width: 17em; text-wrap: balance; }
html[data-lang="en"] .hero2 .masthead h1 { line-height: 1.22; letter-spacing: -0.02em; max-width: 19em; }
.hero2 .masthead h1 .hl { background: var(--yellow); color: #14262a; padding: 0.02em 0.32em 0.08em; border-radius: 0.28em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero2 .masthead > p { font-size: clamp(1rem, 1.5vw, 1.2rem); max-width: 40em; margin-top: 14px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 20px; }
.hero-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--yellow); color: #14262a; font-weight: 800; font-size: 1rem; }
.hero-btn::after { content: "←"; font-weight: 400; }
html[data-lang="en"] .hero-btn::after { content: "→"; }
.hero-btn:hover { background: #ffc13d; }
.hero2 .masthead .hero-cta .tagline { margin: 0; }
.hero-paths { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hero-paths a { display: flex; align-items: center; gap: 14px; height: 100%; padding: 14px 18px; border: 1px solid rgba(87, 217, 199, 0.45); border-radius: 18px; background: rgba(16, 31, 34, 0.45); color: var(--text); transition: border-color 0.2s ease, background 0.2s ease; }
.hero-paths a:hover { border-color: var(--mint); background: rgba(87, 217, 199, 0.1); }
.hero-paths svg { width: 34px; height: 34px; flex: none; fill: none; stroke: var(--mint); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hero-paths b { display: block; font-size: 1.08rem; font-weight: 800; }
.hero-paths small { display: block; margin-top: 2px; color: var(--muted); font-size: 0.86rem; line-height: 1.6; }
.hero-lights { display: inline-flex; align-items: center; gap: 12px; margin-top: 14px; padding: 9px 18px; border: 1px solid rgba(242, 240, 233, 0.2); border-radius: 999px; color: var(--text); font-size: 0.95rem; }
.hero-lights::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); flex: none; }
.hero-lights b { font-weight: 800; }
.hero-lights span { color: #c9d2ce; border-inline-start: 1px solid rgba(242, 240, 233, 0.25); padding-inline-start: 12px; }
.hero-lights:hover { border-color: var(--yellow); }
@media (max-width: 700px) {
  .hero2 .masthead { padding: 18px 0 20px; }
  .hero2 .masthead::before { width: 44px; height: 4px; margin-bottom: 12px; }
  .hero2 .masthead h1 { font-size: 1.62rem; line-height: 1.55; }
  html[data-lang="en"] .hero2 .masthead h1 { font-size: 1.7rem; line-height: 1.25; }
  .hero2 .masthead > p { font-size: 0.95rem; margin-top: 8px; }
  .hero-cta { margin-top: 14px; gap: 8px 16px; }
  .hero-btn { min-height: 44px; padding: 0 20px; font-size: 0.95rem; }
  .hero-paths { margin-top: 16px; gap: 8px; }
  .hero-paths a { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 10px; border-radius: 14px; }
  .hero-paths svg { width: 26px; height: 26px; }
  .hero-paths b { font-size: 0.92rem; }
  .hero-paths small { display: none; }
  .hero-lights { margin-top: 10px; font-size: 0.84rem; padding: 7px 14px; }
}
.hero2 .masthead h1 .hl { white-space: nowrap; }
.hero2 .hero-inner { padding-block: 0; }
@media (min-width: 701px) { .hero2 .masthead { padding: 44px 0 40px; } }

/* ---------- Home hero v3: Tehran art on the far side behind an arc, cream category cards (preview) ---------- */
.hero2 { background: #0f2a2f; }
html[data-lang="en"] .hero2 { background: #0f2a2f; }
.hero2::before, html[data-lang="en"] .hero2::before, .hero2 .hero-inner::after { display: none; }
.hero-art { position: absolute; top: 0; bottom: 0; left: 0; width: 64%; z-index: 0; margin: 0; overflow: hidden;
  clip-path: circle(92% at 22% 60%); }
html[data-lang="en"] .hero-art { left: auto; right: 0; clip-path: circle(92% at 78% 60%); }
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 78% 40%; }
html[data-lang="fa"] .hero-art img { transform: scaleX(-1); }
.hero-art::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to left, #0f2a2f 0%, rgba(15, 42, 47, 0.55) 16%, rgba(15, 42, 47, 0) 42%), linear-gradient(to top, #0f2a2f 0%, rgba(15, 42, 47, 0.75) 22%, rgba(15, 42, 47, 0) 50%); }
html[data-lang="en"] .hero-art::after { background: linear-gradient(to right, #0f2a2f 0%, rgba(15, 42, 47, 0.55) 16%, rgba(15, 42, 47, 0) 42%), linear-gradient(to top, #0f2a2f 0%, rgba(15, 42, 47, 0.75) 22%, rgba(15, 42, 47, 0) 50%); }
.art-tag { position: absolute; top: 12px; left: 12px; z-index: 1; font-size: 0.68rem; line-height: 1; padding: 5px 8px; border-radius: 4px; background: rgba(60, 70, 72, 0.78); color: #e8ece9; }
html[data-lang="en"] .art-tag { left: auto; right: 12px; }
.hero2 .hero-inner { position: relative; z-index: 1; }
.hero2 .masthead h1 { max-width: 13.5em; text-shadow: 0 2px 18px rgba(15, 42, 47, 0.6); }
.hero2 .masthead h1 .hl { text-shadow: none; border-radius: 0.2em; }
.hero2 .masthead > p { max-width: 26em; text-shadow: 0 1px 12px rgba(15, 42, 47, 0.8); }
.hero-paths { gap: 16px; margin-top: 34px; }
.hero-paths a.cat-card { position: relative; overflow: hidden; display: flex; align-items: stretch; justify-content: space-between; gap: 8px; min-height: 132px; padding: 0;
  border: 0; border-radius: 8px; background: #f2ebdd; color: #101f22; --cat: #0b8f88; }
.hero-paths a.cat-card:hover { background: #f8f3e8; }
.cat-card.c-markets { --cat: #2f6bff; } .cat-card.c-tech { --cat: #7b4dff; } .cat-card.c-learn { --cat: #0b8f88; }
.cat-card::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 58%; background: var(--cat); clip-path: polygon(0 100%, 62% 34%, 100% 34%, 100% 100%); }
html[data-lang="en"] .cat-card::before { left: auto; right: 0; clip-path: polygon(100% 100%, 38% 34%, 0 34%, 0 100%); transform: scaleX(-1); }
.cat-card .cat-txt { position: relative; z-index: 1; padding: 18px 20px 16px; }
.cat-card .cat-txt::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--cat); margin-bottom: 10px; }
.cat-card b { font-size: 1.5rem; font-weight: 800; line-height: 1.35; color: #101f22; }
.cat-card small { margin-top: 4px; font-size: 0.95rem; line-height: 1.6; color: #3d4b4d; max-width: 12em; }
.cat-card img { position: relative; z-index: 1; align-self: flex-end; width: 46%; max-width: 190px; height: auto; margin: 8px 6px 0; flex: none; }
.hero-lights { background: rgba(15, 42, 47, 0.6); }
@media (max-width: 700px) {
  .hero-art { position: relative; width: 100%; height: 150px; clip-path: none; }
  html[data-lang="en"] .hero-art { clip-path: none; }
  .hero-art img { object-position: 82% 30%; }
  .hero-art::after, html[data-lang="en"] .hero-art::after { background: linear-gradient(to top, #0f2a2f 0%, rgba(15, 42, 47, 0) 60%); }
  .hero2 .masthead { padding: 4px 0 20px; }
  .hero2 .masthead h1 { max-width: none; }
  .hero-paths { gap: 8px; margin-top: 16px; }
  .hero-paths a.cat-card { flex-direction: column; min-height: 0; border-radius: 7px; }
  .cat-card .cat-txt { padding: 10px 10px 0; }
  .cat-card .cat-txt::before { width: 28px; height: 4px; margin-bottom: 6px; }
  .cat-card b { font-size: 0.95rem; }
  .cat-card img { width: 78%; align-self: flex-end; margin: 2px 4px 0; }
  .cat-card::before { width: 100%; clip-path: polygon(0 100%, 70% 52%, 100% 52%, 100% 100%); }
}
.hero-paths a.cat-card.c-markets { --cat: #2f6bff; } .hero-paths a.cat-card.c-tech { --cat: #7b4dff; } .hero-paths a.cat-card.c-learn { --cat: #0b8f88; }
.cat-card::before, html[data-lang="en"] .cat-card::before { width: 62%; clip-path: polygon(0 100%, 56% 100%, 100% 26%, 100% 0, 74% 0); transform: none; left: auto; right: 0; }
html[data-lang="fa"] .cat-card::before { right: auto; left: 0; transform: scaleX(-1); }
.cat-card img { width: 40%; }
.cat-card small { max-width: none; }
.hero-art { clip-path: circle(80% at 10% 55%); }
html[data-lang="en"] .hero-art { clip-path: circle(80% at 90% 55%); }
.hero-art::after { background: linear-gradient(to left, rgba(15, 42, 47, 0.5) 0%, rgba(15, 42, 47, 0) 30%), linear-gradient(to top, #0f2a2f 0%, rgba(15, 42, 47, 0.7) 20%, rgba(15, 42, 47, 0) 46%); }
html[data-lang="en"] .hero-art::after { background: linear-gradient(to right, rgba(15, 42, 47, 0.5) 0%, rgba(15, 42, 47, 0) 30%), linear-gradient(to top, #0f2a2f 0%, rgba(15, 42, 47, 0.7) 20%, rgba(15, 42, 47, 0) 46%); }
@media (min-width: 701px) { .hero2 .masthead { padding: 30px 0 34px; } .hero2 .masthead h1 { font-size: clamp(1.75rem, 3.9vw, 3rem); } .hero-paths { margin-top: 28px; } }
@media (max-width: 700px) {
  .hero-art, html[data-lang="en"] .hero-art { clip-path: none; }
  .hero-art::after, html[data-lang="en"] .hero-art::after { background: linear-gradient(to top, #0f2a2f 0%, rgba(15, 42, 47, 0) 60%); }
  .cat-card::before, html[data-lang="en"] .cat-card::before { width: 100%; clip-path: polygon(0 100%, 40% 100%, 100% 58%, 100% 38%, 70% 38%); }
  .cat-card img { width: 74%; }
}
@media (max-width: 700px) {
  .hero-art img { object-position: 82% 12%; }
  .hero-art { height: 156px; }
  html[data-lang="fa"] .art-tag { left: auto; right: 12px; }
  html[data-lang="en"] .art-tag { right: auto; left: 12px; }
}

/* four category cards: markets, technology, fact check, learn */
.hero-paths { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hero-paths a.cat-card.c-check { --cat: #f5a100; }
.hero-paths a.cat-card { min-height: 124px; }
.cat-card b { font-size: 1.3rem; }
.cat-card small { font-size: 0.88rem; }
.cat-card .cat-txt { padding: 16px 16px 14px; }
.cat-card img { width: 42%; }
@media (max-width: 1000px) and (min-width: 701px) { .hero-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .hero-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hero-paths a.cat-card { flex-direction: row; align-items: stretch; min-height: 62px; }
  .cat-card .cat-txt { padding: 9px 10px 8px; }
  .cat-card b { font-size: 0.95rem; }
  .cat-card img { width: 40%; margin: 4px 4px 0; align-self: flex-end; }
  .cat-card::before, html[data-lang="en"] .cat-card::before { width: 62%; clip-path: polygon(0 100%, 56% 100%, 100% 26%, 100% 0, 74% 0); }
}
@media (max-width: 700px) { html[data-lang="en"] .hero2 .masthead h1 .hl { white-space: normal; } }
.hero-lights { max-width: 100%; }
.hero-lights b { white-space: nowrap; }
.hero-lights span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 700px) { .hero2 .masthead .hero-cta .tagline { font-size: 0.78rem; letter-spacing: 0.02em; } .hero-cta { gap: 8px 12px; } }

/* Cross-links written by scripts/build_links.py: a term in the text that has its own page */
a.xl, .lesson-content a.xl {
  color: var(--mint, #57D9C7);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(87, 217, 199, 0.6);
  text-underline-offset: 4px;
  font-weight: inherit;
  transition: color 0.15s, text-decoration-color 0.15s;
}
a.xl:hover, .lesson-content a.xl:hover { color: #FFAD00; text-decoration-style: solid; text-decoration-color: #FFAD00; }
a.xl:focus-visible { outline: 2px solid #57D9C7; outline-offset: 2px; border-radius: 3px; }

/* The old hero let clicks through to the map behind it; the new hero has nothing behind, so its cards and links must take clicks */
.hero2 .hero-inner, .hero2 .hero-paths, .hero2 .hero-paths a, .hero2 .hero-lights { pointer-events: auto; }
