/* ============================================
   Beit Net'zer · Yeshivah Online
   Design system
   ============================================ */

:root {
  /* Ink — deep warm-black tones */
  --ink-0: #07060a;
  --ink-1: #0d0c12;
  --ink-2: #14131a;
  --ink-3: #1c1a24;
  --ink-4: #26232f;
  --ink-5: #34303c;

  /* Pergamino — bone / cream text */
  --bone: #f3ead7;
  --bone-dim: #c9bfa9;
  --bone-mute: #8a8170;

  /* Antique gold accent */
  --gold: #d4ad5a;
  --gold-bright: #e8c777;
  --gold-deep: #9a7a36;
  --gold-shadow: rgba(212, 173, 90, 0.18);

  /* Deep midnight blue */
  --indigo: #1f2a44;
  --indigo-deep: #131a2c;

  /* States */
  --ok: #6fbf8f;
  --warn: #d99a4a;
  --err: #c25a5a;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --serif: "Cormorant Garamond", "Cormorant", "EB Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --hebrew: "Frank Ruhl Libre", "David Libre", "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--ink-0);
  color: var(--bone);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* App shell */
.app-root {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at top, rgba(31, 42, 68, 0.45) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 110%, rgba(212, 173, 90, 0.08) 0%, transparent 55%),
    var(--ink-0);
  background-attachment: fixed;
}

