/* ClassFabric shared styles */
:root{
  --ink:#1B2430; --muted:#5B6472; --faint:#8A929E;
  --line:#E3E6EC; --soft:#F6F7F9; --white:#FFFFFF;
  --indigo:#2B3A8F; --indigo-dk:#1F2B70; --indigo-lt:#EEF0FA;
  --saffron:#E0A21B; --saffron-lt:#FDF5E1;
  --green:#2F7D4F; --green-lt:#E9F4EE; --red:#B23A48;
  --sci:#1F7A7A; --math:#5B4BB7; --ela:#B23A48; --soc:#A86E1C; --cte:#2F5D8A; --health:#2F7D4F; --econ:#7A4E2D;
  --r-s:6px; --r-m:10px; --r-l:16px;
  --serif:"Literata", Georgia, "Times New Roman", serif;
  --sans:"Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--white);color:var(--ink);font-family:var(--sans);font-size:16px;line-height:1.55}
img{max-width:100%;display:block}
a{color:var(--indigo)}
h1,h2,h3,h4{font-family:var(--serif);font-weight:600;line-height:1.18;margin:0 0 .5em;letter-spacing:-.01em}
h1{font-size:clamp(2rem,4.2vw,3.1rem)}
h2{font-size:clamp(1.5rem,2.6vw,2.1rem)}
h3{font-size:1.2rem}
p{margin:0 0 1em}
.muted{color:var(--muted)}
.small{font-size:.875rem}
.wrap{max-width:1180px;margin:0 auto;padding:0 24px}
:focus-visible{outline:3px solid var(--saffron);outline-offset:2px;border-radius:4px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Header */
.site-header{border-bottom:1px solid var(--line);background:var(--white);position:sticky;top:0;z-index:20}
.site-header .wrap{display:flex;align-items:center;gap:28px;height:68px}
.logo{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);font-family:var(--serif);font-weight:700;font-size:1.25rem}
.logo svg{width:30px;height:30px}
.nav{display:flex;gap:22px}
.nav a{color:var(--muted);text-decoration:none;font-weight:500}
.nav a:hover,.nav a[aria-current="page"]{color:var(--ink)}
.nav a[aria-current="page"]{box-shadow:inset 0 -2px 0 var(--indigo);padding-bottom:4px}
.header-right{margin-left:auto;display:flex;align-items:center;gap:12px}
.lang-select{font:inherit;font-size:.875rem;border:1px solid var(--line);border-radius:var(--r-s);padding:6px 8px;background:var(--white);color:var(--ink)}
.cart-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid var(--line);border-radius:var(--r-s);background:var(--white);cursor:pointer;color:var(--ink)}
.cart-count{position:absolute;top:-6px;right:-6px;background:var(--saffron);color:var(--ink);font-size:.7rem;font-weight:700;min-width:18px;height:18px;border-radius:9px;display:grid;place-items:center;padding:0 4px}
.cart-count[hidden]{display:none}
.avatar{width:36px;height:36px;border-radius:50%;background:var(--indigo-lt);color:var(--indigo);display:grid;place-items:center;font-weight:600;font-size:.85rem}
.menu-toggle{display:none}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font:inherit;font-weight:600;font-size:.95rem;padding:11px 18px;border-radius:var(--r-s);border:1px solid transparent;cursor:pointer;text-decoration:none;white-space:nowrap}
.btn-primary{background:var(--indigo);color:#fff}
.btn-primary:hover{background:var(--indigo-dk)}
.btn-outline{background:var(--white);color:var(--ink);border-color:var(--line)}
.btn-outline:hover{border-color:var(--ink)}
.btn-ghost{background:transparent;color:var(--indigo);padding-left:8px;padding-right:8px}
.btn-sm{padding:7px 12px;font-size:.85rem}
.btn-block{width:100%}

/* Chips & badges */
.chip{display:inline-flex;align-items:center;gap:6px;font-size:.78rem;font-weight:500;padding:3px 9px;border-radius:999px;background:var(--soft);color:var(--muted);border:1px solid var(--line)}
.chip-code{font-variant-numeric:tabular-nums}
.reviewed{display:inline-flex;align-items:center;gap:5px;font-size:.78rem;font-weight:600;color:var(--green)}
.langs{display:inline-flex;gap:4px}
.langs span{font-size:.7rem;font-weight:600;padding:2px 5px;border-radius:4px;background:var(--indigo-lt);color:var(--indigo)}

/* Swatch covers */
.swatch{--c:var(--indigo);position:relative;aspect-ratio:4/5;border-radius:var(--r-s);overflow:hidden;color:#fff;
  background-color:var(--c);
  background-image:
    repeating-linear-gradient(0deg,rgba(255,255,255,.10) 0 2px,transparent 2px 7px),
    repeating-linear-gradient(90deg,rgba(0,0,0,.12) 0 2px,transparent 2px 7px);
  display:flex;flex-direction:column;justify-content:space-between;padding:16px}
.swatch::after{content:"";position:absolute;inset:8px;border:1.5px dashed rgba(255,255,255,.45);border-radius:4px;pointer-events:none}
.swatch .sw-top{display:flex;justify-content:space-between;align-items:flex-start;font-size:.75rem;font-weight:600;opacity:.92;position:relative;z-index:1}
.swatch .sw-title{font-family:var(--serif);font-weight:600;font-size:1.15rem;line-height:1.2;position:relative;z-index:1}
.swatch svg{width:34px;height:34px;opacity:.9}
.sw-sci{--c:var(--sci)}.sw-math{--c:var(--math)}.sw-ela{--c:var(--ela)}.sw-soc{--c:var(--soc)}
.sw-cte{--c:var(--cte)}.sw-health{--c:var(--health)}.sw-econ{--c:var(--econ)}

/* Product card */
.product{display:flex;flex-direction:column;gap:10px}
.product h3{font-size:1.02rem;margin:4px 0 0}
.product h3 a{color:var(--ink);text-decoration:none}
.product h3 a:hover{text-decoration:underline}
.product .meta{display:flex;flex-wrap:wrap;gap:6px}
.product .buy{display:flex;align-items:center;justify-content:space-between;margin-top:auto;padding-top:6px}
.price{font-weight:700;font-size:1.1rem}
.price s{color:var(--faint);font-weight:500;font-size:.85rem;margin-left:4px}

/* Forms */
.input,.select{font:inherit;width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:var(--r-s);background:var(--white);color:var(--ink)}
.input:focus,.select:focus{outline:none;border-color:var(--indigo);box-shadow:0 0 0 3px var(--indigo-lt)}
label{font-weight:500;font-size:.9rem}
.check{display:flex;align-items:center;gap:8px;font-weight:400;font-size:.92rem;padding:4px 0;cursor:pointer}
.check input{accent-color:var(--indigo);width:16px;height:16px}

/* Footer */
.site-footer{border-top:1px solid var(--line);margin-top:96px;padding:48px 0 32px;color:var(--muted);font-size:.9rem}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:32px}
.site-footer h4{font-family:var(--sans);font-size:.9rem;color:var(--ink);margin-bottom:12px}
.site-footer ul{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.site-footer a{color:var(--muted);text-decoration:none}
.site-footer a:hover{color:var(--ink)}
.footer-base{display:flex;justify-content:space-between;gap:16px;border-top:1px solid var(--line);margin-top:32px;padding-top:20px;flex-wrap:wrap}

@media (max-width:860px){
  .nav{display:none}
  .footer-grid{grid-template-columns:1fr 1fr}
  .site-header .wrap{gap:14px}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Cart drawer */
.cart-overlay{position:fixed;inset:0;background:rgba(27,36,48,.35);z-index:50;display:flex;justify-content:flex-end}
.cart-overlay[hidden]{display:none}
.cart-drawer{background:#fff;width:min(420px,100%);height:100%;display:flex;flex-direction:column;box-shadow:-20px 0 40px -20px rgba(27,36,48,.3);animation:slidein .25s ease-out}
@keyframes slidein{from{transform:translateX(30px);opacity:.4}to{transform:none;opacity:1}}
.cart-head{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid var(--line)}
.cart-head h2{font-size:1.3rem;margin:0}
.icon-btn{width:36px;height:36px;border:0;background:transparent;border-radius:var(--r-s);display:grid;place-items:center;cursor:pointer;color:var(--ink)}
.icon-btn:hover{background:var(--soft)}
.icon-btn svg{width:20px;height:20px}
.cart-items{flex:1;overflow:auto;padding:8px 24px}
.cart-item{display:grid;grid-template-columns:52px 1fr auto;gap:14px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line)}
.cart-item .swatch{aspect-ratio:4/5;padding:0}
.cart-item .swatch::after{inset:4px}
.cart-item strong{display:block;font-size:.95rem;line-height:1.3}
.cart-item .small{color:var(--muted)}
.cart-item .remove{border:0;background:none;color:var(--muted);font:inherit;font-size:.8rem;cursor:pointer;padding:0;text-decoration:underline}
.cart-empty{padding:40px 0;text-align:center;color:var(--muted)}
.upsell{margin:16px 0;padding:14px 16px;border-radius:var(--r-s);background:var(--saffron-lt);border:1px solid #F3DFA8;font-size:.9rem}
.upsell button{margin-top:8px}
.cart-foot{padding:20px 24px;border-top:1px solid var(--line);display:grid;gap:12px}
.cart-row{display:flex;justify-content:space-between}
.cart-row.total{font-weight:700;font-size:1.1rem}
.cart-note{font-size:.8rem;color:var(--muted);text-align:center}
a.swatch{text-decoration:none}
@media (max-width:560px){
  .wrap{padding:0 16px}
  .site-header .wrap{gap:8px}
  .header-right{gap:8px}
  .lang-select{max-width:90px;padding:6px 2px;font-size:.8rem}
  .site-header .btn-ghost{padding-left:4px;padding-right:4px}
  .logo{font-size:1.1rem}
}

/* Home */
.hero{padding:72px 0 56px;overflow:hidden}
.hero .wrap{display:grid;grid-template-columns:1.05fr .95fr;gap:56px;align-items:center}
.hero h1{max-width:15ch;margin-bottom:20px}
.hero .lede{font-size:1.15rem;color:var(--muted);max-width:46ch;margin-bottom:28px}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap}
.hero-proof{display:flex;gap:22px;margin-top:28px;flex-wrap:wrap;color:var(--muted);font-size:.9rem}
.hero-proof span{display:inline-flex;align-items:center;gap:7px}
.hero-proof svg{width:18px;height:18px;color:var(--green)}

/* Fanned workbook pages */
.stack{position:relative;height:460px}
.sheet{position:absolute;top:20px;left:50%;width:290px;height:390px;margin-left:-145px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 18px 40px -18px rgba(27,36,48,.28);padding:18px;display:flex;flex-direction:column;gap:12px;transform-origin:50% 100%;animation:fan .9s cubic-bezier(.2,.8,.2,1) both}
.sheet-head{display:flex;justify-content:space-between;font-size:.7rem;color:var(--muted);border-bottom:2px solid var(--ink);padding-bottom:6px;font-weight:600}
.sheet .swatch{aspect-ratio:auto;height:150px;padding:12px}
.sheet .swatch .sw-title{font-size:1rem}
.lines{display:grid;gap:7px}
.lines i{display:block;height:7px;border-radius:4px;background:var(--soft);border:1px solid #EDEFF3}
.sheet h4{font-size:.95rem;margin:2px 0 0}
.grid-lines{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin-top:4px}
.grid-lines i{aspect-ratio:1;background:var(--soft);border:1px solid #EDEFF3;border-radius:2px}
.s1{--r:-9deg;--x:-120px;z-index:1}
.s2{--r:0deg;--x:0px;z-index:2;animation-delay:.08s}
.s3{--r:8deg;--x:118px;z-index:3;animation-delay:.16s}
.sheet{transform:translateX(var(--x)) rotate(var(--r))}
@keyframes fan{from{transform:translateX(0) rotate(0) translateY(16px);opacity:0}to{transform:translateX(var(--x)) rotate(var(--r));opacity:1}}
.price-tag{position:absolute;right:6%;bottom:6px;z-index:4;background:var(--saffron);color:var(--ink);font-weight:700;border-radius:999px;padding:10px 18px;font-size:1.05rem;box-shadow:0 8px 20px -8px rgba(27,36,48,.35)}

section{padding:64px 0}
.section-head{max-width:640px;margin-bottom:36px}
.section-head p{color:var(--muted);font-size:1.05rem}
.band{background:var(--soft);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}

/* What's inside */
.inside{display:grid;grid-template-columns:repeat(3,1fr);gap:0;border:1px solid var(--line);border-radius:var(--r-m);overflow:hidden;background:#fff}
.inside div{padding:24px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
.inside div:nth-child(3n){border-right:0}
.inside div:nth-last-child(-n+3){border-bottom:0}
.inside svg{width:26px;height:26px;color:var(--indigo);margin-bottom:12px}
.inside h3{font-family:var(--sans);font-size:1rem;font-weight:600;margin-bottom:6px}
.inside p{color:var(--muted);font-size:.93rem;margin:0}

/* Languages */
.lang-row{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}
.lang-card .swatch{margin-bottom:12px}
.lang-card > strong{display:block}
.lang-card > span{color:var(--muted);font-size:.9rem}

/* Subjects */
.subjects{display:grid;grid-template-columns:repeat(7,1fr);gap:14px}
.subject{text-decoration:none;color:var(--ink)}
.subject .swatch{aspect-ratio:1;justify-content:center;align-items:center;padding:0}
.subject .swatch svg{width:36px;height:36px}
.subject strong{display:block;margin-top:10px;font-weight:600;font-size:.95rem}
.subject span{color:var(--muted);font-size:.85rem}

/* Ways to buy */
.buy-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:0;border:1px solid var(--line);border-radius:var(--r-m);overflow:hidden}
.buy-grid > div{padding:28px 24px;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:6px}
.buy-grid > div:last-child{border-right:0}
.buy-grid .featured{background:var(--indigo-lt)}
.buy-grid .amount{font-family:var(--serif);font-size:2rem;font-weight:600;line-height:1.1}
.buy-grid .amount small{font-family:var(--sans);font-size:.9rem;font-weight:500;color:var(--muted)}
.buy-grid p{color:var(--muted);font-size:.93rem;flex:1}
.buy-grid h3{font-family:var(--sans);font-size:1rem;font-weight:600;margin:0}

/* Review promise */
.promise{display:grid;grid-template-columns:auto 1fr;gap:40px;align-items:center;border-left:4px solid var(--saffron);padding:8px 0 8px 32px;max-width:900px}
.promise blockquote{margin:0;font-family:var(--serif);font-size:clamp(1.3rem,2.2vw,1.65rem);line-height:1.4}
.promise cite{display:block;font-style:normal;color:var(--muted);margin-top:14px;font-size:.95rem}
.seal{width:120px;height:120px;border-radius:50%;border:2px dashed var(--green);display:grid;place-items:center;text-align:center;color:var(--green);font-weight:700;font-size:.85rem;line-height:1.2;padding:12px}
.seal svg{width:28px;height:28px;margin:0 auto 4px}

.cta-final{text-align:center}
.cta-final h2{max-width:22ch;margin:0 auto 14px}
.cta-final p{color:var(--muted);margin-bottom:24px}

@media (max-width:980px){
  .hero .wrap{grid-template-columns:1fr}
  .stack{height:420px;max-width:460px;margin:0 auto;width:100%}
  .subjects{grid-template-columns:repeat(4,1fr)}
  .buy-grid{grid-template-columns:1fr 1fr}
  .buy-grid > div:nth-child(2){border-right:0}
  .buy-grid > div:nth-child(-n+2){border-bottom:1px solid var(--line)}
}
@media (max-width:680px){
  .hero{padding-top:44px}
  .sheet{width:200px;height:290px;margin-left:-100px;padding:14px}
  .sheet .swatch{height:110px}
  .s1{--x:-58px}.s3{--x:58px}
  .stack{height:350px}
  .inside{grid-template-columns:1fr}
  .inside div{border-right:0!important;border-bottom:1px solid var(--line)!important}
  .inside div:last-child{border-bottom:0!important}
  .lang-row{grid-template-columns:1fr 1fr}
  .subjects{grid-template-columns:repeat(2,1fr)}
  .buy-grid{grid-template-columns:1fr}
  .buy-grid > div{border-right:0;border-bottom:1px solid var(--line)}
  .promise{grid-template-columns:1fr;padding-left:20px}
}
