:root {
  --navy: #102f55;
  --ink: #172033;
  --muted: #657083;
  --teal: #0b9f9a;
  --gold: #f4b942;
  --coral: #f2634c;
  --green: #22a06b;
  --paper: #f6f8fb;
  --line: #dce4ee;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(16, 47, 85, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.header-actions,
.main-nav,
.hero-metrics,
.product-actions,
.price-row,
.card-bottom,
.section-heading,
.store-toolbar {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0;
  min-width: clamp(142px, 20vw, 178px);
}

.brand-mark {
  display: block;
  width: clamp(142px, 20vw, 178px);
  height: clamp(38px, 5.3vw, 47px);
  color: var(--white);
  background: url("assets/logo-learnza.png") left center / contain no-repeat;
}

.brand-mark svg {
  display: none;
}

.brand-copy {
  display: none;
}

.brand-copy strong {
  letter-spacing: 0;
}

.brand-copy em {
  color: var(--teal);
  font-style: normal;
}

.brand strong,
.site-footer strong {
  display: block;
  color: var(--navy);
  font-size: 1.1rem;
}

.brand small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.main-nav {
  gap: 8px;
}

.main-nav a,
.footer-column a {
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 8px;
}

.main-nav a:hover,
.footer-column a:hover {
  color: var(--navy);
  background: #eef5f8;
}

.header-actions {
  gap: 10px;
}

.icon-btn,
.cart-btn {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  min-height: 42px;
  border-radius: 8px;
}

.icon-btn {
  width: 42px;
  padding: 0;
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 700;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark svg {
  width: 48px;
  height: 48px;
  fill: initial;
  stroke: none;
}

.shop-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(42px, 8vw, 86px) clamp(18px, 4vw, 56px) 34px;
  background:
    linear-gradient(115deg, rgba(16, 47, 85, 0.96), rgba(10, 90, 107, 0.9)),
    radial-gradient(circle at top right, rgba(244, 185, 66, 0.45), transparent 40%);
  color: var(--white);
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 6.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  line-height: 1.65;
}

.hero-metrics {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-metrics span {
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-primary,
.hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 900;
}

.hero-primary {
  color: var(--navy);
  background: var(--gold);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.hero-secondary {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
}

.featured-product {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.book-cover {
  min-height: 420px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(16, 47, 85, 0.88), rgba(16, 47, 85, 0.98)),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: perspective(900px) rotateY(-8deg);
}

.cover-band {
  width: fit-content;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--teal);
  font-weight: 800;
}

.book-cover h2 {
  margin: 16px 0 0;
  color: var(--gold);
  font-size: 2.55rem;
  line-height: 1;
  text-transform: uppercase;
}

.book-cover p {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.45;
}

.math-board {
  display: grid;
  gap: 8px;
  color: #a8fff4;
  font-family: Consolas, "Courier New", monospace;
  font-size: 1.1rem;
}

.book-cover strong {
  color: var(--white);
  padding-top: 18px;
  border-top: 4px solid var(--gold);
}

.store-promise-cover h2 {
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.product-panel {
  align-self: center;
  padding: 26px;
  color: var(--ink);
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-checklist {
  display: grid;
  gap: 9px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.hero-checklist li {
  position: relative;
  padding-left: 22px;
  color: var(--ink);
  line-height: 1.42;
  font-weight: 750;
}

.hero-checklist li::before {
  position: absolute;
  left: 0;
  top: 0.15em;
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: inset 0 0 0 3px #d7f9f1;
}

.download-badge,
.status {
  display: inline-block;
  padding: 7px 10px;
  color: var(--white);
  background: var(--coral);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.product-panel h3,
.product-card h3,
.experience h2,
.section-heading h2 {
  margin: 10px 0 8px;
  color: var(--navy);
  line-height: 1.12;
}

.product-panel p,
.product-card p,
.experience p,
.site-footer p {
  color: var(--muted);
  line-height: 1.55;
}

.price-row {
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.price-row strong {
  color: var(--navy);
  font-size: 2rem;
}

.price-row span {
  color: var(--green);
  font-weight: 800;
}

.product-actions {
  gap: 12px;
  margin-top: 18px;
}

.product-actions button,
.product-actions .primary-action,
.card-bottom button,
.mini-button {
  border: 0;
  color: var(--white);
  background: var(--navy);
  border-radius: 8px;
  min-height: 42px;
  padding: 0 16px;
  font-weight: 800;
}

.product-actions .primary-action,
.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.product-actions a {
  min-height: 42px;
  padding: 11px 14px;
  border-radius: 8px;
  color: var(--navy);
  background: #edf6f6;
  font-weight: 800;
}

.product-actions a.primary-action {
  color: var(--white);
  background: var(--navy);
}

.payfast-checkout {
  margin: 0;
}

.product-actions .payfast-button {
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(16, 47, 85, 0.2);
}

.product-actions .payfast-button:hover {
  background: #0b9f9a;
}

.checkout-note {
  flex-basis: 100%;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.payment-status {
  border-bottom: 4px solid var(--gold);
}

.store-toolbar,
.catalogue,
.faculties,
.experience,
.site-footer {
  margin: 0 auto;
  width: min(1180px, calc(100% - 36px));
}

.store-toolbar {
  gap: 14px;
  justify-content: space-between;
  padding: 22px;
  margin-top: -24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 45px rgba(16, 47, 85, 0.12);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 260px;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #edf2f7;
  border-radius: 8px;
}

.segmented button {
  border: 0;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
}

.segmented .active {
  color: var(--navy);
  background: var(--white);
}

.catalogue,
.faculties,
.experience {
  padding: 58px 0 0;
}

.section-heading {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.55rem);
}

.section-heading a {
  color: var(--teal);
  font-weight: 800;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-hero,
.catalogue-section,
.seo-strip {
  width: min(100% - clamp(32px, 7vw, 96px), 1180px);
  margin-inline: auto;
}

.category-hero.article-hero {
  max-width: 1180px;
  padding: clamp(54px, 8vw, 96px) 0 clamp(28px, 5vw, 52px);
}

.category-hero h1 {
  max-width: 860px;
}

.category-hero > p:not(.eyebrow) {
  max-width: 760px;
}

.category-hero .hero-actions {
  margin-top: 24px;
  gap: 10px;
}

.category-hero .mini-button {
  min-height: 40px;
  padding: 0 14px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid rgba(16, 47, 85, 0.12);
  box-shadow: 0 12px 30px rgba(16, 47, 85, 0.08);
}

.catalogue-section {
  padding: clamp(26px, 4vw, 44px) 0 clamp(44px, 6vw, 72px);
}

.catalogue-section .section-heading {
  align-items: end;
  padding: 0 0 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(16, 47, 85, 0.12);
}

.catalogue-section .product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.catalogue-section .product-card {
  min-height: 378px;
  padding: 20px;
  box-shadow: 0 18px 46px rgba(16, 47, 85, 0.08);
}

.seo-strip {
  margin-bottom: clamp(42px, 7vw, 78px);
  padding: clamp(24px, 4vw, 38px);
  color: var(--navy);
  background: linear-gradient(135deg, #ffffff, #eef8f7);
  border: 1px solid rgba(11, 159, 154, 0.16);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(16, 47, 85, 0.08);
}

.seo-strip h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
}

.seo-strip p {
  max-width: 920px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.grade-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0 -6px;
  padding: 18px 0 8px;
  border-bottom: 1px solid rgba(16, 47, 85, 0.14);
}

.grade-heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  line-height: 1.1;
}

.grade-heading .eyebrow {
  margin: 0;
}

.product-card {
  position: relative;
  min-height: 362px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-card.available {
  border-color: rgba(11, 159, 154, 0.45);
}

.product-card.review {
  border-color: rgba(244, 185, 66, 0.7);
  background: linear-gradient(180deg, #ffffff, #fffaf0);
}

.product-card .status {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--green);
}

.product-card.review .status {
  color: var(--navy);
  background: var(--gold);
}

.product-card .upcoming {
  color: var(--navy);
  background: #fff3cc;
}

.mini-cover {
  display: grid;
  place-items: end start;
  height: 142px;
  padding: 14px;
  margin-bottom: 16px;
  color: var(--white);
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 900;
}

.mini-cover.maths { background: linear-gradient(135deg, var(--navy), var(--teal)); }
.mini-cover.science { background: linear-gradient(135deg, #0b6b52, #2fbf71); }
.mini-cover.ems { background: linear-gradient(135deg, #583f99, #f4b942); }
.mini-cover.english { background: linear-gradient(135deg, #922c40, #f2634c); }
.mini-cover.social { background: linear-gradient(135deg, #2c5f7c, #d2953f); }
.mini-cover.engineering { background: linear-gradient(135deg, #102f55, #64748b); }
.mini-cover.technology { background: linear-gradient(135deg, #164e63, #f2634c); }
.mini-cover.life-orientation { background: linear-gradient(135deg, #0b9f9a, #7c3aed); }
.mini-cover.creative-arts { background: linear-gradient(135deg, #7c3aed, #f4b942); }
.mini-cover.afrikaans-fal { background: linear-gradient(135deg, #102f55, #f2634c); }

.product-card p {
  flex: 1;
}

.card-bottom {
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.card-bottom strong {
  color: var(--navy);
}

.card-bottom button {
  min-height: 36px;
  padding: 0 12px;
}

.card-bottom .mini-button {
  min-height: 36px;
  padding: 0 12px;
}

.faculty-products {
  margin-top: 18px;
}

.faculty-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.faculty-grid a {
  min-height: 120px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 850;
}

.faculty-grid span {
  width: fit-content;
  padding: 6px 8px;
  color: var(--white);
  background: var(--teal);
  border-radius: 7px;
  font-size: 0.78rem;
}

.experience {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  align-items: center;
  padding-bottom: 64px;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.feature-list div {
  min-height: 142px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.feature-list strong,
.feature-list span {
  display: block;
}

.feature-list strong {
  color: var(--navy);
  margin-bottom: 10px;
}

.feature-list span {
  color: var(--muted);
  line-height: 1.45;
}

.product-hero,
.study-article {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.product-hero {
  display: grid;
  grid-template-columns: minmax(260px, 390px) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 72px);
  align-items: center;
  padding: clamp(38px, 7vw, 82px) 0 42px;
}

.product-cover {
  transform: none;
}

.science-cover {
  background:
    linear-gradient(180deg, rgba(9, 83, 68, 0.9), rgba(16, 47, 85, 0.98)),
    radial-gradient(circle at 20% 20%, rgba(34, 160, 107, 0.42), transparent 32%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px);
}

.ems-cover {
  background:
    linear-gradient(180deg, rgba(88, 63, 153, 0.88), rgba(16, 47, 85, 0.98)),
    radial-gradient(circle at 22% 18%, rgba(244, 185, 66, 0.36), transparent 34%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px);
}

.english-cover {
  background:
    linear-gradient(180deg, rgba(146, 44, 64, 0.88), rgba(16, 47, 85, 0.98)),
    radial-gradient(circle at 22% 18%, rgba(242, 99, 76, 0.36), transparent 34%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px);
}

.social-cover {
  background:
    linear-gradient(180deg, rgba(44, 95, 124, 0.9), rgba(16, 47, 85, 0.98)),
    radial-gradient(circle at 22% 18%, rgba(210, 149, 63, 0.42), transparent 34%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px);
}

.technology-cover {
  background:
    linear-gradient(180deg, rgba(22, 78, 99, 0.92), rgba(16, 47, 85, 0.98)),
    radial-gradient(circle at 22% 18%, rgba(242, 99, 76, 0.4), transparent 34%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px);
}

.life-orientation-cover {
  background:
    linear-gradient(180deg, rgba(11, 159, 154, 0.88), rgba(16, 47, 85, 0.98)),
    radial-gradient(circle at 22% 18%, rgba(124, 58, 237, 0.34), transparent 34%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px);
}

.creative-arts-cover {
  background:
    linear-gradient(180deg, rgba(124, 58, 237, 0.88), rgba(16, 47, 85, 0.98)),
    radial-gradient(circle at 22% 18%, rgba(244, 185, 66, 0.38), transparent 34%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px);
}

.afrikaans-fal-cover {
  background:
    linear-gradient(180deg, rgba(242, 99, 76, 0.88), rgba(16, 47, 85, 0.98)),
    radial-gradient(circle at 24% 18%, rgba(215, 249, 241, 0.36), transparent 34%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px);
}

.product-cover h1 {
  margin: 16px 0 0;
  color: var(--gold);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1;
  text-transform: uppercase;
}

.product-detail {
  padding: clamp(24px, 4vw, 44px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.product-detail h1,
.article-hero h1 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: clamp(2.1rem, 4.6vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.product-detail p,
.article-hero p,
.article-body p,
.article-body li,
.article-card p {
  color: var(--muted);
  line-height: 1.7;
}

.price-box {
  display: grid;
  gap: 3px;
  width: fit-content;
  min-width: 210px;
  margin: 24px 0;
  padding: 18px;
  background: #fff7df;
  border: 1px solid rgba(244, 185, 66, 0.5);
  border-radius: 8px;
}

.price-box span,
.price-box small {
  color: var(--muted);
  font-weight: 750;
}

.price-box strong {
  color: var(--navy);
  font-size: 2.4rem;
  line-height: 1;
}

.product-info-grid {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 12px 0 64px;
}

.product-info-grid article,
.article-card,
.article-buy-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.product-info-grid h2,
.article-card h2,
.article-body h2,
.article-buy-box h2 {
  margin: 0 0 10px;
  color: var(--navy);
  line-height: 1.16;
}

.product-info-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.article-hero {
  padding: clamp(42px, 7vw, 82px) 0 30px;
  max-width: 980px;
}

.article-hero p {
  max-width: 760px;
  font-size: 1.08rem;
}

.article-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 12px;
  padding: 0 18px;
  color: var(--white);
  background: var(--coral);
  border-radius: 8px;
  font-weight: 900;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding-bottom: 64px;
}

.article-card {
  position: sticky;
  top: 96px;
}

.article-body {
  padding: clamp(24px, 4vw, 44px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-body a:not(.article-cta) {
  color: var(--teal);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-body ul {
  padding-left: 22px;
}

.formula-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.formula-jump-nav a {
  padding: 10px 13px;
  border-radius: 8px;
  color: var(--navy);
  background: var(--gold);
  font-weight: 900;
}

.formula-grade {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.formula-heading h2 {
  margin-bottom: 8px;
}

.formula-table-wrap {
  overflow-x: auto;
  margin: 18px 0 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.formula-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.formula-table th,
.formula-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.formula-table th {
  color: var(--navy);
  background: #edf6f6;
  font-weight: 900;
}

.formula-table td:first-child {
  color: var(--navy);
  font-weight: 850;
}

.formula-table code {
  color: #0a5a6b;
  font-family: Consolas, "Courier New", monospace;
  font-weight: 900;
  white-space: nowrap;
}

.theorem-title {
  margin-top: 20px;
}

.theorem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.theorem-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.theorem-grid h3 {
  margin: 0 0 8px;
  color: var(--navy);
}

.theorem-grid p {
  margin: 0;
}

.article-buy-box {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin: 28px 0;
  background: #f1fbfa;
  border-color: rgba(11, 159, 154, 0.28);
}

.about-page {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding-bottom: 64px;
}

.about-hero {
  padding: clamp(42px, 7vw, 78px) 0 clamp(28px, 4vw, 42px);
  max-width: 1030px;
}

.about-hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(3.2rem, 8vw, 6.8rem);
  line-height: 0.95;
}

.about-hero > p:not(.eyebrow) {
  max-width: 820px;
  margin: 18px 0 0;
  font-size: 1.16rem;
  line-height: 1.65;
}

.about-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.about-quick-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 11px 14px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(220px, 286px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 34px);
  align-items: start;
}

.about-toc,
.about-content {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(16, 47, 85, 0.06);
}

.about-toc {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 6px;
  padding: 20px;
}

.about-toc h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 1rem;
}

.about-toc a {
  display: block;
  width: 100%;
  padding: 9px 10px;
  color: var(--muted);
  border-radius: 8px;
  font-weight: 800;
}

.about-toc a:hover {
  color: var(--navy);
  background: #f1fbfa;
}

.about-content {
  padding: clamp(28px, 4vw, 52px);
}

.about-content section + section {
  margin-top: clamp(30px, 4vw, 44px);
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--line);
}

.about-content h2 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  line-height: 1.08;
}

.about-content h3 {
  margin: 22px 0 8px;
  color: var(--navy);
  font-size: 1.08rem;
}

.about-content p,
.about-content li {
  color: var(--muted);
  font-size: 1.01rem;
  line-height: 1.75;
}

.about-content p {
  margin: 0 0 16px;
}

.about-content p:last-child {
  margin-bottom: 0;
}

.about-content ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.about-content a {
  color: var(--teal);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.about-searches {
  border-radius: 8px;
  padding: clamp(22px, 3vw, 30px);
  background: #f1fbfa;
  border-left: 4px solid var(--teal);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(250px, 1.3fr) repeat(4, minmax(140px, 1fr));
  gap: clamp(18px, 3vw, 34px);
  align-items: start;
  padding: 42px 0 48px;
  border-top: 1px solid var(--line);
}

.footer-brand p {
  max-width: 320px;
  margin: 18px 0 0;
}

.footer-logo {
  width: fit-content;
  min-width: 0;
}

.footer-column {
  display: grid;
  gap: 4px;
}

.footer-column h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-column a {
  width: fit-content;
  margin-left: 0;
}

.credit-footer {
  width: min(1180px, calc(100% - 36px));
  margin: -24px auto 0;
  padding: 0 0 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0;
}

.credit-footer a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--navy);
  font-weight: 900;
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

.credit-footer a::after {
  content: "View studio";
  padding: 4px 8px;
  color: var(--teal);
  background: #f1fbfa;
  border: 1px solid rgba(11, 159, 154, 0.22);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
}

.credit-footer a:hover {
  color: var(--teal);
  transform: translateY(-1px);
}

.admin-body {
  background:
    linear-gradient(180deg, #f7fbfa 0%, #ffffff 48%),
    radial-gradient(circle at top right, rgba(11, 159, 154, 0.12), transparent 34%);
}

.admin-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 48px 0 58px;
}

.admin-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 210px);
}

.admin-intro h1 {
  max-width: 760px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(3.4rem, 9vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.admin-intro > p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.12rem;
}

.admin-status {
  width: fit-content;
  max-width: 680px;
  margin-top: 24px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: #ffffff;
  font-weight: 800;
}

.admin-status[data-tone="warning"] {
  border-color: rgba(244, 185, 66, 0.55);
  background: #fff9e8;
}

.admin-status[data-tone="success"] {
  border-color: rgba(11, 159, 154, 0.35);
  background: #f0fbfa;
}

.admin-status[data-tone="error"] {
  border-color: rgba(242, 99, 76, 0.45);
  background: #fff1ee;
}

.auth-card,
.admin-panel,
.admin-metrics article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(16, 47, 85, 0.08);
}

.auth-card {
  padding: 26px;
}

.auth-card h2,
.admin-panel h2 {
  margin: 0 0 16px;
  color: var(--navy);
}

.provider-grid {
  display: grid;
  gap: 10px;
}

.provider-grid button,
.email-login button,
.ghost-button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--navy);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.provider-grid button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  text-align: left;
}

.provider-grid span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--navy);
  font-size: 0.8rem;
}

.email-login {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.email-login label {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 900;
}

.email-login input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--navy);
  font: inherit;
}

.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-user > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--teal);
  font-weight: 900;
}

.admin-user div {
  display: grid;
  gap: 2px;
}

.admin-user small {
  color: var(--muted);
}

.ghost-button {
  padding: 0 16px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.admin-metrics article {
  padding: 18px;
}

.admin-metrics span,
.admin-metrics small {
  display: block;
  color: var(--muted);
}

.admin-metrics strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--navy);
  font-size: 1.8rem;
}

.admin-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 18px;
}

.admin-panel {
  padding: 22px;
}

.admin-panel p {
  color: var(--muted);
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.admin-table th {
  color: var(--navy);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-table td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.admin-table mark {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--teal);
  background: #effbfa;
  font-weight: 900;
}

.admin-checklist {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.admin-checklist li {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-checklist span {
  color: var(--muted);
}

@media (max-width: 980px) {
  .main-nav {
    display: none;
  }

  .shop-hero,
  .featured-product,
  .experience,
  .product-hero,
  .article-layout,
  .about-layout,
  .admin-login,
  .admin-panel-grid {
    grid-template-columns: 1fr;
  }

  .book-cover {
    transform: none;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalogue-section .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .faculty-grid,
  .feature-list,
  .product-info-grid,
  .site-footer,
  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .article-card,
  .about-toc {
    position: static;
  }

  .about-toc {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-toc h2 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: center;
    min-height: 68px;
  }

  .cart-btn span,
  .brand small {
    display: none;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 142px;
    height: 38px;
  }

  .about-page {
    width: min(100% - 28px, 1180px);
    padding-bottom: 42px;
  }

  .about-hero h1 {
    font-size: clamp(2.75rem, 16vw, 4.2rem);
  }

  .about-hero > p:not(.eyebrow) {
    font-size: 1rem;
  }

  .about-quick-links {
    display: grid;
  }

  .about-quick-links a,
  .about-toc a {
    width: 100%;
  }

  .about-toc {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .about-content {
    padding: 22px;
  }

  .about-content h2 {
    font-size: clamp(1.45rem, 8vw, 1.95rem);
  }

  .shop-hero {
    padding-top: 34px;
  }

  .hero-copy h1 {
    font-size: 3rem;
  }

  .featured-product,
  .store-toolbar {
    display: block;
  }

  .product-panel {
    margin-top: 16px;
  }

  .segmented {
    margin-top: 14px;
    overflow-x: auto;
  }

  .product-grid,
  .faculty-grid,
  .feature-list,
  .product-info-grid,
  .site-footer,
  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .category-hero,
  .catalogue-section,
  .seo-strip {
    width: min(100% - 28px, 1180px);
  }

  .category-hero.article-hero {
    padding-top: 34px;
    padding-bottom: 24px;
  }

  .category-hero h1 {
    font-size: clamp(2.25rem, 12vw, 3.35rem);
  }

  .category-hero .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .category-hero .mini-button {
    width: 100%;
  }

  .catalogue-section {
    padding-top: 20px;
    padding-bottom: 40px;
  }

  .catalogue-section .section-heading {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
  }

  .catalogue-section .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .catalogue-section .product-card {
    min-height: 0;
    padding: 18px;
  }

  .seo-strip {
    padding: 22px;
    margin-bottom: 42px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .article-buy-box {
    display: block;
  }

  .article-buy-box .article-cta,
  .article-cta {
    width: 100%;
  }
}


.learnza-ad-slot {
  width: min(100% - 32px, 980px);
  min-height: 96px;
  margin: 28px auto;
  padding: 12px;
  overflow: hidden;
  background: #f8fbfc;
  border: 1px solid rgba(16, 47, 85, 0.08);
  border-radius: 8px;
}

.learnza-adsense-disabled .learnza-ad-slot {
  display: none;
}

.legacy-product-hero .book-cover {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(17, 170, 164, 0.28);
  box-shadow: 0 26px 60px rgba(9, 31, 57, 0.18);
}

.legacy-product-hero .book-cover::after {
  content: "";
  position: absolute;
  inset: auto -20% -30% 22%;
  height: 180px;
  background: rgba(246, 213, 111, 0.18);
  transform: rotate(-8deg);
}

.cover-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

.cover-brand svg {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.18));
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.trust-row span {
  border: 1px solid rgba(17, 170, 164, 0.28);
  background: rgba(17, 170, 164, 0.08);
  color: #102f55;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 0.82rem;
  font-weight: 800;
}

.branded-product-card .mini-cover {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-height: 112px;
  padding: 14px;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.05;
}

.branded-product-card .mini-cover span {
  font-size: 0.82rem;
  font-weight: 900;
  max-width: 100%;
}

.branded-product-card .mini-cover small {
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.82;
}

.branded-info-grid article {
  border-top: 4px solid #11aaa4;
}

.legacy-library-page .category-hero,
.legacy-library-page .catalogue-section {
  width: min(100% - clamp(36px, 8vw, 112px), 1240px);
}

.legacy-library-page .category-hero.article-hero {
  padding-top: clamp(58px, 8vw, 104px);
  padding-bottom: clamp(34px, 5vw, 58px);
}

.legacy-library-page .catalogue-section {
  padding-top: clamp(30px, 4vw, 52px);
  padding-bottom: clamp(58px, 7vw, 92px);
}

.legacy-library-page .catalogue-section .section-heading {
  padding-bottom: 22px;
  margin-bottom: 30px;
}

.legacy-library-page .catalogue-section .product-grid {
  gap: clamp(20px, 2.2vw, 30px);
}

.legacy-library-page .catalogue-section .product-card {
  padding: clamp(20px, 2.2vw, 26px);
}

@media (max-width: 680px) {
  .legacy-library-page .category-hero,
  .legacy-library-page .catalogue-section {
    width: min(100% - 32px, 1240px);
  }

  .legacy-library-page .category-hero.article-hero {
    padding-top: 42px;
    padding-bottom: 28px;
  }

  .legacy-library-page .catalogue-section {
    padding-top: 24px;
  }
}

.product-card {
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(17, 170, 164, 0.62);
  box-shadow: 0 24px 60px rgba(16, 47, 85, 0.14);
}

.product-card .mini-cover {
  position: relative;
  isolation: isolate;
  min-height: 172px;
  align-items: stretch;
  overflow: hidden;
  box-shadow: inset -18px 0 0 rgba(0, 0, 0, 0.16), 0 18px 38px rgba(16, 47, 85, 0.18);
}

.product-card .mini-cover::before {
  content: "LearnZA";
  position: absolute;
  top: 13px;
  left: 13px;
  z-index: -1;
  padding: 5px 8px;
  color: #102f55;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
}

.product-card .mini-cover::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: -1;
  width: 58px;
  height: 74px;
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08));
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.14);
}

.premium-book-preview {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 214px;
  padding: 16px;
  text-align: left;
}

.premium-book-preview span {
  align-self: flex-start;
  max-width: calc(100% - 82px);
  padding: 6px 8px;
  color: #102f55;
  background: rgba(246, 213, 111, 0.94);
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 900;
}

.premium-book-preview strong {
  max-width: calc(100% - 42px);
  margin-top: auto;
  color: #ffffff;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.08;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.premium-book-preview small {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.72rem;
  font-weight: 800;
}

.premium-book-preview em {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 7px 9px;
  color: #102f55;
  background: #ffffff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 900;
}

.preview-value-list {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  color: #51677d;
  font-size: 0.82rem;
}

.preview-value-list li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.preview-value-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 999px;
  background: #11aaa4;
}

.premium-preview-card .card-bottom .mini-button,
.product-card .card-bottom .mini-button {
  font-weight: 900;
}


.search-box {
  position: relative;
  min-height: 50px;
  padding: 0 14px;
  background: #f8fbfc;
  border: 1px solid rgba(16, 47, 85, 0.12);
  border-radius: 8px;
}

.search-box:focus-within {
  border-color: rgba(17, 170, 164, 0.72);
  box-shadow: 0 0 0 4px rgba(17, 170, 164, 0.12);
}

.search-box svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.search-box input::placeholder {
  color: #7b8b9b;
}

.search-count {
  margin-left: auto;
  color: #51677d;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.search-empty {
  width: min(1180px, calc(100% - 36px));
  margin: 18px auto 0;
  padding: 22px;
  color: #102f55;
  background: #ffffff;
  border: 1px solid rgba(17, 170, 164, 0.18);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(16, 47, 85, 0.08);
}

.search-empty h2 {
  margin: 0 0 8px;
  font-size: 1.18rem;
}

.local-seo-page .article-hero {
  background: linear-gradient(135deg, #f7fbfc, #edf8f6);
  border-bottom: 1px solid rgba(16, 47, 85, 0.08);
}

.local-school-card {
  border-top: 4px solid #11aaa4;
}

@media (max-width: 760px) {
  .store-toolbar {
    display: grid;
  }

  .search-count {
    margin-left: 0;
  }
}


.footer-column a.footer-local-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  margin-top: 8px;
  padding: 0 13px;
  color: #102f55;
  background: linear-gradient(135deg, #f6d56f, #ffffff);
  border: 1px solid rgba(246, 213, 111, 0.72);
  border-radius: 999px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(246, 213, 111, 0.18);
}

.footer-column a.footer-local-button:hover {
  color: #102f55;
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(246, 213, 111, 0.24);
}