/* ===== Header / Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 48px;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(7, 6, 10, 0.92) 0%, rgba(7, 6, 10, 0.55) 80%, transparent 100%);
  transition: background 0.3s;
}
.nav.scrolled {
  background: rgba(7, 6, 10, 0.94);
  border-bottom: 1px solid var(--ink-3);
}
.nav .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.nav .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: url("assets/logo-badge.png") center/cover no-repeat, var(--ink-1);
  border: 1px solid rgba(212, 173, 90, 0.4);
  box-shadow: 0 0 18px rgba(212, 173, 90, 0.18), inset 0 0 8px rgba(0,0,0,0.6);
}
.nav .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.nav .brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--bone);
  white-space: nowrap;
}
.nav .brand-sub {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 3px;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 6px;
  margin-left: 18px;
}
.nav-link {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--bone-dim);
  border: 1px solid transparent;
  background: transparent;
  letter-spacing: 0.02em;
  transition: all 0.15s;
}
.nav-link:hover { color: var(--bone); background: var(--ink-2); }
.nav-link.active {
  color: var(--gold);
  border-color: var(--gold-deep);
  background: rgba(212, 173, 90, 0.06);
}
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: 999px;
  padding: 7px 14px;
  width: 240px;
}
.nav-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--bone);
  font-family: inherit;
  font-size: 13px;
  flex: 1;
}
.nav-search input::placeholder { color: var(--bone-mute); }
.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--ink-3));
  border: 1px solid var(--gold-deep);
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 600;
  display: grid;
  place-items: center;
  font-size: 14px;
  cursor: pointer;
}

/* Profile picker (estilo Disney+) */
.profile-picker {
  margin: 18px 0 8px;
}
.profile-picker-title {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-mute);
  text-align: center;
  margin-bottom: 14px;
}
.profile-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
.profile-card {
  background: transparent;
  border: none;
  color: var(--bone);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 78px;
  position: relative;
  padding: 4px;
  transition: transform 0.15s;
}
.profile-card:hover { transform: scale(1.05); }
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--ink-3));
  border: 2px solid transparent;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--gold);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.profile-card:hover .profile-avatar {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(212, 173, 90, 0.3);
}
.profile-card.admin .profile-avatar {
  background: linear-gradient(135deg, #2a2218, #15110d);
}
.profile-card.teacher .profile-avatar {
  background: linear-gradient(135deg, #1c2538, #15110d);
}
.profile-card .profile-name {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--bone-dim);
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-card .profile-role {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.profile-card-remove {
  position: absolute;
  top: -4px;
  right: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink-2);
  border: 1px solid var(--ink-4);
  color: var(--bone-mute);
  font-size: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.profile-card:hover .profile-card-remove { display: flex; }
.profile-card-remove:hover { color: var(--err); border-color: var(--err); }

/* Teacher entry button — discreto, hebraico no canto */
.profile-picker {
  margin: 18px 0 8px;
}
.profile-picker-title {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-mute);
  text-align: center;
  margin-bottom: 14px;
}
.profile-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
.profile-card {
  background: transparent;
  border: none;
  color: var(--bone);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 78px;
  position: relative;
  padding: 4px;
  transition: transform 0.15s;
}
.profile-card:hover { transform: scale(1.05); }
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--ink-3));
  border: 2px solid transparent;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--gold);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.profile-card:hover .profile-avatar {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(212, 173, 90, 0.3);
}
.profile-card.admin .profile-avatar {
  background: linear-gradient(135deg, #2a2218, #15110d);
}
.profile-card.teacher .profile-avatar {
  background: linear-gradient(135deg, #1c2538, #15110d);
}
.profile-card .profile-name {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--bone-dim);
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-card .profile-role {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.profile-card-remove {
  position: absolute;
  top: -4px;
  right: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink-2);
  border: 1px solid var(--ink-4);
  color: var(--bone-mute);
  font-size: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.profile-card:hover .profile-card-remove { display: flex; }
.profile-card-remove:hover { color: var(--err); border-color: var(--err); }
.btn-teacher-entry {
  background: transparent;
  border: 1px solid var(--gold-deep);
  color: var(--gold);
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-teacher-entry .heb {
  font-family: var(--hebrew);
  font-size: 15px;
  letter-spacing: 0.04em;
  direction: rtl;
}
.btn-teacher-entry:hover {
  background: rgba(212, 173, 90, 0.08);
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.15s;
  cursor: pointer;
  background: transparent;
  color: var(--bone);
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1c150a;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(212, 173, 90, 0.25);
}
.btn-gold:hover {
  background: linear-gradient(180deg, #f0d488, var(--gold-bright));
  transform: translateY(-1px);
}
.btn-ghost {
  border-color: var(--ink-4);
  background: rgba(20, 19, 26, 0.5);
  color: var(--bone);
}
.btn-ghost:hover {
  border-color: var(--gold-deep);
  background: var(--ink-3);
}
.btn-outline {
  border-color: var(--gold-deep);
  color: var(--gold);
}
.btn-outline:hover { background: rgba(212, 173, 90, 0.08); }
.btn-google {
  background: #fff;
  color: #1f1f1f;
  border-radius: 6px;
  padding: 12px 24px;
  font-weight: 500;
  font-family: var(--sans);
  border: 1px solid #dadce0;
}
.btn-google:hover { background: #f8f9fa; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-sm { padding: 7px 14px; font-size: 12px; }

/* ===== Landing page ===== */
.landing {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
.landing-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(212, 173, 90, 0.14) 0%, transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(31, 42, 68, 0.55) 0%, transparent 50%),
    linear-gradient(180deg, var(--ink-0) 0%, var(--ink-1) 100%);
  pointer-events: none;
}
.landing-bg::after {
  /* subtle parchment grain */
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.83 0 0 0 0 0.68 0 0 0 0 0.35 0 0 0 0.08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
}
.landing-sparkles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.landing-hero {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 90px 48px 60px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  align-items: center;
  min-height: calc(100vh - 90px);
}
.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}
.landing-eyebrow::before {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold-deep);
}
.landing h1 {
  font-family: var(--serif);
  font-size: clamp(48px, 6.5vw, 88px);
  font-weight: 500;
  line-height: 0.98;
  margin: 0 0 28px;
  color: var(--bone);
  letter-spacing: -0.01em;
}
.landing h1 em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}
.landing-hebrew {
  font-family: var(--hebrew);
  font-size: 28px;
  color: var(--gold);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}
.landing-lede {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--bone-dim);
  max-width: 540px;
  margin: 0 0 40px;
}
.landing-cta { display: flex; gap: 14px; align-items: center; margin-bottom: 56px; }
.landing-meta {
  display: flex;
  gap: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--ink-3);
  max-width: 540px;
}
.landing-meta .meta-item .num {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--gold);
  display: block;
  line-height: 1;
}
.landing-meta .meta-item .lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--bone-mute);
  margin-top: 8px;
  display: block;
}

/* Landing right column — video panel */
.landing-art {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: var(--ink-0);
  border: 1px solid var(--ink-3);
  box-shadow:
    0 50px 100px -25px rgba(0,0,0,0.7),
    0 0 0 1px rgba(212, 173, 90, 0.15),
    inset 0 1px 0 rgba(255,255,255,0.03);
}
.landing-art-emblem {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 50% 45%, rgba(212, 173, 90, 0.18) 0%, transparent 55%),
    url("assets/logo.png") center/contain no-repeat,
    #000;
  animation: emblemBreath 7s ease-in-out infinite;
}
@keyframes emblemBreath {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.015); }
}
.landing-art-gradient {
  /* dark gradient at the bottom for caption legibility */
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 45%;
  background: linear-gradient(180deg, transparent 0%, rgba(7,6,10,0.4) 40%, rgba(7,6,10,0.92) 100%);
  pointer-events: none;
  z-index: 1;
}
.landing-art-frame {
  /* inner gold ornament border */
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(212, 173, 90, 0.22);
  border-radius: 8px;
  pointer-events: none;
  z-index: 2;
}
.landing-art-frame::before,
.landing-art-frame::after {
  /* corner ornaments */
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid var(--gold);
  opacity: 0.6;
}
.landing-art-frame::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.landing-art-frame::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* Caption */
.landing-art-caption {
  position: absolute;
  bottom: 28px;
  left: 0; right: 0;
  text-align: center;
  z-index: 3;
  padding: 0 24px;
}
.landing-art-caption .heb {
  font-family: var(--hebrew);
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 0.05em;
  direction: rtl;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}
