:root {
  --cream: #FAF7F2;
  --white: #FFFFFF;
  --navy-deep: #001d39;
  --navy: #0a4174;
  --navy-mid: #1F2A44;
  --navy-muted: #49769f;
  --text-2: #5A6882;
  --gold: #C6A75E;
  --gold-deep: #A07B3D;
  --sky: #7bbde8;
  --line: rgba(31, 42, 68, 0.08);
  --line-strong: rgba(31, 42, 68, 0.14);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 12px 32px -8px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 10px 30px -10px rgba(15, 23, 42, 0.18), 0 30px 60px -20px rgba(15, 23, 42, 0.18);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Inter", Arial, sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", "Roboto Mono", ui-monospace, monospace;

  --maxw: 1200px;
  --pad: 24px;
  --section-py: 120px;
}

[data-density="compact"] {
  --section-py: 84px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--navy-mid);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* ───── Logo ───── */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, #001d39 0%, #0a4174 50%, #2a8fb8 100%);
  flex: none; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 4px 10px -2px rgba(0, 29, 57, 0.35);
}
.logo-mark::before, .logo-mark::after { content: none; }
.logo-text { font-weight: 700; letter-spacing: -0.01em; font-size: 17px; color: var(--navy-deep); }

/* ───── Nav ───── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(250, 247, 242, 0.92); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-link {
  font-size: 14px; color: var(--text-2); font-weight: 500;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--navy-deep); }
.nav-cta { display: flex; gap: 12px; align-items: center; }

/* ───── Buttons ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 0.08s ease, background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, #0a4174 0%, #001d39 100%);
  color: white;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 6px 16px -4px rgba(0, 29, 57, 0.35);
}
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.22) inset, 0 10px 22px -6px rgba(0, 29, 57, 0.45); }
.btn-secondary {
  background: var(--white); color: var(--navy-deep);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: rgba(31, 42, 68, 0.25); }
.btn-ghost { background: transparent; color: var(--navy-deep); height: 40px; padding: 0 14px; }
.btn-ghost:hover { background: rgba(31, 42, 68, 0.05); }
.btn-sm { height: 36px; font-size: 13.5px; padding: 0 14px; border-radius: 8px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 15.5px; border-radius: 12px; }

/* ───── Eyebrow / pill ───── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 12px; border-radius: 999px;
  background: rgba(198, 167, 94, 0.12);
  border: 1px solid rgba(198, 167, 94, 0.28);
  color: var(--gold-deep);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--gold);
  box-shadow: 0 0 0 3px rgba(198, 167, 94, 0.18);
  animation: pulseGold 2.4s ease-in-out infinite;
}
@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 0 3px rgba(198, 167, 94, 0.18); }
  50% { box-shadow: 0 0 0 5px rgba(198, 167, 94, 0.04); }
}

/* ───── Hero ───── */
.hero {
  position: relative;
  padding: 96px 0 60px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: -10% 0 auto 0; height: 720px;
  background: radial-gradient(60% 60% at 50% 0%, rgba(87, 86, 214, 0.11), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.05fr 1.1fr; gap: 64px; align-items: center;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

.h1 {
  font-size: clamp(40px, 5.6vw, 76px);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.02;
  color: var(--navy-deep);
  margin: 24px 0 24px;
}
.h1 .italic {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.h1 .underline-mark {
  position: relative; display: inline-block;
}
.h1 .underline-mark::after {
  content: ""; position: absolute; left: 2%; right: 2%; bottom: 0.04em; height: 0.18em;
  background: linear-gradient(90deg, rgba(198,167,94,0.0), rgba(198,167,94,0.55) 20%, rgba(198,167,94,0.55) 80%, rgba(198,167,94,0.0));
  border-radius: 2px;
  z-index: -1;
}

.lede {
  font-size: 19px; line-height: 1.55; color: var(--text-2);
  max-width: 540px; margin: 0 0 36px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-trust {
  margin-top: 28px; display: flex; align-items: center; gap: 14px;
  color: var(--text-2); font-size: 13.5px;
}
.avatars { display: flex; }
.avatars > span {
  width: 28px; height: 28px; border-radius: 999px;
  border: 2px solid var(--cream); margin-left: -8px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: white;
}
.avatars > span:first-child { margin-left: 0; }

.stars { display: inline-flex; gap: 1px; color: var(--gold); }
.stars svg { width: 14px; height: 14px; }

/* ───── Section ───── */
section.section {
  padding: var(--section-py) 0;
  position: relative;
}
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 720px; margin: 0 auto 64px; text-align: center; }
.section-head .eyebrow { margin-bottom: 18px; }
.h2 {
  font-size: clamp(32px, 3.8vw, 52px);
  font-weight: 800; letter-spacing: -0.025em; line-height: 1.05;
  color: var(--navy-deep); margin: 0 0 18px;
}
.h2 .italic { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--navy); }
.h3 {
  font-size: 19px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--navy-deep); margin: 0 0 8px;
}
.section-sub { font-size: 17px; color: var(--text-2); margin: 0; }

/* ───── Stats ───── */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  padding: 36px 28px;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
}
.stat:last-child { border-right: 0; }
@media (max-width: 720px) {
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
.stat-num {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 56px; line-height: 1; color: var(--navy-deep); letter-spacing: -0.02em;
}
.stat-num .plus { font-family: var(--font-sans); font-style: normal; font-weight: 700; font-size: 0.55em; vertical-align: super; color: var(--gold); margin-left: 2px; }
.stat-label { font-size: 13.5px; color: var(--text-2); margin-top: 6px; }

/* ───── Features ───── */
.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 920px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feat {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 16px; padding: 28px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.feat:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(10, 65, 116, 0.07);
  color: var(--navy);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 14px;
}
.feat-icon.gold { background: rgba(198, 167, 94, 0.12); color: var(--gold-deep); }
.feat p { color: var(--text-2); margin: 0; font-size: 14.5px; line-height: 1.55; }

/* ───── Curriculum ───── */
.curr-grid {
  display: grid; grid-template-columns: 280px 1fr; gap: 32px;
}
@media (max-width: 880px) { .curr-grid { grid-template-columns: 1fr; } }
.curr-tabs {
  display: flex; flex-direction: column; gap: 4px;
}
.curr-tab {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: 10px;
  background: transparent; border: 1px solid transparent;
  cursor: default; text-align: left;
  color: var(--text-2); font-size: 14.5px; font-weight: 500;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.curr-tab:hover { background: rgba(10, 65, 116, 0.04); color: var(--navy-deep); }
.curr-tab.active {
  background: var(--white); color: var(--navy-deep); border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.curr-tab .num { font-family: var(--font-mono); font-size: 12px; color: var(--navy-muted); }
.curr-tab.active .num { color: var(--gold-deep); }
.curr-panel {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 16px; padding: 32px;
}
.curr-meta { display: flex; gap: 18px; color: var(--text-2); font-size: 13px; margin: 8px 0 22px; }
.curr-meta span { display: inline-flex; align-items: center; gap: 6px; }
.curr-meta .dot { width: 4px; height: 4px; border-radius: 999px; background: var(--gold); }
.curr-lessons { display: flex; flex-direction: column; gap: 2px; }
.curr-lesson {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.curr-lesson:last-child { border-bottom: 0; }
.curr-lesson-num {
  font-family: var(--font-mono); font-size: 12px; color: var(--navy-muted);
  width: 32px; flex: none;
}
.curr-lesson-title { flex: 1; font-size: 14.5px; font-weight: 500; color: var(--navy-deep); }
.curr-lesson-formula {
  font-family: var(--font-mono); font-size: 12px; color: var(--gold-deep);
  background: rgba(198, 167, 94, 0.08);
  padding: 3px 8px; border-radius: 5px;
}
.curr-lesson-time { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ───── Pricing ───── */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.price-grid-pro { grid-template-columns: 1fr 1.18fr 1fr; align-items: stretch; }
@media (max-width: 880px) { .price-grid-pro { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }
.price-amount-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-old {
  font-size: 22px; color: var(--text-2);
  text-decoration: line-through;
  text-decoration-color: rgba(198, 167, 94, 0.7);
  text-decoration-thickness: 2px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price.featured .price-old { color: rgba(255,255,255,0.55); }
.price-savings {
  font-size: 12px; font-weight: 600;
  color: var(--gold);
  margin-top: -8px;
  letter-spacing: 0.01em;
}
.price-feat.off { color: var(--text-2); opacity: 0.7; }
.price-feat.off span { text-decoration: line-through; text-decoration-color: rgba(31, 42, 68, 0.25); }
.price-feat.off svg { color: rgba(31, 42, 68, 0.3); }
.price.featured .price-feat.off { color: rgba(255, 255, 255, 0.45); }
.price.featured .price-feat.off svg { color: rgba(255, 255, 255, 0.3); }
.price-feat.strong { font-weight: 600; color: var(--navy-deep); }
.price.featured .price-feat.strong { color: white; }
.price-proof {
  margin-top: -6px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
}
.price-proof-dot {
  width: 7px; height: 7px; border-radius: 999px; background: #61C554;
  box-shadow: 0 0 0 3px rgba(97, 197, 84, 0.25);
  animation: pulseGold 2s ease-in-out infinite;
}
.price-guarantee {
  margin-top: 28px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 14px; color: var(--text-2);
  padding: 14px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: 540px; margin-left: auto; margin-right: auto;
}
.price-guarantee svg { color: var(--gold-deep); flex: none; }
.price-guarantee b { color: var(--navy-deep); }

/* Curriculum lock pills + upsell */
.curr-lock-pill {
  font-family: var(--font-sans);
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #C6A75E, #A07B3D);
  color: white;
  padding: 2px 7px; border-radius: 999px;
}
.curr-lock-pill.big { font-size: 11px; padding: 4px 10px; }
.curr-tab.is-locked { position: relative; }
.curr-tab.is-locked .num:first-child { color: var(--gold-deep); }
.curr-upsell {
  margin-top: 12px;
  padding: 16px;
  background: linear-gradient(160deg, rgba(198, 167, 94, 0.14), rgba(198, 167, 94, 0.06));
  border: 1px solid rgba(198, 167, 94, 0.3);
  border-radius: 12px;
}
.curr-upsell-h { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 6px; }
.curr-upsell p { font-size: 13px; color: var(--navy-mid); margin: 0 0 12px; line-height: 1.5; }

/* CTA proof */
.cta-proof {
  margin-top: 24px;
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px; color: rgba(255, 255, 255, 0.75);
}
.cta-proof .avatars > span { border-color: #1F2A44; }
@media (max-width: 880px) { .price-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }
.price {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 18px; padding: 32px;
  display: flex; flex-direction: column; gap: 18px;
  position: relative;
}
.price.featured {
  background: var(--navy-deep); color: white;
  border-color: var(--navy-deep);
  box-shadow: var(--shadow-lg);
}
.price.featured .price-name, .price.featured .price-tagline,
.price.featured .price-amount, .price.featured .price-feat,
.price.featured .price-per { color: white; }
.price.featured .price-feat svg { color: var(--gold); }
.price-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--navy-deep);
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
}
.price-name { font-size: 14px; font-weight: 600; color: var(--text-2); letter-spacing: 0.02em; text-transform: uppercase; }
.price-tagline { font-size: 14px; color: var(--text-2); }
.price-amount {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 56px; line-height: 1; color: var(--navy-deep); letter-spacing: -0.02em;
  white-space: nowrap;
}
.price-per { font-family: var(--font-sans); font-style: normal; font-size: 14px; color: var(--text-2); margin-left: 4px; white-space: nowrap; }
.price-feats { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.price-feat { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--navy-mid); }
.price-feat svg { width: 16px; height: 16px; color: var(--gold-deep); flex: none; margin-top: 2px; }

/* ───── FAQ ───── */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-q {
  width: 100%; background: transparent; border: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 0; cursor: default;
  text-align: left; color: var(--navy-deep);
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
}
.faq-q:hover { color: var(--navy); }
.faq-icon {
  width: 24px; height: 24px; flex: none; position: relative;
  color: var(--text-2);
}
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; background: currentColor;
  border-radius: 1px; left: 50%; top: 50%; transition: transform 0.25s ease;
}
.faq-icon::before { width: 12px; height: 1.5px; transform: translate(-50%, -50%); }
.faq-icon::after { width: 1.5px; height: 12px; transform: translate(-50%, -50%); }
.faq-item.open .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
.faq-a {
  max-height: 0; overflow: hidden;
  color: var(--text-2); font-size: 15px; line-height: 1.6;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-a { max-height: 320px; padding: 0 0 22px; }

/* ───── Final CTA ───── */
.cta {
  position: relative;
  background: #1F2A44;
  border-radius: 24px;
  padding: 80px 60px;
  overflow: hidden;
  color: white;
  text-align: center;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(40% 60% at 88% 12%, rgba(87, 86, 214, 0.34), transparent 70%),
    radial-gradient(40% 60% at 12% 88%, rgba(87, 86, 214, 0.34), transparent 70%);
  pointer-events: none;
}
.cta::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(60% 60% at 50% 50%, black, transparent 80%);
  pointer-events: none;
}
.cta > * { position: relative; z-index: 1; }
.cta h2 {
  font-size: clamp(32px, 4.4vw, 60px);
  font-weight: 800; letter-spacing: -0.025em; line-height: 1.05;
  margin: 0 0 18px;
}
.cta h2 .italic { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: #cbd5e1; }
.cta p { font-size: 18px; color: rgba(255,255,255,0.75); margin: 0 auto 32px; max-width: 540px; }
.cta .btn-primary {
  background: white; color: var(--navy-deep);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.4);
}
.cta .btn-primary:hover { background: var(--cream); }
.cta .btn-ghost { color: white; }
.cta .btn-ghost:hover { background: rgba(255,255,255,0.08); }

/* ───── Footer ───── */
footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
  background: var(--cream);
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px;
  margin-bottom: 36px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h4 {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--navy-deep);
  margin: 0 0 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--text-2); }
.footer-col a:hover { color: var(--navy-deep); }
.footer-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--line);
  color: var(--text-2); font-size: 13px;
}

/* ───── Accent variants ───── */
[data-accent="gold"] .btn-primary {
  background: linear-gradient(180deg, #C6A75E 0%, #A07B3D 100%);
  color: var(--navy-deep);
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 6px 16px -4px rgba(160, 123, 61, 0.4);
}
[data-accent="gold"] .price.featured {
  background: linear-gradient(160deg, #1F2A44 0%, #001d39 100%);
}

/* ───── Hero spreadsheet (animated) ───── */
.hsheet {
  position: relative;
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-size: 13px;
  transform: rotate(0deg);
}
.hsheet-chrome {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #f4f1ec, #ece8e1);
  border-bottom: 1px solid var(--line);
}
.hsheet-dots { display: flex; gap: 6px; }
.hsheet-dots span { width: 11px; height: 11px; border-radius: 999px; background: rgba(31,42,68,0.18); }
.hsheet-dots span:first-child { background: #ED6A5E; }
.hsheet-dots span:nth-child(2) { background: #F4BF4F; }
.hsheet-dots span:nth-child(3) { background: #61C554; }
.hsheet-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px; border-radius: 6px;
  background: rgba(31, 42, 68, 0.05);
  font-size: 12px; color: var(--navy-mid); font-weight: 500;
}
.hsheet-tab-icon { width: 12px; height: 12px; border-radius: 3px;
  background: linear-gradient(135deg, #001d39, #0a4174);
}
.hsheet-share {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--text-2);
}
.hsheet-share-dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: #61C554;
  box-shadow: 0 0 0 3px rgba(97, 197, 84, 0.18);
}
.hsheet-tools {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--text-2);
  background: var(--white);
}
.hsheet-tool {
  display: inline-flex; align-items: center; justify-content: center;
  height: 24px; min-width: 24px; padding: 0 6px;
  border-radius: 5px;
  font-family: var(--font-mono); font-size: 11.5px;
}
.hsheet-tool:hover { background: rgba(31, 42, 68, 0.06); }
.hsheet-tool.bold { font-weight: 700; font-family: var(--font-sans); }
.hsheet-tool.ital { font-style: italic; font-family: var(--font-sans); }
.hsheet-tool.under { text-decoration: underline; font-family: var(--font-sans); }
.hsheet-tool.fx { font-style: italic; color: var(--gold-deep); font-family: var(--font-serif); font-size: 14px; }
.hsheet-tool-sep { width: 1px; height: 16px; background: var(--line); }

.hsheet-fbar {
  display: grid; grid-template-columns: 60px 32px 1fr; align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  height: 36px;
}
.hsheet-fbar-cell {
  height: 100%;
  display: grid; place-items: center;
  border-right: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px;
  color: var(--navy-deep); font-weight: 500;
  background: rgba(31, 42, 68, 0.03);
}
.hsheet-fbar-fx {
  font-family: var(--font-serif); font-style: italic;
  color: var(--text-2);
  border-right: 1px solid var(--line);
  display: grid; place-items: center; height: 100%;
  font-size: 14px;
}
.hsheet-fbar-input {
  display: flex; align-items: center; padding: 0 12px;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--navy-deep); min-height: 100%;
  position: relative;
}
.hsheet-fbar-input.is-result { color: var(--navy-deep); }
.caret {
  display: inline-block; width: 1.5px; height: 14px;
  background: var(--navy-deep); margin-left: 1px;
  opacity: 0; transition: opacity 0.05s;
}
.caret.on { opacity: 1; }

/* Grid */
.hsheet-grid {
  display: grid;
  grid-template-columns: 36px repeat(6, 1fr);
}
.hsheet-corner {
  background: rgba(31, 42, 68, 0.04);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  height: 26px;
}
.hsheet-colhdr {
  background: rgba(31, 42, 68, 0.04);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 11px; color: var(--text-2);
  display: grid; place-items: center;
  height: 26px;
  font-weight: 500;
}
.hsheet-rowhdr {
  background: rgba(31, 42, 68, 0.04);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 11px; color: var(--text-2);
  display: grid; place-items: center;
  height: 32px;
  font-weight: 500;
}
.hsheet-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  height: 32px;
  display: flex; align-items: center;
  padding: 0 10px;
  font-size: 13px; color: var(--navy-mid);
  position: relative;
  background: var(--white);
  overflow: hidden;
}
.hsheet-cell.is-num { font-variant-numeric: tabular-nums; justify-content: flex-end; color: var(--navy-deep); }
.hsheet-cell.is-header { background: rgba(31, 42, 68, 0.025); font-weight: 600; color: var(--navy-deep); }
.hsheet-cell.is-active {
  outline: 2px solid var(--navy);
  outline-offset: -2px;
  z-index: 2;
  background: rgba(10, 65, 116, 0.04);
}
.hsheet-cell.is-success {
  outline: 2px solid #61C554;
  outline-offset: -2px;
  z-index: 2;
  background: rgba(97, 197, 84, 0.08);
  animation: cellPop 0.4s ease;
}
.hsheet-cell.is-lookup-key {
  background: rgba(198, 167, 94, 0.12);
  color: var(--gold-deep);
  font-weight: 500;
}
.hsheet-cell.is-lookup-row {
  background: rgba(123, 189, 232, 0.18);
  animation: rowPulse 0.6s ease;
}
@keyframes cellPop { 0% { transform: scale(0.96); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes rowPulse { 0% { background: rgba(123, 189, 232, 0); } 100% { background: rgba(123, 189, 232, 0.18); } }
.hsheet-typing { font-family: var(--font-mono); font-size: 11.5px; color: var(--navy-deep); white-space: nowrap; overflow: hidden; }
.hsheet-result { font-variant-numeric: tabular-nums; font-weight: 500; }

/* Tooltips */
.hsheet-tip {
  position: absolute;
  font-size: 12px; font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--navy-deep); color: white;
  display: inline-flex; align-items: center; gap: 6px;
  pointer-events: none;
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: var(--shadow-md);
}
.hsheet-tip.show { opacity: 1; transform: translateY(0); }
.hsheet-tip-typing { top: 110px; right: 18px; }
.hsheet-tip-typing .hsheet-tip-dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--gold);
  animation: pulseGold 1.2s ease-in-out infinite;
}
.hsheet-tip-success {
  bottom: 18px; right: 18px;
  background: #1f8a5b;
}
.hsheet-tip-success b { font-family: var(--font-mono); font-weight: 600; margin-left: 2px; }

