/* ═══════════════════════════════════════════════════════════════
   مستر هشام صدقي — Physics Lab UI
   Dark Navy + Beige · RTL · مدارات وموجات ومعادلات
   ═══════════════════════════════════════════════════════════════ */

/* ── Ambient orbits ── */
.lg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.lg-ambient__orbit {
  position: absolute;
  border: 1px solid rgba(18, 38, 63, 0.06);
  border-radius: 50%;
  animation: lgOrbitSpin 48s linear infinite;
}
.lg-ambient__orbit--a {
  width: min(70vw, 640px);
  height: min(70vw, 640px);
  top: -12%;
  inset-inline-end: -8%;
}
.lg-ambient__orbit--b {
  width: min(50vw, 420px);
  height: min(50vw, 420px);
  bottom: 8%;
  inset-inline-start: -10%;
  animation-duration: 64s;
  animation-direction: reverse;
  border-color: rgba(196, 176, 154, 0.12);
}
.lg-ambient__wave {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 120px;
  background:
    radial-gradient(ellipse 80% 100% at 50% 100%, rgba(18, 38, 63, 0.04), transparent 70%);
}
html[data-theme="dark"] .lg-ambient__orbit { border-color: rgba(212, 224, 236, 0.06); }
html[data-theme="dark"] .lg-ambient__orbit--b { border-color: rgba(196, 176, 154, 0.10); }

@keyframes lgOrbitSpin {
  to { transform: rotate(360deg); }
}
@keyframes lgIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes lgStrip {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

/* ── Buttons ── */
.lg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-family: var(--font-body); font-weight: 800; font-size: 15px; line-height: 1;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.lg-btn--lg { padding: 15px 28px; font-size: 16px; }
.lg-btn--block { width: 100%; }
.lg-btn--solid {
  background: var(--btn-solid-bg); color: var(--btn-solid-text);
  box-shadow: 0 12px 28px rgba(11, 29, 54, 0.28);
}
.lg-btn--solid:hover { filter: brightness(1.08); transform: translateY(-2px); }
.lg-btn--gold {
  background: var(--btn-gold-bg); color: var(--btn-gold-text) !important;
  border-color: rgba(196, 176, 154, 0.55);
}
.lg-btn--gold:hover { filter: brightness(1.05); transform: translateY(-2px); }
.lg-btn--outline {
  background: transparent; color: var(--brand-800);
  border-color: rgba(18, 38, 63, 0.28);
}
.lg-btn--outline:hover { background: rgba(18, 38, 63, 0.06); border-color: var(--brand-700); }
.lg-btn--ghost {
  background: transparent; color: var(--brand-800);
  border-color: transparent;
}
.lg-btn--ghost:hover { background: rgba(18, 38, 63, 0.06); }

/* ── Header ── */
.lg-hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 237, 227, 0.92);
  border-bottom: 1px solid rgba(18, 38, 63, 0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text);
}
.lg-hdr__top {
  background: var(--hdr-bg);
  color: var(--hdr-text);
  font-size: 12px; font-weight: 600;
}
.lg-hdr__topInner {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 32px; text-align: center;
}
.lg-hdr__tag {
  font-family: var(--font-display); letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-400);
}
.lg-hdr__tagSep { opacity: .45; color: var(--gold-500); }
.lg-hdr__tagAr { color: rgba(243, 237, 227, 0.78); }

.lg-hdr__bar {
  display: flex; align-items: center; gap: 14px; min-height: 72px;
}
.lg-brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; margin-inline-end: auto; color: inherit;
}
.lg-brand__mark {
  width: 48px; height: 48px; display: grid; place-items: center; flex: none;
  border-radius: 50%; background: var(--brand-900); color: var(--gold-300);
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: .04em;
  overflow: hidden; border: 2px solid var(--gold-500);
  box-shadow: 0 0 0 4px rgba(196, 176, 154, 0.18);
}
.lg-brand__logo {
  width: 100%; height: 100%; object-fit: contain; display: block;
  background: #FFFDF9;
}
.lg-brand__logoFallback {
  display: grid; place-items: center; width: 100%; height: 100%;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--gold-300);
}
.lg-brand__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lg-brand__name {
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  color: var(--brand-900); letter-spacing: -.01em;
}
.lg-brand__sub { font-size: 12px; font-weight: 700; color: var(--brand-600); }

.lg-hdr__nav { display: flex; align-items: center; gap: 10px; }
.lg-hdr__theme { display: inline-flex; }
.lg-hdr__mobileTheme { display: none; }
.lg-hdr .theme-switch {
  background: rgba(18, 38, 63, 0.08); border-color: rgba(18, 38, 63, 0.16);
}