.landing-art-caption .quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--bone);
  margin: 0 auto;
  max-width: 80%;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}
.landing-art-caption .attr {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 6px;
}

/* Scroll scene */
.scroll-scene {
  position: relative;
  width: 92%;
  height: 78%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scrollFloat 9s ease-in-out infinite;
  filter: drop-shadow(0 40px 50px rgba(0,0,0,0.55));
}
@keyframes scrollFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* Wooden rollers (Atzei Chayim) — left and right */
.scroll-roller {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.scroll-roller.left  { left: 4%; }
.scroll-roller.right { right: 4%; }

.scroll-roller-cap {
  flex: 0 0 auto;
  width: 56px;
  height: 22px;
  border-radius: 6px;
  background:
    radial-gradient(ellipse at 50% 30%, #5d3f1f 0%, #3a2410 70%, #1f1408 100%);
  box-shadow:
    inset 0 1px 0 rgba(212, 173, 90, 0.3),
    inset 0 -3px 6px rgba(0,0,0,0.5),
    0 2px 4px rgba(0,0,0,0.4);
  position: relative;
  z-index: 4;
}
.scroll-roller-cap.top    { margin-bottom: -2px; }
.scroll-roller-cap.bottom { margin-top: -2px; }

/* Finial/crown above the top cap */
.scroll-roller-finial {
  width: 14px;
  height: 26px;
  background:
    radial-gradient(ellipse at 50% 30%, var(--gold-bright) 0%, var(--gold) 40%, var(--gold-deep) 100%);
  border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
  position: relative;
  margin-bottom: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255,235,180,0.6),
    inset 0 -2px 4px rgba(0,0,0,0.3),
    0 0 12px rgba(212, 173, 90, 0.4);
}
.scroll-roller-finial::before {
  /* crown tip */
  content: "";
  position: absolute;
  top: -6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  border-radius: 50% 50% 30% 30%;
  box-shadow: 0 0 6px rgba(212, 173, 90, 0.6);
}
.scroll-roller-finial::after {
  /* ring at base */
  content: "";
  position: absolute;
  bottom: -2px; left: -2px; right: -2px;
  height: 4px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  border-radius: 50%;
}
.scroll-roller-foot {
  /* small wooden knob at the bottom */
  width: 14px;
  height: 18px;
  background:
    radial-gradient(ellipse at 50% 30%, #5d3f1f 0%, #3a2410 70%, #1f1408 100%);
  border-radius: 4px 4px 50% 50%;
  margin-top: 2px;
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.5);
}

/* The wooden rod itself */
.scroll-rod {
  flex: 1;
  width: 22px;
  background:
    /* wood grain */
    repeating-linear-gradient(180deg,
      rgba(0,0,0,0.18) 0px, transparent 1px, transparent 4px,
      rgba(0,0,0,0.12) 4px, transparent 5px, transparent 14px),
    linear-gradient(90deg,
      #2a1a0c 0%,
      #4a2e16 25%,
      #6b4424 50%,
      #4a2e16 75%,
      #2a1a0c 100%);
  border-radius: 4px;
  box-shadow:
    inset 1px 0 0 rgba(212, 173, 90, 0.15),
    inset -1px 0 0 rgba(0,0,0,0.4);
  position: relative;
}

/* Parchment between the rollers */
.scroll-parchment {
  position: absolute;
  left: calc(4% + 32px - 12px);
  right: calc(4% + 32px - 12px);
  top: 18px;
  bottom: 18px;
  background:
    /* aged parchment */
    radial-gradient(ellipse at 50% 50%, #e8d8a8 0%, #d9c280 60%, #b89a5c 100%);
  z-index: 1;
  box-shadow:
    inset 0 0 40px rgba(120, 80, 30, 0.5),
    inset 0 0 0 1px rgba(120, 80, 30, 0.3),
    0 4px 12px rgba(0,0,0,0.5);
}
.scroll-parchment::before {
  /* parchment fiber texture */
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.1 0 0 0 0.35 0'/></filter><rect width='100%' height='100%' filter='url(%23p)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.6;
  pointer-events: none;
}
.scroll-parchment::after {
  /* darker stained edges */
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(80,50,15,0.45) 0%, transparent 12%, transparent 88%, rgba(80,50,15,0.45) 100%),
    linear-gradient(180deg, rgba(80,50,15,0.25) 0%, transparent 10%, transparent 90%, rgba(80,50,15,0.25) 100%);
  pointer-events: none;
}

/* Subtle paper roll shadow against the rods */
.scroll-roll-shadow-l, .scroll-roll-shadow-r {
  position: absolute;
  top: 14px; bottom: 14px;
  width: 14px;
  z-index: 2;
  background: linear-gradient(90deg, rgba(0,0,0,0.4), transparent);
}
.scroll-roll-shadow-l { left: calc(4% + 32px - 12px); border-radius: 0 8px 8px 0; }
.scroll-roll-shadow-r {
  right: calc(4% + 32px - 12px);
  background: linear-gradient(270deg, rgba(0,0,0,0.4), transparent);
  border-radius: 8px 0 0 8px;
}

/* Parchment content */
.scroll-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10% 18%;
  text-align: center;
  gap: 12px;
}
.scroll-emblem {
  width: 56%;
  aspect-ratio: 1 / 1;
  background: url("assets/logo-square.jpg") center/cover no-repeat;
  border-radius: 50%;
  position: relative;
  filter: contrast(1.05) brightness(0.95);
  mix-blend-mode: multiply;
}
.scroll-emblem::before {
  /* warm glow */
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 90, 30, 0.25) 0%, transparent 65%);
  z-index: -1;
  mix-blend-mode: multiply;
}
.scroll-title {
  font-family: var(--hebrew);
  font-size: clamp(22px, 2.4vw, 30px);
  color: #5a3a14;
  letter-spacing: 0.15em;
  direction: rtl;
  text-shadow: 0 1px 0 rgba(255, 230, 170, 0.4);
}
.scroll-sub {
  font-family: var(--serif);
  font-size: clamp(11px, 1.1vw, 13px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #6b4a1c;
}

/* Caption below scroll */
.landing-art-caption {
  position: absolute;
  bottom: 28px;
  left: 0; right: 0;
  text-align: center;
  z-index: 4;
}
.landing-art-caption .heb {
  font-family: var(--hebrew);
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 0.05em;
  direction: rtl;
  margin-bottom: 6px;
}
.landing-art-caption .quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--bone-dim);
  margin: 0 auto;
  max-width: 80%;
}
.landing-art-caption .attr {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-mute);
  margin-top: 6px;
}