/* Formula token coloring */
.ff { font-family: var(--font-mono); }
.ff-eq { color: var(--text-2); }
.ff-fn { color: var(--navy); font-weight: 600; }
.ff-ref { color: #2a8fb8; }
.ff-num { color: var(--gold-deep); }
.ff-kw { color: #7A5AE0; font-weight: 500; }
.ff-punct, .ff-paren { color: var(--text-2); }
.ff-plain { color: var(--navy-deep); }
.ff-compact { font-size: 11.5px; }

/* ───── Lesson playground ───── */
.lp {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  max-width: 1080px;
  margin: 0 auto;
}
.lp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #faf7f2, #fff);
}
.lp-step { font-family: var(--font-mono); font-size: 11px; color: var(--gold-deep); letter-spacing: 0.05em; text-transform: uppercase; }
.lp-title { font-size: 18px; font-weight: 700; color: var(--navy-deep); margin-top: 2px; letter-spacing: -0.01em; }
.lp-progress { display: flex; align-items: center; gap: 12px; }
.lp-progress-bar {
  width: 160px; height: 6px; border-radius: 999px;
  background: rgba(31, 42, 68, 0.08); overflow: hidden;
}
.lp-progress-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  transition: width 0.5s ease;
}
.lp-progress-num { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }

.lp-body { display: grid; grid-template-columns: 320px 1fr; }
@media (max-width: 880px) { .lp-body { grid-template-columns: 1fr; } }

