/* ===== Font ===== */
@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn%5Bwght%5D.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ===== Tokens ===== */
/* Poster theme: cream paper, forest green, warm orange and sage pills (from the class poster). */
:root {
  --green: #1F4B3A;
  --green-ink: #1F4B3A;
  --green-hover: #173a2d;
  --green-soft: #CCDBC8;
  --green-softer: #e8eee2;
  --orange: #EEA153;
  --orange-hover: #e48d3b;
  --orange-ink: #a2541a;
  --on-orange: #1f2a22;
  --live: #309460;
  --danger: #dc2626;
  --hero-green: linear-gradient(135deg, #2a5f4a, #1F4B3A 55%, #173a2d);

  --bg: #F4F1E2;
  --surface: #fdfcf7;
  --surface-2: #f7f4e8;
  --text: #17271f;
  --muted: #5e6a5f;
  --line: #e4dec9;
  --overlay: rgba(14, 24, 18, .45);

  --shadow-sm: 0 1px 2px rgba(31, 75, 58, .06);
  --shadow: 0 1px 2px rgba(31, 75, 58, .05), 0 12px 32px rgba(31, 75, 58, .09);
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1240px;
  --gutter: 24px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --orange-ink: #f3b877;
  --danger: #f87171;
  --hero-green: linear-gradient(135deg, #24533f, #173a2d);
  --green: #2b6650;
  --green-ink: #9fd0b4;
  --green-hover: #33765d;
  --green-soft: #26402f;
  --green-softer: #1a2a21;
  --bg: #0f1612;
  --surface: #16201a;
  --surface-2: #1b2720;
  --text: #ece9dc;
  --muted: #a3ab9f;
  --line: #29362e;
  --overlay: rgba(0, 0, 0, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --orange-ink: #f3b877;
    --danger: #f87171;
    --hero-green: linear-gradient(135deg, #24533f, #173a2d);
    --green: #2b6650;
    --green-ink: #9fd0b4;
    --green-hover: #33765d;
    --green-soft: #26402f;
    --green-softer: #1a2a21;
    --bg: #0f1612;
    --surface: #16201a;
    --surface-2: #1b2720;
    --text: #ece9dc;
    --muted: #a3ab9f;
    --line: #29362e;
    --overlay: rgba(0, 0, 0, .6);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s, color .25s;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-ink); text-decoration: none; }
h1, h2, h3 { line-height: 1.4; margin: 0 0 .5em; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 8px 16px; border-radius: 10px;
}
.skip-link:focus { top: 12px; }

.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Light/dark logo swap */
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: .95rem; white-space: nowrap; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { height: 40px; padding: 0 16px; font-size: .9rem; }
.btn-sm .i { width: 18px; height: 18px; }
.btn-accent { background: var(--orange); color: var(--on-orange); }
.btn-accent:hover { background: var(--orange-hover); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-hover); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--green); color: var(--green-ink); }
.btn-outline { background: var(--surface); border: 1.5px solid var(--green); color: var(--green-ink); }
.btn-outline:hover { background: var(--green-softer); }

/* Round outlined icon buttons (header, carousels) */
.square-btn {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--green);
  background: var(--surface); color: var(--green-ink); cursor: pointer; transition: background-color .2s;
}
.square-btn:hover { background: var(--green-softer); }
.square-btn--sm { width: 36px; height: 36px; border-color: var(--line); color: var(--text); }
.square-btn--sm:hover { border-color: var(--green); color: var(--green-ink); }
.square-btn--sm .i { width: 18px; height: 18px; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px; border: 0;
  background: transparent; color: var(--text); cursor: pointer;
  transition: background-color .2s, color .2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--green-ink); }
.badge {
  position: absolute; top: 3px; inset-inline-end: 1px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--green); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* Theme toggle shows the mode you'd switch to */
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* ===== Announcement bar ===== */
.announce { background: var(--green); color: #fff; font-size: .9rem; }
.announce-inner { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 42px; padding-inline-end: 56px; }
.announce p { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.announce p .i { width: 18px; height: 18px; flex: none; }
.announce-cta {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px; border-radius: 999px; white-space: nowrap;
  background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; font-size: .82rem;
}
.announce-cta:hover { background: rgba(255, 255, 255, .28); }
.announce-cta .i { width: 15px; height: 15px; }
.announce-close {
  position: absolute; inset-inline-end: var(--gutter); top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px;
  background: transparent; color: #fff; cursor: pointer; opacity: .8;
}
.announce-close:hover { opacity: 1; background: rgba(255, 255, 255, .14); }
.announce-close .i { width: 16px; height: 16px; }

/* ===== Header: white card with rounded bottom corners ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface); border-radius: 0 0 28px 28px;
  box-shadow: 0 1px 2px rgba(15, 40, 25, .04), 0 10px 30px rgba(15, 40, 25, .07);
}
.header-bar { display: flex; align-items: center; gap: 20px; min-height: 80px; transition: min-height .25s; }
.is-scrolled .header-bar { min-height: 66px; }

.brand { display: flex; align-items: center; gap: 10px; flex: none; color: var(--text); }
.brand-logo { height: 50px; width: auto; transition: height .25s; }
.is-scrolled .brand-logo { height: 42px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.5; min-width: 0; }
.brand-text strong { font-size: 1rem; font-weight: 900; white-space: nowrap; }
.brand-text small { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .74rem; }

.main-nav { display: flex; align-items: center; gap: 2px; margin-inline: auto; }
.main-nav a {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  color: var(--text); font-weight: 600; font-size: .92rem; white-space: nowrap; transition: color .2s, background-color .2s;
}
.main-nav a .i { width: 18px; height: 18px; color: var(--muted); transition: color .2s; }
.main-nav a:hover, .main-nav a.is-active { background: var(--green-softer); color: var(--green-ink); }
.main-nav a:hover .i, .main-nav a.is-active .i { color: var(--green-ink); }

.header-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.only-compact { display: none; }

@media (max-width: 1279px) {
  .main-nav, .only-wide { display: none; }
  .only-compact { display: inline-grid; }
  .header-tools { margin-inline-start: auto; }
  .header-bar { min-height: 70px; gap: 12px; }
  .brand-logo { height: 44px; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .site-header { border-radius: 0 0 22px 22px; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: .88rem; }
  .brand-logo { height: 38px; }
  .is-scrolled .brand-logo { height: 34px; }
  .header-tools { gap: 6px; }
  .square-btn { width: 38px; height: 38px; }
  .announce { font-size: .8rem; }
  .announce-inner { justify-content: flex-start; gap: 8px; padding-inline-end: 40px; }
}

/* ===== Overlays: drawer + search ===== */
.overlay {
  position: fixed; inset: 0; background: var(--overlay);
  opacity: 0; transition: opacity .25s;
}
.is-open .overlay { opacity: 1; }

.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer-panel {
  position: absolute; inset-block: 0; inset-inline-start: 0;
  width: min(340px, 86vw); background: var(--surface);
  display: flex; flex-direction: column; gap: 20px; padding: 18px 18px 24px;
  box-shadow: var(--shadow); overflow-y: auto;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.is-open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: .95rem; }
.drawer-brand img { height: 40px; width: auto; }
.drawer-nav { display: flex; flex-direction: column; }
.drawer-nav a {
  padding: 12px 14px; border-radius: 12px; color: var(--text); font-weight: 500; font-size: 1.05rem;
}
.drawer-nav a:hover { background: var(--surface-2); }
.drawer-nav a.is-active { background: var(--green-softer); color: var(--green-ink); font-weight: 700; }
.drawer-actions { display: grid; gap: 10px; }
.drawer-call {
  margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border-radius: 12px; background: var(--surface-2); color: var(--text); font-weight: 700;
}

.search-panel { position: fixed; inset: 0; z-index: 90; }
.search-box {
  position: relative; margin: 14vh auto 0; width: min(680px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px;
  padding-inline-start: 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-12px); transition: opacity .25s, transform .25s;
}
.is-open .search-box { opacity: 1; transform: none; }
.search-box > .i { color: var(--muted); }
.search-box input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1.05rem; height: 44px;
}
.search-box input::-webkit-search-cancel-button { display: none; }
@media (max-width: 520px) {
  .search-box .btn { display: none; }
}

/* ===== Flash ===== */
.flash-stack { display: grid; gap: 8px; margin-top: 16px; }
.flash { margin: 0; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.flash--success { border-color: var(--green); background: var(--green-softer); }
.flash--error { border-color: #ef4444; background: color-mix(in srgb, #ef4444 10%, var(--bg)); }

/* ===== Temporary preview pages ===== */
.stage { min-height: 110vh; padding-block: 12vh 80px; text-align: center; }
.stage--small { min-height: 60vh; }
.stage h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; letter-spacing: -.01em; }
.stage p { color: var(--muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto 28px; }
.stage-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
/* Pill with an orange outline and a green "live" dot, like the poster's «کلاس آنلاین» badge */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 4px 14px; border-radius: 999px;
  border: 1.5px solid var(--orange); background: var(--surface); color: var(--green-ink); font-weight: 800; font-size: .85rem;
}
.eyebrow::before, .live-dot {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--live);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent);
}

