:root {
  color-scheme: light;
  --paper: #F6F4F1;
  --ink: #1F1F1F;
  --muted: #595959;
  --accent: #C80000;
  --rule: #ECE8E3;
  font-family: system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid #A00000; outline-offset: 5px; }
.skip { position: absolute; top: -6rem; left: 1rem; z-index: 2; padding: .75rem; background: white; }
.skip:focus { top: 1rem; }
.shell { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.top { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; font-weight: 800; font-size: 1.4rem; letter-spacing: -.045em; }
.brand img { display: block; width: clamp(126px, 18vw, 182px); height: auto; }
.dot { color: #C80000; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(12px, 2vw, 26px); font-size: .92rem; font-weight: 650; }
nav a:hover, footer > a:last-child:hover { text-decoration: underline; text-underline-offset: 5px; }
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  margin-block: clamp(20px, 4vw, 44px);
  padding: clamp(22px, 5vw, 62px);
  color: #fff;
  border: 1px solid #663039;
  border-radius: 30px;
  background:
    radial-gradient(circle at 19% 18%, #ffffff27 0 1px, transparent 2px) 0 0 / 21px 21px,
    linear-gradient(133deg, #ffffff15 0%, #ffffff03 39%, transparent 39%),
    radial-gradient(ellipse at 100% 0%, #931b36 0%, transparent 61%),
    linear-gradient(145deg, #0b0b0f, #241013 70%);
  box-shadow: inset 0 1px #ffffff40, 0 20px 48px #24101332;
}
.hero .eyebrow { color: #ffd2dc; }
.hero .eyebrow span { background: #ff75a5; box-shadow: 0 0 14px #ff75a5; }
.hero h1 { font-family: system-ui, sans-serif; font-weight: 850; font-size: clamp(2rem, 5.1vw, 4.65rem); letter-spacing: -.045em; line-height: 1.15; }
.hero h1 em { display: inline-block; margin-top: .08em; color: #ffd6e2; font-style: normal; }
.hero .lede { color: #fff0f3; }
.hero .outline { color: #fff; border-color: #ffffff65; background: #ffffff13; }
.hero .outline:hover { background: #ffffff29; }
.eyebrow { display: flex; align-items: center; gap: .55rem; margin: 0 0 16px; font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow span { background: #C80000; border-radius: 50%; width: 8px; height: 8px; flex: none; }
h1, h2 { font-family: Georgia, serif; font-weight: 500; margin: 0; letter-spacing: -.055em; line-height: 1.03; }
h1 { font-size: clamp(2.6rem, 6.1vw, 5.35rem); }
h1 em { color: var(--accent); }
h2 { font-size: clamp(2rem, 4.5vw, 3.65rem); }
.lede { color: var(--muted); font-size: clamp(1rem, 1.7vw, 1.15rem); line-height: 1.7; max-width: 42ch; margin: 24px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 10px 17px; border-radius: 100px; border: 1px solid transparent; font-size: .9rem; font-weight: 740; }
.primary { background: linear-gradient(155deg, #e72b65, #ac0035 56%, #870024); color: white; box-shadow: inset 0 1px #ffffff80, 0 5px 16px #ab003443; }
.primary:hover { background: linear-gradient(155deg, #f63a74, #a60038 63%); }
.outline { border-color: #A00000; }
.outline:hover { background: #FBEDED; }
.art { min-width: 0; display: grid; align-content: center; gap: clamp(14px, 2vw, 24px); padding: clamp(46px, 6vw, 64px) 10%; overflow: hidden; position: relative; isolation: isolate; border-radius: 28px; background: radial-gradient(ellipse at 60% 10%, #922660, #38162e 68%, #1c1024); border: 1px solid #ffffff40; box-shadow: inset 0 1px #ffffff50, 0 14px 32px #09061066; color: #F3C7C7; }
.orbit { position: absolute; inset: 0; width: 100%; height: 100%; stroke: #F3C7C7; opacity: .25; }
.art-index, .art-caption { position: absolute; left: 6%; font-size: clamp(.55rem, 1vw, .72rem); font-weight: 750; letter-spacing: .16em; }
.art-index { top: 7%; right: 6%; display: flex; justify-content: space-between; }
.art-caption { bottom: 7%; }
.word { position: relative; display: grid; justify-self: start; max-width: 100%; padding: 9px 16px; border-radius: 20px; box-shadow: 0 14px 32px #0B0B0F62; color: #1F1F1F; }
.word span { font-family: Georgia, serif; font-size: clamp(1.5rem, 3.4vw, 2.9rem); line-height: 1.18; font-weight: 600; }
.word small { font-size: .75rem; margin-top: 5px; letter-spacing: .12em; }
.word-cn { --tilt: -3deg; background: #FBEDED; transform: rotate(-3deg); }
.word-en { --tilt: 3deg; justify-self: end; background: #F3C7C7; transform: rotate(3deg); }
.word-bn { --tilt: -2deg; background: #E6F3EA; transform: rotate(-2deg); }
.spark { pointer-events: none; position: absolute; font-size: 2rem; }
.spark-top { right: 16%; top: 18%; }
.spark-bottom { right: 17%; bottom: 14%; font-size: 1.25rem; }
.paths { padding: 18px 0 58px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-top: 24px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: clamp(18px, 3vw, 29px); border: 1px solid #1F1F1F1F; border-radius: 21px; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px #1F1F1F17; }
.card { color: #fff; box-shadow: inset 0 1px #ffffff45, 0 10px 24px #17132524; }
.card:hover { box-shadow: inset 0 1px #ffffff65, 0 16px 26px #17132533; }
.card-title { font-family: system-ui, sans-serif; font-weight: 780; }
.mint { background: linear-gradient(145deg, #ffffff23 0 35%, transparent 36%), linear-gradient(140deg, #0b7a4b, #06281d); }
.peach { background: linear-gradient(145deg, #ffffff23 0 35%, transparent 36%), linear-gradient(140deg, #b21646, #510e2b); }
.lilac { background: linear-gradient(145deg, #ffffff23 0 35%, transparent 36%), linear-gradient(140deg, #4b5be0, #161b52); }
.number { font-size: .75rem; font-weight: 780; letter-spacing: .15em; }
.card-title { font-size: clamp(1.45rem, 2.5vw, 2rem); line-height: 1.12; letter-spacing: -.035em; }
.card-copy { color: #fff; line-height: 1.6; }
.card-link { display: flex; justify-content: space-between; margin-top: auto; padding-top: 12px; font-weight: 750; font-size: .9rem; }
.exam { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 28px; background: #FBEDED; border: 1px solid var(--rule); border-radius: 24px; padding: clamp(22px, 5vw, 48px); }
.exam p:last-child { color: var(--muted); line-height: 1.5; margin-bottom: 0; }
.exam-links { display: grid; gap: 10px; }
.exam-links a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: #FFFFFF; border: 1px solid var(--rule); font-weight: 730; }
.exam-links a:hover { border-color: var(--accent); }
.footer { border-top: 1px solid var(--rule); margin-top: 52px; padding-block: 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.footer > a:last-child { font-size: .88rem; font-weight: 650; }
.top .menu-toggle { display: none; }

@media (max-width: 740px) {
  .shell { width: min(100% - 32px, 560px); }
  .top { min-height: 70px; }
  .top { flex-wrap: wrap; padding-block: 9px; gap: 8px 12px; }
  .top .menu-toggle:not([hidden]) {
    display: inline-flex;
    margin-left: auto;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
  }
  .top .menu-toggle[aria-expanded="false"]:not([hidden]) + nav { display: none; }
  .top nav {
    order: 1;
    flex-basis: 100%;
    display: grid;
    gap: 0;
    padding: 6px 12px;
    border: 1px solid var(--rule);
    border-radius: 14px;
    background: #fff;
  }
  .top nav > a { padding: 10px 0; }
  .top nav > * + * { border-top: 1px solid var(--rule); }
  .top .course-options {
    position: static;
    min-width: 0;
    margin-bottom: 6px;
    box-shadow: none;
  }
  .top .brand img { width: clamp(94px, 29vw, 126px); }
  .top .menu-toggle, .top .login { padding-inline: 10px; gap: 5px; }
  .hero, .exam { grid-template-columns: 1fr; }
  .word span { font-size: clamp(1.5rem, 6vw, 2.5rem); }
  .cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}

.course-menu { position: relative; }
.course-menu summary { cursor: pointer; white-space: nowrap; padding-block: 8px; }
.course-menu summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.course-options { position: absolute; z-index: 3; top: calc(100% + 4px); left: 0; min-width: min(235px, calc(100vw - 32px)); padding: 6px; background: #fff; border: 1px solid var(--rule); border-radius: 13px; box-shadow: 0 12px 28px #1F1F1F17; }
.course-options a { display: grid; gap: 3px; padding: 10px; border-radius: 8px; }
.course-options a:hover { background: #FBEDED; text-decoration: none; }
.course-options span { color: var(--muted); font-size: .82rem; font-weight: 500; }

@media (prefers-reduced-motion: no-preference) {
  .word { animation: greeting-float 2.1s ease-in-out 2; }
  .word-en { animation-delay: .18s; }
  .word-bn { animation-delay: .36s; }
  .spark { animation: sparkle 1.5s ease-in-out 3; }
  @keyframes greeting-float {
    0%, 100% { transform: translateY(0) rotate(var(--tilt)); }
    50% { transform: translateY(-4px) rotate(var(--tilt)); }
  }
  @keyframes sparkle {
    50% { transform: scale(1.22); opacity: .68; }
  }
}

.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.card-glyph {
  position: absolute;
  z-index: -1;
  right: 4%;
  bottom: -0.15em;
  color: #fff;
  opacity: .11;
  font: 800 clamp(5rem, 11vw, 10rem)/1 system-ui, sans-serif;
  pointer-events: none;
}

.art .card-glyph {
  right: 8%;
  bottom: 14%;
}

.info-section { margin-block: clamp(32px, 6vw, 64px); }
.section-copy { max-width: 62ch; color: var(--muted); line-height: 1.65; }
.method-grid {
  --timeline-gap: 14px;
  --timeline-line: #c65c7c;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--timeline-gap);
  padding: 22px 0 0;
  margin: 22px 0 0;
  list-style: none;
}
.method-grid li, .faq-list details {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 16px;
}
.step-number {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fbe5ec;
  color: #870024;
  font-weight: 800;
}
#teacher-method .method-grid { --timeline-line: #8965ae; }
#teacher-method .step-number { background: #efe5fa; color: #53277c; }
.method-grid li {
  position: relative;
  padding-top: 32px;
}
.method-grid .step-number {
  position: absolute;
  z-index: 1;
  top: -20px;
  left: 18px;
}
.method-grid li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 37px;
  width: calc(100% + var(--timeline-gap) + 2px);
  height: 3px;
  background: var(--timeline-line);
}
.method-grid h3 { margin: 0 0 6px; font-size: 1.04rem; }
@media (max-width: 850px) {
  .method-grid {
    grid-template-columns: 1fr;
    padding: 0 0 0 22px;
  }
  .method-grid li { padding: 14px 16px 16px 30px; }
  .method-grid .step-number { top: 14px; left: -20px; }
  .method-grid li:not(:last-child)::after {
    top: 33px;
    left: -2px;
    width: 3px;
    height: calc(100% + var(--timeline-gap) + 2px);
  }
}
.method-grid p, .faq-list p { margin: 0; color: var(--muted); line-height: 1.55; }
.about-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 22px;
  padding: clamp(22px, 5vw, 48px);
  border: 1px solid #ead4dd;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff 0%, #fbe8ef 100%);
}
.about-panel img { width: clamp(120px, 22vw, 260px); height: auto; }
.faq-list { display: grid; gap: 10px; margin-top: 22px; }
.faq-list summary { cursor: pointer; font-weight: 750; }
.faq-list p { margin-top: 10px; }
.faq-list p a { text-decoration: underline; text-underline-offset: 3px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 20px; font-size: .88rem; font-weight: 650; }
@media (max-width: 740px) {
  .about-panel { grid-template-columns: 1fr; }
  .footer { align-items: flex-start; flex-direction: column; }
}

.sample { margin-bottom: clamp(24px, 5vw, 48px); scroll-margin-top: 20px; }
.sample-question { padding: 18px; border-radius: 16px; background: #fff; color: var(--ink); }
.sample-question fieldset { border: 0; margin: 0; min-width: 0; padding: 0; }
.sample-question legend { padding: 0; margin-bottom: 12px; font-weight: 800; }
.sample-question button { margin: 0 4px 6px 0; background: #fff; color: inherit; cursor: pointer; }
.sample-question button:hover { background: #fbe5ec; }
.sample-question .sample-correct { background: #e6f3ea; border-color: #1e7b3f; }
#sample-feedback { min-height: 1.5em; margin: 4px 0 8px; color: var(--ink); }
.sample-next { font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
  .in-view {
    animation: section-arrive .48s cubic-bezier(.22, 1, .36, 1);
  }

  .in-view :is(.card, .method-grid li, .faq-list details) {
    animation: section-arrive .45s cubic-bezier(.22, 1, .36, 1) backwards;
  }

  .in-view :is(.card, .method-grid li, .faq-list details):nth-child(2) { animation-delay: .07s; }
  .in-view :is(.card, .method-grid li, .faq-list details):nth-child(3) { animation-delay: .14s; }
  .in-view .method-grid li:nth-child(4) { animation-delay: .21s; }

  .button, .exam-links a {
    transition: translate .18s ease, box-shadow .18s ease, background-color .18s ease;
  }

  @media (hover: hover) {
    .button:hover, .exam-links a:hover { translate: 0 -2px; }
  }

  .button:active, .exam-links a:active { translate: 0 1px; }
  .course-menu[open] .course-options, .faq-list details[open] > p {
    animation: section-arrive .24s ease-out;
  }
  .sample-question .sample-correct { animation: answer-pop .28s ease-out; }

  @media (max-width: 740px) {
    .top .menu-toggle[aria-expanded="true"] + nav {
      animation: section-arrive .24s ease-out;
    }
  }

  @keyframes section-arrive {
    from { opacity: .55; translate: 0 10px; }
    to { opacity: 1; translate: 0 0; }
  }

  @keyframes answer-pop {
    45% { scale: 1.04; }
  }
}

.login-menu { position: relative; }
.login-menu button { cursor: pointer; }
.login-options:not([hidden]) {
  position: absolute;
  z-index: 4;
  top: 100%;
  right: 0;
  min-width: 174px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px #1F1F1F24;
}
.login-options a { white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .login-options:not([hidden]) { animation: section-arrive .2s ease-out; }
}