.lg-burger {
  display: none; width: 44px; height: 42px; border-radius: 10px;
  background: transparent; border: 1px solid rgba(18, 38, 63, 0.18);
  cursor: pointer; padding: 0; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
}
.lg-burger span {
  width: 18px; height: 2px; border-radius: 2px; background: var(--brand-800);
}
.lg-drawer {
  display: none; overflow: hidden; max-height: 0;
  transition: max-height .3s var(--ease);
  background: var(--card-bg); border-top: 1px solid rgba(18, 38, 63, 0.08);
}
.lg-drawer.is-open { max-height: 280px; }
.lg-drawer__box {
  padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 10px;
}

/* ── Hero: نص + صورة دائرية متوسطة متقاربة ── */
.lg-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 50% 60% at 12% 50%, rgba(18, 38, 63, 0.06), transparent 60%),
    #F3EDE3;
  min-height: min(70vh, 600px);
}
.lg-hero__orbits {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.lg-hero__orbit {
  position: absolute;
  border: 1px solid rgba(18, 38, 63, 0.08);
  border-radius: 50%;
  inset-inline-start: 6%;
  top: 50%;
  translate: 0 -50%;
  animation: lgOrbitSpin 36s linear infinite;
}
.lg-hero__orbit--1 { width: 300px; height: 300px; }
.lg-hero__orbit--2 { width: 380px; height: 380px; animation-duration: 52s; animation-direction: reverse; border-color: rgba(196, 176, 154, 0.4); }
.lg-hero__orbit--3 { width: 460px; height: 460px; animation-duration: 68s; border-style: dashed; border-color: rgba(18, 38, 63, 0.06); }

.lg-hero__stage {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(16px, 2.5vw, 28px);
  min-height: min(70vh, 600px);
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 48px) 20px;
}
.lg-hero__copy {
  display: flex; flex-direction: column; justify-content: center;
  padding: 0;
  animation: lgIn .75s var(--ease) both;
  background: transparent;
  color: #0B1D36;
}
.lg-hero__enLine {
  margin: 0 0 14px;
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: #1A3354;
}
.lg-hero__brand {
  margin: 0; font-family: var(--font-body); font-weight: 900;
  font-size: clamp(34px, 5vw, 56px); line-height: 1.08;
  color: #0B1D36; letter-spacing: -.02em;
}
.lg-hero__brand span { color: #1A3354; }
.lg-hero__teacher {
  margin: 14px 0 4px;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(18px, 2.2vw, 26px); color: #12263F;
  letter-spacing: .04em;
}
.lg-hero__teacherAr {
  margin: 0 0 16px; font-size: 15px; font-weight: 700; color: #3A4A5A;
}
.lg-hero__desc {
  margin: 0 0 22px; max-width: 480px;
  font-size: 16px; line-height: 1.85; color: #2A3A4A; font-weight: 600;
}
.lg-hero__skills {
  display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 28px;
  font-family: var(--font-body); font-size: 15px; font-weight: 800;
  letter-spacing: 0; text-transform: none; color: #12263F;
}
.lg-hero__skills span {
  padding: 6px 14px;
  border-inline-end: 1px solid rgba(18, 38, 63, 0.22);
}
.lg-hero__skills span:last-child { border-inline-end: 0; }
.lg-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.lg-hero__actions .lg-btn--outline {
  color: #0B1D36;
  border-color: rgba(11, 29, 54, 0.45);
  background: transparent;
}
.lg-hero__actions .lg-btn--outline:hover {
  background: rgba(11, 29, 54, 0.08);
  border-color: #0B1D36;
}
.lg-hero__actions .lg-btn--solid {
  background: #0B1D36;
  color: #F3EDE3;
}

.lg-hero__photo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex: none;
  width: clamp(340px, 34vw, 420px);
  padding: 8px;
  animation: lgIn .85s var(--ease) .12s both;
  background: transparent;
}
.lg-hero__photo img {
  width: clamp(320px, 32vw, 400px);
  height: clamp(320px, 32vw, 400px);
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 50%;
  border: 6px solid #0B1D36;
  box-shadow:
    0 0 0 12px rgba(196, 176, 154, 0.35),
    0 22px 48px rgba(11, 29, 54, 0.24);
  background: #12263F;
  filter: saturate(1.05) contrast(1.02);
}
.lg-hero__photoEmpty {
  width: clamp(320px, 32vw, 400px);
  height: clamp(320px, 32vw, 400px);
  display: grid; place-items: center; gap: 8px; text-align: center;
  background: linear-gradient(160deg, #1A3354, #0B1D36);
  color: #E8DFD0;
  border-radius: 50%;
  border: 6px solid #0B1D36;
  box-shadow: 0 0 0 12px rgba(196, 176, 154, 0.35);
}
.lg-hero__photoEmpty strong {
  font-family: var(--font-display); font-size: 42px; font-weight: 800;
  letter-spacing: .08em;
}
.lg-hero__photoEmpty span { font-size: 12px; opacity: .8; max-width: 140px; }
.lg-hero__photoCap {
  position: relative;
  inset: auto;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px;
  background: #0B1D36;
  border-inline-start: none;
  border-radius: 999px;
  text-align: center;
  width: auto;
  max-width: 100%;
}
.lg-hero__photoCapEn {
  font-family: var(--font-display); font-size: 10px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: #C4B09A;
}
.lg-hero__photoCapAr { font-size: 14px; font-weight: 800; color: #F3EDE3; }

/* ── Stats ── */
.lg-stats {
  background: var(--brand-900);
  border-bottom: 1px solid rgba(196, 176, 154, 0.2);
  padding: 28px 0;
}
.lg-stats__row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
}
.lg-stat {
  text-align: center; padding: 12px 16px;
  border-inline-start: 1px solid rgba(243, 237, 227, 0.12);
}
.lg-stat:first-child { border-inline-start: 0; }
.lg-stat__val {
  font-family: var(--font-display); font-size: clamp(32px, 4vw, 48px);
  font-weight: 800; color: var(--gold-300); line-height: 1.1;
}
.lg-stat__lbl {
  margin-top: 6px; font-size: 14px; font-weight: 700; color: rgba(243, 237, 227, 0.72);
}

/* ── Formula strip ── */
.lg-strip {
  overflow: hidden;
  background: var(--page-bg-alt);
  border-block: 1px solid rgba(18, 38, 63, 0.08);
  padding: 14px 0;
}
.lg-strip__inner {
  display: flex; gap: 40px; width: max-content;
  animation: lgStrip 32s linear infinite;
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  letter-spacing: .06em; color: var(--brand-600); white-space: nowrap;
}
.lg-strip__inner span { opacity: .85; }

/* ── Sections ── */
.lg-section { padding: 72px 0; background: var(--card-bg); }
.lg-section--muted { background: var(--page-bg); }
.lg-section--features {
  background:
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(18, 38, 63, 0.05), transparent 55%),
    var(--page-bg);
}
.lg-section__head { text-align: center; margin-bottom: 44px; }
.lg-section__head--start { text-align: start; max-width: 640px; }
.lg-section__en {
  margin: 0 0 8px;
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brand-600);
}
.lg-section__title {
  margin: 0 0 10px; font-family: var(--font-body); font-weight: 900;
  font-size: clamp(26px, 3.4vw, 36px); color: var(--brand-900);
}
.lg-section__sub { margin: 0; color: var(--muted-strong); font-size: 16px; line-height: 1.8; }
.lg-section__rule {
  display: block; width: 56px; height: 3px; margin: 18px auto 0;
  background: linear-gradient(90deg, var(--brand-800), var(--gold-500));
  border-radius: 2px;
}