/* ===== Footer ===== */
.site-footer {
  margin-top: 72px; padding-top: 56px; font-size: .95rem;
  background: var(--surface); border-radius: 32px 32px 0 0;
  box-shadow: 0 -1px 2px rgba(15, 40, 25, .03), 0 -10px 30px rgba(15, 40, 25, .05);
}
.footer-grid {
  display: grid; grid-template-columns: 1.35fr 1fr 1.2fr 1.25fr; gap: 40px; padding-bottom: 48px;
}
.footer-grid h2 { font-size: 1rem; font-weight: 800; margin-bottom: 18px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }

.footer-logo { display: flex; align-items: center; gap: 12px; color: var(--text); margin-bottom: 14px; }
.footer-logo img { height: 52px; width: auto; }
.footer-logo strong { font-size: 1.1rem; font-weight: 900; }
.footer-brand p { color: var(--muted); margin: 0 0 20px; }

.socials { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.social {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--text); font-size: .88rem; font-weight: 500; transition: border-color .2s, color .2s;
}
.social .i { width: 18px; height: 18px; }
.social:hover { border-color: var(--green); color: var(--green-ink); }

.footer-links { display: grid; gap: 6px; }
.footer-links a { color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--green-ink); }

.contact-list { display: grid; gap: 12px; }
.contact-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); }
.contact-list .i { margin-top: 4px; color: var(--green-ink); width: 18px; height: 18px; }
.contact-list a { color: var(--text); font-weight: 700; }
.contact-list a:hover { color: var(--green-ink); }

.map-card, .map-frame {
  display: block; width: 100%; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: var(--radius);
}
.map-card {
  position: relative; overflow: hidden;
  background:
    linear-gradient(115deg, transparent 46%, color-mix(in srgb, var(--orange) 55%, transparent) 46.5%, color-mix(in srgb, var(--orange) 55%, transparent) 49%, transparent 49.5%),
    linear-gradient(20deg, transparent 58%, var(--surface) 58.5%, var(--surface) 62%, transparent 62.5%),
    repeating-linear-gradient(0deg, transparent 0 27px, var(--line) 27px 28px),
    repeating-linear-gradient(90deg, transparent 0 27px, var(--line) 27px 28px),
    var(--green-softer);
}
.map-pin {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -70%);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50% 50% 50% 0;
  rotate: -45deg; background: var(--green); color: #fff; box-shadow: var(--shadow);
}
.map-pin .i { rotate: 45deg; }
.map-route { margin-top: 12px; }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-block: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem;
}
.footer-bottom p { margin: 0; }
.trust-slot {
  display: grid; place-items: center; gap: 4px; width: 104px; height: 104px; padding: 10px;
  border: 1.5px dashed var(--line); border-radius: 12px; text-align: center; font-size: .75rem; line-height: 1.5;
}
.trust-slot .i { width: 26px; height: 26px; color: var(--muted); }

@media (max-width: 1020px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .site-footer { padding-top: 44px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column-reverse; text-align: center; }
}

/* ===== Utilities ===== */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.narrow { max-width: 860px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.stage-actions--start { justify-content: flex-start; }

/* Fade-up on scroll (only when JS is running, so content never stays hidden) */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.96); } }

/* ===== 1. Hero slider ===== */
.hero { padding-top: 8px; }
.slider { position: relative; }
.slides { display: grid; }
/* Big slider + two side banners; buttons sit as "tabs" cut into the bottom edge of each card. */
.hero { padding-top: 20px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; padding-bottom: 18px; }
.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 34px; }
.side-banner {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 22px 24px 40px; border-radius: 24px; background: var(--surface); color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 40, 25, .04), 0 8px 24px rgba(15, 40, 25, .06); transition: transform .25s, box-shadow .25s;
}
.side-banner:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.side-text strong { display: block; font-size: 1.25rem; font-weight: 900; line-height: 1.5; }
.side-text span { color: var(--muted); font-size: .92rem; }
.side-art {
  flex: none; display: grid; place-items: center; width: 86px; height: 86px; border-radius: 50%;
  background: var(--green); color: #fff; box-shadow: 0 0 0 7px var(--green-soft);
}
.side-banner--2 .side-art { background: var(--orange); color: var(--on-orange); box-shadow: 0 0 0 7px color-mix(in srgb, var(--orange) 26%, transparent); }
.side-art .i { width: 42px; height: 42px; stroke-width: 1.5; }
.tab-cta {
  position: absolute; z-index: 2; bottom: -17px; inset-inline-start: 24px;
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 18px; border-radius: 999px;
  background: var(--green); color: #fff; font-weight: 800; font-size: .88rem; white-space: nowrap;
  box-shadow: 0 0 0 7px var(--bg); transition: background-color .2s;
}
.tab-cta .i { width: 16px; height: 16px; }
a:hover > .tab-cta, .tab-cta:hover { background: var(--green-hover); }
/* Poster slide: cream card, a big green arc on the start side with an orange circle where it meets the bottom,
   the photo framed on the arc, and a centred title with an orange swoosh and a sage pill under it. */
.slide {
  --shape: var(--green); --circle: var(--orange); --art-color: #fff;
  grid-area: 1 / 1; position: relative;
  display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); grid-template-areas: "art content";
  align-items: center; gap: 32px;
  min-height: 480px; padding: 70px 48px 44px; border-radius: 30px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: scale(.985);
  transition: opacity .6s ease, transform .6s ease, visibility 0s .6s;
}
.slide.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .6s ease, transform .6s ease, visibility 0s; }
.slide--light { --shape: var(--green-soft); --art-color: var(--green); }
.slide--orange { --shape: var(--orange); --circle: var(--green); --art-color: var(--green); }