/* Section pillars under hero */
.landing-pillars {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 48px 100px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.pillar {
  border: 1px solid var(--ink-3);
  background: rgba(20, 19, 26, 0.55);
  border-radius: 10px;
  padding: 28px;
  transition: all 0.2s;
}
.pillar:hover { border-color: var(--gold-deep); background: rgba(20, 19, 26, 0.85); }
.pillar-num {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 0.15em;
}
.pillar h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  margin: 12px 0 10px;
  color: var(--bone);
}
.pillar p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--bone-dim);
  margin: 0;
}

/* ===== Login screen ===== */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px;
  position: relative;
  background:
    radial-gradient(circle at 50% 30%, rgba(212, 173, 90, 0.07) 0%, transparent 50%),
    var(--ink-0);
}
.login-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, rgba(20, 19, 26, 0.9), rgba(13, 12, 18, 0.95));
  border: 1px solid var(--ink-3);
  border-radius: 14px;
  padding: 44px 40px 36px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.login-mark {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: url("assets/logo-badge.png") center/cover no-repeat, var(--ink-1);
  border: 1px solid rgba(212, 173, 90, 0.4);
  box-shadow: 0 0 32px rgba(212, 173, 90, 0.2), inset 0 0 12px rgba(0,0,0,0.5);
  margin: 0 auto 24px;
}
.login-card h2 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  text-align: center;
  margin: 0 0 8px;
  color: var(--bone);
}
.login-card .login-sub {
  text-align: center;
  font-size: 13px;
  color: var(--bone-mute);
  margin: 0 0 32px;
  letter-spacing: 0.02em;
}
.login-email-input {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid var(--ink-4);
  background: var(--ink-1);
  color: var(--bone);
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 14px;
  outline: none;
}
.login-email-input:focus { border-color: var(--gold-deep); }
.login-google-btn {
  width: 100%;
  padding: 12px 18px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0 18px;
  color: var(--bone-mute);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.login-divider::before, .login-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--ink-3);
}
.login-hint {
  font-size: 12px;
  color: var(--bone-mute);
  text-align: center;
  line-height: 1.6;
  margin: 24px 0 0;
}
.login-hint code {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--ink-2);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--gold-bright);
}
.login-error {
  background: rgba(194, 90, 90, 0.1);
  border: 1px solid rgba(194, 90, 90, 0.4);
  color: #f0b9b9;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 18px;
  display: flex; gap: 10px; align-items: flex-start;
}
.login-success {
  background: rgba(111, 191, 143, 0.08);
  border: 1px solid rgba(111, 191, 143, 0.3);
  color: var(--ok);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 18px;
  display: flex; gap: 10px; align-items: center;
}

