/* AANP FNP Mastery, 2026 redesign. Sits on top of the original stylesheet.
   Surface white, content ink, action violet, gold only for the monitor and accents.
   Contrast on white: ink #1B1533 16.6:1, slate #565069 7.4:1, violet #4A2BC2 8.2:1, gold-ink #7A5D10 6.0:1. */
:root {
  --cream: #ffffff; --cream-deep: #f5f3fb; --cream-card: #ffffff;
  --purple: #2a1760; --purple-deep: #1e1049; --purple-light: #4a2bc2;
  --gold: #c9a84c; --gold-light: #e9c766; --gold-deep: #7a5d10;
  --ink: #1b1533; --ink-soft: #565069; --line: rgba(27, 21, 51, .1);
  --violet: #4a2bc2; --mist: #f5f3fb; --aubergine: #1e1049;
  --shadow-sm: 0 1px 2px rgba(30, 16, 73, .05);
  --shadow-md: 0 8px 24px rgba(30, 16, 73, .08);
  --shadow-lg: 0 24px 60px rgba(30, 16, 73, .16);
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Hanken Grotesk", "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Newsreader", "New York", Georgia, serif;
  --spring: cubic-bezier(.2, .8, .2, 1);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
}

/* Base: mobile details */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; background: #fff; }
body { font-family: var(--ui); color: var(--ink); min-height: 100dvh; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, a, input, select, textarea { touch-action: manipulation; }
input, select, textarea { font-size: 16px !important; } /* stops iOS zooming into fields */
:focus-visible { outline: 2.5px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, .section-title, .serif { font-family: var(--display); font-weight: 400; letter-spacing: -.015em; }
h1 em, h2 em, h3 em, .section-title em { font-style: normal; color: inherit; }
.eyebrow { display: none; }
.mono, .chapter-card-num, .quiz-card-week { font-family: var(--ui); letter-spacing: 0; text-transform: none; }
video, audio { max-width: 100%; }

/* Buttons */
.btn-main, .btn-quiet {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px; border-radius: 14px; border: 0; cursor: pointer;
  font: 600 17px/1.2 var(--ui); text-decoration: none; text-align: center;
  transition: transform .18s var(--spring), background-color .18s, box-shadow .18s, opacity .18s;
}
.btn-main { background: var(--violet); color: #fff; box-shadow: 0 8px 22px rgba(74, 43, 194, .28); }
.btn-main:hover { background: #3f23ab; }
.btn-main:active, .btn-quiet:active { transform: scale(.97); }
.btn-main[disabled] { opacity: .42; box-shadow: none; cursor: not-allowed; }
.btn-quiet { background: var(--mist); color: var(--ink); }
.btn-quiet:hover { background: #ebe7f7; }
.wide { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--violet); font: inherit; text-decoration: underline; cursor: pointer; }

/* Top navigation */
.topnav {
  position: sticky; top: 0; z-index: 900; padding-top: var(--sat);
  background: rgba(255, 255, 255, .78); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.nav-inner { max-width: 1160px; margin: 0 auto; padding: 0 max(20px, var(--sal)); min-height: 56px; display: flex; align-items: center; gap: 20px; }
.nav-brand { font: 500 20px/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.nav-brand .accent { color: var(--violet); }
.nav-links { display: flex; gap: 4px; margin: 0 auto 0 12px; padding: 0; list-style: none; }
.nav-links a { padding: 8px 12px; border-radius: 10px; color: var(--ink-soft); font: 500 15px/1 var(--ui); text-decoration: none; text-transform: none; letter-spacing: 0; transition: color .15s, background-color .15s; }
.nav-links a:hover { background: var(--mist); color: var(--ink); }
.nav-links a.active { color: var(--violet); background: #eeebfb; }
.nav-links a::after { display: none !important; }
.nav-help { background: none; border: 1px solid var(--line); border-radius: 10px; min-height: 36px; padding: 0 12px; font: 500 14px/1 var(--ui); color: var(--ink); cursor: pointer; white-space: nowrap; }
.nav-help:hover { background: var(--mist); }
.nav-toggle, .nav-cta { display: none !important; }
.auth-pill { background: var(--ink); color: #fff; border: 0; border-radius: 10px; min-height: 36px; padding: 0 14px; font: 600 14px/1 var(--ui); margin: 0; letter-spacing: 0; text-transform: none; }
.auth-pill:hover { background: var(--violet); color: #fff; }
.auth-pill.signed-in { background: var(--mist); color: var(--ink); }

/* Bottom tab bar on phones. Blur stays on this floating layer only. */
.tabbar { display: none; }
@media (max-width: 760px) {
  .nav-links, .nav-help { display: none !important; }
  .nav-inner { min-height: 50px; justify-content: space-between; gap: 10px; }
  .auth-pill { margin-left: auto; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; z-index: 950; left: 0; right: 0; bottom: 0;
    padding: 6px max(6px, var(--sal)) calc(6px + var(--sab)) max(6px, var(--sar));
    background: rgba(255, 255, 255, .82); border-top: 1px solid var(--line);
    -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 46px; color: #6d6783; text-decoration: none; font: 500 11px/1.1 var(--ui); border-radius: 10px; }
  .tabbar a.active { color: var(--violet); }
  .tabbar svg { width: 24px; height: 24px; }
  body { padding-bottom: calc(62px + var(--sab)); }
  body.view-quiz .tabbar:has(~ .quiz-page .quiz-timer), body.in-test .tabbar { display: none; }
  #amaBtn { bottom: calc(74px + var(--sab)) !important; right: 14px !important; width: 50px !important; height: 50px !important; }
}

/* View switching for the new pages */
#homePage, .account-page, #toolkitMount { display: none; }
body.view-page-home #homePage { display: block; }
body.view-page-account .account-page { display: block; }
body.view-page-plan #toolkitMount { display: block; }
body.view-page-home > section.faq { display: block !important; }
body.view-page-plan #toolkitMount > section { display: block !important; }
body.view-chapter #homePage, body.view-quiz #homePage, body.view-blog #homePage { display: none; }
::view-transition-old(root) { animation: vt-out .16s ease both; }
::view-transition-new(root) { animation: vt-in .28s var(--spring) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

/* Reveal */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--spring), transform .7s var(--spring); }
.rv.in { opacity: 1; transform: none; }

/* Home: hero and bedside monitor */
.hm-wrap { max-width: 1120px; margin: 0 auto; padding: 0 max(22px, var(--sal)); }
.hm-hero { padding: clamp(40px, 9vh, 96px) 0 0; text-align: center; overflow: hidden; }
.hm-title { font: 300 clamp(46px, 9.4vw, 112px)/.98 var(--display); letter-spacing: -.03em; margin: 0 auto; max-width: 13ch; color: var(--ink); animation: rise .9s var(--spring) both; }
.hm-lede { font-size: clamp(18px, 2.1vw, 22px); line-height: 1.45; color: var(--ink-soft); max-width: 36em; margin: 22px auto 0; animation: rise .9s .08s var(--spring) both; }
.hm-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; animation: rise .9s .16s var(--spring) both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
.hm-monitor-stage { --p: 0; padding: clamp(36px, 7vh, 72px) max(14px, var(--sal)) clamp(48px, 9vh, 96px); animation: rise 1.1s .24s var(--spring) both; }
.hm-monitor {
  max-width: 1040px; margin: 0 auto; border-radius: clamp(22px, 3vw, 34px); color: #fff;
  background: radial-gradient(120% 140% at 50% 0%, #2c1a70 0%, #1e1049 62%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .08);
  padding: clamp(18px, 3vw, 32px);
  transform: scale(calc(.9 + .1 * var(--p)));
  will-change: transform;
}
.hm-monitor-top { display: flex; justify-content: space-between; align-items: center; font-size: clamp(14px, 1.6vw, 17px); color: rgba(255, 255, 255, .72); }
.hm-monitor-clock { font-variant-numeric: tabular-nums; color: #e9c766; font-weight: 600; }
.hm-ecg { display: block; width: 100%; height: clamp(120px, 24vw, 240px); margin: 10px 0 6px; }
.hm-vitals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: clamp(12px, 2vw, 20px); text-align: left; }
.hm-vitals b { display: block; font: 300 clamp(26px, 5.4vw, 56px)/1 var(--display); font-variant-numeric: tabular-nums; color: #fff; letter-spacing: -.02em; }
.hm-vitals span { display: block; margin-top: 6px; font-size: clamp(12.5px, 1.5vw, 15px); color: rgba(255, 255, 255, .72); }

/* Home: three ways to study, phone stays while the text moves */
.hm-three { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 1120px; margin: 0 auto; padding: 40px max(22px, var(--sal)) 80px; align-items: start; }
.hm-three-stage { position: sticky; top: calc(84px + var(--sat)); display: flex; justify-content: center; }
.hm-phone { position: relative; width: min(300px, 74vw); aspect-ratio: 9 / 18.6; border-radius: 44px; background: #fff; box-shadow: 0 0 0 9px #1b1533, var(--shadow-lg); overflow: hidden; }
.hm-phone::before { content: ""; position: absolute; top: 12px; left: 50%; width: 84px; height: 24px; margin-left: -42px; background: #1b1533; border-radius: 14px; z-index: 3; }
.hm-phone-screen { position: absolute; inset: 0; padding: 56px 20px 24px; opacity: 0; transform: scale(.97); transition: opacity .45s ease, transform .55s var(--spring); }
.hm-phone-screen.on { opacity: 1; transform: none; }
.ph-title { font: 400 24px/1.15 var(--display); color: var(--ink); margin-bottom: 10px; }
.hm-phone-screen p { font-size: 14px; line-height: 1.45; color: var(--ink-soft); margin: 0 0 12px; }
.ph-pearl { background: #f7f1dd; color: #5a4510 !important; border-radius: 12px; padding: 10px 12px; }
.ph-line { height: 9px; background: var(--mist); border-radius: 5px; margin-bottom: 9px; }
.ph-line.short { width: 62%; }
.ph-wave { display: flex; align-items: center; gap: 4px; height: 120px; margin: 26px 0; }
.ph-wave i { flex: 1; background: var(--violet); border-radius: 3px; height: 100%; transform: scaleY(.25); animation: wave 1.2s ease-in-out infinite alternate; }
.ph-wave i:nth-child(3n) { animation-delay: -.3s; } .ph-wave i:nth-child(3n+1) { animation-delay: -.7s; } .ph-wave i:nth-child(4n) { animation-delay: -1s; animation-duration: .9s; } .ph-wave i:nth-child(5n) { animation-delay: -.5s; animation-duration: 1.5s; }
@keyframes wave { to { transform: scaleY(.95); } }
.ph-play { width: 58px; height: 58px; border-radius: 50%; background: var(--violet); margin: 0 auto; position: relative; }
.ph-play::after { content: ""; position: absolute; left: 22px; top: 18px; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.ph-video { aspect-ratio: 16 / 10; border-radius: 14px; background: linear-gradient(135deg, #2c1a70, #1e1049); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.ph-video-play { width: 0; border-left: 24px solid #e9c766; border-top: 14px solid transparent; border-bottom: 14px solid transparent; }
.ph-track { height: 5px; background: var(--mist); border-radius: 3px; overflow: hidden; margin-bottom: 14px; }
.ph-track span { display: block; height: 100%; width: 100%; background: var(--violet); transform-origin: left; animation: track 9s linear infinite; }
@keyframes track { from { transform: scaleX(.05); } to { transform: scaleX(1); } }
.hm-step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; opacity: .28; transition: opacity .45s ease; }
.hm-step.on { opacity: 1; }
.hm-step h2 { font: 300 clamp(36px, 5vw, 60px)/1.04 var(--display); margin: 0 0 16px; letter-spacing: -.025em; }
.hm-step p { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--ink-soft); margin: 0; max-width: 28em; }
@media (max-width: 760px) {
  .hm-three { grid-template-columns: 1fr; gap: 0; padding-top: 10px; }
  .hm-three-stage { top: calc(60px + var(--sat)); z-index: 1; padding: 14px 0 24px; background: linear-gradient(#fff 88%, rgba(255, 255, 255, 0)); }
  .hm-phone { width: min(190px, 50vw); border-radius: 30px; box-shadow: 0 0 0 6px #1b1533, var(--shadow-md); }
  .hm-phone::before { width: 54px; margin-left: -27px; height: 16px; top: 8px; }
  .hm-phone-screen { padding: 34px 12px 12px; }
  .ph-title { font-size: 17px; margin-bottom: 6px; }
  .hm-phone-screen p { font-size: 10.5px; margin-bottom: 7px; }
  .ph-wave { height: 72px; margin: 12px 0; gap: 2px; }
  .ph-play { width: 38px; height: 38px; }
  .ph-play::after { left: 14px; top: 11px; border-left-width: 13px; border-top-width: 8px; border-bottom-width: 8px; }
  .hm-step { min-height: 52vh; justify-content: flex-start; padding-top: 12px; }
}

/* Home: chapters band */
.hm-band { background: var(--aubergine); color: #fff; padding: clamp(64px, 10vh, 110px) 0; overflow: hidden; }
.hm-band h2 { font: 300 clamp(36px, 6vw, 72px)/1.03 var(--display); letter-spacing: -.025em; margin: 0 0 clamp(30px, 5vh, 52px); max-width: 16ch; color: #fff; }
.hm-marquee { overflow: hidden; margin-bottom: 12px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.hm-marquee-row { display: inline-flex; gap: 10px; white-space: nowrap; animation: drift 52s linear infinite; will-change: transform; }
.hm-marquee.reverse .hm-marquee-row { animation-direction: reverse; animation-duration: 60s; }
@keyframes drift { to { transform: translateX(-50%); } }
.mq-chip { display: inline-block; padding: 12px 18px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 16px; color: #fff; }
.hm-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin: clamp(40px, 7vh, 72px) 0 0; }
.hm-stats div { min-width: 0; }
.hm-stats dd { margin: 0; font: 300 clamp(38px, 6vw, 72px)/1 var(--display); color: #e9c766; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.hm-stats dt { margin-top: 8px; font-size: 15px; color: rgba(255, 255, 255, .76); }
@media (max-width: 760px) { .hm-stats { grid-template-columns: repeat(2, 1fr); gap: 26px 18px; } }

/* Home: exam clock and sample question */
.hm-sim { padding: clamp(64px, 11vh, 120px) 0; }
.hm-sim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 72px); align-items: center; }
.hm-sim h2 { font: 300 clamp(36px, 5.4vw, 64px)/1.04 var(--display); letter-spacing: -.025em; margin: 0 0 16px; }
.hm-sim-copy p { font-size: clamp(18px, 2vw, 20px); line-height: 1.5; color: var(--ink-soft); margin: 0; }
.hm-ring { position: relative; width: 168px; height: 168px; margin-top: 28px; }
.hm-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg, .ring-fg { fill: none; stroke-width: 7; }
.ring-bg { stroke: var(--mist); }
.ring-fg { stroke: var(--violet); stroke-linecap: round; }
.hm-ring-time { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 500 26px/1 var(--ui); font-variant-numeric: tabular-nums; color: var(--ink); }
.hm-q { background: var(--mist); border-radius: 24px; padding: clamp(20px, 3vw, 30px); }
.hm-q-stem { font: 400 clamp(21px, 2.6vw, 26px)/1.25 var(--display); margin: 0 0 18px; color: var(--ink); }
.hm-q-opt { display: block; width: 100%; min-height: 50px; margin-bottom: 8px; padding: 12px 16px; text-align: left; background: #fff; border: 1.5px solid transparent; border-radius: 13px; font: 500 17px/1.3 var(--ui); color: var(--ink); cursor: pointer; transition: transform .15s var(--spring), border-color .15s, background-color .2s; }
.hm-q-opt:hover { border-color: rgba(74, 43, 194, .35); }
.hm-q-opt:active { transform: scale(.985); }
.hm-q-opt.right { background: #e4f6ea; border-color: #1c7c43; color: #125a2f; }
.hm-q-opt.right::after { content: " Correct"; font-weight: 700; }
.hm-q-opt.wrong { background: #fbe9e9; border-color: #b3261e; color: #8c1d18; }
.hm-q-opt.wrong::after { content: " Your answer"; font-weight: 700; }
.hm-q.done .hm-q-opt { cursor: default; }
.hm-q-why { font-size: 16px; line-height: 1.5; color: var(--ink-soft); margin: 14px 0 0; }
@media (max-width: 760px) { .hm-sim-grid { grid-template-columns: 1fr; } }

/* Home: price */
.hm-price { padding: 0 0 clamp(64px, 11vh, 120px); text-align: center; }
.hm-price h2 { font: 300 clamp(36px, 5.6vw, 66px)/1.04 var(--display); letter-spacing: -.025em; margin: 0 0 34px; }
.hm-price-card { position: relative; max-width: 460px; margin: 0 auto; padding: clamp(24px, 4vw, 34px); background: #fff; border-radius: 26px; text-align: left; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.hm-price-amount { display: flex; align-items: baseline; gap: 8px; margin-bottom: 18px; }
.hm-price-amount b { font: 300 72px/1 var(--display); letter-spacing: -.03em; color: var(--ink); }
.hm-price-amount span { font-size: 17px; color: var(--ink-soft); }
.hm-price-card ul { list-style: none; margin: 0 0 22px; padding: 0; }
.hm-price-card li { position: relative; padding: 9px 0 9px 28px; font-size: 17px; line-height: 1.35; border-top: 1px solid var(--line); }
.hm-price-card li::before { content: ""; position: absolute; left: 3px; top: 15px; width: 13px; height: 7px; border-left: 2px solid var(--violet); border-bottom: 2px solid var(--violet); transform: rotate(-45deg); }
.hm-price-card .btn-quiet { margin-top: 8px; }
.hm-price-fine { margin: 14px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }

/* FAQ */
section.faq { background: var(--mist); padding: clamp(56px, 9vh, 96px) max(22px, var(--sal)); }
.faq-inner { max-width: 760px; margin: 0 auto; }
.faq h2 { font: 300 clamp(34px, 5vw, 54px)/1.05 var(--display); letter-spacing: -.02em; margin: 0 0 10px; }
.faq-lede { color: var(--ink-soft); font-size: 16px; margin: 0 0 22px; }
.faq-item { background: #fff; border: 0; border-radius: 14px; margin-bottom: 8px; padding: 0; overflow: hidden; }
.faq-q { position: relative; padding: 16px 44px 16px 18px; font: 600 17px/1.3 var(--ui) !important; color: var(--ink); cursor: pointer; min-height: 52px; }
.faq-q::after { content: ""; position: absolute; right: 20px; top: 22px; width: 9px; height: 9px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(45deg); transition: transform .25s var(--spring); }
.faq-item.open .faq-q::after { transform: translateY(4px) rotate(225deg); }
.faq-a { display: grid; margin: 0; padding: 0 18px; color: var(--ink-soft); font-size: 16px; line-height: 1.55; max-height: 0; overflow: hidden; transition: max-height .32s var(--spring), padding .32s var(--spring); }
.faq-item.open .faq-a { max-height: 420px; padding: 0 18px 18px; }

/* Footer */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 34px max(22px, var(--sal)) calc(34px + var(--sab)); }
.site-footer-inner { max-width: 1120px; margin: 0 auto; }
.footer-logo { font: 500 20px/1 var(--display); color: var(--ink); }
.footer-logo em { font-style: normal; color: var(--violet); }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0; }
.site-footer-links a, .site-footer-links button { display: inline-flex; align-items: center; min-height: 40px; background: none; border: 0; padding: 0; color: var(--ink-soft); font: 500 15px/1 var(--ui); text-decoration: none; cursor: pointer; }
.site-footer-links a:hover, .site-footer-links button:hover { color: var(--violet); }
.site-footer .disclaimer { font-size: 13px; line-height: 1.5; color: var(--ink-soft); max-width: 62em; margin: 0; }
body.view-quiz .site-footer { display: none; }

/* Course page */
section.course { background: #fff !important; padding: clamp(36px, 7vh, 72px) max(20px, var(--sal)) 80px; }
.section-inner { max-width: 1120px; margin: 0 auto; }
.section-header { text-align: left; margin-bottom: 30px; max-width: 720px; }
.section-title { font: 300 clamp(36px, 5.4vw, 62px)/1.05 var(--display) !important; letter-spacing: -.025em !important; color: var(--ink) !important; margin: 0 0 12px; }
.section-lede { font-size: clamp(17px, 2vw, 19px); line-height: 1.5; color: var(--ink-soft) !important; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.chapter-card { position: relative; background: var(--mist) !important; border: 0 !important; border-radius: 22px !important; box-shadow: none !important; padding: 22px !important; cursor: pointer; transition: transform .28s var(--spring), box-shadow .28s var(--spring), opacity .7s var(--spring) !important; }
.chapter-card::before { display: none !important; }
.chapter-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md) !important; }
.chapter-card:active { transform: scale(.985); }
.chapter-card-num { display: flex; align-items: center; justify-content: space-between; font-size: 14px !important; font-weight: 600; color: var(--ink-soft) !important; }
.chapter-free-tag { background: var(--violet); color: #fff; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.chapter-card-tier { display: none !important; }
.chapter-card-title { font: 400 25px/1.15 var(--display) !important; color: var(--ink) !important; margin: 10px 0 8px !important; }
.chapter-card-summary { font-size: 15px !important; line-height: 1.45 !important; color: var(--ink-soft) !important; }
.chapter-card-cta { color: var(--violet) !important; font: 600 15px/1 var(--ui) !important; letter-spacing: 0 !important; text-transform: none !important; }
.chapter-card-score { color: var(--ink-soft) !important; font: 500 14px/1 var(--ui) !important; letter-spacing: 0 !important; text-transform: none !important; }
.chapter-card.is-locked .chapter-card-title, .chapter-card.is-locked .chapter-card-summary { opacity: .72; }
.lock-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--gold-deep); font: 600 14px/1 var(--ui); }
.lock-tag svg { width: 14px; height: 14px; }

/* Locked and loading states */
.locked-panel { max-width: 620px; margin: 24px auto; padding: clamp(24px, 4vw, 36px); background: var(--mist); border-radius: 24px; text-align: center; }
.locked-panel h3 { font: 400 clamp(25px, 3.4vw, 32px)/1.15 var(--display); margin: 8px 0; color: var(--ink); }
.locked-panel p { color: var(--ink-soft); font-size: 17px; line-height: 1.5; margin: 0 0 18px; }
.locked-icon { width: 46px; height: 46px; margin: 0 auto; border-radius: 50%; background: #fff; color: var(--gold-deep); display: flex; align-items: center; justify-content: center; }
.locked-icon svg { width: 20px; height: 20px; }
.locked-topics { list-style: none; margin: 24px 0 0; padding: 0; text-align: left; }
.locked-topics li { display: flex; gap: 10px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--line); font-size: 15.5px; color: var(--ink-soft); }
.locked-topics svg { width: 13px; height: 13px; flex: none; color: var(--gold-deep); }
.chapter-skeleton { padding: 16px 0; }
.chapter-skeleton i { display: block; height: 16px; margin-bottom: 14px; border-radius: 8px; background: linear-gradient(90deg, var(--mist), #e7e3f4, var(--mist)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.chapter-skeleton i:first-child { height: 30px; width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Tests */
.quiz-card { font: inherit; text-align: left; background: var(--mist) !important; border: 0 !important; border-radius: 22px !important; box-shadow: none !important; transition: transform .25s var(--spring), box-shadow .25s var(--spring); width: 100%; cursor: pointer; display: block; color: inherit; }
.quiz-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md) !important; }
.quiz-card-locked h2, .quiz-card-locked p { opacity: .72; }
.quiz-header h1, .quiz-container h1 { font: 300 clamp(36px, 5.4vw, 60px)/1.05 var(--display); letter-spacing: -.025em; }

/* Account */
.account-page { padding: clamp(32px, 6vh, 64px) max(20px, var(--sal)) 80px; }
.acct-wrap { max-width: 560px; margin: 0 auto; }
.acct-wrap h1 { font: 300 clamp(38px, 6vw, 56px)/1.05 var(--display); letter-spacing: -.025em; margin: 0 0 6px; }
.acct-sub { color: var(--ink-soft); font-size: 16px; margin: 0 0 22px; overflow-wrap: anywhere; }
.acct-card { background: var(--mist); border-radius: 22px; padding: 22px; margin-bottom: 12px; }
.acct-card h2 { font: 400 25px/1.2 var(--display); margin: 0 0 6px; }
.acct-card p { color: var(--ink-soft); font-size: 16px; line-height: 1.5; margin: 0 0 14px; }
.acct-card .btn-quiet { background: #fff; }
.acct-fine { font-size: 13.5px !important; margin: 12px 0 0 !important; }
.acct-links { margin-top: 16px; font-size: 15px; }
.acct-links a { color: var(--ink-soft); }

/* Sheets: bottom sheet on phones, centered on larger screens */
.sheet-wrap { position: fixed; inset: 0; z-index: 10100; display: flex; align-items: flex-end; justify-content: center; background: rgba(27, 21, 51, 0); transition: background-color .28s ease; }
.sheet-wrap.open { background: rgba(27, 21, 51, .42); }
.sheet { position: relative; width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #fff; border-radius: 26px 26px 0 0; padding: 12px 22px calc(22px + var(--sab)); transform: translateY(100%); transition: transform .36s var(--spring); }
.sheet-wrap.open .sheet { transform: none; }
body.sheet-open { overflow: hidden; }
.sheet-grabber { width: 40px; height: 5px; border-radius: 3px; background: #d9d5e6; margin: 0 auto 16px; }
.sheet-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--ink-soft); cursor: pointer; }
.sheet-title { font: 400 28px/1.15 var(--display); letter-spacing: -.015em; margin: 0 34px 10px 0; color: var(--ink); }
.sheet-sub { color: var(--ink-soft); font-size: 16px; line-height: 1.5; margin: 0 0 14px; }
.sheet-list { list-style: none; margin: 0 0 14px; padding: 0; }
.sheet-list li { position: relative; padding: 7px 0 7px 26px; font-size: 16px; line-height: 1.35; }
.sheet-list li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 12px; height: 6px; border-left: 2px solid var(--violet); border-bottom: 2px solid var(--violet); transform: rotate(-45deg); }
.sheet-consent { display: flex; gap: 10px; align-items: flex-start; background: var(--mist); border-radius: 14px; padding: 14px; margin-bottom: 12px; font-size: 14px; line-height: 1.45; color: var(--ink); cursor: pointer; }
.sheet-consent input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--violet); }
.sheet-consent a { color: var(--violet); }
.sheet .btn-quiet { margin-top: 8px; }
.sheet-msg { font-size: 14px; color: #8c1d18; margin: 10px 0 0; min-height: 1em; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; color: var(--ink); }
.field input, .field select, .field textarea { width: 100%; box-sizing: border-box; min-height: 48px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-family: var(--ui); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--violet); }
.hp { position: absolute !important; left: -9999px !important; height: 0; width: 0; opacity: 0; }
.sheet-done { text-align: center; padding: 10px 0; }
.sheet-done p { font-size: 17px; }
.sheet-check { width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 50%; background: #e4f6ea; position: relative; animation: pop .45s var(--spring) both; }
.sheet-check::after { content: ""; position: absolute; left: 18px; top: 19px; width: 22px; height: 11px; border-left: 3px solid #1c7c43; border-bottom: 3px solid #1c7c43; transform: rotate(-45deg); }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 24px; padding: 26px 28px; transform: translateY(24px) scale(.97); opacity: 0; transition: transform .3s var(--spring), opacity .2s ease; }
  .sheet-wrap.open .sheet { transform: none; opacity: 1; }
  .sheet-grabber { display: none; }
}

/* Install hint */
.install-hint { position: fixed; z-index: 940; left: 12px; right: 12px; bottom: calc(72px + var(--sab)); display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--ink); color: #fff; border-radius: 16px; font-size: 14.5px; line-height: 1.35; box-shadow: var(--shadow-lg); transform: translateY(16px); opacity: 0; transition: transform .35s var(--spring), opacity .25s; }
.install-hint.open { transform: none; opacity: 1; }
.install-hint span { flex: 1; }
.install-hint svg { width: 17px; height: 17px; vertical-align: -3px; }
.install-go { background: #fff; color: var(--ink); border: 0; border-radius: 10px; min-height: 36px; padding: 0 12px; font-weight: 600; }
.install-x { background: none; color: #fff; border: 0; width: 36px; height: 36px; font-size: 22px; }

/* Auth and older modals pick up the new look */
.auth-modal, #suCard, #tcCard { border-radius: 24px !important; }
.auth-submit, #suCard .suBtn { background: var(--violet) !important; min-height: 48px; border-radius: 13px !important; }
.auth-footer-note { font-size: 14px; }
#tcOverlay h2 { font: 400 20px/1.2 var(--display); margin: 22px 0 6px; }
#tcOverlay h1 { font: 400 28px/1.15 var(--display); margin: 0 0 8px; }
#tcOverlay .summary { background: var(--mist); border-radius: 12px; padding: 12px 14px; }
.chapter-page { padding-top: 0; }

/* Exam page bands */
section.glance { background: var(--aubergine) !important; }

/* Reduced motion, reduced transparency */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .hm-marquee-row { flex-wrap: wrap; white-space: normal; }
  .ph-wave i { transform: scaleY(.6); }
}
@media (prefers-reduced-transparency: reduce) {
  .topnav, .tabbar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Fixes from the first staging review */
.topnav { position: sticky !important; top: 0; background: rgba(255, 255, 255, .78) !important; }
.nav-brand .accent, .footer-logo em { font-style: normal; }
body:not(.is-member) #amaBtn, body:not(.is-member) #amaPanel { display: none !important; }
body.in-test #amaBtn { display: none !important; }
@media (max-width: 760px) {
  body.in-test .tabbar { display: none; }
  body.in-test { padding-bottom: var(--sab); }
  .glance-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .glance-card { min-width: 0; max-width: 100%; box-sizing: border-box; }
  .glance-card canvas { max-width: 100% !important; }
}

/* Second review: chapter pages and the phone mockup */
.chapter-page-num, .chapter-page-tier, .chapter-audio-eyebrow, .chapter-video-eyebrow, .test-cta-eyebrow, .continue-eyebrow, [class*="continue"] [class*="eyebrow"], [class*="continue"] [class*="label"] {
  font-family: var(--ui) !important; letter-spacing: 0 !important; text-transform: none !important;
}
.chapter-page-title { font: 300 clamp(38px, 6vw, 64px)/1.05 var(--display) !important; letter-spacing: -.025em !important; color: var(--ink) !important; }
.chapter-page-summary { color: var(--ink-soft) !important; }
.chapter-warning-banner { background: var(--mist) !important; border: 0 !important; border-radius: 14px !important; color: var(--ink-soft) !important; font-size: 14.5px !important; }
.chapter-warning-banner strong { color: var(--ink) !important; }
#continueCard h3, #continueCard [class*="title"] { font: 400 26px/1.2 var(--display) !important; }
.hm-phone-screen .ph-line:last-child { margin-bottom: 0; }
.ph-fill { display: block; }
@media (max-width: 760px) {
  .hm-three-stage { padding-bottom: 28px; }
  .hm-phone { width: min(210px, 54vw); aspect-ratio: 9 / 13; border-radius: 30px 30px 26px 26px; }
  .ph-wave { height: 58px; margin: 8px 0 12px; }
  .ph-play { width: 34px; height: 34px; }
  .ph-play::after { left: 13px; top: 10px; border-left-width: 11px; border-top-width: 7px; border-bottom-width: 7px; }
  .hm-step { min-height: 46vh; padding-top: 4px; }
  .hm-step h2 { font-size: 34px; }
  .ph-line { height: 6px; margin-bottom: 6px; }
}
@media (min-width: 761px) {
  .ph-wave { height: 190px; margin: 44px 0; }
  .ph-pearl { margin-top: 18px !important; }
  .ph-line { height: 11px; margin-bottom: 13px; }
  .hm-phone-screen[data-screen="read"] .ph-line:first-of-type { margin-top: 26px; }
  .ph-video { margin-top: 40px; aspect-ratio: 4 / 3; }
}

/* Third review */
section.glance .section-title, section.glance h2, section.glance h3 { color: #fff !important; }
section.glance .section-lede { color: rgba(255, 255, 255, .8) !important; }
section.glance h2 em { color: #e9c766; }
section.glance { padding: clamp(40px, 7vh, 72px) max(20px, var(--sal)) 72px; }
section.faq .faq-item { padding: 0 !important; }
.faq-q { margin: 0 !important; }
.faq-a { display: block; }
.quiz-card p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.quiz-container .quiz-header, .quiz-header { text-align: left; }
.quiz-container { padding-top: clamp(20px, 4vh, 44px) !important; }
.install-hint { display: none; }
body.view-page-home .install-hint, body.view-page-course .install-hint { display: flex; }
#toolkitMount > section { background: #fff; }
@media (max-width: 760px) { .hm-three { padding-bottom: 16px; } .hm-step:last-child { min-height: 34vh; } }

/* Gold text needs the darker gold on white */
.section-title em, #toolkitMount h2 em, #toolkitMount h3 em { color: var(--gold-deep) !important; }
section.glance .section-title em, section.glance h2 em { color: #e9c766 !important; }

/* Test review: the rationale was hidden by the chapter-quiz rule. Only rendered after submitting. */
#quizPage .quiz-rationale { display: block !important; }

/* The FAQ belongs to the home page only. It was showing on Account, Course, Exam and Plan. */
body[class*="view-page-"]:not(.view-page-home) > section.faq { display: none !important; }

/* Home: what is included, chapters, plan, comparison */
.hm-sub { font-size: clamp(18px, 2vw, 21px); line-height: 1.45; color: var(--ink-soft); margin: 0 0 30px; max-width: 34em; }
.hm-tiles, .hm-chapters, .hm-compare { padding: clamp(56px, 9vh, 104px) 0; }
.hm-tiles h2, .hm-chapters h2, .hm-plan h2, .hm-compare h2 { font: 300 clamp(36px, 5.6vw, 66px)/1.04 var(--display); letter-spacing: -.025em; margin: 0 0 14px; color: var(--ink); }
.hm-tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hm-tile { background: var(--mist); border-radius: 20px; padding: 20px; }
.hm-tile span { font-size: 14px; font-weight: 600; color: var(--violet); }
.hm-tile h3 { font: 400 22px/1.2 var(--display); margin: 8px 0 6px; color: var(--ink); }
.hm-tile p { font-size: 15.5px; line-height: 1.45; color: var(--ink-soft); margin: 0; }
.hm-chapters { background: var(--mist); }
.hm-chapter-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 12px; }
.hm-chapter-list li { break-inside: avoid; margin-bottom: 8px; }
.hm-chapter-list a { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; background: #fff; border-radius: 14px; color: var(--ink); text-decoration: none; transition: transform .2s var(--spring), box-shadow .2s; }
.hm-chapter-list a:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.hm-chapter-list b { flex: 1; min-width: 0; font-size: 16px; font-weight: 500; line-height: 1.25; }
.hm-chapter-list span { flex: none; font-size: 13.5px; color: var(--ink-soft); }
.hm-chapter-list em { flex: none; font-style: normal; font-size: 12.5px; font-weight: 600; color: #fff; background: var(--violet); border-radius: 999px; padding: 3px 9px; }
.hm-chapter-list i { flex: none; display: inline-flex; color: var(--gold-deep); }
.hm-chapter-list i svg { width: 14px; height: 14px; }
.hm-plan { padding: clamp(56px, 9vh, 104px) 0; }
.hm-weeks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hm-weeks li { border-top: 3px solid var(--violet); padding: 12px 2px 4px; }
.hm-weeks b { display: block; font-size: 14px; font-weight: 600; color: var(--violet); }
.hm-weeks span { display: block; margin-top: 4px; font-size: 16px; line-height: 1.35; color: var(--ink); }
.hm-compare { background: #fff; padding-top: 0; }
.cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 18px; box-shadow: 0 0 0 1px var(--line); }
.cmp { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 760px; font-size: 15px; background: #fff; }
.cmp th, .cmp td { padding: 13px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); color: var(--ink); font-weight: 400; line-height: 1.35; }
.cmp thead th, .cmp thead td { border-top: 0; font-weight: 600; font-size: 14.5px; }
.cmp tbody th { position: sticky; left: 0; z-index: 1; background: #fff; font-weight: 600; min-width: 118px; max-width: 132px; box-shadow: 1px 0 0 var(--line); }
.cmp thead td { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--line); }
.cmp .cmp-us { background: #f1eefc; }
.cmp thead .cmp-us { color: var(--violet); }
.cmp b { display: block; font: 400 30px/1.05 var(--display); color: var(--violet); }
.cmp small { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.35; color: var(--ink-soft); }
.cmp-note { font-size: 13.5px !important; line-height: 1.5; color: var(--ink-soft); margin: 12px 0 0; }
.cmp-note a { color: inherit; }
.hm-compare-more { margin: 14px 0 0; font-size: 16px; font-weight: 600; }
.hm-compare-more a { color: var(--violet); }
@media (max-width: 900px) { .hm-tile-grid, .hm-weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .hm-chapter-list { columns: 1; }
  .hm-tile { padding: 16px; }
  .hm-tile h3 { font-size: 19px; }
  .hm-tile p { font-size: 14.5px; }
  .cmp { min-width: 680px; font-size: 14px; }
  .cmp th, .cmp td { padding: 11px 10px; }
  .cmp tbody th { min-width: 96px; max-width: 104px; }
}
.cmp-hint { display: none; margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--violet); }
@media (max-width: 760px) { .cmp-hint { display: block; } }