.slide-shapes { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.slide-shapes::before {
  content: ""; position: absolute; top: 50%; inset-inline-start: -36%; width: 86%; aspect-ratio: 1;
  border-radius: 50%; background: var(--shape); transform: translateY(-50%);
}
.slide-shapes::after {
  content: ""; position: absolute; bottom: -64px; inset-inline-start: 34%; width: 150px; aspect-ratio: 1;
  border-radius: 50%; background: var(--circle);
}

.slide-content { grid-area: content; position: relative; z-index: 1; text-align: center; }
.slide-title {
  position: relative; display: inline-block; margin: 0 0 30px; padding-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3.3rem); font-weight: 900; line-height: 1.3; letter-spacing: -.01em; color: var(--green-ink);
}
.slide-title::after { inset-inline: 0; margin-inline: auto; width: min(78%, 260px); height: 16px; bottom: 0; }
.slide-sub {
  display: table; margin: 0 auto 28px; padding: 10px 28px; border-radius: 26px;
  background: var(--green-soft); color: var(--green-ink); font-weight: 900; font-size: clamp(1rem, 1.55vw, 1.3rem); line-height: 1.6;
}
.slide-cta { margin-bottom: 4px; }
.slide-formula {
  margin: 26px 0 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-family: "Times New Roman", Georgia, serif; font-style: italic; font-size: 1.05rem;
  color: color-mix(in srgb, var(--text) 30%, transparent);
}

.slide-art { grid-area: art; position: relative; z-index: 1; justify-self: center; width: min(100%, 380px); aspect-ratio: 1; color: var(--art-color); }
.slide-art--photo { aspect-ratio: auto; width: min(100%, 360px); }
.slide-photo {
  position: relative; margin: 0; padding: 8px; border-radius: 28px; background: var(--surface);
  box-shadow: 0 26px 50px rgba(0, 0, 0, .22);
}
.slide-photo img { width: 100%; aspect-ratio: 1 / .92; object-fit: cover; object-position: top; border-radius: 21px; }
.live-badge {
  position: absolute; z-index: 2; top: -19px; inset-inline-end: 22px;
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 16px; border-radius: 999px;
  background: var(--bg); border: 2px solid var(--orange); color: var(--green-ink); font-weight: 900; font-size: .92rem;
}
.live-badge .live-dot { width: 10px; height: 10px; animation: live 2s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--live) 0%, transparent); } }
.name-pill {
  position: absolute; z-index: 2; bottom: -30px; left: 50%; translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; white-space: nowrap;
}
.name-pill small { padding: 1px 16px; border-radius: 999px; background: var(--orange); color: var(--on-orange); font-weight: 800; font-size: .8rem; margin-bottom: -4px; }
.name-pill strong {
  padding: 6px 24px; border-radius: 999px; background: var(--surface); border: 2.5px solid var(--green);
  color: var(--text); font-weight: 900; font-size: 1.08rem; box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}

/* Neural network drawn by main.js (buildNeural) */
.neural { position: absolute; inset: -4%; width: 108%; height: 108%; overflow: visible; }
.neural-spin { transform-origin: 200px 200px; animation: spin 150s linear infinite; }
.neural .axon { fill: none; stroke: currentColor; stroke-opacity: .38; stroke-width: 1.4; stroke-linecap: round; }
.neural .link { fill: none; stroke: currentColor; stroke-opacity: .2; stroke-width: 1.1; stroke-linecap: round; }
@media (max-width: 900px) {
  .neural .axon { stroke-width: 1.8; }
  .neural .signal { stroke-width: 3.4; }
}
.neural .soma { fill: currentColor; }
.neural .halo { fill: currentColor; opacity: 0; }
.neural .signal {
  fill: none; stroke: var(--orange); stroke-width: 2.6; stroke-linecap: round;
  filter: drop-shadow(0 0 3px var(--orange));
}
.slide--light .neural .halo { fill: var(--orange); }
.art-core {
  position: absolute; inset: 29%; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
}
.art-core img { width: 70%; height: auto; }
.core-ring { position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--orange); opacity: 0; pointer-events: none; }
.chip {
  position: absolute; padding: 6px 14px; border-radius: 999px; white-space: nowrap;
  background: var(--surface); color: var(--text); font-weight: 700; font-size: .9rem;
  box-shadow: var(--shadow); animation: float 6s ease-in-out infinite;
}
.chip-1 { top: 6%; right: 2%; }
.chip-2 { bottom: 14%; left: -2%; animation-delay: -2s; }
.chip-3 { bottom: 0; right: 18%; animation-delay: -4s; }

.slider-controls {
  position: absolute; z-index: 2; top: 20px; inset-inline-end: 24px;
  display: flex; align-items: center; gap: 10px;
}
.slider-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer;
  display: grid; place-items: center; background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm);
}
.slider-btn:hover { color: var(--green-ink); }
.slider-dots { display: flex; gap: 6px; }
.dot {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--text) 25%, transparent); transition: width .3s, background-color .3s;
}
.dot.is-active, .slider .dot.is-active { width: 26px; background: var(--orange); }

@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (max-width: 900px) {
  /* Stacked: the green arc becomes a dome over the photo, the orange circle sits on its edge. */
  .slide { grid-template-columns: minmax(0, 1fr); grid-template-areas: "art" "content"; align-content: start; min-height: 0; padding: 30px 18px 26px; gap: 66px; border-radius: 26px; }
  .slide-shapes::before { top: auto; bottom: calc(100% - 290px); inset-inline-start: 50%; width: 190%; transform: translateX(50%); }
  .slide-shapes::after { bottom: auto; top: 186px; inset-inline-start: -40px; width: 96px; }
  .slide-art { width: min(70%, 250px); }
  .slide-art--photo { width: min(76%, 270px); }
  .live-badge { font-size: .82rem; padding: 3px 12px; top: -16px; }
  .name-pill strong { font-size: .95rem; padding: 5px 18px; }
  .slide-title { margin-bottom: 22px; }
  .slide-sub { padding: 8px 22px; margin-bottom: 22px; }
  .slide-formula { font-size: .9rem; margin-top: 20px; }
  .chip { font-size: .75rem; padding: 4px 10px; }
  .slide:has(~ .slider-controls), .slides:has(~ .slider-controls) .slide { padding-bottom: 78px; }
  .slider-controls { top: auto; bottom: 18px; inset-inline: 0; justify-content: center; }
  .slider-btn { width: 34px; height: 34px; }
}
@media (max-width: 560px) {
  .side-banner { flex-direction: column-reverse; align-items: flex-start; padding: 16px 16px 36px; gap: 10px; }
  .side-text strong { font-size: 1.02rem; }
  .side-text span { font-size: .8rem; }
  .side-art { width: 54px; height: 54px; border-radius: 16px; }
  .side-art .i { width: 28px; height: 28px; }
  .tab-cta { inset-inline-start: 14px; height: 34px; padding: 0 12px; font-size: .8rem; }
}

/* ===== 2. Konkur countdown ===== */
.countdown-wrap { margin-top: 16px; }
.countdown {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
  padding: 14px 16px 14px 14px; padding-inline-start: 18px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface);
}
.countdown-label { display: flex; align-items: center; gap: 12px; }
.countdown-icon {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange-ink);
}
.countdown-units { display: flex; gap: 8px; }
.countdown-units > div {
  min-width: 66px; padding: 6px 8px; border-radius: 14px; text-align: center; background: var(--surface-2);
}
.countdown-units b { display: block; font-size: 1.45rem; font-weight: 900; line-height: 1.35; font-variant-numeric: tabular-nums; }
.countdown-units span { font-size: .75rem; color: var(--muted); }
@media (max-width: 760px) {
  .countdown { flex-direction: column; align-items: stretch; text-align: center; padding: 18px 14px; }
  .countdown-label { justify-content: center; }
  .countdown-units > div { flex: 1; min-width: 0; }
}

