/* ================================================================
   EverythingPhysix — site styles
   Colours live at the top: change them here and the whole site updates.
   ================================================================ */
:root {
  --bg:        #070B16;   /* page background (deep space navy) */
  --bg-2:      #0C1224;   /* raised panels */
  --panel:     #111A31;   /* cards */
  --line:      #1E2A47;   /* thin borders */
  --line-2:    #2B3A60;
  --text:      #E7ECF7;   /* main text */
  --muted:     #8D9AB8;   /* secondary text */
  --accent:    #22D3EE;   /* cyan — buttons, highlights */
  --accent-2:  #7C8CFF;   /* violet — secondary highlight */
  --warm:      #F5B84B;   /* amber — prices, badges */
  --radius:    10px;
  --max:       1180px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Faint graph-paper grid behind everything */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(34,211,238,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,211,238,.045) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 85%);
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--font-mono); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,11,22,.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; }
.logo-mark { width: 30px; height: 30px; }
.logo b { color: var(--accent); font-weight: 700; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { color: var(--muted); font-size: .95rem; font-weight: 500; transition: color .15s; white-space: nowrap; }
.nav a:hover, .nav a.active { color: var(--text); }
.nav .btn { color: var(--bg); }
.menu-toggle { display: none; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 1.1rem; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--bg);
  font-weight: 600; font-size: .95rem;
  padding: 12px 22px; border-radius: 8px; border: 1px solid var(--accent);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 30px -8px rgba(34,211,238,.6); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn-sm { padding: 8px 16px; font-size: .88rem; }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 80px; position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: .8rem; color: var(--accent);
  letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px;
  background: rgba(34,211,238,.06);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.hero h1 {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(2.4rem, 5.2vw, 4rem); line-height: 1.05; letter-spacing: -.03em;
  margin: 22px 0 20px;
}
.hero h1 .hl {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { color: var(--muted); font-size: 1.15rem; max-width: 34em; }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-note { margin-top: 26px; font-size: .88rem; color: var(--muted); display: flex; gap: 22px; flex-wrap: wrap; }
.hero-note span::before { content: "✓ "; color: var(--accent); font-weight: 700; }

.hero-visual { position: relative; aspect-ratio: 1 / 1; max-width: 460px; width: 100%; justify-self: end; }
.hero-visual svg { width: 100%; height: 100%; }
.orbit { transform-origin: 230px 230px; }
.orbit-1 { animation: spin 26s linear infinite; }
.orbit-2 { animation: spin 38s linear infinite reverse; }
.orbit-3 { animation: spin 52s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.float-tag {
  position: absolute; font-family: var(--font-mono); font-size: .82rem;
  background: rgba(17,26,49,.9); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 8px 12px; color: var(--text); backdrop-filter: blur(6px);
}
.float-tag i { color: var(--accent); font-style: normal; }
.float-tag.t1 { top: 12%; left: -4%; }
.float-tag.t2 { bottom: 14%; right: -2%; }
.float-tag.t3 { bottom: 2%; left: 10%; }

@media (prefers-reduced-motion: reduce) {
  .orbit-1, .orbit-2, .orbit-3 { animation: none; }
}

/* ---------- Sections ---------- */
section.block { padding: 96px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head .label { font-family: var(--font-mono); color: var(--accent); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.section-head h2 { font-family: var(--font-head); font-size: clamp(1.8rem, 3.4vw, 2.5rem); letter-spacing: -.02em; line-height: 1.15; margin-top: 8px; }
.section-head p { color: var(--muted); max-width: 32em; margin-top: 10px; }
.link-arrow { color: var(--accent); font-weight: 600; font-size: .95rem; white-space: nowrap; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Product cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.cover {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background:
    radial-gradient(circle at 80% 20%, rgba(124,140,255,.35), transparent 55%),
    radial-gradient(circle at 10% 90%, rgba(34,211,238,.25), transparent 50%),
    var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.cover::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 20px 20px;
}
.cover .code {
  position: absolute; left: 18px; bottom: 12px;
  font-family: var(--font-head); font-weight: 700; font-size: 3.4rem; letter-spacing: -.04em; line-height: 1;
  color: var(--text); opacity: .95;
}
.cover .type {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(7,11,22,.75); border: 1px solid var(--line-2); padding: 4px 9px; border-radius: 6px;
}
.cover svg.wave { position: absolute; right: 0; top: 38%; width: 70%; opacity: .7; }
/* Cover with a real preview image: page sits on the dark panel, fading out at the bottom */
.cover.has-thumb::before { display: none; }
.cover .thumb {
  position: absolute; left: 50%; top: 14px; width: 78%; transform: translateX(-50%) rotate(-2deg);
  border-radius: 4px; box-shadow: 0 12px 30px -8px rgba(0,0,0,.7); transition: transform .3s;
}
.cover.has-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(12,18,36,.55) 70%, rgba(12,18,36,.95) 100%);
}
.card:hover .cover .thumb { transform: translateX(-50%) rotate(0deg) translateY(-4px); }
.cover.has-thumb .code, .cover.has-thumb .type { z-index: 1; }
/* designed bundle covers fill the card flat (they already have their own title and background) */
.cover.is-cover .thumb { inset: 0; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transform: none; border-radius: 0; box-shadow: none; }
.card:hover .cover.is-cover .thumb { transform: scale(1.03); }
.cover.is-cover::after { display: none; }
.cover.is-cover .type { display: none; }
.cover.has-thumb .code { font-size: 2.6rem; }
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card-topic { font-size: .78rem; color: var(--muted); font-family: var(--font-mono); }
.card h3 { font-family: var(--font-head); font-size: 1.06rem; line-height: 1.3; margin: 6px 0 8px; letter-spacing: -.01em; }
.card p { color: var(--muted); font-size: .88rem; line-height: 1.5; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.price { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--warm); }
.price.free { color: var(--accent); }

/* ---------- Topic tiles ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.topic {
  background: var(--bg-2); padding: 26px 22px; min-height: 140px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  transition: background .2s;
}
.topic:hover { background: var(--panel); }
.topic .t-code { font-family: var(--font-mono); color: var(--accent); font-size: .85rem; }
.topic .t-name { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; line-height: 1.25; }
.topic .t-go { color: var(--muted); font-size: .82rem; }
.topic:hover .t-go { color: var(--accent); }

/* ---------- Resource types ---------- */
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.type-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: linear-gradient(180deg, var(--bg-2), transparent); }
.type-card .icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.3); margin-bottom: 18px; }
.type-card .icon svg { width: 22px; height: 22px; stroke: var(--accent); }
.type-card h3 { font-family: var(--font-head); font-size: 1.1rem; margin-bottom: 8px; }
.type-card p { color: var(--muted); font-size: .9rem; }

/* ---------- About teaser ---------- */
.about {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center;
  border: 1px solid var(--line); border-radius: 16px; padding: 56px;
  background:
    radial-gradient(circle at 0% 100%, rgba(34,211,238,.12), transparent 50%),
    var(--bg-2);
}
.about-visual { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); display: grid; place-items: center; position: relative; overflow: hidden; }
.about-visual .eq { font-family: var(--font-head); font-size: clamp(1.4rem, 2.6vw, 2rem); color: var(--text); letter-spacing: -.02em; text-align: center; line-height: 1.35; padding: 0 28px; }
.about-visual .eq i { color: var(--accent); font-style: italic; }
.about-visual small { position: absolute; bottom: 16px; left: 18px; font-family: var(--font-mono); color: var(--muted); font-size: .75rem; }
.about h2 { font-family: var(--font-head); font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -.02em; line-height: 1.15; margin: 10px 0 18px; }
.about p { color: var(--muted); margin-bottom: 14px; }
.about ul { list-style: none; margin: 22px 0 30px; display: grid; gap: 10px; }
.about li { display: flex; gap: 12px; align-items: baseline; }
.about li::before { content: "→"; color: var(--accent); font-family: var(--font-mono); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 36px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.site-footer p { color: var(--muted); font-size: .9rem; max-width: 26em; margin-top: 12px; }
.site-footer h4 { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.site-footer ul { list-style: none; display: grid; gap: 8px; font-size: .92rem; }
.site-footer ul a:hover { color: var(--accent); }
.foot-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: .82rem; gap: 12px; flex-wrap: wrap; }

/* ---------- Teacher / student paths ---------- */
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.path {
  border: 1px solid var(--line); border-radius: 14px; padding: 36px;
  background: radial-gradient(circle at 100% 0%, rgba(34,211,238,.14), transparent 55%), var(--bg-2);
  display: flex; flex-direction: column; gap: 12px; transition: border-color .2s, transform .2s;
}
.path-alt { background: radial-gradient(circle at 100% 0%, rgba(124,140,255,.18), transparent 55%), var(--bg-2); }
.path:hover { border-color: var(--accent); transform: translateY(-2px); }
.path-alt:hover { border-color: var(--accent-2); }
.path-tag { color: var(--accent); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.path-alt .path-tag, .path-alt .link-arrow { color: var(--accent-2); }
.path h3 { font-family: var(--font-head); font-size: 1.6rem; letter-spacing: -.02em; line-height: 1.2; }
.path p { color: var(--muted); max-width: 30em; }
.path .link-arrow { margin-top: 6px; }

/* ---------- Audience tags ---------- */
.auds { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.aud {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted);
}
.aud-teachers { color: var(--accent); border-color: rgba(34,211,238,.35); background: rgba(34,211,238,.07); }
.aud-students { color: var(--accent-2); border-color: rgba(124,140,255,.4); background: rgba(124,140,255,.08); }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  background: var(--bg-2); display: flex; flex-direction: column; gap: 16px;
}
.quote .aud { align-self: flex-start; }
.quote blockquote { font-size: 1.02rem; line-height: 1.6; flex: 1; }
.quote figcaption { display: flex; flex-direction: column; font-size: .9rem; border-top: 1px solid var(--line); padding-top: 14px; }
.quote figcaption span { color: var(--muted); font-size: .84rem; }
.example-tag {
  position: absolute; top: -10px; right: 16px; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  background: var(--warm); color: var(--bg); padding: 3px 9px; border-radius: 6px; font-weight: 500;
}

/* ---------- Page heading (shop, about) ---------- */
.page-head { padding: 64px 0 36px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.03em; line-height: 1.1; margin-top: 10px; }
.page-head p { color: var(--muted); margin-top: 12px; max-width: 40em; }
.label { font-family: var(--font-mono); color: var(--accent); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Shop ---------- */
.shop-layout { display: grid; grid-template-columns: 250px 1fr; gap: 36px; padding: 36px 0 80px; align-items: start; }
.filters { position: sticky; top: 88px; display: grid; gap: 26px; }
.f-group h4 { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: inherit; font-size: .85rem; color: var(--muted); background: transparent; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.on { color: var(--bg); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.field {
  width: 100%; font: inherit; font-size: .92rem; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px;
}
.field:focus { outline: none; border-color: var(--accent); }
select.field { cursor: pointer; }
.shop-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.shop-bar .count { color: var(--muted); font-family: var(--font-mono); font-size: .85rem; }
.shop-bar .field { width: auto; }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.empty { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty button { background: none; border: none; cursor: pointer; font: inherit; margin-left: 8px; }
.clear-btn { background: none; border: none; color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.clear-btn:hover { color: var(--text); }

/* ---------- Product page ---------- */
.crumbs { color: var(--muted); font-size: .8rem; padding: 32px 0 24px; }
.crumbs a:hover { color: var(--accent); }
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.product-cover { border: 1px solid var(--line); border-radius: 14px; aspect-ratio: 4 / 3; }
.product-cover .code { font-size: clamp(4rem, 9vw, 7rem); left: 28px; bottom: 20px; }
.product-cover .type { top: 20px; left: 20px; font-size: .8rem; }
.gallery { display: grid; gap: 12px; }
.gallery button { background: none; border: none; padding: 0; cursor: pointer; font: inherit; }
.gallery .gallery-main {
  display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 22px;
  background: radial-gradient(circle at 80% 10%, rgba(124,140,255,.18), transparent 55%), var(--bg-2); cursor: zoom-in !important;
}
/* Pages are stacked in one spot and slide in like the home page gallery; the shadow gives a paper-stack edge */
.gallery-stage { position: relative; }
.gallery .gallery-main { height: 580px; overflow: hidden; }
.g-shot {
  grid-area: 1 / 1; max-height: 520px; width: auto; max-width: 100%; border-radius: 4px;
  box-shadow: 7px 7px 0 -1px rgba(227,232,242,.45), 14px 13px 0 -2px rgba(227,232,242,.2), 0 16px 40px -10px rgba(0,0,0,.8);
  opacity: 0; transform: translateX(44px) rotate(2.5deg) scale(.97); transition: opacity .45s ease, transform .6s cubic-bezier(.2,.75,.2,1);
}
.g-shot.from-left { transform: translateX(-44px) rotate(-2.5deg) scale(.97); }
.g-shot.on { opacity: 1; transform: none; }
.g-shot.gone { opacity: 0; transform: translateX(-52px) rotate(-3.5deg) scale(.96); }
.g-shot.gone.back { transform: translateX(52px) rotate(3.5deg) scale(.96); }
.g-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; z-index: 2;
  background: rgba(17,26,49,.88) !important; border: 1px solid var(--line-2) !important; color: var(--text); font-size: 1.5rem; line-height: 1;
  display: grid; place-items: center; transition: border-color .2s;
}
.g-arrow:hover { border-color: var(--accent) !important; }
.g-prev { left: 10px; }
.g-next { right: 10px; }
.g-count { position: absolute; bottom: 12px; right: 14px; font-size: .72rem; color: var(--muted); background: rgba(7,11,22,.7); padding: 3px 9px; border-radius: 999px; }
@media (max-width: 720px) {
  .gallery .gallery-main { height: auto; padding: 16px 16px 30px; }    /* fits the pages: no empty band around slides */
  .g-shot { max-height: 420px; }
  .g-arrow { width: 32px; height: 32px; font-size: 1.2rem; }
  .g-prev { left: 4px; }
  .g-next { right: 4px; }
}
.gallery-thumbs { display: flex; gap: 10px; overflow-x: auto; }
.gallery-thumbs button { flex: 0 0 auto; border: 2px solid transparent !important; border-radius: 6px; opacity: .6; transition: opacity .15s; }
.gallery-thumbs button.on, .gallery-thumbs button:hover { opacity: 1; border-color: var(--accent) !important; }
.gallery-thumbs img { height: 74px; width: auto; border-radius: 4px; display: block; }
.gallery-note { color: var(--muted); font-size: .74rem; }
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(4,7,14,.92); display: grid; place-items: center; padding: 24px;
}
.lightbox img { max-width: min(1000px, 92vw); max-height: 88vh; border-radius: 4px; }
.lightbox button {
  position: absolute; background: rgba(17,26,49,.9); color: var(--text); border: 1px solid var(--line-2);
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.lightbox .lb-close { top: 18px; right: 18px; }
.lightbox .lb-prev { left: 18px; top: 50%; }
.lightbox .lb-next { right: 18px; top: 50%; }
.product-info h1 { font-family: var(--font-head); font-size: clamp(1.8rem, 3.4vw, 2.5rem); letter-spacing: -.02em; line-height: 1.15; margin: 14px 0 14px; }
.product-info .lead { color: var(--muted); font-size: 1.08rem; }
.buy-box { margin-top: 28px; padding: 26px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--bg-2); }
.price.big { font-size: 2.2rem; margin-bottom: 16px; }
.btn-buy { width: 100%; justify-content: center; padding: 15px 22px; font-size: 1.02rem; cursor: pointer; font-family: inherit; }
.btn-buy:disabled { background: var(--line-2); border-color: var(--line-2); color: var(--muted); cursor: not-allowed; transform: none; box-shadow: none; }
.buy-notes { list-style: none; margin-top: 18px; display: grid; gap: 8px; font-size: .88rem; color: var(--muted); }
.buy-notes li::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.upsell { display: block; margin-top: 16px; padding: 16px 18px; border: 1px dashed var(--warm); border-radius: 10px; color: var(--text); font-size: .92rem; }
.upsell span { color: var(--warm); font-weight: 600; margin-right: 4px; }
.upsell:hover { background: rgba(245,184,75,.07); }
.includes { margin-top: 64px; padding: 40px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.includes h2 { font-family: var(--font-head); font-size: 1.6rem; letter-spacing: -.02em; margin: 8px 0 24px; }
.inc-list { list-style: none; counter-reset: inc; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; }
.inc-list li { counter-increment: inc; padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; font-size: .95rem; }
.inc-list li::before { content: counter(inc, decimal-leading-zero); font-family: var(--font-mono); color: var(--accent); font-size: .8rem; padding-top: 2px; }
.related { margin-top: 72px; padding-bottom: 40px; }

/* ---------- Header drop-down menus (Teachers ▾ / Students ▾) ---------- */
.dd { position: relative; }
.dd-btn {
  background: none; border: none; font: inherit; font-size: .95rem; font-weight: 500; color: var(--muted);
  cursor: pointer; padding: 8px 0; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap;
}
.dd-btn span { font-size: .7rem; transition: transform .2s; }
.dd:hover .dd-btn, .dd.open .dd-btn, .dd.active .dd-btn { color: var(--text); }
.dd.open .dd-btn span { transform: rotate(180deg); }
.dd-panel {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translate(-50%, 6px);
  width: min(720px, 92vw); padding: 22px 24px 18px; z-index: 60;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.8);
  opacity: 0; visibility: hidden; transition: opacity .15s, transform .15s, visibility .15s;
}
.dd-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }   /* hover bridge */
.dd.open .dd-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (hover: hover) and (min-width: 861px) {
  .dd:hover .dd-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
}
.dd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.dd-col { --accent-s: var(--accent); }
.dd-subject {
  display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  color: var(--text) !important; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line);
}
.dd-subject .ico, .subject-head .ico, .soon .ico { color: var(--accent-s); display: inline-grid; place-items: center; }
.dd-subject .ico svg { width: 20px; height: 20px; }
.dd-level { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 10px 0 6px; }
.dd-boards { display: flex; flex-wrap: wrap; gap: 6px; }
.dd-boards a {
  font-size: .85rem; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--text) !important;
  display: inline-flex; align-items: center; gap: 6px;
}
.dd-boards a:hover { border-color: var(--accent-s); background: rgba(255,255,255,.03); }
.dd-boards em { font-style: normal; font-family: var(--font-mono); font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.dd-panel.dd-narrow { width: min(360px, 92vw); }
.dd-narrow .dd-grid { grid-template-columns: 1fr; }
.dd-narrow .dd-foot { flex-direction: column; align-items: flex-start; gap: 6px; }
.soon-tag { font-family: var(--font-mono); font-size: .62rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: var(--amber, #F5B84B); border: 1px solid currentColor; border-radius: 5px; padding: 2px 6px; margin-left: 6px; vertical-align: middle; }
.dd-all { display: inline-block; margin-top: 18px; font-size: .88rem; }

/* ---------- Homepage: subject / course cards ---------- */
.subject-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.subject-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 26px; display: flex; flex-direction: column; gap: 18px;
  background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent-s) 16%, transparent), transparent 55%), var(--bg-2);
}
.subject-head { display: flex; gap: 14px; align-items: center; }
.subject-head .ico { width: 46px; height: 46px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent-s) 45%, transparent); background: color-mix(in srgb, var(--accent-s) 10%, transparent); }
.subject-head .ico svg { width: 24px; height: 24px; }
.subject-head h3 { font-family: var(--font-head); font-size: 1.35rem; letter-spacing: -.01em; }
.subject-head .mono { color: var(--muted); font-size: .75rem; }
.course-list { list-style: none; display: grid; gap: 8px; }
.course-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 14px; border-radius: 8px; border: 1px solid var(--line); font-size: .92rem; transition: border-color .15s, background .15s;
}
.course-list a:hover { border-color: var(--accent-s); background: rgba(255,255,255,.02); }
.course-list i { font-style: normal; color: var(--muted); font-size: .72rem; margin-left: 4px; }
.status { font-size: .78rem; font-weight: 600; white-space: nowrap; }
.status.live { color: var(--accent-s); }
.status.soon { color: var(--muted); font-family: var(--font-mono); font-weight: 500; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 8px; }