/* ===== Dashboard hero (featured course) ===== */
.dash-hero {
  position: relative;
  margin: -90px 0 0;
  min-height: 540px;
  padding: 160px 48px 100px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.dash-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, oklch(0.32 0.05 var(--hero-hue)) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, var(--ink-0) 0%, transparent 50%),
    linear-gradient(135deg, var(--indigo-deep), var(--ink-1) 70%);
  z-index: 0;
}
.dash-hero-bg::before {
  /* Massive Hebrew letter */
  content: attr(data-hebrew);
  position: absolute;
  right: 60px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--hebrew);
  font-size: 380px;
  color: rgba(212, 173, 90, 0.09);
  line-height: 1;
  direction: rtl;
}
.dash-hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 50%, var(--ink-0) 100%);
}
.dash-hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
}
.dash-hero-tag {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: flex; gap: 12px; align-items: center;
}
.dash-hero-tag::before {
  content: "✦"; color: var(--gold); font-size: 10px;
}
.dash-hero h1 {
  font-family: var(--serif);
  font-size: 62px;
  font-weight: 500;
  margin: 0 0 16px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.dash-hero-desc {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  color: var(--bone-dim);
  margin: 0 0 28px;
  max-width: 560px;
}
.dash-hero-meta {
  display: flex; gap: 18px;
  font-size: 12px;
  color: var(--bone-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 28px;
  align-items: center;
}
.dash-hero-meta .dot { width: 3px; height: 3px; background: var(--bone-mute); border-radius: 50%; }
.dash-hero-actions { display: flex; gap: 12px; }

/* ===== Carousel rail ===== */
.rail {
  padding: 36px 48px 0;
  position: relative;
}
.rail-head {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 18px;
}
.rail-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  margin: 0;
  color: var(--bone);
}
.rail-title-heb {
  font-family: var(--hebrew);
  color: var(--gold);
  font-size: 18px;
  letter-spacing: 0.05em;
}
.rail-link {
  margin-left: auto;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-mute);
  cursor: pointer;
}
.rail-link:hover { color: var(--gold); }

.rail-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 0 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-4) transparent;
}
.rail-track::-webkit-scrollbar { height: 6px; }
.rail-track::-webkit-scrollbar-thumb { background: var(--ink-4); border-radius: 3px; }
.rail-track::-webkit-scrollbar-track { background: transparent; }

/* Card */
.card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--ink-3);
  background: var(--ink-2);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-deep);
  box-shadow: 0 16px 40px -10px rgba(0,0,0,0.6);
}
.card-thumb {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, oklch(0.3 0.08 var(--card-hue)), oklch(0.15 0.04 var(--card-hue))),
    var(--ink-3);
}
.card-thumb::before {
  /* Hebrew text decoration */
  content: attr(data-heb);
  position: absolute;
  right: -10px; bottom: -30px;
  font-family: var(--hebrew);
  font-size: 140px;
  color: rgba(212, 173, 90, 0.18);
  line-height: 0.9;
  direction: rtl;
}
.card-thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(7,6,10,0.85) 100%);
}
.card-thumb-badge {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: rgba(7, 6, 10, 0.7);
  border: 1px solid var(--gold-deep);
  color: var(--gold);
  padding: 4px 9px;
  border-radius: 3px;
  backdrop-filter: blur(6px);
  z-index: 1;
}
.card-thumb-pdf {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 10px;
  letter-spacing: 0.15em;
  font-family: var(--mono);
  background: rgba(7,6,10,0.6);
  border: 1px solid var(--ink-5);
  color: var(--bone);
  padding: 3px 8px;
  border-radius: 3px;
  z-index: 1;
}
.card-thumb-duration {
  position: absolute;
  bottom: 10px; right: 12px;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--bone);
  background: rgba(7,6,10,0.7);
  padding: 3px 8px;
  border-radius: 3px;
  z-index: 1;
}
.card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-cat {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.card-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--bone);
  line-height: 1.2;
}
.card-desc {
  font-size: 12px;
  color: var(--bone-mute);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  margin-top: 12px;
  display: flex; align-items: center; gap: 10px;
  font-size: 11px;
  color: var(--bone-mute);
  letter-spacing: 0.05em;
}
.card-progress {
  flex: 1;
  height: 2px;
  background: var(--ink-4);
  border-radius: 1px;
  overflow: hidden;
}
.card-progress-fill {
  height: 100%;
  background: var(--gold);
}