/* ── Features: diagonal cut cards ── */
.lg-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.lg-feature {
  position: relative;
  padding: 28px 24px 26px;
  background: var(--card-bg-strong);
  border: 1px solid rgba(18, 38, 63, 0.10);
  border-block-start: 3px solid var(--brand-800);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
  box-shadow: var(--shadow-soft);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.lg-feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(18, 38, 63, 0.22);
}
.lg-feature__top {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.lg-feature__num {
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  letter-spacing: .1em; color: var(--gold-700);
}
.lg-feature__mark {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(18, 38, 63, 0.06);
  border: 1px solid rgba(18, 38, 63, 0.14);
  font-family: var(--font-display); font-size: 18px; font-weight: 800;
  color: var(--brand-800);
}
.lg-feature__ico {
  width: 44px; height: 44px; object-fit: contain; border-radius: 50%;
  background: rgba(18, 38, 63, 0.05); padding: 6px;
}
.lg-feature__title {
  margin: 0 0 10px; font-family: var(--font-body); font-size: 20px; font-weight: 800;
  color: var(--brand-900);
}
.lg-feature__text {
  margin: 0; color: var(--muted-strong); font-size: 15px; line-height: 1.8; font-weight: 600;
}

/* ── Grades ── */
.lg-section--grades {
  background:
    radial-gradient(ellipse 55% 45% at 0% 100%, rgba(196, 176, 154, 0.22), transparent 55%),
    var(--card-bg);
}
.lg-grades {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.lg-grades--count-1 { grid-template-columns: minmax(0, 420px); justify-content: center; }
.lg-grades--count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; margin-inline: auto; }
.lg-grades--count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lg-grade {
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  background: var(--card-bg-strong);
  border: 1px solid rgba(18, 38, 63, 0.10);
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.lg-grade:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(18, 38, 63, 0.24);
}
.lg-grade__media {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--brand-900);
}
.lg-grade__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s var(--ease);
}
.lg-grade:hover .lg-grade__media img { transform: scale(1.05); }
.lg-grade__mediaEmpty {
  width: 100%; height: 100%; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 48px; font-weight: 700;
  color: var(--gold-400); background: linear-gradient(145deg, #12263F, #0B1D36);
}
.lg-grade__badge {
  position: absolute; top: 12px; inset-inline-start: 12px;
  padding: 5px 12px;
  background: rgba(243, 237, 227, 0.95);
  border: 1px solid var(--gold-500);
  font-size: 12px; font-weight: 800; color: var(--brand-900);
}
.lg-grade__body {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 16px;
}
.lg-grade__copy { min-width: 0; }
.lg-grade__name {
  margin: 0; font-family: var(--font-body); font-size: 20px; font-weight: 800;
  color: var(--brand-900);
}
.lg-grade__hint {
  margin: 4px 0 0; font-size: 13px; font-weight: 600; color: var(--muted);
}
.lg-grade__cta {
  flex: none; padding: 8px 12px; border-radius: 999px;
  background: var(--brand-800); color: var(--gold-300);
  font-size: 13px; font-weight: 800; white-space: nowrap;
  transition: background .2s;
}
.lg-grade:hover .lg-grade__cta { background: var(--brand-700); }

/* ── CTA ── */
.lg-cta { padding: 24px 0 80px; background: var(--card-bg); }
.lg-cta__box {
  text-align: center; padding: clamp(36px, 5vw, 56px) 24px;
  background: var(--hdr-bg);
  border: 1px solid rgba(196, 176, 154, 0.35);
  box-shadow: var(--shadow-strong);
  position: relative; overflow: hidden;
}
.lg-cta__box::before {
  content: "";
  position: absolute; inset: -40% -20% auto auto;
  width: 280px; height: 280px; border-radius: 50%;
  border: 1px solid rgba(196, 176, 154, 0.18);
  animation: lgOrbitSpin 40s linear infinite;
}
.lg-cta__en {
  position: relative; margin: 0 0 10px;
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--gold-400);
}
.lg-cta__title {
  position: relative; margin: 0 0 12px;
  font-family: var(--font-body); font-weight: 900;
  font-size: clamp(24px, 3.2vw, 34px); color: #FFFDF9;
}
.lg-cta__sub {
  position: relative; margin: 0 auto 24px; max-width: 520px;
  color: rgba(243, 237, 227, 0.82); font-size: 16px; line-height: 1.8;
}