/* ===== 3. Stats: green panel with a maze-like line pattern and a badge cut into its top edge ===== */
.stats-panel {
  position: relative; margin-top: 56px; padding: 82px 40px 32px; border-radius: 28px; color: #fff;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' fill='none' stroke='white' stroke-opacity='.1' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 8h32v24M56 8v32h24M8 56h24v32M48 56h40M64 72v16M24 40h16M80 24v16M40 72v-16'/%3E%3C/svg%3E"),
    var(--hero-green);
}
.stats-badge {
  position: absolute; top: -30px; inset-inline-start: 40px; display: flex; flex-direction: column; align-items: center;
  min-width: 128px; padding: 10px 22px 12px; border-radius: 18px; background: var(--orange); color: var(--on-orange);
  box-shadow: 0 0 0 8px var(--bg);
}
.stats-badge b { font-size: 2.4rem; font-weight: 900; line-height: 1.15; }
.stats-badge span { font-size: .85rem; font-weight: 800; text-align: center; }
.stats-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 28px; }
.stats-lead { margin: 0; font-size: 1.08rem; line-height: 2; opacity: .95; }
/* flex (not grid) so a lone item on the last row stretches instead of leaving an empty cell */
.stats { display: flex; flex-wrap: wrap; gap: 12px; }
.stat {
  flex: 1 1 150px; display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 18px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
}
.stat b { font-size: 1.9rem; font-weight: 900; line-height: 1.25; }
.stat span { color: rgba(255, 255, 255, .85); font-size: .9rem; }
@media (max-width: 860px) {
  .stats-panel { padding: 80px 20px 22px; }
  .stats-badge { inset-inline-start: 20px; }
  .stats-body { grid-template-columns: 1fr; gap: 18px; }
}

/* ===== Sections + shared cards ===== */
.section { margin-top: 88px; }
.section--tinted { padding-block: 0; background: none; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section-head h2 { position: relative; font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 900; margin: 0; padding-bottom: 12px; }
/* Hand-drawn orange swoosh under titles (poster style); the shape is a mask so the colour stays a token. */
.section-head h2::after, .slide-title::after {
  content: ""; position: absolute; bottom: -2px; inset-inline-start: 0; width: 84px; height: 12px; background: var(--orange);
  -webkit-mask: var(--swoosh) no-repeat center / 100% 100%; mask: var(--swoosh) no-repeat center / 100% 100%;
}
:root { --swoosh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 12'%3E%3Cpath d='M3 9.5C22 3.5 52 1.8 81 5.5' fill='none' stroke='black' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E"); }
.section-head-tools { display: flex; align-items: center; gap: 8px; flex: none; }

/* Horizontal card rows with arrow buttons (main.js) */
.carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 40px) / 3); gap: 20px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 6px 2px 18px; margin: -6px -2px 0; scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; }
.carousel--narrow { grid-auto-columns: calc((100% - 60px) / 4); }
@media (max-width: 1020px) { .carousel { grid-auto-columns: calc((100% - 20px) / 2); } .carousel--narrow { grid-auto-columns: calc((100% - 40px) / 3); } }
@media (max-width: 640px) { .carousel { grid-auto-columns: 82%; gap: 14px; } .carousel--narrow { grid-auto-columns: 58%; } }
.section-lead { margin: 8px 0 0; color: var(--muted); max-width: 640px; }
.section-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; transition: gap .2s; }
.section-link .i { width: 18px; height: 18px; }
.section-link:hover { gap: 10px; }
.demo-note {
  margin: -12px 0 22px; padding: 10px 14px; border: 1px dashed var(--orange); border-radius: 12px;
  font-size: .85rem; color: var(--muted); background: color-mix(in srgb, var(--orange) 6%, transparent);
}

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1020px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { margin-top: 72px; }
  .section--tinted { padding-block: 56px; }
  .section-head { flex-direction: column; align-items: flex-start; }
}

.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card-body { flex: 1; padding: 20px 20px 10px; }
.card-body h3 { font-size: 1.12rem; font-weight: 800; margin: 0 0 6px; }
.card-body p { margin: 0 0 12px; font-size: .93rem; }
.card h3 a { color: var(--text); }
.card:hover h3 a { color: var(--green-ink); }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: auto; padding: 14px 20px 18px; border-top: 1px dashed var(--line);
}
.price { font-weight: 800; }
.price del { margin-inline-end: 6px; color: var(--muted); font-weight: 500; font-size: .85rem; }
.card-cta { display: inline-flex; align-items: center; gap: 6px; color: var(--green-ink); font-weight: 700; font-size: .9rem; }
.card-cta .i { width: 18px; height: 18px; }
.meta-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .88rem; color: var(--muted); }
.meta-list li { display: flex; align-items: center; gap: 8px; }
.meta-list .i { width: 16px; height: 16px; color: var(--green-ink); }

.avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar--lg { width: 96px; height: 96px; }
.avatar--initials {
  display: grid; place-items: center; font-weight: 900; font-size: 1.3rem;
  background: color-mix(in srgb, var(--tone) 16%, var(--surface)); color: var(--tone);
}
:root[data-theme="dark"] .avatar--initials { color: color-mix(in srgb, var(--tone) 55%, #fff); }

/* ===== 4. Course cards ===== */
.course-top {
  --c1: #2d6a52; --c2: #1F4B3A;
  position: relative; height: 150px; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff;
}
.course-card[data-grade="یازدهم"] .course-top { --c1: #0e8aa8; --c2: #155e75; }
.course-card[data-grade="دوازدهم"] .course-top { --c1: #EEA153; --c2: #b8662a; }
.course-top img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.course-atom {
  position: absolute; width: 200px; height: 200px; inset-inline-end: -40px; bottom: -60px;
  fill: none; stroke: #fff; stroke-width: .8; opacity: .3; transition: transform 1.2s ease;
}
.course-card:hover .course-atom { transform: rotate(60deg); }
.course-subject { font-size: 2.3rem; font-weight: 900; letter-spacing: -.01em; }
.course-grade {
  position: absolute; top: 14px; inset-inline-start: 14px; padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .22); backdrop-filter: blur(6px); font-size: .82rem; font-weight: 700;
}

/* ===== 5. Why us ===== */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.feature h3 { font-size: 1.1rem; font-weight: 800; margin: 16px 0 6px; }
.feature p { margin: 0; color: var(--muted); font-size: .93rem; }
.feature-icon {
  width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center;
  background: var(--green-soft); color: var(--green-ink);
}
.feature-icon .i { width: 24px; height: 24px; }
.feature--cta { background: var(--hero-green); color: #fff; border-color: transparent; transition: transform .25s; }
.feature--cta:hover { transform: translateY(-4px); }
.feature--cta p { color: rgba(255, 255, 255, .88); }
.feature--cta .feature-icon { background: rgba(255, 255, 255, .18); color: #fff; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ===== 6. Top students ===== */
.scroller {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin;
}
.scroller > * { scroll-snap-align: start; }
.rank-card { align-items: center; text-align: center; padding: 28px 20px; }
.rank-number { display: flex; align-items: baseline; gap: 6px; margin: 16px 0 2px; font-size: 2rem; font-weight: 900; color: var(--orange-ink); }
.rank-number small { font-size: .85rem; font-weight: 600; color: var(--muted); }
.rank-card h3 { font-size: 1rem; font-weight: 800; margin: 0; }
.rank-card p { margin: 2px 0 0; font-size: .88rem; }

/* ===== 7. Teachers ===== */
.teacher-spotlight {
  display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 40px;
  padding: 36px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line);
}
.teacher-spotlight h3 { font-size: 1.8rem; font-weight: 900; margin: 6px 0 8px; }
.teacher-spotlight p { margin: 0 0 22px; max-width: 560px; }
.teacher-photo { width: 220px; height: 220px; border-radius: 32px; object-fit: cover; }
.teacher-photo--initials {
  display: grid; place-items: center; font-size: 3.6rem; font-weight: 900;
  background: var(--hero-green); color: #fff;
}
.teacher-card { align-items: center; text-align: center; padding: 28px 20px; }
.teacher-card h3 { font-size: 1.05rem; font-weight: 800; margin: 14px 0 2px; }
.teacher-card p { margin: 0; }
@media (max-width: 700px) {
  .teacher-spotlight { grid-template-columns: 1fr; text-align: center; padding: 28px 20px; gap: 20px; }
  .teacher-photo { width: 140px; height: 140px; margin-inline: auto; border-radius: 28px; font-size: 2.4rem; }
  .teacher-spotlight p { margin-inline: auto; }
  .teacher-spotlight .stage-actions--start { justify-content: center; }
}

/* ===== 8. Products ===== */
.product-cover {
  position: relative; aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 24px; text-align: center; color: var(--tone);
  background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 20%, var(--surface)), color-mix(in srgb, var(--tone) 6%, var(--surface)));
}
.product-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-cover > .i { width: 42px; height: 42px; stroke-width: 1.4; }
.product-cover > span:not(.tag) { color: var(--text); font-weight: 800; font-size: .95rem; line-height: 1.6; }
.tag {
  position: absolute; top: 12px; inset-inline-start: 12px; padding: 3px 10px; border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: .75rem; font-weight: 700; box-shadow: var(--shadow-sm);
}
@media (max-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-grid .product-cover { padding: 14px; }
  .product-grid .product-cover > span:not(.tag) { font-size: .82rem; }
  .product-grid .card-body { padding: 12px 12px 6px; }
  .product-grid .card-body h3 { font-size: .92rem; }
  .product-grid .card-foot { padding: 10px 12px 12px; font-size: .85rem; }
  .product-grid .icon-pill { width: 32px; height: 32px; }
  .product-grid .tag { top: 8px; inset-inline-start: 8px; }
}
.icon-pill { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: var(--on-orange); }
.icon-pill .i { width: 18px; height: 18px; }

/* ===== 9. Testimonials ===== */
.quote-card { margin: 0; padding: 28px; }
.quote-mark { width: 34px; height: 34px; color: var(--orange); }
.quote-card blockquote { flex: 1; margin: 14px 0 20px; line-height: 1.95; }
.quote-card figcaption { display: flex; flex-direction: column; }
.quote-card figcaption span { color: var(--muted); font-size: .85rem; }

/* ===== 10. Gallery ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 180px; gap: 12px; }
.gallery-item { position: relative; margin: 0; overflow: hidden; border-radius: 18px; }
.gallery-item:first-child { grid-column: span 2; grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0; padding: 28px 14px 10px; color: #fff; font-size: .85rem; font-weight: 600;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6)); opacity: 0; transition: opacity .3s;
}
.gallery-item:hover figcaption, .gallery-item:focus-within figcaption { opacity: 1; }
.gallery-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--tone) 14%, var(--surface-2)); color: var(--tone);
}
.gallery-placeholder .i { width: 34px; height: 34px; stroke-width: 1.4; }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; } }

/* ===== 11. News ===== */
.news-cover {
  aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden;
  background: color-mix(in srgb, var(--tone) 12%, var(--surface-2)); color: var(--tone);
}
.news-cover img { width: 100%; height: 100%; object-fit: cover; }
.news-cover .i { width: 36px; height: 36px; stroke-width: 1.4; }
.news-card time { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.news-card time .i { width: 15px; height: 15px; }

/* ===== 12. FAQ ===== */
.faq-list { display: grid; gap: 10px; }
.faq { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: border-color .2s; }
.faq[open] { border-color: var(--green); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; font-weight: 700; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { color: var(--muted); transition: transform .25s; }
.faq[open] summary .i { transform: rotate(180deg); color: var(--green-ink); }
.faq-answer { padding: 0 22px 16px; color: var(--muted); }
.faq-answer p { margin: 0 0 8px; }

/* ===== 13. Quick registration ===== */
.register-card {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px;
  padding: 52px; border-radius: 32px; background: var(--hero-green); color: #fff;
}
.register-card::before {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  inset-inline-start: -140px; bottom: -220px; border: 70px solid rgba(255, 255, 255, .06);
}
.register-intro { position: relative; }
.register-intro h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); font-weight: 900; margin: 0 0 12px; }
.register-intro p { margin: 0; color: rgba(255, 255, 255, .88); }
.eyebrow--on-dark { background: rgba(255, 255, 255, .16); color: #fff; }
.check-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; }
.check-list li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.check-list .i { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: rgba(255, 255, 255, .18); stroke-width: 2.5; }

.register-form {
  position: relative; display: grid; gap: 14px; padding: 28px; border-radius: 24px;
  background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
}
.field { display: grid; gap: 6px; }
.field > span { font-weight: 700; font-size: .9rem; }
.field input, .field select {
  width: 100%; height: 50px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: inherit;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field input[dir="ltr"] { text-align: right; }
.field select {
  appearance: none; padding-inline-start: 14px; padding-inline-end: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a9a90' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 18px; background-position: left 14px center;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--green); background-color: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 18%, transparent);
}
.field.has-error input { border-color: var(--danger); }
.error { color: var(--danger); font-size: .82rem; font-weight: 600; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Honeypot: clipped in place, not pushed off-screen (an offset to the left adds horizontal scroll in RTL) */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.register-done { place-items: center; text-align: center; padding: 48px 28px; }
.register-done h3 { margin: 0; font-size: 1.3rem; font-weight: 900; }
.register-done p { margin: 0; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green-ink); }
.done-icon .i { width: 30px; height: 30px; stroke-width: 2.5; }
@media (max-width: 900px) {
  .register-card { grid-template-columns: 1fr; gap: 28px; padding: 32px 20px 20px; border-radius: 26px; }
}
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
  .register-form { padding: 20px; }
}

/* ===== Floating contact button ===== */
.fab {
  position: fixed; z-index: 60; bottom: 20px; inset-inline-end: 20px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.fab-btn {
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--green); color: #fff;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--green) 45%, transparent); transition: transform .2s, background-color .2s;
}
.fab-btn:hover { transform: scale(1.06); }
.fab-btn .i { width: 26px; height: 26px; grid-area: 1 / 1; }
.fab-btn .i-close, .fab-btn[aria-expanded="true"] .i-open { display: none; }
.fab-btn[aria-expanded="true"] .i-close { display: block; }
.fab-btn[aria-expanded="true"] { background: var(--text); color: var(--bg); }
.fab-menu {
  width: min(290px, calc(100vw - 40px)); padding: 10px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transform-origin: bottom left; animation: pop .2s ease;
}
.fab-title { margin: 4px 10px 8px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.fab-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; color: var(--text); font-weight: 600; }
.fab-item:hover { background: var(--surface-2); }
.fab-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, currentColor 14%, transparent); }
.fab-icon .i { width: 20px; height: 20px; }
.fab-icon--call { color: var(--green-ink); }
.fab-icon--telegram { color: #0ea5e9; }
.fab-icon--rubika { color: #a855f7; }
@media (max-width: 480px) { .fab { bottom: 14px; inset-inline-end: 14px; } }

/* ===== Inner pages: shared ===== */
.good { color: var(--green-ink); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.center { text-align: center; }
.flash--info { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 8%, var(--bg)); }
.page-head { padding-block: 28px 32px; }
.page-head--compact { padding-bottom: 20px; }
.page-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 900; margin: 6px 0 8px; }
.page-head > p { margin: 0; max-width: 680px; }
.page-head .lead { font-size: 1.1rem; color: var(--muted); max-width: 720px; margin: 0 0 14px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--green-ink); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.empty-state { display: grid; place-items: center; gap: 10px; padding: 56px 20px; border: 1px dashed var(--line); border-radius: 22px; color: var(--muted); text-align: center; }
.empty-state .i { width: 36px; height: 36px; }

.tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 24px; padding-bottom: 4px; scrollbar-width: none; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; transition: all .2s;
}
.tab small { color: var(--muted); font-weight: 500; }
.tab:hover { border-color: var(--green); color: var(--green-ink); }
.tab.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.tab.is-active small { color: rgba(255, 255, 255, .8); }