/* ===== Course page ===== */
.course-page { padding-bottom: 80px; }
.course-hero {
  position: relative;
  margin-top: -90px;
  padding: 160px 48px 60px;
  min-height: 480px;
  overflow: hidden;
}
.course-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 70% 40%, oklch(0.3 0.07 var(--hero-hue)) 0%, transparent 55%),
    linear-gradient(135deg, var(--indigo-deep), var(--ink-0));
  z-index: 0;
}
.course-hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, var(--ink-0) 100%);
}
.course-hero-bg::before {
  content: attr(data-hebrew);
  position: absolute;
  right: 6%; top: 50%;
  transform: translateY(-50%);
  font-family: var(--hebrew);
  font-size: 320px;
  color: rgba(212, 173, 90, 0.1);
  line-height: 1;
  direction: rtl;
}
.course-hero-content {
  position: relative; z-index: 1;
  max-width: 720px;
}
.course-breadcrumb {
  font-size: 12px;
  color: var(--bone-mute);
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}
.course-breadcrumb .crumb-sep { color: var(--ink-5); margin: 0 8px; }
.course-breadcrumb .crumb-link { cursor: pointer; }
.course-breadcrumb .crumb-link:hover { color: var(--gold); }
.course-hero h1 {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 500;
  margin: 0 0 14px;
  line-height: 1;
}
.course-hero-heb {
  font-family: var(--hebrew);
  font-size: 26px;
  color: var(--gold);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.course-hero-desc {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--bone-dim);
  line-height: 1.55;
  margin: 0 0 24px;
  max-width: 600px;
}
.course-stats {
  display: flex; gap: 32px;
  font-size: 12px;
  color: var(--bone-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-top: 1px solid var(--ink-3);
  padding-top: 20px;
  max-width: 720px;
}
.course-stats .stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--bone);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 4px;
  font-weight: 500;
}

.course-body {
  padding: 40px 48px 60px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  max-width: 1400px;
  margin: 0 auto;
}

.lesson-list-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 24px;
  display: flex; align-items: baseline; gap: 14px;
}
.lesson-list-title .count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--bone-mute);
  letter-spacing: 0.1em;
}

.lesson-row {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--ink-3);
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 4px;
}
.lesson-row:hover { background: rgba(20, 19, 26, 0.6); }
.lesson-num {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--bone-mute);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.lesson-row:hover .lesson-num { color: var(--gold); }
.lesson-info h4 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 4px;
  color: var(--bone);
}
.lesson-info p {
  font-size: 12px;
  color: var(--bone-mute);
  margin: 0;
  line-height: 1.5;
}
.lesson-duration {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--bone-mute);
  letter-spacing: 0.06em;
}
.status-pill {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}
.status-completed {
  color: var(--ok);
  border-color: rgba(111, 191, 143, 0.4);
  background: rgba(111, 191, 143, 0.05);
}
.status-in_progress {
  color: var(--gold);
  border-color: var(--gold-deep);
  background: rgba(212, 173, 90, 0.06);
}
.status-not_started {
  color: var(--bone-mute);
  border-color: var(--ink-4);
}

.course-side {
  position: sticky;
  top: 100px;
  height: fit-content;
  border: 1px solid var(--ink-3);
  background: rgba(20, 19, 26, 0.6);
  border-radius: 10px;
  padding: 24px;
}
.course-side h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 16px;
}
.course-side-row {
  display: flex; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-3);
  font-size: 13px;
}
.course-side-row:last-of-type { border-bottom: none; }
.course-side-row .lbl { color: var(--bone-mute); letter-spacing: 0.05em; }
.course-side-row .val { color: var(--bone); }
.course-side-progress {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--ink-3);
}
.course-side-progress .progress-bar {
  height: 4px;
  background: var(--ink-3);
  border-radius: 2px;
  overflow: hidden;
  margin: 8px 0 6px;
}
.course-side-progress .progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
}
.course-side-progress .label-row {
  display: flex; justify-content: space-between;
  font-size: 11px;
  color: var(--bone-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== Lesson page ===== */
.lesson-page { padding: 32px 48px 80px; max-width: 1400px; margin: 0 auto; }
.lesson-back {
  font-size: 12px;
  color: var(--bone-mute);
  letter-spacing: 0.12em;
  cursor: pointer;
  margin-bottom: 24px;
  display: inline-flex; align-items: center; gap: 8px;
}
.lesson-back:hover { color: var(--gold); }
.lesson-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
}
.lesson-video {
  background: #000;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--ink-3);
}
.lesson-video-placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(ellipse at center, var(--indigo) 0%, var(--ink-0) 70%);
}
.lesson-video-play {
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 1px solid var(--gold-deep);
  background: rgba(212, 173, 90, 0.12);
  color: var(--gold);
  display: grid; place-items: center;
  font-size: 28px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}
