:root {
  --paper: #f9f8f2;
  --ink: #214f42;
  --ink-dark: #163e34;
  --body: #59665d;
  --border: #e1e5d9;
  --orange: #bb7146;
  --peach: #f2d2b5;
  --green: #dae7d7;
  --radius: 18px;
  --sans: "DM Sans", system-ui, sans-serif;
  --heading: "Manrope", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink-dark); font-family: var(--sans); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--ink); color: #fff; padding: 8px 12px; }
.shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(249,248,242,.96); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 16px; }
.main-nav { display: flex; gap: 18px; font-size: 13px; font-weight: 650; flex-wrap: wrap; }
.nav-menu { display: none; position: relative; }
.nav-menu summary { list-style: none; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu nav {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #fdfcf8;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  display: grid;
  gap: 10px;
  min-width: 180px;
  font-size: 14px;
  font-weight: 650;
  z-index: 30;
}
.brand { display: flex; gap: 10px; align-items: center; min-width: 0; }
.brand-mark { width: 40px; height: 53px; max-width: none; flex-shrink: 0; display: block; }
.brand-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.brand-name { font: 800 21px/1 var(--heading); letter-spacing: -1px; white-space: nowrap; }
.brand em { color: var(--orange); font-family: var(--serif); font-style: italic; font-weight: 500; }
.brand-tagline { font: 700 9px/1 var(--sans); letter-spacing: 1.7px; text-transform: uppercase; color: var(--orange); white-space: nowrap; }
nav { display: flex; gap: 18px; font-size: 13px; font-weight: 650; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 9px; padding: 10px 18px; font-size: 13px; font-weight: 700; border: 0; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--border); }
.banner { background: var(--ink); color: #f9f8f2; text-align: center; font-size: 12px; font-weight: 600; padding: 8px 16px; }
.hero { padding: 40px 0 32px; display: grid; grid-template-columns: minmax(0, 640px); gap: 24px; align-items: center; }
.ad-stage-wrap {
  background: linear-gradient(180deg, #e7efe4 0%, var(--paper) 78%);
  border-bottom: 1px solid var(--border);
}
.ad-stage { width: min(1280px, calc(100% - 32px)); margin-inline: auto; padding: 24px 0 28px; }
.ad-stage-media {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.85fr);
  gap: 20px;
  align-items: stretch;
}
.promo-sound {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(249, 248, 242, 0.94);
  color: var(--ink-dark);
  font-size: 12px;
  font-weight: 700;
}
.promo-banner {
  display: grid;
  align-content: space-between;
  gap: 20px;
  min-height: 420px;
  padding: 32px 28px;
  border-radius: 22px;
  color: #f9f8f2;
  background:
    radial-gradient(900px 240px at 100% -10%, rgba(242, 210, 181, 0.38), transparent 58%),
    linear-gradient(160deg, #1b4a3e 0%, #163e34 58%, #214f42 100%);
  box-shadow: 0 18px 40px rgba(22, 62, 52, 0.16);
}
.promo-banner h2 {
  color: #f9f8f2;
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -1.2px;
  margin: 0 0 12px;
}
.promo-banner h2 em { color: var(--peach); }
.promo-banner p { margin: 0; color: #e4ecdf; }
.promo-banner .banner-slot {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--peach);
}
.promo-banner .banner-points {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.promo-banner .banner-points li {
  position: relative;
  padding-left: 26px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #e4ecdf;
}
.promo-banner .banner-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--peach);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23000'/%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.8-4.9' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23000'/%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.8-4.9' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.promo-banner .banner-points strong {
  display: block;
  color: #f9f8f2;
  font-family: var(--heading);
  font-weight: 800;
  letter-spacing: -0.2px;
}
.promo-banner .banner-note {
  font-size: 13px;
  color: #f2d2b5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}
.promo-banner .banner-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 9px;
  background: var(--peach);
  color: var(--ink-dark);
  font-weight: 800;
  font-size: 13px;
}
.promo-banner .banner-cta:hover { background: #f7dfc9; }
.signup-panel {
  margin-top: 20px;
  background: #fdfcf8;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(33, 79, 66, 0.06);
}
.signup-panel .form {
  max-width: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: end;
}
.signup-panel .form-intro { grid-column: 1 / -1; }
.signup-panel .form-intro h2 { margin-bottom: 8px; }
.signup-panel .form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.signup-span-2 { grid-column: span 2; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; margin: 0 0 12px; }
h1, h2, h3 { font-family: var(--heading); letter-spacing: -1.4px; line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: clamp(36px, 5vw, 58px); }
h1 em, h2 em { font-family: var(--serif); color: var(--orange); font-weight: 500; }
.lead { color: var(--body); max-width: 520px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card { background: #fdfcf8; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.muted { color: var(--body); font-size: 14px; }
.form { display: grid; gap: 12px; max-width: 420px; }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 650; }
.form input, .form select, .form textarea { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: #fffef8; }
.error { color: #8a3b2a; background: #f5e5d5; padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.ok { color: var(--ink); background: var(--green); padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.footer { border-top: 1px solid var(--border); padding: 24px 0 36px; font-size: 12px; color: var(--body); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
video { width: 100%; border-radius: 12px; background: #1a352d; }
.tabs { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.tabs button.active { background: var(--ink); color: #fff; }
.chapter { display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: 8px 0; font-size: 13px; }
.lab { background: #eef0e3; border-radius: 12px; padding: 16px; }
.digits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.digits input { text-align: center; font-size: 24px; font-family: var(--serif); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.promo-frame {
  position: relative;
  background: #102e27;
  border-radius: 22px;
  min-height: 420px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(22, 62, 52, 0.18);
}
.promo-video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #102e27;
  border-radius: 0;
}
.promo-fallback { color: #f9f8f2; padding: 32px; min-height: 420px; display: grid; align-content: center; }
.promo-fallback .eyebrow { color: #f2d2b5; }
.term-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
.term-card.locked { background: #f3f1ea; }
.term-card .lock { font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--orange); }
.topic-list { margin-top: 24px; }
.topic-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.topic-row h3 { margin: 0; font-size: 20px; }
.curriculum-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.curriculum-table th, .curriculum-table td { text-align: left; padding: 8px 10px 8px 0; vertical-align: top; }
.curriculum-table code { font-size: 13px; }
.subject-link.is-active { text-decoration: underline; }
.studio-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.studio-nav a { font-size: 13px; font-weight: 700; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--border); }
.studio-nav a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.studio-topic { padding: 20px 0; border-bottom: 1px solid var(--border); }
.studio-form { display: grid; gap: 12px; max-width: 720px; }
.studio-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 650; }
.studio-form input, .studio-form select, .studio-form textarea { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: #fffef8; }
.studio-form-inline { max-width: none; }
.studio-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-top: 12px; }
.studio-ad-preview { display: block; width: min(100%, 420px); max-height: 240px; margin: 12px 0; border-radius: 12px; background: #111; }
@media (max-width: 980px) {
  .ad-stage-media { grid-template-columns: 1fr; }
  .promo-frame, .promo-video, .promo-fallback, .promo-banner { min-height: 0; }
  .promo-video { min-height: 240px; }
  .promo-banner { min-height: 0; }
  .signup-panel .form { grid-template-columns: 1fr 1fr; }
  .signup-span-2 { grid-column: span 2; }
}
@media (max-width: 800px) {
  .term-grid, .topic-row { grid-template-columns: 1fr; }
  .hero, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .nav-menu { display: block; }
  .header-inner {
    display: grid;
    grid-template-columns: minmax(auto, 1fr) auto auto;
    align-items: center;
    min-height: 72px;
    gap: 8px;
  }
  .brand-mark { width: 32px; height: 42px; }
  .brand-name { font-size: 17px; }
  .brand-tagline { letter-spacing: 1px; font-size: 8px; }
  .sign-out-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .signup-panel { padding: 22px 18px; }
  .signup-panel .form, .signup-span-2 { grid-template-columns: 1fr; grid-column: auto; }
  .promo-banner { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