.help-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 40px; padding: 22px 26px; border-radius: 22px; background: var(--green-softer); border: 1px solid var(--line);
}
.help-strip div { display: flex; flex-direction: column; }

/* Price tag: struck-through list price + current price */
.price-tag { display: inline-flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; line-height: 1.5; }
.price-tag del { color: var(--muted); font-size: .85rem; text-decoration-color: var(--danger); text-decoration-thickness: 1.5px; }
.price-tag b { font-weight: 900; font-size: 1.05rem; }
.price-tag span { font-size: .85rem; }
.price-tag--soon { color: var(--muted); font-weight: 700; font-size: .9rem; }
.price-tag--lg del { font-size: 1rem; }
.price-tag--lg b { font-size: 2rem; }
.price-tag--lg span { font-size: 1rem; }
.off-badge {
  position: absolute; top: 14px; inset-inline-end: 14px; padding: 4px 10px; border-radius: 999px;
  background: var(--orange); color: var(--on-orange); font-size: .78rem; font-weight: 800;
}
.off-badge--inline { position: static; justify-self: start; }

/* ===== Course page ===== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.chip-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: .85rem; font-weight: 600;
}
.chip-tag .i { width: 16px; height: 16px; color: var(--green-ink); }
.chip-tag--grade { background: var(--green); border-color: var(--green); color: #fff; }
.course-head[data-grade="یازدهم"] .chip-tag--grade { background: #155e75; border-color: #155e75; }
.course-head[data-grade="دوازدهم"] .chip-tag--grade { background: #c2410c; border-color: #c2410c; }
.byline { display: flex; align-items: center; gap: 10px; margin: 0; }
.avatar--xs { width: 34px; height: 34px; font-size: .8rem; }

.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.course-layout .buy-card { grid-column: 2; grid-row: 1; position: sticky; top: 96px; }
.course-main { grid-column: 1; grid-row: 1; display: grid; gap: 20px; }
.buy-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 26px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.buy-card .price-tag { margin-bottom: 4px; }
.plan-list { list-style: none; margin: 0; padding: 14px 0; display: grid; gap: 10px; border-block: 1px dashed var(--line); font-size: .93rem; }
.plan-list li { display: flex; gap: 10px; align-items: flex-start; }
.plan-list .i { width: 18px; height: 18px; margin-top: 4px; color: var(--green-ink); }
.course-section { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px 26px; }
.course-section h2 { font-size: 1.2rem; font-weight: 900; margin: 0 0 14px; display: flex; align-items: baseline; gap: 10px; }
.course-section h2 small { font-size: .85rem; font-weight: 500; }
.course-section > p { margin: 0 0 10px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0; }
.facts > div { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.facts dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .82rem; margin-bottom: 2px; }
.facts dt .i { width: 16px; height: 16px; color: var(--green-ink); }
.facts dd { margin: 0; font-weight: 700; }
.syllabus summary > span { display: flex; align-items: center; gap: 12px; }
.chapter-no {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 10px;
  background: var(--green-soft); color: var(--green-ink); font-size: .85rem; font-weight: 900;
}
.topic-list { margin: 0; padding: 0 22px 16px; padding-inline-start: 64px; color: var(--muted); display: grid; gap: 4px; }
.teacher-mini { display: flex; align-items: center; gap: 16px; }
.teacher-mini p { margin: 2px 0 0; }
@media (max-width: 960px) {
  .course-layout { grid-template-columns: 1fr; }
  .course-layout .buy-card { grid-column: 1; grid-row: auto; position: static; }
  .course-main { grid-row: auto; }
}

/* ===== Enroll / checkout ===== */
.steps { list-style: none; display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 0; font-size: .88rem; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 8px; }
.steps li + li::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--line); }
.steps span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); font-weight: 800; }
.steps .is-current { color: var(--text); font-weight: 700; }
.steps .is-current span { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }
.steps .is-done span { background: var(--green); border-color: var(--green); color: #fff; }

.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.checkout-main { display: grid; gap: 18px; }
fieldset.panel { margin: 0; min-width: 0; }
/* Floated so the legend sits inside the panel instead of on its border */
.panel legend { float: right; width: 100%; padding: 0; margin-bottom: 16px; font-weight: 900; font-size: 1.05rem; }
.panel legend + * { clear: both; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field--wide { grid-column: 1 / -1; }
.field textarea {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: inherit; resize: vertical;
}
.field textarea:focus { outline: none; border-color: var(--green); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 18%, transparent); }
.hint { color: var(--muted); font-size: .8rem; }
.plan-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan-option {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 16px; cursor: pointer;
  border: 1.5px solid var(--line); transition: border-color .2s, background-color .2s;
}
.plan-option:has(input:checked) { border-color: var(--green); background: var(--green-softer); }
.plan-option input { margin-top: 6px; accent-color: var(--green); }
.plan-option span { display: flex; flex-direction: column; }
.code-row { display: flex; gap: 10px; }
.code-row input {
  flex: 1; min-width: 0; height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: inherit;
}
.code-row input:focus { outline: none; border-color: var(--green); }
.code-row.has-error input { border-color: var(--danger); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--green); }
.check.has-error span { color: var(--danger); }