.lesson-video-play:hover { background: var(--gold); color: var(--ink-0); transform: scale(1.05); }
.lesson-video-label {
  position: absolute;
  top: 16px; left: 16px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-mute);
  font-family: var(--mono);
  padding: 5px 10px;
  background: rgba(7,6,10,0.7);
  border-radius: 4px;
  border: 1px solid var(--ink-4);
}
.lesson-heading {
  margin-top: 28px;
  display: flex; align-items: flex-start; gap: 20px;
}
.lesson-heading-num {
  font-family: var(--serif);
  font-size: 56px;
  color: var(--gold-deep);
  font-weight: 400;
  line-height: 1;
}
.lesson-heading-text h1 {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 500;
  margin: 0 0 8px;
  line-height: 1.1;
}
.lesson-heading-text .meta {
  font-size: 12px;
  color: var(--bone-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lesson-text-section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--ink-3);
}
.lesson-text-section h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 14px;
  color: var(--gold);
}
.lesson-text-section p {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  color: var(--bone-dim);
  margin: 0 0 14px;
}
.lesson-text-section blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.5;
  color: var(--bone);
  padding: 18px 24px;
  border-left: 2px solid var(--gold);
  margin: 24px 0;
  background: rgba(212, 173, 90, 0.03);
}
.lesson-text-section blockquote .heb {
  display: block;
  font-family: var(--hebrew);
  font-style: normal;
  color: var(--gold);
  font-size: 24px;
  margin-bottom: 8px;
  direction: rtl;
  text-align: right;
}

.lesson-side { display: flex; flex-direction: column; gap: 18px; }
.side-panel {
  border: 1px solid var(--ink-3);
  background: rgba(20, 19, 26, 0.6);
  border-radius: 10px;
  padding: 20px 22px;
}
.side-panel h4 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.side-panel h4 .tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--bone-mute);
  letter-spacing: 0.1em;
  font-weight: 400;
}
.pdf-preview {
  background: linear-gradient(135deg, #2a2218, var(--ink-2));
  border: 1px solid var(--ink-4);
  border-radius: 6px;
  padding: 22px 18px;
  display: flex; gap: 14px; align-items: center;
  cursor: pointer;
  transition: all 0.15s;
}
.pdf-preview:hover { border-color: var(--gold-deep); }
.pdf-icon {
  width: 44px; height: 56px;
  background: var(--bone);
  color: var(--ink-1);
  border-radius: 3px;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
}
.pdf-icon::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 12px; height: 12px;
  background: linear-gradient(225deg, var(--ink-2) 50%, transparent 50%);
}
.pdf-meta { flex: 1; }
.pdf-meta .pdf-name {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--bone);
  margin-bottom: 4px;
}
.pdf-meta .pdf-info {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--bone-mute);
}
.next-lesson {
  display: flex; flex-direction: column; gap: 6px;
}
.next-lesson .nl-row {
  display: flex; justify-content: space-between;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  align-items: center;
}
.next-lesson .nl-row:hover { background: var(--ink-3); }
.next-lesson .nl-row.current { background: rgba(212, 173, 90, 0.08); color: var(--gold); }
.next-lesson .nl-row .nl-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--bone-mute);
}
.next-lesson .nl-row.current .nl-num { color: var(--gold); }

/* ===== Admin panel ===== */
.admin-page { padding: 28px 48px 80px; max-width: 1400px; margin: 0 auto; }
.admin-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink-3);
}
.admin-head h1 {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 500;
  margin: 0 0 6px;
}
.admin-head .heb {
  font-family: var(--hebrew);
  color: var(--gold);
  font-size: 18px;
  margin-bottom: 4px;
}
.admin-head .sub {
  color: var(--bone-mute);
  font-size: 13px;
}

.admin-tabs {
  display: flex; gap: 4px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--ink-3);
}
.admin-tab {
  background: transparent;
  border: none;
  color: var(--bone-mute);
  padding: 14px 22px;
  font-size: 13px;
  letter-spacing: 0.06em;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}
