@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap");
:root {
  --bg: #0b0e0d;
  --panel: #111513;
  --text: #f6efdf;
  --muted: #b7b1a5;
  --gold: #d7ad69;
  --gold2: #f2d7a3;
  --line: rgba(215, 173, 105, 0.28);
  --shadow: 0 25px 70px #0008;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  overflow-x: hidden;
}
body.light {
  --bg: #f1eadb;
  --panel: #fff9ee;
  --text: #211b14;
  --muted: #6c6255;
  --line: rgba(119, 80, 32, 0.25);
  --shadow: 0 25px 70px #38250b20;
}
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}
.topbar {
  height: 76px;
  position: absolute;
  z-index: 10;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 6vw, 90px);
  background: linear-gradient(#070a0be8, #070a0b66);
  border-bottom: 1px solid #ffffff12;
  backdrop-filter: blur(12px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  font-size: 35px;
  color: var(--gold);
  line-height: 1;
}
.brand strong {
  display: block;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -1px;
}
.brand small {
  display: block;
  color: #d5c5a7;
  font-size: 9px;
  margin-top: 5px;
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(17px, 3vw, 42px);
}
.nav a {
  font-size: 12px;
  color: #eee6d7;
  text-decoration: none;
  position: relative;
  padding: 10px 0;
  transition: color 0.25s;
}
.nav a:hover,
.nav a.active {
  color: var(--gold2);
}
.nav a.active:after {
  content: "◆";
  position: absolute;
  bottom: -8px;
  right: 40%;
  font-size: 8px;
  color: var(--gold);
}
.actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.icon-btn,
.login-btn,
.menu-toggle {
  background: transparent;
  color: var(--text);
  border: 1px solid #ffffff45;
  cursor: pointer;
}
.icon-btn {
  border: 0;
  font-size: 22px;
}
.login-btn {
  border-radius: 30px;
  padding: 10px 18px;
  font: inherit;
  font-size: 11px;
}
.login-btn span {
  margin-right: 10px;
  color: var(--gold);
}
.menu-toggle {
  display: none;
  border-radius: 8px;
  padding: 7px 10px;
}
.hero {
  min-height: 690px;
  height: min(100vh, 820px);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111 url("/assets/images/literature-background.jpg") center 42% / cover
    no-repeat;
  isolation: isolate;
  overflow: hidden;
}
.hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #070a0b3b, #070a0b7a 38%, #070a0bc9 60%, #070a0b38),
    linear-gradient(0deg, var(--bg) 0%, transparent 22%, #05070755 100%);
  z-index: -1;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 42%,
    transparent 0%,
    #0608072e 60%,
    #0507067a 100%
  );
  z-index: -1;
}
.hero-content {
  width: min(760px, 90%);
  text-align: center;
  margin-top: 64px;
  transform-style: preserve-3d;
}
.eyebrow,
.kicker {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.4px;
}
.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.eyebrow span {
  height: 1px;
  width: 32px;
  background: var(--gold);
}
h1 {
  font-size: clamp(34px, 5vw, 61px);
  line-height: 1.35;
  margin: 20px 0 12px;
  font-weight: 700;
  letter-spacing: -1.7px;
  text-shadow: 0 5px 30px #0009;
}
h1 em {
  font-style: normal;
  color: var(--gold2);
}
.hero-content > p {
  max-width: 620px;
  margin: 0 auto 27px;
  color: #e6dfd3;
  font-size: 14px;
  line-height: 2.2;
}
.searchbar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--gold);
  border-radius: 50px;
  background: #0b1010ed;
  max-width: 560px;
  margin: 0 auto 36px;
  padding: 5px 8px 5px 17px;
  box-shadow: 0 12px 40px #0006;
}
.search-icon {
  font-size: 25px;
  color: var(--gold);
  line-height: 1;
}
.searchbar input {
  min-width: 0;
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font: inherit;
  font-size: 12px;
}
.searchbar input::placeholder {
  color: #b8b7b2;
}
.searchbar select {
  max-width: 110px;
  background: #171a19;
  border: 0;
  border-radius: 30px;
  padding: 9px 8px;
  color: #e9dfcc;
  font: inherit;
  font-size: 10px;
  outline: none;
}
.searchbar button {
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: 23px;
  cursor: pointer;
}
.quick-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 680px;
  margin: auto;
}
.quick-features > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-left: 1px solid #ffffff25;
}
.quick-features > div:last-child {
  border: 0;
}
.feature-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid #b98d51;
  border-radius: 50%;
  color: var(--gold2);
  font-size: 21px;
  background: #080b0b75;
}
.quick-features b {
  font-size: 12px;
  font-weight: 500;
}
.quick-features small {
  font-size: 10px;
  color: #bcb5a8;
}
.scroll-cue {
  position: absolute;
  bottom: 78px;
  right: 7%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #eee5d7;
  font-size: 11px;
}
.scroll-cue i {
  font-style: normal;
  width: 37px;
  height: 37px;
  border: 1px solid #d8b87d88;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 21px;
  animation: bob 1.8s infinite;
}
.floating-seal {
  position: absolute;
  left: 5%;
  bottom: 85px;
  width: 72px;
  height: 72px;
  border: 1px solid #d6b2747a;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 17px;
  background: #090b0b88;
  transform: rotate(-12deg);
}
.floating-seal small {
  font-size: 9px;
  text-align: center;
  line-height: 1.4;
}
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--gold);
  font-size: 12px;
  margin-top: -5px;
  position: relative;
  z-index: 2;
}
.ornament span {
  width: 50px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.ornament span:last-child {
  transform: rotate(180deg);
}
.section {
  padding: 75px clamp(20px, 7vw, 100px);
}
.section-heading {
  text-align: center;
  margin-bottom: 38px;
}
.section-heading .kicker {
  display: block;
  margin-bottom: 9px;
}
.section-heading h2,
.tutor-copy h2,
.newsletter h2 {
  font-size: clamp(25px, 3vw, 36px);
  margin: 0 0 10px;
  letter-spacing: -0.8px;
}
.section-heading p {
  font-size: 12px;
  line-height: 2;
  color: var(--muted);
  margin: 0 auto;
  max-width: 620px;
}
.grades-section {
  padding-top: 34px;
  perspective: 1200px;
}
.grade-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  max-width: 1050px;
  margin: 0 auto;
}
.grade-card {
  position: relative;
  min-height: 180px;
  padding: 18px 10px 14px;
  border: 1px solid var(--gold);
  border-radius: 48% 48% 8px 8px/24% 24% 8px 8px;
  background: linear-gradient(145deg, #14221b, #0c1512 70%);
  color: #f5e9d1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  font-family: inherit;
  box-shadow:
    inset 0 0 25px #fff0,
    0 13px 25px #0003;
  transform-style: preserve-3d;
  transition:
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.35s,
    border-color 0.3s;
  overflow: hidden;
}
.grade-card:before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid #d8b4772c;
  border-radius: inherit;
  pointer-events: none;
}
.grade-card:after {
  content: "✧";
  position: absolute;
  top: 14px;
  color: #cba3634c;
  font-size: 65px;
  line-height: 1;
  transform: translateZ(-12px);
}
.grade-card:hover,
.grade-card:focus-visible {
  transform: translateY(-10px) rotateX(5deg) rotateY(-3deg) scale(1.025);
  box-shadow:
    0 22px 36px #0006,
    0 0 22px #d8ae5730;
  outline: none;
}
.grade-card.selected {
  box-shadow:
    0 0 0 2px var(--gold),
    0 18px 40px #0007;
  transform: translateY(-6px);
}
.grade-card small {
  font-size: 10px;
  color: #cdbb98;
}
.grade-card strong {
  font-size: 20px;
  font-weight: 600;
}
.grade-symbol {
  color: var(--gold);
  font-size: 22px;
  margin-bottom: 3px;
}
.card-link {
  font-size: 10px;
  border: 1px solid #d4b57c70;
  border-radius: 25px;
  padding: 7px 10px;
  margin-top: 12px;
  background: #0002;
}
.card-link b {
  color: var(--gold);
  font-size: 13px;
  margin-right: 5px;
}
.grade-8 {
  background: linear-gradient(145deg, #281a2d, #171020);
}
.grade-9 {
  background: linear-gradient(145deg, #142a3b, #101a27);
}
.grade-10 {
  background: linear-gradient(145deg, #3a211f, #211312);
}
.grade-11 {
  background: linear-gradient(145deg, #342819, #1d160d);
}
.grade-12 {
  background: linear-gradient(145deg, #102e29, #0b1917);
}
.results-bar {
  max-width: 1050px;
  margin: 26px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
.results-bar > span:first-child {
  color: var(--gold);
}
.results-bar button {
  background: transparent;
  border: 0;
  color: var(--gold);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.quote-section {
  padding: 20px clamp(20px, 12vw, 180px) 65px;
  perspective: 1000px;
}
.quote-paper {
  position: relative;
  max-width: 800px;
  margin: auto;
  text-align: center;
  padding: 36px 20px;
  background: linear-gradient(120deg, #b99a6c12, #d9b67b0b);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotateX(5deg);
  transform-style: preserve-3d;
  box-shadow: 0 25px 45px #0002;
}
.quote-paper p {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.9;
  color: var(--gold2);
  margin: 0 0 10px;
}
.quote-paper small {
  color: var(--muted);
  font-size: 11px;
}
.quote-mark {
  position: absolute;
  top: 0;
  right: 20px;
  font-family: Georgia, serif;
  font-size: 70px;
  color: #cba36338;
}
.quote-flower {
  position: absolute;
  left: 25px;
  bottom: 14px;
  font-size: 36px;
  color: #d4af6c33;
}
.features-section {
  background: linear-gradient(180deg, transparent, #121613 40%, transparent);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1050px;
  margin: auto;
}
.feature-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #151a17, #0d100f);
  padding: 30px 26px;
  border-radius: 4px 28px 4px 28px;
  min-height: 230px;
  transition:
    transform 0.35s,
    border-color 0.35s;
  box-shadow: var(--shadow);
}
.feature-card:hover {
  transform: translateY(-8px) rotateX(2deg);
  border-color: var(--gold);
}
.big-icon {
  color: var(--gold);
  font-size: 32px;
}
.feature-card h3 {
  font-size: 17px;
  margin: 12px 0;
}
.feature-card p {
  font-size: 12px;
  line-height: 2.2;
  color: var(--muted);
  min-height: 55px;
}
.feature-card a {
  font-size: 11px;
  color: var(--gold2);
  text-decoration: none;
}
.feature-card a b {
  margin-right: 8px;
}
.tutor-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 60px clamp(24px, 10vw, 150px);
  background: radial-gradient(ellipse at 20% 50%, #b7893b12, transparent 50%);
}
.tutor-art {
  height: 300px;
  position: relative;
  display: grid;
  place-items: center;
  perspective: 800px;
}
.orbit {
  position: absolute;
  border: 1px solid #d4ae6b45;
  border-radius: 50%;
  transform: rotateX(65deg) rotateZ(-20deg);
}
.orbit-one {
  width: 290px;
  height: 180px;
}
.orbit-two {
  width: 230px;
  height: 140px;
  transform: rotateX(65deg) rotateZ(35deg);
}
.book-3d {
  width: 130px;
  height: 160px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d4b17a, #61401d 60%, #21150c);
  border: 4px double #efcf8f;
  color: #2b1d0c;
  font-size: 75px;
  font-weight: 700;
  box-shadow:
    14px 20px 0 #25180f,
    20px 27px 35px #0009;
  transform: rotateY(-18deg) rotateX(8deg);
  text-shadow: 2px 2px #f7d89c;
}
.spark {
  position: absolute;
  color: var(--gold);
  font-size: 27px;
  animation: twinkle 2s infinite alternate;
}
.s1 {
  top: 48px;
  right: 25%;
}
.s2 {
  bottom: 50px;
  left: 25%;
  animation-delay: 0.7s;
}
.tutor-copy p {
  font-size: 13px;
  line-height: 2.3;
  color: var(--muted);
  max-width: 520px;
}
.gold-btn {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
  border: 1px solid var(--gold);
  border-radius: 30px;
  padding: 12px 20px;
  background: linear-gradient(120deg, #d2aa68, #f1d5a0);
  color: #1b160e;
  font: inherit;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}
.gold-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 25px #c99d4d30;
}
.exams-section {
  padding-top: 45px;
}
.exam-panel {
  max-width: 900px;
  margin: auto;
  border: 1px solid var(--line);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 22px;
  background: linear-gradient(100deg, #171a16, #0e1110);
  box-shadow: var(--shadow);
}
.exam-emblem {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 28px;
}
.exam-panel h3 {
  margin: 0 0 5px;
  font-size: 17px;
}
.exam-panel p {
  margin: 0;
  font-size: 12px;
  line-height: 2;
  color: var(--muted);
}
.outline-btn {
  margin-right: auto;
  white-space: nowrap;
  background: transparent;
  color: var(--gold2);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 11px 16px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.outline-btn span {
  margin-right: 8px;
}
.newsletter {
  padding: 65px 20px 75px;
  background: radial-gradient(ellipse at 50% 100%, #a97a3420, transparent 70%);
  border-top: 1px solid #ffffff08;
}
.newsletter-inner {
  text-align: center;
}
.newsletter-inner > span {
  font-size: 25px;
  color: var(--gold);
}
.newsletter h2 {
  margin: 10px 0;
}
.newsletter p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 23px;
}
footer {
  border-top: 1px solid var(--line);
  padding: 25px clamp(20px, 6vw, 90px);
  display: flex;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
  background: #080a09;
}
footer p,
.footer-note {
  font-size: 10px;
  color: var(--muted);
}
.footer-note {
  margin-right: auto;
}
.footer-brand strong {
  font-size: 21px;
}
.footer-brand .brand-mark {
  font-size: 28px;
}
.back-top {
  font-size: 11px;
  text-decoration: none;
  color: var(--gold);
}
.dialog {
  width: min(420px, calc(100% - 32px));
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--gold);
  padding: 35px;
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 30px 100px #000b;
}
.dialog::backdrop {
  background: #020403b8;
  backdrop-filter: blur(7px);
}
.dialog-close {
  position: absolute;
  left: 15px;
  top: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 25px;
  cursor: pointer;
}
.dialog-icon {
  color: var(--gold);
  font-size: 35px;
}
.dialog h2 {
  font-size: 23px;
}
.dialog p {
  font-size: 13px;
  color: var(--muted);
  line-height: 2.2;
  margin-bottom: 24px;
}
.reveal {
  opacity: 0;
  transform: translateY(32px) rotateX(3deg);
  transform-origin: center top;
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.75, 0.25, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}
.grade-card.reveal {
  transform: translateY(40px) rotateX(12deg) rotateY(-3deg);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.75, 0.25, 1),
    box-shadow 0.3s;
}
.grade-card.reveal.visible {
  transform: translateY(0) rotateX(0) rotateY(0);
}
.grade-card.reveal.visible:hover {
  transform: translateY(-10px) rotateX(5deg) rotateY(-3deg) scale(1.025);
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}
@keyframes twinkle {
  from {
    opacity: 0.35;
    transform: scale(0.8) rotate(0);
  }
  to {
    opacity: 1;
    transform: scale(1.2) rotate(20deg);
  }
}
@media (min-width: 1400px) {
  .hero {
    height: 800px;
  }
  .hero-content {
    transform: translateY(-10px);
  }
}
@media (max-width: 1000px) {
  .topbar {
    padding: 0 24px;
  }
  .nav {
    gap: 17px;
  }
  .nav a {
    font-size: 11px;
  }
  .brand strong {
    font-size: 23px;
  }
  .grade-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 650px;
  }
  .grade-card {
    min-height: 175px;
  }
  .hero {
    height: 760px;
  }
  .scroll-cue {
    bottom: 32px;
  }
  .floating-seal {
    bottom: 35px;
  }
  .tutor-section {
    padding-inline: 6vw;
  }
}
@media (max-width: 720px) {
  .topbar {
    height: 68px;
    padding: 0 16px;
  }
  .brand-mark {
    font-size: 28px;
  }
  .brand strong {
    font-size: 21px;
  }
  .brand small {
    font-size: 8px;
  }
  .menu-toggle {
    display: block;
    order: 3;
  }
  .actions {
    margin-right: auto;
    margin-left: 12px;
    gap: 8px;
  }
  .login-btn {
    padding: 7px 11px;
    font-size: 10px;
  }
  .icon-btn {
    font-size: 20px;
  }
  .nav {
    display: none;
    position: absolute;
    top: 68px;
    right: 12px;
    left: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 18px;
    background: #0b0e0df5;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    padding: 13px 4px;
    border-bottom: 1px solid #ffffff0d;
  }
  .nav a:last-child {
    border: 0;
  }
  .nav a.active:after {
    display: none;
  }
  .hero {
    min-height: 720px;
    height: auto;
    padding: 120px 0 115px;
    background-position: 52% center;
  }
  .hero:before {
    background:
      linear-gradient(90deg, #060807aa, #060807d9),
      linear-gradient(0deg, var(--bg), transparent 35%);
  }
  .hero-content {
    margin: 0;
    width: 92%;
  }
  h1 {
    font-size: clamp(32px, 8vw, 48px);
    letter-spacing: -1px;
  }
  .hero-content > p {
    font-size: 12px;
  }
  .searchbar {
    height: auto;
    min-height: 54px;
    gap: 6px;
    padding: 5px 10px;
  }
  .searchbar input {
    font-size: 10px;
  }
  .searchbar select {
    max-width: 92px;
    font-size: 9px;
  }
  .quick-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 5px;
    margin-top: 25px;
  }
  .quick-features > div:nth-child(2) {
    border: 0;
  }
  .quick-features b {
    font-size: 11px;
  }
  .quick-features small {
    font-size: 9px;
  }
  .scroll-cue {
    right: 6%;
    bottom: 30px;
  }
  .floating-seal {
    left: 6%;
    bottom: 25px;
    width: 54px;
    height: 54px;
    font-size: 13px;
  }
  .floating-seal small {
    font-size: 8px;
  }
  .section {
    padding: 55px 18px;
  }
  .grades-section {
    padding-top: 28px;
  }
  .section-heading {
    margin-bottom: 27px;
  }
  .section-heading p {
    font-size: 11px;
  }
  .grade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .grade-card {
    min-height: 160px;
  }
  .grade-card strong {
    font-size: 19px;
  }
  .quote-section {
    padding: 15px 20px 45px;
  }
  .quote-paper {
    padding: 30px 12px;
  }
  .quote-paper p {
    font-size: 22px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .feature-card {
    min-height: 0;
    padding: 24px;
  }
  .feature-card p {
    min-height: 0;
  }
  .tutor-section {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 35px 22px 55px;
  }
  .tutor-art {
    height: 230px;
    order: 2;
  }
  .tutor-copy {
    order: 1;
  }
  .tutor-copy h2 {
    font-size: 28px;
  }
  .tutor-copy p {
    font-size: 12px;
  }
  .exam-panel {
    padding: 20px 15px;
    gap: 13px;
    flex-wrap: wrap;
  }
  .exam-emblem {
    width: 45px;
    height: 45px;
    font-size: 22px;
  }
  .exam-panel > div:nth-child(2) {
    flex: 1;
  }
  .exam-panel p {
    font-size: 11px;
  }
  .outline-btn {
    margin: 8px 0 0;
    width: 100%;
  }
  .newsletter {
    padding: 50px 18px;
  }
  footer {
    gap: 13px;
    justify-content: space-between;
  }
  footer p {
    width: 100%;
    margin: 0;
  }
  .footer-note {
    margin: 0;
    width: 100%;
  }
  .back-top {
    margin-right: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
/* API-backed learning components */
.lesson-results {
  max-width: 1050px;
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.lesson-result {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: linear-gradient(145deg, #151a17, #0d100f);
  box-shadow: 0 12px 28px #0002;
}
.lesson-result h3 {
  font-size: 15px;
  margin: 0 0 8px;
}
.lesson-result p {
  font-size: 12px;
  line-height: 2;
  color: var(--muted);
}
.lesson-result small,
.system-status {
  display: block;
  color: #d4b477;
  font-size: 10px;
  line-height: 1.8;
  margin: 10px 0;
}
.dialog {
  max-height: 85vh;
  overflow: auto;
}
.dialog #dialogText {
  text-align: right;
}
.dialog #dialogText h3 {
  font-size: 15px;
  color: var(--gold2);
}
.dialog #dialogText p,
.dialog #dialogText li {
  line-height: 2;
  font-size: 12px;
}
.dialog #dialogText .notice {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
}
.dialog-actions,
.auth-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.app-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.app-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.app-form input,
.app-form textarea,
.app-form select,
.user-list select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b100f;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  outline: none;
}
.app-form input:focus,
.app-form textarea:focus,
.app-form select:focus {
  border-color: var(--gold);
}
.app-form fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.app-form legend {
  font-size: 12px;
  line-height: 1.9;
}
.app-form .option {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 8px 0;
}
.app-form .option input {
  width: auto;
}
.ai-answer {
  white-space: pre-wrap;
  line-height: 2.1;
  padding: 12px;
  background: #0b100f;
  border-radius: 10px;
  color: var(--text);
  font-size: 12px;
}
.exam-list,
.user-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.exam-list article,
.user-list article {
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 12px;
}
.exam-list h3 {
  font-size: 14px;
  margin: 0;
}
.exam-list p,
.user-list small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.user-list article {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 15px 0;
}
.stats-grid div {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stats-grid b {
  font-size: 22px;
  color: var(--gold2);
}
.stats-grid span {
  font-size: 10px;
  color: var(--muted);
}
#authMessage,
#questionMessage {
  color: var(--gold2);
  font-size: 12px;
}
.system-status {
  max-width: 520px;
  margin: 12px auto 0;
  text-align: center;
}
body.light .lesson-result {
  background: #fff9ee;
}
body.light .app-form input,
body.light .app-form textarea,
body.light .app-form select,
body.light .ai-answer,
body.light .user-list select {
  background: #fffaf1;
  color: #211b14;
}
@media (max-width: 800px) {
  .lesson-results {
    grid-template-columns: 1fr 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .lesson-results {
    grid-template-columns: 1fr;
  }
  .dialog {
    padding: 28px 20px;
  }
  .dialog-actions .gold-btn,
  .dialog-actions .outline-btn {
    flex: 1;
  }
  .auth-tabs > * {
    flex: 1;
  }
}

/* ── قابلیت‌های جدید: پنجره عریض، toast، گفت‌وگو، پیشرفت، فیلتر شعر ── */
.dialog.wide {
  width: min(720px, calc(100% - 24px));
}
.dialog.locked .dialog-close {
  opacity: 0.6;
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 30px);
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--gold);
  padding: 11px 20px;
  border-radius: 30px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s,
    transform 0.3s;
  z-index: 100;
  box-shadow: var(--shadow);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.card-actions .outline-btn {
  margin: 0;
}
.icon-chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.icon-chip.on {
  background: var(--gold);
  color: #21180c;
}
.chip {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 10px;
  font: inherit;
  font-size: 11px;
  color: var(--gold2);
  background: transparent;
}
button.chip {
  cursor: pointer;
}
.chip.done {
  color: #a8d9a5;
  border-color: #a8d9a555;
  margin-right: 6px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.verse {
  white-space: pre-line;
  color: var(--gold2) !important;
  font-size: 14px !important;
}
.poem-filter {
  max-width: 560px;
  margin: 0 auto 22px;
  display: flex;
  gap: 10px;
}
.poem-filter input,
.poem-filter select {
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #0b100f;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  outline: none;
}
.poem-filter input {
  flex: 1;
  min-width: 0;
}
.poem-filter input:focus,
.poem-filter select:focus {
  border-color: var(--gold);
}
body.light .poem-filter input,
body.light .poem-filter select {
  background: #fffaf1;
}
.chat-log {
  max-height: 300px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
  padding: 4px;
}
.chat-msg {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 2;
  white-space: pre-wrap;
  max-width: 92%;
}
.chat-msg.user {
  align-self: flex-start;
  background: #d7ad6926;
  border: 1px solid var(--line);
}
.chat-msg.assistant {
  align-self: flex-end;
  background: #0b100f;
  border: 1px solid var(--line);
}
.chat-msg.pending {
  opacity: 0.6;
}
.chat-msg.error {
  align-self: center;
  color: #ffb9b9;
  border: 1px solid #a95757;
}
body.light .chat-msg.assistant {
  background: #fffaf1;
}
.timer {
  text-align: center;
  font-weight: 600;
  font-size: 15px !important;
  position: sticky;
  top: -8px;
  background: var(--panel);
  z-index: 2;
}
.timer.warn {
  color: #ffb9b9;
  border-color: #a95757 !important;
}
.muted-small {
  font-size: 11px !important;
  color: var(--muted);
}
.score-big {
  font-size: 46px;
  color: var(--gold2);
  text-align: center;
  margin: 8px 0 16px;
}
.score-big small {
  font-size: 16px;
  color: var(--muted);
}
.review {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0;
}
.review.ok {
  border-color: #a8d9a566;
}
.review.bad {
  border-color: #a9575788;
}
.review p {
  margin: 6px 0 !important;
}
.prog {
  display: grid;
  grid-template-columns: 80px 1fr 70px;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  font-size: 11px;
}
.bar {
  height: 8px;
  border-radius: 8px;
  background: #ffffff14;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
}
.account {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.account summary {
  cursor: pointer;
  color: var(--gold2);
  font-size: 12px;
}
.exam-list article button {
  margin-top: 8px;
}
.exam-list button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.login-btn:focus-visible,
.outline-btn:focus-visible,
.gold-btn:focus-visible,
.icon-chip:focus-visible,
.chip:focus-visible {
  outline: 2px solid var(--gold2);
  outline-offset: 2px;
}
@media (max-width: 560px) {
  .poem-filter {
    flex-direction: column;
  }
  .actions {
    flex-wrap: wrap;
  }
}
/* نوار بالا و هیرو همیشه روی زمینه‌ی تیره‌اند؛ در حالت روشن هم متن باید روشن بماند (قبلاً ناخوانا می‌شد). */
.topbar,
.hero {
  --text: #f6efdf;
  --muted: #c9c2b4;
  --line: rgba(215, 173, 105, 0.28);
  color: var(--text);
}
body.light .topbar .brand small {
  color: #d5c5a7;
}
body.light footer {
  background: #e8dfcb;
}
body.light footer p,
body.light .footer-note {
  color: #6c6255;
}
body.light .exam-panel,
body.light .feature-card,
body.light .grade-card.grade-7 {
  box-shadow: 0 12px 30px #38250b18;
}
body.light .exam-panel {
  background: linear-gradient(100deg, #fff9ee, #f3ead9);
}
body.light .feature-card {
  background: linear-gradient(145deg, #fff9ee, #f3ead9);
}
body.light .quote-paper p {
  color: #7a5420;
}
/* حالت روشن: طلایی تیره‌تر برای خوانایی روی زمینه کرم؛ نوار بالا و هیرو همان طلایی قبلی را نگه می‌دارند. */
body.light {
  --gold: #9a6a22;
  --gold2: #6f4a14;
}
body.light .topbar,
body.light .hero {
  --gold: #d7ad69;
  --gold2: #f2d7a3;
}
body.light .gold-btn {
  color: #1b160e;
  --gold: #d7ad69;
}
body.light .grade-card {
  --gold: #d7ad69;
  --gold2: #f2d7a3;
}
body.light .lesson-result small,
body.light .system-status {
  color: #8a5f1f;
}
body.light .icon-chip.on {
  color: #fff;
}
body.light .panel-head {
  background: #f6efe0f2;
}
body.light .panel-head > div {
  color: #6f4a14;
}
body.light .panel-card {
  background: linear-gradient(145deg, #fff9ee, #f6efe0);
}
body.light .panel-item {
  background: #fffaf0;
}
body.light .panel-tabs button.active {
  color: #fff;
}