.summary { position: sticky; top: 96px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.summary h2 { font-size: 1.1rem; font-weight: 900; margin: 0; }
.summary-course { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; }
.summary-course .i { color: var(--green-ink); }
.summary-lines { margin: 0; display: grid; gap: 8px; font-size: .93rem; }
.summary-lines > div { display: flex; justify-content: space-between; gap: 10px; }
.summary-lines dd { margin: 0; }
.summary-lines .good dd, .summary-lines .good dt { color: var(--green-ink); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px dashed var(--line); }
.summary-total strong { font-size: 1.3rem; font-weight: 900; }
.schedule { list-style: none; margin: 0; padding: 12px; border-radius: 14px; background: var(--surface-2); display: grid; gap: 6px; font-size: .88rem; }
.schedule li { display: flex; justify-content: space-between; }
.summary .small .i { width: 15px; height: 15px; vertical-align: -3px; }
@media (max-width: 960px) {
  .checkout { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 560px) {
  .field-grid, .plan-options { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
}

/* ===== Receipt ===== */
.receipt-wrap { max-width: 860px; }
.receipt { display: grid; gap: 22px; }
.receipt-head { display: flex; align-items: center; gap: 16px; }
.receipt-head h1 { font-size: 1.5rem; font-weight: 900; margin: 0; }
.receipt-head p { margin: 2px 0 0; }
.receipt-icon {
  display: grid; place-items: center; width: 60px; height: 60px; flex: none; border-radius: 50%;
  background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange-ink);
}
.receipt-head.is-ok .receipt-icon { background: var(--green-soft); color: var(--green-ink); }
.receipt-icon .i { width: 28px; height: 28px; stroke-width: 2.4; }
.facts--receipt { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.receipt-sub { font-size: 1.1rem; font-weight: 900; margin: 0 0 -8px; }
section > .receipt-sub { margin-bottom: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.pay-table { width: 100%; border-collapse: collapse; font-size: .92rem; white-space: nowrap; }
.pay-table th, .pay-table td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--line); }
.pay-table th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: .82rem; }
.pay-table tr:last-child td { border-bottom: 0; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.status--ok { background: var(--green-soft); color: var(--green-ink); }
.status--wait { background: var(--surface-2); color: var(--muted); }
.status--late { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.receipt-pay {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: 18px; background: color-mix(in srgb, var(--orange) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--orange) 40%, transparent);
}
.receipt-pay div { display: flex; flex-direction: column; }
.receipt-note { margin: 0; line-height: 2; }
.receipt-note .i { width: 16px; height: 16px; vertical-align: -3px; color: var(--green-ink); }

/* ===== Test gateway ===== */
.gateway-wrap { max-width: 620px; padding-block: 40px; }
.gateway { display: grid; gap: 18px; }
.gateway h1 { margin: 0; font-size: 1.4rem; font-weight: 900; }
.gateway-warn {
  display: flex; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 14px; font-size: .88rem;
  background: color-mix(in srgb, var(--orange) 12%, transparent); border: 1px dashed var(--orange);
}
.gateway-warn .i { flex: none; color: var(--orange-ink); }
.gateway-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Register / consultation page ===== */
.register-page { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; }
.register-side { display: grid; gap: 16px; }
.register-side h2 { font-size: 1.05rem; font-weight: 900; margin: 0 0 14px; }
.how-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.how-list li { display: flex; gap: 12px; align-items: flex-start; }
.how-list b { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--green-soft); color: var(--green-ink); font-size: .85rem; }
.contact-mini { display: grid; gap: 8px; }
.contact-mini h2 { margin-bottom: 4px; }
.contact-mini a { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.05rem; }
.contact-mini .i { width: 18px; height: 18px; color: var(--green-ink); }
.contact-mini p { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; }
.register-full { display: grid; gap: 20px; }
.register-page .register-done { display: grid; gap: 12px; }
@media (max-width: 960px) {
  .register-page { grid-template-columns: 1fr; }
  .register-side { order: 2; }
}

/* ===== Teachers ===== */
.i-sm { width: 15px; height: 15px; vertical-align: -3px; }
.teacher-tile-photo { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); }
.teacher-tile-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.teacher-tile:hover .teacher-tile-photo img { transform: scale(1.04); }
.teacher-tile-photo .course-grade { background: rgba(0, 0, 0, .45); color: #fff; }
.teacher-photo--initials {
  display: grid; place-items: center; width: 100%; height: 100%;
  background: var(--hero-green); color: #fff; font-size: 3.4rem; font-weight: 900;
}
.teacher-tile h2 { font-size: 1.15rem; font-weight: 900; margin: 0 0 6px; }
.teacher-tile h2 a { color: var(--text); }
.teacher-tile:hover h2 a { color: var(--green-ink); }
.mini-socials { position: relative; z-index: 2; display: flex; gap: 4px; }
.mini-socials a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--muted); }
.mini-socials a:hover { background: var(--surface-2); color: var(--green-ink); }
.mini-socials .i { width: 18px; height: 18px; }
@media (min-width: 1021px) { .teacher-grid:has(> :only-child) { grid-template-columns: minmax(0, 380px); } }

.teacher-hero {
  display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 48px; align-items: center;
  padding: 32px; border-radius: 32px; background: var(--surface); border: 1px solid var(--line);
}
.teacher-hero-photo { aspect-ratio: 1; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); }
.teacher-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.teacher-hero-info h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 900; margin: 12px 0 10px; }
.teacher-hero-info .lead { font-size: 1.08rem; color: var(--muted); margin: 0 0 10px; max-width: 620px; }
.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 22px; padding: 0; }
.hero-facts li { display: flex; flex-direction: column; min-width: 110px; padding: 10px 16px; border-radius: 16px; background: var(--surface-2); }
.hero-facts b { font-size: 1.5rem; font-weight: 900; color: var(--green-ink); line-height: 1.3; }
.hero-facts span { font-size: .82rem; color: var(--muted); }
.socials--teacher { margin-top: 18px; }
.teacher-body { display: grid; gap: 20px; margin-top: 24px; }
.teacher-body:empty { display: none; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 4px; }
.timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; inset-inline-start: 7px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 0; padding-inline-start: 32px; }
.timeline li::before {
  content: ""; position: absolute; top: 15px; inset-inline-start: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--green);
}
.timeline-when { font-weight: 800; color: var(--green-ink); min-width: 70px; }

@media (max-width: 860px) {
  .teacher-hero { grid-template-columns: 1fr; gap: 24px; padding: 20px; text-align: center; }
  .teacher-hero-photo { width: min(260px, 80%); margin-inline: auto; }
  .teacher-hero-info .lead { margin-inline: auto; }
  .hero-facts, .teacher-hero-info .stage-actions--start, .socials--teacher { justify-content: center; }
}