.admin-tab:hover { color: var(--bone); }
.admin-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  border: 1px solid var(--ink-3);
  background: rgba(20, 19, 26, 0.5);
  border-radius: 10px;
  padding: 20px;
}
.stat-card .lbl {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-mute);
  margin-bottom: 10px;
}
.stat-card .val {
  font-family: var(--serif);
  font-size: 38px;
  color: var(--bone);
  font-weight: 500;
  line-height: 1;
}
.stat-card .delta {
  font-size: 12px;
  margin-top: 8px;
  color: var(--ok);
  font-family: var(--mono);
}

.admin-toolbar {
  display: flex; gap: 12px;
  margin-bottom: 18px;
  align-items: center;
}
.admin-toolbar .search {
  flex: 1; max-width: 360px;
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: 6px;
  padding: 9px 14px;
  color: var(--bone);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.admin-toolbar .search:focus { border-color: var(--gold-deep); }

.admin-table {
  border: 1px solid var(--ink-3);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(13, 12, 18, 0.6);
}
.admin-table table { width: 100%; border-collapse: collapse; }
.admin-table thead th {
  text-align: left;
  padding: 14px 18px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-mute);
  background: var(--ink-1);
  border-bottom: 1px solid var(--ink-3);
  font-weight: 500;
}
.admin-table tbody td {
  padding: 14px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--ink-3);
  color: var(--bone);
}
.admin-table tbody tr:hover { background: rgba(20, 19, 26, 0.6); }
.admin-table tbody tr:last-of-type td { border-bottom: none; }
.admin-table .email { font-family: var(--mono); font-size: 12px; color: var(--bone-dim); }
.admin-table .row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn {
  width: 30px; height: 30px;
  border-radius: 5px;
  background: transparent;
  border: 1px solid var(--ink-4);
  color: var(--bone-mute);
  display: grid; place-items: center;
  font-size: 14px;
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--gold-deep); color: var(--gold); }
.icon-btn.danger:hover { border-color: var(--err); color: var(--err); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.1em;
  border: 1px solid;
  text-transform: uppercase;
}
.pill-ok { color: var(--ok); border-color: rgba(111, 191, 143, 0.4); background: rgba(111, 191, 143, 0.06); }
.pill-warn { color: var(--warn); border-color: rgba(217, 154, 74, 0.4); background: rgba(217, 154, 74, 0.06); }
.pill-err { color: var(--err); border-color: rgba(194, 90, 90, 0.4); background: rgba(194, 90, 90, 0.06); }
.pill::before {
  content: "";
  width: 5px; height: 5px;
  background: currentColor;
  border-radius: 50%;
}

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(7, 6, 10, 0.78);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  z-index: 100;
  padding: 32px;
}
.modal {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
  border: 1px solid var(--ink-4);
  border-radius: 12px;
  padding: 30px 32px;
  position: relative;
}
.modal::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.modal h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 6px;
}
.modal .sub {
  color: var(--bone-mute);
  font-size: 13px;
  margin: 0 0 22px;
}
.field {
  display: flex; flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.field label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-mute);
}
.field input, .field select, .field textarea {
  background: var(--ink-1);
  border: 1px solid var(--ink-4);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--bone);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold-deep); }
.modal-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 22px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--ink-2);
  border: 1px solid var(--gold-deep);
  color: var(--bone);
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 200;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
  display: flex; gap: 10px; align-items: center;
  animation: toastIn 0.3s ease;
}
.toast::before { content: "✦"; color: var(--gold); }
@keyframes toastIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Footer */
.foot {
  border-top: 1px solid var(--ink-3);
  padding: 36px 48px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
  color: var(--bone-mute);
  margin-top: 40px;
}
.foot .heb { font-family: var(--hebrew); color: var(--gold); font-size: 14px; letter-spacing: 0.05em; }

@media (max-width: 900px) {
  .nav { padding: 14px 20px; gap: 14px; }
  .nav-links { display: none; }
  .nav-search { display: none; }
  .landing-hero { grid-template-columns: 1fr; padding: 60px 24px; gap: 40px; }
  .landing-pillars { grid-template-columns: 1fr; padding: 0 24px 80px; }
  .dash-hero { padding: 130px 24px 60px; min-height: 460px; }
  .dash-hero h1 { font-size: 38px; }
  .rail { padding: 28px 24px 0; }
  .course-body { grid-template-columns: 1fr; padding: 30px 24px; }
  .course-hero { padding: 130px 24px 50px; }
  .course-hero h1 { font-size: 36px; }
  .lesson-page { padding: 24px; }
  .lesson-grid { grid-template-columns: 1fr; }
  .admin-page { padding: 24px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .foot { flex-direction: column; gap: 12px; padding: 28px 24px; }
}