/* ── Footer ── */
.lg-footer {
  position: relative;
  background: #071422;
  color: rgba(243, 237, 227, 0.82);
}
.lg-footer__wave {
  height: 4px;
  background: linear-gradient(90deg, var(--brand-700), var(--gold-500), var(--brand-700));
}
.lg-footer__inner { padding: 48px 20px 24px; }
.lg-footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px;
}
.lg-footer__logoLink {
  display: inline-flex; margin-bottom: 12px;
}
.lg-footer__logoImg {
  width: 56px; height: 56px; object-fit: contain; border-radius: 50%;
  border: 2px solid rgba(196, 176, 154, 0.35); background: #0B1D36;
}
.lg-footer__logoFallback,
.lg-footer__mark {
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%;
  background: #12263F; color: var(--gold-300);
  font-family: var(--font-display); font-weight: 800; border: 2px solid rgba(196, 176, 154, 0.35);
}
.lg-footer__name {
  margin: 0 0 8px; font-family: var(--font-body); font-size: 22px; font-weight: 900;
  color: #FFFDF9;
}
.lg-footer__tag { margin: 0 0 16px; line-height: 1.8; max-width: 360px; }
.lg-footer__nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.lg-footer__nav a { color: #E8DFD0; font-weight: 700; font-size: 14px; }
.lg-footer__nav a:hover { color: #fff; }
.lg-footer__heading {
  margin: 0 0 14px; font-size: 15px; font-weight: 800; color: var(--gold-400);
  letter-spacing: .04em;
}
.lg-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lg-footer__link {
  display: inline-flex; align-items: center; gap: 8px;
  color: rgba(243, 237, 227, 0.82); font-weight: 600;
}
.lg-footer__link:hover { color: #fff; }
.lg-footer__linkIco { width: 20px; height: 20px; object-fit: contain; border-radius: 4px; }
.lg-footer__phones { display: grid; gap: 8px; }
.lg-footer__phone {
  color: rgba(243, 237, 227, 0.85); font-weight: 700; direction: ltr;
  justify-self: start;
}
.lg-footer__phone:hover { color: var(--gold-400); }
.lg-footer__bottom {
  margin-top: 28px; padding-top: 18px;
  border-top: 1px solid rgba(243, 237, 227, 0.1);
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
}
.lg-footer__copy, .lg-footer__dev { margin: 0; font-size: 13px; color: rgba(243, 237, 227, 0.5); }

/* ── Auth ── */
.auth-page { padding: 40px 0 64px; position: relative; z-index: 1; }
.auth-card {
  overflow: hidden; background: var(--card-bg-strong);
  border: 1px solid rgba(18, 38, 63, 0.12);
  box-shadow: 0 18px 48px rgba(11, 29, 54, 0.12);
  border-radius: var(--radius-lg);
}
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; min-height: 520px; }
.auth-formPane { padding: 40px 36px; background: var(--card-bg-strong); }
.auth-step { display: none; }
.auth-head { text-align: start; margin-bottom: 24px; }
.auth-head__logo {
  width: 56px; height: 56px; margin: 0 0 14px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: var(--brand-900); color: var(--gold-300);
  border: 2px solid var(--gold-500);
}
.auth-head__logo img { width: 100%; height: 100%; object-fit: contain; }
.auth-head__logoFallback {
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
}
.auth-head__title {
  font-family: var(--font-body); font-weight: 900; font-size: 28px;
  color: var(--brand-900);
}
.auth-head__sub { color: var(--muted-strong); margin-top: 8px; font-size: 15px; line-height: 1.8; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.label { font-weight: 700; font-size: 14px; color: var(--text-strong); }
.input {
  width: 100%; padding: 13px 15px; border-radius: 10px;
  border: 1.5px solid var(--field-border); background: var(--field-bg); color: var(--field-text);
  font-family: inherit; font-size: 15px;
}
.input:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 4px var(--primary-weak); }
.center-area {
  display: none;
  flex-direction: column;
  gap: 16px;
}
.center-area:not([hidden]) {
  display: flex;
}
.btn-submit {
  margin-top: 6px; width: 100%; padding: 15px 20px; border: none; border-radius: 999px;
  background: var(--btn-solid-bg); color: var(--btn-solid-text); font-family: var(--font-body);
  font-weight: 800; font-size: 16px; cursor: pointer;
}
.btn-submit:hover { filter: brightness(1.08); }
.auth-foot { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted-strong); font-size: 14px; }
.auth-link { color: var(--brand-700); font-weight: 800; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; }
.auth-link:hover { text-decoration: underline; }

.auth-imgPane {
  position: relative; overflow: hidden; display: grid; place-items: center; padding: 28px;
  background: linear-gradient(160deg, #071422, #12263F 55%, #1A3354);
}
.auth-imgPane__symbols { position: absolute; inset: 0; opacity: .14; pointer-events: none; }
.auth-imgPane__symbols span {
  position: absolute; font-family: var(--font-mono); font-size: 18px; font-weight: 700;
  color: #E8DFD0; border: 1px solid currentColor; width: 56px; height: 56px;
  display: grid; place-items: center; border-radius: 50%;
}
.auth-imgPane__symbols span:nth-child(1){ top: 12%; inset-inline-start: 12%; }
.auth-imgPane__symbols span:nth-child(2){ top: 22%; inset-inline-end: 14%; }
.auth-imgPane__symbols span:nth-child(3){ bottom: 28%; inset-inline-start: 18%; }
.auth-imgPane__symbols span:nth-child(4){ bottom: 14%; inset-inline-end: 16%; }
.auth-img { position: relative; z-index: 1; max-width: 100%; max-height: 420px; border: 2px solid rgba(196, 176, 154, 0.35); border-radius: 8px; }
.auth-imgFallback { position: relative; z-index: 1; text-align: center; color: #F3EDE3; display: grid; gap: 12px; place-items: center; }
.auth-imgFallback__hero {
  width: 110px; height: 110px; display: grid; place-items: center;
  border: 2px solid rgba(196, 176, 154, 0.4); border-radius: 50%;
  font-family: var(--font-display); font-size: 34px; font-weight: 700; color: var(--gold-300);
}
.auth-imgFallback p { max-width: 240px; font-size: 14px; opacity: .85; }
.auth-imgPane__brand {
  position: absolute; bottom: 24px; inset-inline: 24px; z-index: 2; text-align: center;
  font-family: var(--font-body); color: #F3EDE3;
}
.auth-imgPane__brand strong { display: block; font-size: 22px; margin-bottom: 4px; font-weight: 900; }
.auth-imgPane__brand span { font-size: 13px; color: var(--gold-400); }

/* Toasts */
.phy-alert { border-radius: 8px; padding: 16px 20px; margin-bottom: 20px; background: rgba(192,57,43,.1); border: 1px solid rgba(192,57,43,.4); color: var(--danger); }
.phy-toast {
  --toast-accent: var(--success); --toast-duration: 6000ms;
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: max(18px, calc(env(safe-area-inset-bottom, 0px) + 16px)) !important;
  z-index: 14000 !important;
  width: min(440px, calc(100vw - 24px));
  max-height: min(46vh, 340px);
  display: flex; gap: 13px; align-items: flex-start;
  padding: 17px 18px 19px; border-radius: 12px;
  background: color-mix(in srgb, var(--card-bg-strong) 96%, transparent);
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--toast-accent);
  box-shadow: 0 22px 54px rgba(11, 29, 54, .28);
  transform: translateX(-50%);
  animation: authToastIn .38s var(--ease-bounce) both; overflow: hidden;
}
.phy-toast--top {
  top: auto !important;
  bottom: max(18px, calc(env(safe-area-inset-bottom, 0px) + 16px)) !important;
}
.phy-toast--success { --toast-accent: var(--success); }
.phy-toast--error { --toast-accent: var(--danger); }
.phy-toast__icon {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  border-radius: 50%; background: var(--toast-accent); color: #fff; font-weight: 900;
}
.phy-toast__body { min-width: 0; flex: 1; max-height: min(38vh, 280px); overflow-y: auto; }
.phy-toast__title { display: block; font-weight: 800; color: var(--text-strong); }
.phy-toast__msg { margin: 4px 0 0; color: var(--muted-strong); font-size: 14px; line-height: 1.7; }
.phy-toast__list { margin: 7px 0 0; padding-inline-start: 19px; color: var(--muted-strong); font-size: 14px; }
.phy-toast__close {
  width: 30px; height: 30px; margin-inline-start: auto; flex: none;
  display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-soft); color: var(--muted); cursor: pointer; font-size: 19px;
}
.phy-toast__progress { position: absolute; inset-inline: 0; bottom: 0; height: 3px; overflow: hidden; }
.phy-toast__progress span {
  display: block; height: 100%; width: 100%; background: var(--toast-accent);
  transform-origin: right; animation: phyToastBar var(--toast-duration) linear forwards;
}
.phy-toast.is-leaving { animation: authToastOut .32s var(--ease) both; pointer-events: none; }
@keyframes phyToastBar { to { transform: scaleX(0); } }
@keyframes authToastIn {
  from { opacity: 0; transform: translate(-50%, 18px) scale(.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes authToastOut { to { opacity: 0; transform: translate(-50%, 14px) scale(.97); } }

/* ── Dark mode ── */
html[data-theme="dark"] .lg-hdr {
  background: rgba(7, 20, 34, 0.94);
  border-bottom-color: rgba(243, 237, 227, 0.08);
}
html[data-theme="dark"] .lg-brand__name { color: #FFFDF9; }
html[data-theme="dark"] .lg-brand__sub { color: var(--gold-400); }
html[data-theme="dark"] .lg-btn--ghost,
html[data-theme="dark"] .lg-btn--outline { color: #F3EDE3; border-color: rgba(243, 237, 227, 0.22); }
html[data-theme="dark"] .lg-btn--outline:hover,
html[data-theme="dark"] .lg-btn--ghost:hover { background: rgba(243, 237, 227, 0.06); }
html[data-theme="dark"] .lg-burger { border-color: rgba(243, 237, 227, 0.2); }
html[data-theme="dark"] .lg-burger span { background: #F3EDE3; }
html[data-theme="dark"] .lg-drawer { background: #0B1D36; border-top-color: rgba(243, 237, 227, 0.08); }
html[data-theme="dark"] .lg-hdr .theme-switch {
  background: rgba(243, 237, 227, 0.08); border-color: rgba(243, 237, 227, 0.14);
}

html[data-theme="dark"] .lg-hero {
  background:
    radial-gradient(ellipse 50% 60% at 12% 50%, rgba(58, 95, 138, 0.18), transparent 60%),
    #071422;
}
html[data-theme="dark"] .lg-hero__copy { background: transparent; color: #F3EDE3; }
html[data-theme="dark"] .lg-hero__enLine { color: #C4B09A; }
html[data-theme="dark"] .lg-hero__brand { color: #FFFDF9; }
html[data-theme="dark"] .lg-hero__brand span { color: #C4B09A; }
html[data-theme="dark"] .lg-hero__teacher { color: #D4E0EC; }
html[data-theme="dark"] .lg-hero__teacherAr,
html[data-theme="dark"] .lg-hero__desc { color: #B8C8D8; }
html[data-theme="dark"] .lg-hero__skills { color: #E8DFD0; }
html[data-theme="dark"] .lg-hero__skills span { border-color: rgba(243, 237, 227, 0.22); }
html[data-theme="dark"] .lg-hero__actions .lg-btn--outline {
  color: #F3EDE3;
  border-color: rgba(243, 237, 227, 0.45);
}
html[data-theme="dark"] .lg-hero__actions .lg-btn--outline:hover {
  background: rgba(243, 237, 227, 0.08);
}
html[data-theme="dark"] .lg-hero__actions .lg-btn--solid {
  background: #C4B09A;
  color: #071422;
}
html[data-theme="dark"] .lg-hero__photo { background: transparent; }
html[data-theme="dark"] .lg-hero__photo img {
  border-color: #C4B09A;
  box-shadow:
    0 0 0 10px rgba(196, 176, 154, 0.18),
    0 18px 40px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .lg-hero__photoCap { background: #12263F; }
html[data-theme="dark"] .lg-hero__photoCapEn { color: #C4B09A; }
html[data-theme="dark"] .lg-hero__photoCapAr { color: #FFFDF9; }
html[data-theme="dark"] .lg-hero__orbit { border-color: rgba(243, 237, 227, 0.12); }

html[data-theme="dark"] .lg-strip { background: #0B1D36; border-color: rgba(243, 237, 227, 0.08); }
html[data-theme="dark"] .lg-strip__inner { color: var(--gold-400); }
html[data-theme="dark"] .lg-section { background: #071422; }
html[data-theme="dark"] .lg-section--muted,
html[data-theme="dark"] .lg-section--features {
  background:
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(58, 95, 138, 0.14), transparent 55%),
    #071422;
}
html[data-theme="dark"] .lg-section--grades {
  background:
    radial-gradient(ellipse 55% 45% at 0% 100%, rgba(196, 176, 154, 0.1), transparent 55%),
    #0B1D36;
}
html[data-theme="dark"] .lg-section__title,
html[data-theme="dark"] .lg-feature__title,
html[data-theme="dark"] .lg-grade__name,
html[data-theme="dark"] .auth-head__title,
html[data-theme="dark"] .lg-brand__name { color: #ffffff !important; }
html[data-theme="dark"] .lg-section__en { color: var(--gold-400); }
html[data-theme="dark"] .lg-section__sub,
html[data-theme="dark"] .lg-feature__text,
html[data-theme="dark"] .lg-stat__lbl,
html[data-theme="dark"] .auth-head__sub,
html[data-theme="dark"] .auth-foot { color: #D4E0EC !important; }

html[data-theme="dark"] .lg-feature {
  background: #12263F;
  border-color: rgba(243, 237, 227, 0.1);
  border-block-start-color: var(--gold-500);
}
html[data-theme="dark"] .lg-feature__mark,
html[data-theme="dark"] .lg-feature__ico {
  background: rgba(196, 176, 154, 0.1);
  border-color: rgba(196, 176, 154, 0.22);
  color: var(--gold-300);
}
html[data-theme="dark"] .lg-feature__num { color: var(--gold-400); }
html[data-theme="dark"] .lg-grade {
  background: #12263F; border-color: rgba(243, 237, 227, 0.1);
}
html[data-theme="dark"] .lg-grade__badge {
  background: rgba(18, 38, 63, 0.95); color: #E2C9A8; border-color: #E2C9A8;
}
html[data-theme="dark"] .lg-grade__hint { color: #A8B8C8; }
html[data-theme="dark"] .lg-cta { background: #071422; }
html[data-theme="dark"] .lg-cta__box {
  background: linear-gradient(160deg, #12263F, #1A3354) !important;
  border-color: rgba(196, 176, 154, 0.35) !important;
}
html[data-theme="dark"] .lg-btn--gold,
html[data-theme="dark"] .lg-cta .lg-btn--gold {
  background: #F3EDE3 !important;
  color: #071422 !important;
  border-color: #E2C9A8 !important;
}
html[data-theme="dark"] .lg-brand__mark {
  background: #12263F; border-color: rgba(196, 176, 154, 0.4);
}
html[data-theme="dark"] .lg-brand__logo { background: #0B1D36; }
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .auth-formPane { background: #12263F; border-color: rgba(243, 237, 227, 0.1); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .lg-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg-grades,
  .lg-grades--count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; margin-inline: auto; }
}
@media (max-width: 900px) {
  .lg-hdr__nav { display: none; }
  .lg-hdr__mobileTheme { display: inline-flex; margin-inline-start: auto; }
  .lg-burger { display: flex; }
  .lg-drawer { display: block; }
  .lg-brand { margin-inline-end: 0; }

  .lg-hero {
    background: #F3EDE3;
    min-height: 0;
  }
  html[data-theme="dark"] .lg-hero { background: #071422; }
  .lg-hero__orbit { display: none; }
  .lg-hero__stage {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 24px;
    min-height: 0;
    padding: 28px 20px 36px;
  }
  .lg-hero__photo {
    order: -1;
    width: auto;
    padding: 0;
  }
  .lg-hero__photo img,
  .lg-hero__photoEmpty {
    width: 280px;
    height: 280px;
  }
  .lg-hero__copy {
    text-align: center;
    padding: 0;
    background: transparent;
    color: #0B1D36;
    align-items: center;
  }
  html[data-theme="dark"] .lg-hero__copy {
    background: transparent;
    color: #F3EDE3;
  }
  .lg-hero__brand { color: #0B1D36; }
  .lg-hero__brand span { color: #1A3354; }
  .lg-hero__teacher { color: #12263F; }
  .lg-hero__teacherAr,
  .lg-hero__desc { color: #2A3A4A; }
  .lg-hero__skills { color: #12263F; justify-content: center; }
  html[data-theme="dark"] .lg-hero__brand { color: #FFFDF9; }
  html[data-theme="dark"] .lg-hero__brand span { color: #C4B09A; }
  html[data-theme="dark"] .lg-hero__teacher { color: #D4E0EC; }
  html[data-theme="dark"] .lg-hero__teacherAr,
  html[data-theme="dark"] .lg-hero__desc { color: #B8C8D8; }
  html[data-theme="dark"] .lg-hero__skills { color: #E8DFD0; }
  .lg-hero__desc { margin-inline: auto; }
  .lg-hero__actions { justify-content: center; }
  .lg-hero__photoCap { width: auto; margin-inline: auto; }

  .lg-section__head--start { text-align: center; margin-inline: auto; }
  .lg-features { grid-template-columns: 1fr; }
  .lg-grades,
  .lg-grades--count-2,
  .lg-grades--count-4 { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-imgPane { order: -1; min-height: 220px; max-height: 260px; }
  .auth-imgPane__brand { display: none; }
  .auth-formPane { padding: 28px 20px; }
  .auth-head { text-align: center; }
  .auth-head__logo { margin-inline: auto; }
  .auth-foot { justify-content: center; }
  .lg-footer__grid { grid-template-columns: 1fr 1fr; }
  .lg-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .lg-hdr__tagAr { display: none; }
  .lg-brand__sub { display: none; }
  .lg-brand__name { font-size: 16px; }
  .lg-stats__row { grid-template-columns: 1fr; }
  .lg-stat { border-inline-start: 0; border-top: 1px solid rgba(243, 237, 227, 0.12); }
  .lg-stat:first-child { border-top: 0; }
  .lg-stat__val { font-size: 40px; }
  .fgrid { grid-template-columns: 1fr; }
  .lg-footer__grid { grid-template-columns: 1fr; }
  .lg-hero__skills span { padding-inline: 10px; font-size: 12px; }
  .lg-hero__photo img,
  .lg-hero__photoEmpty { width: 240px; height: 240px; }
}

body.legend-platform {
  font-size: 17px !important;
  font-weight: 600 !important;
}
.lg-btn { font-size: 16px; font-weight: 800; }
.lg-btn--lg { font-size: 17px; }