/* ===== Shop ===== */
.product-cover--video { --tone: #155e75; }
.product-cover--print { --tone: #1F4B3A; }
:root[data-theme="dark"] .product-cover > .i { color: color-mix(in srgb, var(--tone) 50%, #fff); }
.card-kicker { display: inline-block; margin-bottom: 4px; font-size: .8rem; font-weight: 700; color: var(--green-ink); }
.off-badge--muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

.shop-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 24px; }
.shop-toolbar .tabs { margin-bottom: 0; }
.chip-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-filter {
  padding: 5px 14px; border-radius: 999px; font-size: .88rem; font-weight: 600;
  color: var(--muted); border: 1px dashed var(--line);
}
.chip-filter:hover { color: var(--green-ink); border-color: var(--green); }
.chip-filter.is-active { color: var(--green-ink); border-style: solid; border-color: var(--green); background: var(--green-softer); }
.sort-links { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; margin-inline-start: auto; }
.sort-links a { color: var(--muted); font-size: .9rem; font-weight: 600; padding: 2px 0; border-bottom: 2px solid transparent; }
.sort-links a:hover { color: var(--text); }
.sort-links a.is-active { color: var(--green-ink); border-bottom-color: var(--orange); }

.product-layout { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 40px; align-items: start; }
.product-media {
  position: relative; aspect-ratio: 1; border-radius: 28px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px; text-align: center;
  color: var(--tone); border: 1px solid var(--line);
  background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 22%, var(--surface)), color-mix(in srgb, var(--tone) 6%, var(--surface)));
}
.product-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-media > .i { width: 72px; height: 72px; stroke-width: 1.2; }
.product-media > span { color: var(--text); font-size: 1.3rem; font-weight: 900; }
.product-info h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 900; margin: 10px 0 8px; }
.product-info .lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 8px; }
.product-info .chips { align-items: center; }
.buy-box { display: grid; gap: 14px; margin-top: 20px; padding: 24px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.add-form { display: flex; gap: 10px; flex-wrap: wrap; }
.add-form .btn { flex: 1; }
.qty select {
  height: 54px; padding: 0 14px; padding-inline-end: 36px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a9a90' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat left 12px center / 16px;
  color: var(--text); font: inherit; appearance: none; cursor: pointer;
}
.section--compact { margin-top: 32px; }
@media (max-width: 860px) {
  .product-layout { grid-template-columns: 1fr; gap: 24px; }
  .product-media { max-width: 360px; width: 100%; margin-inline: auto; }
}

.cart-list { display: grid; gap: 0; padding-block: 8px; }
.cart-line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-thumb {
  width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; overflow: hidden; color: var(--tone);
  background: color-mix(in srgb, var(--tone) 14%, var(--surface));
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-info { display: flex; flex-direction: column; min-width: 0; }
.cart-line-info a { color: var(--text); }
.cart-line-qty { display: flex; align-items: center; gap: 6px; }
.cart-line-qty select { height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; }
.cart-line-total { white-space: nowrap; }
@media (max-width: 560px) {
  .cart-line { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .cart-thumb { width: 56px; height: 56px; }
  .cart-line-total { grid-column: 2 / -1; font-size: .92rem; }
}
.summary-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; }
.summary-items li { display: flex; justify-content: space-between; gap: 10px; }
.summary-items b { white-space: nowrap; }

.licence-box { display: grid; gap: 12px; padding: 18px; border-radius: 18px; background: var(--green-softer); border: 1px solid var(--line); }
.licence-box .receipt-sub { margin: 0; display: flex; align-items: center; gap: 8px; }
.licence { display: grid; gap: 8px; }
.licence-key { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.licence-key code {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  font-family: ui-monospace, Consolas, monospace; font-size: .85rem; overflow-wrap: anywhere;
}
.track-wrap { max-width: 520px; }
.track-form { display: grid; gap: 16px; }

/* ===== News ===== */
.news-cover { position: relative; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 32px; }
.article { max-width: 820px; }
.article-head { padding-block: 28px 8px; }
.article-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 900; margin: 10px 0 8px; line-height: 1.45; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 12px; }
.article-head .lead { font-size: 1.12rem; color: var(--muted); margin: 0; }
.article-cover { width: 100%; max-height: 460px; object-fit: cover; border-radius: 24px; margin: 18px 0 8px; }
.prose { font-size: 1.05rem; line-height: 2; }
.prose h2 { font-size: 1.25rem; font-weight: 900; margin: 28px 0 8px; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-inline-start: 22px; display: grid; gap: 6px; }
.prose li::marker { color: var(--green-ink); }
.share { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding-top: 20px; border-top: 1px dashed var(--line); }
.share button.social { font: inherit; font-size: .88rem; cursor: pointer; }

/* ===== Gallery ===== */
.album-cover { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.album-card:hover .album-cover img { transform: scale(1.04); }
.album-card h2 { font-size: 1.1rem; font-weight: 900; margin: 0 0 4px; }
.album-card h2 a { color: var(--text); }
.sub-title { font-size: 1.2rem; font-weight: 900; margin: 40px 0 16px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 24px; }
.photo { position: relative; display: block; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--surface-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.photo:hover img { transform: scale(1.05); }
.photo-caption {
  position: absolute; inset: auto 0 0; padding: 26px 12px 10px; color: #fff; font-size: .85rem; font-weight: 600;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
}
@media (max-width: 560px) { .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

.lightbox { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: rgba(5, 10, 8, .92); }
.lightbox img { max-width: min(92vw, 1200px); max-height: 80vh; border-radius: 14px; object-fit: contain; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 12px; }
.lightbox figcaption { color: #e7eee9; font-size: .95rem; text-align: center; min-height: 1.5em; }
.lightbox .icon-btn { position: absolute; color: #fff; background: rgba(255, 255, 255, .12); }
.lightbox .icon-btn:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.lightbox [data-lb-close] { top: 16px; inset-inline-end: 16px; }
.lightbox [data-lb-prev] { inset-inline-start: 16px; top: 50%; transform: translateY(-50%); }
.lightbox [data-lb-next] { inset-inline-end: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-count { position: absolute; top: 24px; inset-inline-start: 24px; color: #cfd8d3; font-size: .85rem; }

/* ===== Contact ===== */
.contact-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; }
.contact-cards { display: grid; gap: 12px; }
.contact-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--text); }
a.contact-card:hover { border-color: var(--green); }
.contact-card > span:last-child { display: flex; flex-direction: column; }
.contact-card strong { font-size: 1rem; }
.contact-socials { display: grid; gap: 10px; padding: 16px 18px; }
.contact-main { display: grid; gap: 20px; }
.contact-form { display: grid; gap: 18px; }
.contact-form h2, .contact-map h2 { font-size: 1.15rem; font-weight: 900; margin: 0; }
.contact-map { display: grid; gap: 14px; }
.map-frame--lg { aspect-ratio: 16 / 8; }
@media (max-width: 960px) {
  .contact-layout { grid-template-columns: 1fr; }
}

/* ===== Search ===== */
.search-inline {
  display: flex; align-items: center; gap: 10px; max-width: 680px; margin-top: 12px; padding: 6px; padding-inline-start: 16px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
}
.search-inline > .i { color: var(--muted); }
.search-inline input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; font-size: 1.02rem; }
.search-results { max-width: 860px; }
.result-group { margin-top: 24px; }
.result-group h2 { font-size: 1.1rem; font-weight: 900; margin: 0 0 10px; }
.result-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.result-list a {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.result-list a:hover { border-color: var(--green); }

/* ===== Student account ===== */
.auth-wrap { max-width: 460px; padding-block: 36px 8px; }
.auth-card { display: grid; gap: 16px; padding: 30px; }
.auth-card h1 { margin: 0; text-align: center; font-size: 1.4rem; font-weight: 900; }
.auth-card > p { margin: 0; }
.auth-brand { display: grid; place-items: center; }
.auth-brand img { height: 60px; width: auto; }
.auth-tabs { justify-content: center; margin: 0; }
.auth-form { display: grid; gap: 14px; }
.auth-form .center { justify-self: center; }
.code-field { letter-spacing: .45em; text-align: center !important; font-size: 1.4rem !important; font-weight: 800; }
.auth-resend { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.account-head { padding-bottom: 8px; }
.account-hello { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.account-hello h1 { font-size: 1.4rem; margin: 0; }
.account-hello p { margin: 0; }
.account-logout { margin-inline-start: auto; }
.account-tabs { margin: 18px 0 0; }
.account-body { display: grid; gap: 22px; padding-top: 8px; }
.account-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.account-card { display: grid; justify-items: start; gap: 4px; color: var(--text); transition: border-color .2s; }
.account-card:hover { border-color: var(--green); }
.account-card b { font-size: 1.8rem; font-weight: 900; margin-top: 8px; line-height: 1.2; }
.account-card > span:last-child { color: var(--muted); font-size: .9rem; }
.due-alert {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 20px;
  background: color-mix(in srgb, var(--orange) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--orange) 45%, transparent);
}
.due-alert > div { display: flex; flex-direction: column; flex: 1; }
.due-alert span { font-size: .9rem; color: var(--muted); }
.due-alert.is-late { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.due-alert form { margin: 0; }
.class-card { display: grid; gap: 10px; align-content: start; }
.class-card h3 { margin: 0; font-size: 1.1rem; font-weight: 900; }
.class-card p { margin: 0; }
.account-list { display: grid; gap: 16px; }
.enrolled { display: grid; gap: 14px; }
.enrolled header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.enrolled header > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.enrolled h2 { margin: 0; font-size: 1.15rem; font-weight: 900; }
.order-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.order-items li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.order-items .licence-key { flex: 1 1 260px; }
.account-profile { grid-template-columns: 1.4fr 1fr; align-items: start; }
.account-profile form { display: grid; gap: 16px; }
.account-profile h2 { margin: 0; font-size: 1.1rem; font-weight: 900; }
.account-profile p { margin: -8px 0 0; }
@media (max-width: 860px) {
  .account-cards { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  .account-card { padding: 14px; }
  .account-card .feature-icon { width: 40px; height: 40px; }
  .account-card b { font-size: 1.4rem; }
  .account-profile { grid-template-columns: 1fr; }
  .due-alert { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .neural-spin, .chip { animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