.lp-prompt {
  padding: 28px;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 16px;
}
@media (max-width: 880px) { .lp-prompt { border-right: 0; border-bottom: 1px solid var(--line); } }
.lp-prompt-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-deep); }
.lp-prompt-text { font-size: 16px; color: var(--navy-deep); line-height: 1.5; margin: 0; font-weight: 500; }
.lp-checks { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.lp-check {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; color: var(--text-2);
  padding: 8px 12px; border-radius: 8px;
  background: rgba(31, 42, 68, 0.03);
  transition: background 0.2s, color 0.2s;
}
.lp-check svg { color: rgba(31, 42, 68, 0.25); transition: color 0.2s; }
.lp-check.ok { color: var(--navy-deep); background: rgba(97, 197, 84, 0.10); }
.lp-check.ok svg { color: #1f8a5b; }
.lp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.lp-hint {
  background: rgba(198, 167, 94, 0.10);
  border: 1px solid rgba(198, 167, 94, 0.28);
  border-radius: 10px;
  padding: 14px 16px;
}
.lp-hint-h { font-size: 12px; font-weight: 700; color: var(--gold-deep); margin-bottom: 6px; }
.lp-hint p { margin: 0 0 8px; font-size: 13.5px; color: var(--navy-mid); line-height: 1.5; }
.lp-hint-code { font-family: var(--font-mono); font-size: 12px; color: var(--gold-deep); background: rgba(198, 167, 94, 0.12); padding: 3px 8px; border-radius: 4px; display: inline-block; }

.lp-sheet { background: var(--white); display: flex; flex-direction: column; min-height: 480px; }
.lp-fbar {
  display: grid; grid-template-columns: 56px 32px 1fr; align-items: center;
  height: 38px;
  border-bottom: 1px solid var(--line);
  background: rgba(31, 42, 68, 0.02);
}
.lp-fbar-cell {
  height: 100%;
  display: grid; place-items: center;
  border-right: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px;
  color: var(--navy-deep); font-weight: 500;
}
.lp-fbar-fx {
  font-family: var(--font-serif); font-style: italic;
  color: var(--text-2);
  border-right: 1px solid var(--line);
  display: grid; place-items: center; height: 100%;
  font-size: 14px;
}
.lp-fbar-input {
  display: flex; align-items: center; padding: 0 12px;
  font-family: var(--font-mono); font-size: 13px;
  height: 100%;
  cursor: text;
  background: var(--white);
}
.lp-fbar-real {
  font-family: var(--font-mono); font-size: 13px;
  border: 0; outline: 0; background: transparent;
  width: 100%; padding: 0;
  color: var(--navy-deep);
}

.lp-grid {
  display: grid;
  grid-template-columns: 36px repeat(4, 1fr);
  flex: 1;
}
.lp-corner, .lp-colhdr, .lp-rowhdr {
  background: rgba(31, 42, 68, 0.03);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 11px; color: var(--text-2);
  display: grid; place-items: center;
  font-weight: 500;
}
.lp-colhdr, .lp-corner { height: 26px; }
.lp-rowhdr { transition: background 0.15s, color 0.15s; }
.lp-rowhdr.is-active { background: rgba(10, 65, 116, 0.10); color: var(--navy-deep); font-weight: 600; }
.lp-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
  display: flex; align-items: center;
  font-size: 13.5px;
  color: var(--navy-mid);
  background: var(--white);
  cursor: cell;
  position: relative;
  min-height: 36px;
}
.lp-cell.is-num { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.lp-cell.is-header {
  background: rgba(31, 42, 68, 0.025);
  font-weight: 600; color: var(--navy-deep);
}
.lp-cell.is-target {
  background: rgba(198, 167, 94, 0.10);
}
.lp-cell.is-target::after {
  content: ""; position: absolute; inset: 4px;
  border: 1.5px dashed var(--gold);
  border-radius: 4px;
  pointer-events: none;
  animation: dashSpin 1.6s ease-in-out infinite alternate;
}
@keyframes dashSpin {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}
.lp-cell.is-selected {
  outline: 2px solid var(--navy);
  outline-offset: -2px;
  z-index: 2;
  background: rgba(10, 65, 116, 0.05);
}
.lp-cell.is-selected.is-target::after { display: none; }
.lp-cell.is-success {
  background: rgba(97, 197, 84, 0.10);
  outline: 2px solid #61C554;
  outline-offset: -2px;
  z-index: 2;
}
.lp-cell-edit { font-family: var(--font-mono); font-size: 12.5px; }
.lp-err { color: #c0392b; font-family: var(--font-mono); font-size: 12px; }

.lp-statusbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--text-2);
  background: rgba(31, 42, 68, 0.02);
}
.lp-ok { color: #1f8a5b; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.lp-statusbar kbd {
  font-family: var(--font-mono); font-size: 10.5px;
  padding: 1px 5px; border-radius: 3px;
  background: var(--white);
  border: 1px solid var(--line-strong);
  color: var(--navy-mid);
}

/* ───── Italic line toggle ───── */
[data-italic="off"] .h1 .italic,
[data-italic="off"] .h2 .italic {
  font-family: var(--font-sans); font-style: normal; font-weight: 800;
}