/* ---------- "Coming soon" course panel (shop) ---------- */
.soon {
  grid-column: 1 / -1; text-align: center; padding: 56px 32px; border: 1px solid var(--line-2); border-radius: 16px;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent-s) 14%, transparent), transparent 60%), var(--bg-2);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.soon .ico { width: 56px; height: 56px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent-s) 45%, transparent); margin-bottom: 4px; }
.soon .ico svg { width: 28px; height: 28px; }
.soon .label { color: var(--accent-s); }
.soon h2 { font-family: var(--font-head); font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.02em; line-height: 1.2; max-width: 22em; }
.soon > p { color: var(--muted); max-width: 38em; }
.notify { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; width: 100%; max-width: 560px; }
.notify input.field { flex: 1 1 220px; }
.notify select.field { flex: 0 0 auto; width: auto; }
.soon .small-print { border: none; padding: 0; margin: 0; font-size: .8rem; }
.soon-now { margin-top: 14px; font-size: .9rem; color: var(--muted); }

/* ---------- Tutoring ---------- */
.tutor-band {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 16px; padding: 40px 44px;
  background: radial-gradient(circle at 100% 50%, rgba(124,140,255,.16), transparent 55%), var(--bg-2);
  transition: border-color .2s;
}
.tutor-band:hover { border-color: var(--accent-2); }
.tutor-band h2 { font-family: var(--font-head); font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.02em; margin: 8px 0 8px; }
.tutor-band p { color: var(--muted); max-width: 36em; }
/* "more resources coming" notice under the course grid on the home page */
.coming-note {
  display: flex; align-items: center; gap: 14px; margin-top: 22px;
  border: 1px solid rgba(245,184,75,.35); border-radius: var(--radius); padding: 14px 18px;
  background: rgba(245,184,75,.07); color: var(--muted); font-size: .95rem;
}
.coming-note strong { color: var(--warm); font-weight: 600; }
.coming-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 0 4px rgba(245,184,75,.18); }
.steps-list { list-style: none; counter-reset: st; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps-list li {
  counter-increment: st; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  background: var(--bg-2); display: flex; flex-direction: column; gap: 8px;
}
.steps-list li::before { content: counter(st, decimal-leading-zero); font-family: var(--font-mono); color: var(--accent); font-size: .85rem; }
.steps-list b { font-family: var(--font-head); font-size: 1.1rem; }
.steps-list span { color: var(--muted); font-size: .92rem; }
.muted-note { color: var(--muted); margin-top: 20px; }
.enquire {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start;
  border: 1px solid var(--line); border-radius: 16px; padding: 48px; background: var(--bg-2);
}
.enquire h2 { font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.02em; margin: 10px 0 14px; }
.enquire p { color: var(--muted); }
.small-print { font-size: .85rem; margin-top: 18px; border-left: 2px solid var(--line-2); padding-left: 12px; }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: .88rem; color: var(--muted); font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
textarea.field { resize: vertical; font-family: inherit; }

/* ---------- About page ---------- */
.prose { max-width: 720px; padding: 48px 0 32px; }
.prose h2 { font-family: var(--font-head); font-size: 1.6rem; letter-spacing: -.02em; margin: 44px 0 14px; }
.prose p { color: var(--muted); margin-bottom: 14px; }
.prose ul { margin: 0 0 14px 20px; color: var(--muted); display: grid; gap: 6px; }
.prose strong { color: var(--text); }
.edit-note { border: 1px dashed var(--warm); color: var(--warm); border-radius: 10px; padding: 14px 16px; font-size: .88rem; margin-bottom: 20px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text); }
.faq details p { margin: 10px 0 0; }

@media (max-width: 1000px) {
  .shop-layout { grid-template-columns: 1fr; }
  .filters { position: static; grid-template-columns: 1fr 1fr; }
  .product { grid-template-columns: 1fr; }
  .inc-list { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .steps-list { grid-template-columns: 1fr 1fr; }
  .enquire { grid-template-columns: 1fr; padding: 32px; }
}
@media (max-width: 720px) {
  .steps-list, .form-row { grid-template-columns: 1fr; }
  .enquire { padding: 22px; }
  .tutor-band { padding: 26px; }
  .filters { grid-template-columns: 1fr; }
  .includes { padding: 24px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .card-grid, .types, .quotes { grid-template-columns: repeat(2, 1fr); }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { justify-self: center; max-width: 380px; }
  /* stacked hero: the equation tags sit in the empty space either side of the atom, off its orbits */
  .float-tag.t1 { top: 12%; left: -30%; }
  .float-tag.t2 { top: 44%; bottom: auto; right: -34%; }
  .float-tag.t3 { bottom: 6%; left: -42%; }
  .about { grid-template-columns: 1fr; padding: 36px; }
  .about-visual { aspect-ratio: 16 / 9; }
  .subject-grid { grid-template-columns: 1fr; }
  .nav { gap: 22px; }
}
/* Header: the full menu needs ~820px (logo + seven items), so narrower screens get the ☰ menu */
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; max-height: calc(100vh - 68px); overflow-y: auto; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { justify-content: center; margin-top: 12px; border-bottom: none; }
  .menu-toggle { display: block; }
  /* drop-downs become tap-to-expand sections inside the mobile menu */
  .dd { border-bottom: 1px solid var(--line); }
  .dd-btn { width: 100%; justify-content: space-between; padding: 12px 0; }
  .dd-panel { position: static; transform: none !important; width: auto; display: none; opacity: 1; visibility: visible;
    box-shadow: none; border: none; background: none; padding: 0 0 14px; }
  .dd-panel::before { display: none; }
  .dd.open .dd-panel { display: block; }
  .dd-grid { grid-template-columns: 1fr; gap: 14px; }
  .nav .dd a { border-bottom: none; }
  .nav .dd-subject { padding: 0 0 6px; border-bottom: 1px solid var(--line) !important; }
  .nav .dd-boards a { padding: 5px 10px; border: 1px solid var(--line-2); }
  .nav .dd-all { padding: 0; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 56px 0 48px; }
  /* phones: no room beside the atom, so the equation tags sit in a row underneath it */
  .hero-visual { aspect-ratio: auto; max-width: 300px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .hero-visual svg { height: auto; aspect-ratio: 1 / 1; margin-bottom: 4px; }
  .float-tag, .float-tag.t1, .float-tag.t2, .float-tag.t3 { position: static; font-size: .72rem; padding: 6px 10px; }
  section.block { padding: 64px 0; }
  .card-grid, .types, .quotes, .paths, .shop-grid { grid-template-columns: 1fr; }
  .path { padding: 26px; }
  .about { padding: 24px; gap: 28px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
  .soon { padding: 40px 18px; }
}

/* ---------- Shop: topic index, topic sections, bundle cards ---------- */
.shop-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.topic-index { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); padding: 18px; margin-bottom: 8px; }
.topic-index .label { margin-bottom: 12px; }
.ti-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.ti-grid a {
  display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  transition: border-color .2s;
}
.ti-grid a:hover { border-color: var(--accent); }
.ti-grid b { color: var(--accent); font-size: .85rem; grid-row: span 2; }
.ti-grid span { font-weight: 600; font-size: .9rem; line-height: 1.3; }
.ti-grid i { font-style: normal; color: var(--muted); font-size: .75rem; }

.tsec { padding-top: 40px; scroll-margin-top: 80px; }
.tsec-head {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
  padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
}
.tsec-code {
  min-width: 64px; height: 64px; padding: 0 10px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.35rem; font-weight: 500; color: var(--accent);
  background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.35);
}
.tsec-head h2 { font-family: var(--font-head); font-size: 1.6rem; letter-spacing: -.02em; line-height: 1.2; }
.tsec-head h2 small { font-size: .85rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.tsec-head p { color: var(--muted); margin-top: 6px; max-width: 46em; font-size: .95rem; }
.tsec-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tsec-tags span {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 10px;
}
.tsec-sub { font-family: var(--font-mono); font-size: .78rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 6px 0 12px; }
.tsec-sub + .shop-cards { margin-bottom: 26px; }

.card.is-bundle { border-color: rgba(245,184,75,.45); box-shadow: 0 0 0 1px rgba(245,184,75,.12), 0 18px 40px -24px rgba(245,184,75,.45); }
.card.is-bundle:hover { border-color: var(--warm); }
.card.is-bundle .cover .type { color: var(--warm); border-color: rgba(245,184,75,.5); }

/* Product page: what the topic covers */
.topic-note {
  display: grid; gap: 4px; margin: 18px 0 4px; padding: 14px 16px;
  border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; background: var(--bg-2);
}
.topic-note b { font-family: var(--font-head); }
.topic-note span { color: var(--muted); font-size: .92rem; }
.topic-note i { font-style: normal; color: var(--accent); font-size: .75rem; }
.topic-note:hover { border-color: var(--accent); }
.topic-note .tn-test { color: var(--text); font-size: .88rem; }

/* Chemistry: end-of-topic test length per topic */
.tsec-head p.tsec-test { color: var(--text); font-size: .88rem; margin-top: 6px; }
.tsec-test b { font-family: var(--font-mono); font-size: .74rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-right: 4px; }
.test-explainer {
  margin: 0 0 28px; padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; background: var(--bg-2);
}
.test-explainer p { color: var(--muted); font-size: .93rem; margin-top: 6px; max-width: 60em; }
.test-explainer ul { list-style: none; display: grid; gap: 6px; margin-top: 10px; padding: 0; }
.test-explainer li { font-size: .9rem; }
.test-explainer li b { font-family: var(--font-mono); font-size: .8rem; font-weight: 500; color: var(--accent); margin-right: 6px; }
.test-explainer li span { color: var(--muted); }

@media (max-width: 1000px) { .shop-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
  .shop-cards { grid-template-columns: 1fr; }
  .ti-grid { grid-template-columns: 1fr 1fr; }
  .tsec-code { min-width: 48px; height: 48px; font-size: 1.05rem; }
  .tsec-head { gap: 12px; }
  .tsec-head h2 { font-size: 1.3rem; }
}

/* Home topic guide: code + year/paper, name, plain-English summary */
.topic .t-code { display: flex; flex-direction: column; gap: 2px; }
.topic .t-code i { font-style: normal; color: var(--muted); font-size: .72rem; }
.topic .t-about { color: var(--muted); font-size: .84rem; line-height: 1.45; flex: 1; }
.topic-grid .topic { justify-content: flex-start; gap: 10px; }

/* Home "What's in every resource": feature key on the left, real preview pages on the right */
.feat {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-areas: "intro stage" "key stage";
  column-gap: 48px; row-gap: 22px; align-items: start;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 44px; overflow: clip;
}
.feat-intro { grid-area: intro; }
.feat-intro h2 { font-family: var(--font-head); font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -.02em; line-height: 1.15; margin: 10px 0 12px; }
.feat-intro p { color: var(--muted); }
.feat-key { grid-area: key; display: grid; gap: 4px; }
.feat-item {
  display: flex; gap: 14px; align-items: flex-start; text-align: left; cursor: pointer;
  background: none; border: 1px solid transparent; border-radius: var(--radius); padding: 12px 14px;
  color: var(--text); font: inherit; transition: background .2s, border-color .2s;
}
.feat-item b { display: block; font: 600 1rem var(--font-head); }
.feat-item small { display: block; color: var(--muted); font-size: .85rem; line-height: 1.45; margin-top: 2px; }
.feat-num { color: var(--muted); font-size: .78rem; padding-top: 3px; transition: color .2s; }
.feat-item:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.feat-item[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 9%, var(--bg-2)); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.feat-item[aria-selected="true"] .feat-num { color: var(--accent); }
.feat-about { margin: 12px 0 0 14px; justify-self: start; }
.feat-stage { grid-area: stage; margin: 0; position: sticky; top: 90px; scroll-margin-top: 84px; }
/* The page frame is A4 (210 × 297), sized so the whole page fits on screen; pages are never cropped.
   Gallery feel: two blank sheets peek out behind, and each new page slides in from the right with a slight tilt. */
.feat-shots { display: grid; width: min(100%, calc((100vh - 240px) * 210 / 297)); aspect-ratio: 210 / 297; margin: 0 auto; }
.feat-shots::before, .feat-shots::after {
  content: ""; grid-area: 1 / 1; z-index: 0; border-radius: 6px; background: #E3E8F2; box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.feat-shots::before { transform: rotate(-4deg) translate(-8px, 8px); opacity: .28; }
.feat-shots::after { transform: rotate(2.5deg) translate(8px, 5px); opacity: .5; }
.feat-shot {
  grid-area: 1 / 1; position: relative; z-index: 1; min-height: 0; overflow: hidden; pointer-events: none;
  border-radius: 6px; background: #fff; border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0,0,0,.45);
  opacity: 0; transform: translateX(48px) rotate(3deg) scale(.97);
  transition: opacity .55s ease, transform .75s cubic-bezier(.2,.75,.2,1);
}
.feat-shot.on { opacity: 1; transform: none; z-index: 3; pointer-events: auto; }
.feat-shot.gone { opacity: 0; transform: translateX(-56px) rotate(-4deg) scale(.96); z-index: 2; }
.feat-shot img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Slides: landscape, so three from the deck are stacked on the page */
.feat-shot.slides { display: flex; flex-direction: column; justify-content: center; gap: 4%; padding: 7%; background: var(--panel); }
.feat-shot.slides img { height: auto; min-height: 0; flex: 0 1 auto; border-radius: 4px; box-shadow: 0 10px 26px rgba(0,0,0,.45); }
.feat-shot.compare img { position: absolute; inset: 0; }
.feat-shot.compare .top { clip-path: inset(0 0 0 var(--cut, 50%)); }
/* While the slideshow plays, the slider sweeps across by itself: mostly student, then mostly teacher */
@property --cut { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
@keyframes feat-sweep { 0% { --cut: 50%; } 30% { --cut: 86%; } 75% { --cut: 14%; } 100% { --cut: 26%; } }
.feat-shot.compare.auto { animation: feat-sweep 5.4s .7s ease-in-out forwards; }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 3px; margin-left: -1.5px; background: var(--accent); box-shadow: 0 0 0 1px rgba(7,11,22,.35); pointer-events: none; }
.cmp-line::after {
  content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--bg); font: 700 1rem var(--font-mono); box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.feat-shot.compare i {
  position: absolute; top: 12px; font-style: normal; font-size: .72rem; padding: 4px 10px; border-radius: 999px;
  background: var(--bg); color: var(--text); border: 1px solid var(--line-2); pointer-events: none;
}
.feat-shot.compare i.l { left: 12px; }
.feat-shot.compare i.r { right: 12px; border-color: var(--accent); color: var(--accent); }
.cmp { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
/* Example switcher under the page: one button per subject */
.feat-ex { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.feat-ex button {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); font: 600 .8rem var(--font-head);
  transition: color .2s, border-color .2s, background .2s;
}
.feat-ex .ico { color: var(--accent-s); display: inline-grid; }
.feat-ex .ico svg { width: 14px; height: 14px; }
.feat-ex button:hover { color: var(--text); }
.feat-ex button[aria-pressed="true"] { color: var(--text); border-color: var(--accent-s); background: color-mix(in srgb, var(--accent-s) 12%, var(--bg-2)); }
/* Slideshow controls: pause / play and a progress bar for the current page */
.feat-bar { display: flex; align-items: center; gap: 10px; width: min(100%, calc((100vh - 240px) * 210 / 297)); margin: 18px auto 0; }
.feat-play {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); transition: border-color .2s;
}
.feat-play:hover { border-color: var(--accent); }
.feat-play svg { width: 11px; height: 11px; fill: currentColor; }
.feat-play .i-play, .feat-play[aria-pressed="true"] .i-pause { display: none; }
.feat-play[aria-pressed="true"] .i-play { display: block; }
.feat-prog { flex: 1; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.feat-prog i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; }
@keyframes feat-prog { from { width: 0; } to { width: 100%; } }
.feat.paused .feat-prog i, .feat.paused .feat-shot.auto { animation-play-state: paused; }
.feat-stage figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: .85rem; }
.feat-cap { color: var(--muted); font-size: .78rem; }
.feat-stage figcaption .link-arrow { font-size: .88rem; }
@media (max-width: 900px) {
  .feat { grid-template-columns: 1fr; grid-template-areas: "intro" "stage" "key"; padding: 28px; }
  .feat-stage { position: static; }
  .feat-shots, .feat-bar { width: min(100%, 480px); }
}
@media (max-width: 720px) {
  .feat { padding: 20px; }
}

/* Home "Students: start here": three numbered steps and an "or get the lot" option, in the student violet */
.route-label, .route-link { color: var(--accent-2) !important; }
.route { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: none; }
.route li { position: relative; }
.route li:not(:last-child):not(:nth-last-child(2))::after {     /* arrow between the three steps */
  content: "→"; position: absolute; right: -12px; top: 30px; z-index: 1; color: var(--accent-2); font-family: var(--font-mono);
}
.route a {
  height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 22px 20px 20px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, transform .2s;
}
.route a:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.route-n { color: var(--accent-2); font-size: .85rem; }
.route-tag { position: absolute; top: 20px; right: 18px; font-style: normal; font-size: .7rem; padding: 2px 8px; border-radius: 999px; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); }
.route b { font: 600 1.15rem var(--font-head); }
.route p { color: var(--muted); font-size: .88rem; line-height: 1.5; flex: 1; }
.route-go { color: var(--accent-2); font-weight: 600; font-size: .88rem; }
.route-alt a { border-style: dashed; background: transparent; }
@media (max-width: 1000px) {
  .route { grid-template-columns: 1fr 1fr; }
  .route li::after { display: none; }
}
@media (max-width: 560px) { .route { grid-template-columns: 1fr; } }

/* Shop views across several subjects (sg): subject buttons, then a block per subject of collapsible groups (tg-group) */
.sg-index { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.sg-index a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--bg-2); font: 600 .92rem var(--font-head); transition: border-color .2s, background .2s;
}
.sg-index a:hover { border-color: var(--accent-s); background: color-mix(in srgb, var(--accent-s) 10%, var(--bg-2)); }
.sg-index .ico, .sg-head .ico { color: var(--accent-s); display: inline-grid; place-items: center; }
.sg-index .ico svg { width: 17px; height: 17px; }
.sg-index i { font-style: normal; color: var(--accent-s); font-size: .75rem; }
.sg-subject { display: grid; gap: 10px; margin-bottom: 38px; scroll-margin-top: 90px; }
.sg-head { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.sg-head .ico { width: 42px; height: 42px; border-radius: 11px; border: 1px solid color-mix(in srgb, var(--accent-s) 45%, transparent); background: color-mix(in srgb, var(--accent-s) 10%, transparent); }
.sg-head .ico svg { width: 22px; height: 22px; }
.sg-head h2 { font: 600 1.45rem var(--font-head); letter-spacing: -.01em; }
.sg-head p { color: var(--muted); font-size: .78rem; }
.sg-code { color: var(--accent-s); font-size: .85rem; margin-right: 4px; }
.sg-subject .tg-body > .shop-cards { margin-top: 14px; }

/* Home topic guide (tg): subject tabs, then collapsible categories of topics */
.tg-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tg-tab {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--muted); font: 600 .92rem var(--font-head);
  transition: color .2s, border-color .2s, background .2s;
}
.tg-tab .ico { color: var(--accent-s); display: inline-grid; }
.tg-tab .ico svg { width: 18px; height: 18px; }
.tg-tab:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent-s) 50%, var(--line-2)); }
.tg-tab[aria-selected="true"] { color: var(--text); border-color: var(--accent-s); background: color-mix(in srgb, var(--accent-s) 12%, var(--bg-2)); }
.tg-panel { display: grid; gap: 10px; }
.tg-panel[hidden] { display: none; }
.tg-panel > .tg-all { margin-top: 6px; justify-self: start; color: var(--accent-s); }
.tg-group { background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--accent-s); border-radius: var(--radius); overflow: hidden; }
.tg-group[open] { border-color: color-mix(in srgb, var(--accent-s) 40%, var(--line)); border-left-color: var(--accent-s); }
.tg-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 18px; padding: 18px 22px; }
.tg-group summary::-webkit-details-marker { display: none; }
.tg-group summary:hover { background: color-mix(in srgb, var(--accent-s) 5%, transparent); }
.tg-head { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tg-head b { font: 600 1.12rem var(--font-head); }
.tg-head small { color: var(--muted); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-count { color: var(--accent-s); font-size: .76rem; white-space: nowrap; }
.tg-chev { width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin: -4px 4px 0; flex: none; }
.tg-group[open] .tg-chev { transform: rotate(-135deg); margin-top: 4px; }
.tg-body { padding: 4px 22px 18px; border-top: 1px solid var(--line); }
.tg-sub { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 6px; font: 600 .95rem var(--font-head); }
.tg-sub .mono { color: var(--accent-s); font-size: .8rem; }
.tg-sub i { color: var(--muted); font-style: normal; font-size: .72rem; font-weight: 400; }
.tg-sub .link-arrow { margin-left: auto; font-size: .82rem; color: var(--accent-s); }
.tg-list { display: grid; }
.tg-topic { display: grid; grid-template-columns: 64px 1fr auto auto; align-items: center; gap: 16px; padding: 11px 8px; border-bottom: 1px solid var(--line); border-radius: 6px; transition: background .15s; }
.tg-list .tg-topic:last-child { border-bottom: 0; }
.tg-topic:hover { background: var(--panel); }
.tg-code { color: var(--accent-s); font-size: .8rem; }
.tg-main { display: flex; flex-direction: column; min-width: 0; }
.tg-main b { font-weight: 600; font-size: .95rem; }
.tg-main small { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.tg-meta { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.tg-go { color: var(--accent-s); font-weight: 600; font-size: .85rem; white-space: nowrap; min-width: 44px; text-align: right; }
.tg-body > .tg-all { display: inline-block; margin-top: 12px; font-size: .88rem; color: var(--accent-s); }
@media (max-width: 720px) {
  .tg-group summary { padding: 16px; gap: 12px; flex-wrap: wrap; }
  .tg-head { flex-basis: calc(100% - 40px); }
  .tg-count { order: 3; }
  .tg-body { padding: 4px 12px 14px; }
  .tg-topic { grid-template-columns: 48px 1fr auto; gap: 10px; }
  .tg-meta, .tg-main small { display: none; }
}

/* A topic's single bundle runs the full width: cover on the left, details on the right */
.shop-cards.one { grid-template-columns: 1fr; }
.shop-cards.one .card { flex-direction: row; }
.shop-cards.one .cover { flex: 0 0 46%; aspect-ratio: 16 / 10; border-bottom: none; border-right: 1px solid var(--line); }
.shop-cards.one .card-body { justify-content: center; padding: 24px 28px; }
.shop-cards.one .card h3 { font-size: 1.3rem; }
.shop-cards.one .card p { flex: 0; font-size: .95rem; }
@media (max-width: 720px) {
  .shop-cards.one .card { flex-direction: column; }
  .shop-cards.one .cover { flex: none; border-right: none; border-bottom: 1px solid var(--line); }
  .shop-cards.one .card-body { padding: 18px; }
}

/* Small screens: filters fold away behind a button so the topics come first */
.filter-toggle { display: none; }
@media (max-width: 1000px) {
  .filter-toggle {
    display: block; width: 100%; padding: 11px 14px; text-align: left; cursor: pointer;
    font: 600 .95rem var(--font-body); color: var(--text);
    background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius);
  }
  .filters { display: none; }
  .filters.open { display: grid; }
  .shop-layout { gap: 20px; }
}

/* ---------- Policies, student discount, department licence ---------- */
.policy-nav { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.policy-nav a, .prose p a, .prose li a, .small-print a, .buy-notes a { color: var(--accent); }
.prose h2[id], .tsec { scroll-margin-top: 84px; }
.steps-list.steps-3 { grid-template-columns: repeat(3, 1fr); }
.form .check { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: .88rem; }
.form .check input { margin-top: 4px; accent-color: var(--accent); }
.form-msg { color: var(--warm); font-size: .88rem; border-left: 2px solid var(--warm); padding-left: 10px; }
.dd-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.dd-extra { color: var(--muted); font-size: .88rem; }
.dd-extra:hover { color: var(--text); }
.promo {
  display: block; margin-bottom: 18px; padding: 14px 18px; border-radius: var(--radius);
  border: 1px solid rgba(124,140,255,.45); background: rgba(124,140,255,.08); font-size: .92rem;
}
.promo b { color: var(--accent-2); margin-right: 8px; }
.promo:hover { border-color: var(--accent-2); }
@media (max-width: 1000px) { .steps-list.steps-3 { grid-template-columns: 1fr; } }

/* Bundle option picker (e.g. Year 2: choose the optional topic) */
.opt-pick { border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 10px; padding: 12px 14px 10px; margin: 12px 0 14px; }
.opt-pick legend { padding: 0 6px; font-size: .85rem; font-weight: 600; }
.opt-pick label { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; font-size: .95rem; }
.opt-pick input { accent-color: #22D3EE; width: 18px; height: 18px; }

/* ---------- Sectioned courses (Chemistry 3.1/3.2/3.3, Maths Pure/Stats/Mechanics) ---------- */
.sec-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sec-tab { background: var(--bg-2); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: .88rem; cursor: pointer; }
.sec-tab b { color: var(--accent); font-weight: 500; margin-right: 2px; }
.sec-tab:hover { border-color: var(--accent); }
.sec-tab.on { background: var(--accent); border-color: var(--accent); color: #04121A; }
.sec-tab.on b { color: inherit; }
.hub .label { margin-bottom: 12px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px; }
.shop-layout > div { min-width: 0; }
.sec-tabs { max-width: 100%; }
.hub-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); color: var(--text); transition: border-color .15s, transform .15s; }
.hub-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.hub-card h3 { margin: 0; font-size: 1.25rem; }
.hub-subject:hover { border-color: var(--accent-s); }
.hub-subject .ico { color: var(--accent-s); width: 46px; height: 46px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent-s) 45%, transparent); background: color-mix(in srgb, var(--accent-s) 10%, transparent); }
.hub-subject .ico svg { width: 24px; height: 24px; }
.hub-subject .link-arrow { margin-top: auto; }
.hub-code { color: var(--accent); font-size: 1.6rem; font-weight: 500; line-height: 1; }
.hub-meta { color: var(--muted); font-size: .78rem; margin: 0; }
.hub-topics { color: var(--muted); font-size: .88rem; line-height: 1.5; margin: 0; flex: 1; }
.hub-topics i { font-style: normal; color: var(--text); }
.hub-wide { margin-top: 14px; flex-direction: row; align-items: center; gap: 18px; border-style: dashed; border-color: var(--warm); }
.hub-wide .hub-code { color: var(--warm); }
.hub-wide > div { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.hub-all { display: block; margin: 18px auto 0; background: none; border: 0; font: inherit; cursor: pointer; }
@media (max-width: 640px) {
  .hub-wide { flex-direction: column; align-items: flex-start; }
  .sec-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .sec-tab { flex: none; }
}

/* ---------- Student Pass (student-pass.html) ---------- */
.pass-builder { display: grid; gap: 34px; }
.pass-step .label { margin-bottom: 14px; }
.pass-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pass-tier {
  text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; color: var(--text); font-family: inherit; cursor: pointer; display: grid; gap: 4px;
  transition: border-color .15s, transform .15s;
}
.pass-tier:hover { border-color: var(--line-2); transform: translateY(-2px); }
.pass-tier.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.pass-tier b { font-family: var(--font-head); font-size: 1.1rem; }
.pass-tier .price { font-size: 1.6rem; }
.pass-tier small { color: var(--muted); font-size: .85rem; }
.pass-subjects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pass-subject {
  display: grid; grid-template-columns: auto auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; cursor: pointer;
}
.pass-subject:has(input:checked) { border-color: var(--accent-s, var(--accent)); box-shadow: 0 0 0 1px var(--accent-s, var(--accent)) inset; }
.pass-subject input { accent-color: var(--accent-s, var(--accent)); width: 18px; height: 18px; }
.pass-subject .ico { color: var(--accent-s, var(--accent)); display: inline-flex; width: 22px; }
.pass-subject-name { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }
.pass-subject-what { grid-column: 1 / -1; color: var(--muted); font-size: .85rem; margin-top: 8px; }
.pass-subject.soon { opacity: .55; cursor: not-allowed; }
.pass-total {
  display: grid; grid-template-columns: 1fr 260px; gap: 28px; align-items: center;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 24px 26px;
}
.pass-total h3 { font-family: var(--font-head); font-size: 1.35rem; margin: 6px 0 8px; }
.pass-total p { color: var(--muted); }
.pass-total .price s { color: var(--muted); font-size: 1.1rem; font-weight: 500; margin-left: 6px; }
.pass-empty { grid-column: 1 / -1; color: var(--muted); }
.pass-faq { display: grid; gap: 10px; margin-top: 18px; max-width: 52em; }
.pass-faq details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.pass-faq summary { cursor: pointer; font-family: var(--font-head); font-weight: 600; }
.pass-faq p { color: var(--muted); margin-top: 8px; }
@media (max-width: 1000px) {
  .pass-tiers, .pass-subjects { grid-template-columns: 1fr; }
  .pass-total { grid-template-columns: 1fr; }
}
/* Department Pass */
.dept-subjects { grid-template-columns: repeat(4, 1fr); }
.pass-total .price .per { font-size: .95rem; color: var(--muted); font-weight: 500; }
.pass-buy .dept-invoice { margin-top: 10px; }
@media (max-width: 1000px) { .dept-subjects { grid-template-columns: 1fr; } }

/* Shop: topic picker cards, back link, shorter card text */
.topic-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 10px; }
.tcard { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, transform .15s; }
.tcard:hover { border-color: var(--accent); transform: translateY(-2px); }
.tcard b { color: var(--accent); font-weight: 500; font-size: .95rem; }
.tcard span { font-family: var(--font-head); font-weight: 600; line-height: 1.3; }
.tcard i { font-style: normal; color: var(--muted); font-size: .78rem; }
.tcard-bundle { border-style: dashed; border-color: var(--warm); }
.tcard-bundle b { color: var(--warm); }
.back-link { display: inline-block; margin-bottom: 16px; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.shop-cards .card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.test-explainer summary { cursor: pointer; }
.test-explainer:not([open]) { margin-bottom: 18px; padding: 10px 18px; }

/* Students: free notes section + premium pointer */
.free-notes { margin-bottom: 32px; padding: 22px 24px; border: 1px solid rgba(52,211,153,.35); border-radius: 14px; background: radial-gradient(circle at 100% 0, rgba(52,211,153,.10), transparent 55%), var(--bg-2); }
.free-notes .label { color: #34D399; }
.free-notes h2 { font-family: var(--font-head); font-size: clamp(1.3rem, 2.2vw, 1.6rem); letter-spacing: -.02em; margin: 6px 0 4px; }
.free-notes > p { color: var(--muted); font-size: .95rem; }
.free-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.free-link { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg); color: var(--text); font-weight: 600; transition: border-color .15s; }
.free-link:hover { border-color: var(--accent-s); }
.free-link .ico { color: var(--accent-s); display: inline-grid; }
.free-link .ico svg { width: 18px; height: 18px; }
.free-link i { font-style: normal; font-weight: 400; font-size: .75rem; color: #34D399; }
.premium-note { margin: 18px 0 0; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: .92rem; color: var(--muted); }
.shop-cards + .premium-note, .premium-note:first-child { margin: 0 0 20px; padding: 12px 16px; border: 1px solid rgba(245,184,75,.35); border-radius: var(--radius); background: rgba(245,184,75,.06); }
.premium-note b { color: var(--warm); margin-right: 4px; }
.premium-note .link-arrow { white-space: nowrap; margin-left: 4px; }
