/* =========================================================
   Saleem the Physics Master — shared site styles
   ========================================================= */
:root {
  --board: #0b1020;
  --board-dark: #121a2e;
  --board-deep: #080c18;
  --chalk: #e8ecf6;
  --chalk-dim: #a7b0c5;
  --chalk-faint: #6f7a93;
  --copper: #7c6cff;
  --copper-bright: #a99cff;
  --blue: #38bdf8;
  --blue-bright: #7dd3fc;
  --amber: #fbbf24;
  --grad: linear-gradient(135deg, #7c6cff 0%, #4f8cff 55%, #22d3ee 100%);
  --line: rgba(160, 175, 220, 0.13);
  --line-strong: rgba(160, 175, 220, 0.24);
  --radius: 12px;
  --serif: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  --math: 'Newsreader', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --nav-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  background: var(--board);
  color: var(--chalk);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(900px 600px at 85% -10%, rgba(124,108,255,0.16), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(34,211,238,0.07), transparent 60%);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.mono { font-family: var(--mono); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--copper); color: #fff; padding: 8px 14px; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 3px; }

/* ---------- NAV ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 16, 32, 0.78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--nav-h); }
.brand { font-family: var(--serif); font-size: 1.22rem; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 8px; text-decoration: none; white-space: nowrap; }
.brand .dot { color: var(--copper-bright); }
.brand .sub { font-family: var(--mono); font-size: 0.82rem; color: var(--chalk-dim); }
.navlinks { display: flex; gap: 26px; font-size: 0.92rem; }
.navlinks a { text-decoration: none; color: var(--chalk-dim); transition: color .2s ease; position: relative; padding: 4px 0; }
.navlinks a:hover, .navlinks a:focus-visible { color: var(--chalk); }
.navlinks a[aria-current="page"] { color: var(--chalk); }
.navlinks a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--copper); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-cta {
  background: var(--grad); color: #fff; box-shadow: 0 4px 18px rgba(124,108,255,.35); padding: 9px 18px; border-radius: var(--radius);
  font-size: 0.86rem; font-weight: 600; text-decoration: none; transition: background .2s ease; white-space: nowrap;
}
.nav-cta:hover, .nav-cta:focus-visible { filter: brightness(1.1); }
.nav-cta .short { display: none; }
.nav-toggle {
  display: none; width: 42px; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: transparent; color: var(--chalk); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: transform .2s ease, background .2s ease;
}
.nav-toggle .bars::before { position: absolute; top: -6px; }
.nav-toggle .bars::after { position: absolute; top: 6px; }
.site-nav.open .nav-toggle .bars { background: transparent; }
.site-nav.open .nav-toggle .bars::before { transform: translateY(6px) rotate(45deg); }
.site-nav.open .nav-toggle .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- BUTTONS ---------- */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius); text-decoration: none; font-size: 0.95rem;
  transition: background .2s ease, border-color .2s ease, transform .15s ease; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--grad); color: #fff; font-weight: 600; border: 0; box-shadow: 0 6px 22px rgba(124,108,255,.35); }
.btn-primary:hover, .btn-primary:focus-visible { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 10px 28px rgba(124,108,255,.45); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--chalk); font-weight: 500; background: rgba(255,255,255,0.03); }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--chalk-dim); background: rgba(237,230,214,0.05); }
.text-link { color: var(--blue-bright); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.text-link:hover { text-decoration: underline; }

/* ---------- SECTIONS ---------- */
section { position: relative; z-index: 1; padding: 84px 0; }
.eyebrow {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--copper-bright); margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.eyebrow.blue { color: var(--blue-bright); }
.section-head { margin-bottom: 44px; max-width: 64ch; }
.section-head h2 { font-size: clamp(1.75rem, 3vw, 2.3rem); }
.section-head p { color: var(--chalk-dim); margin-top: 14px; font-size: 1.02rem; }
.section-head.split { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-head.split > div { max-width: 64ch; }
.divider { border: none; border-top: 1px solid var(--line); position: relative; z-index: 1; }

/* ---------- HERO ---------- */
.hero { padding: 92px 0 84px; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.4vw, 3.5rem); line-height: 1.07; margin-bottom: 22px; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-size: 1.1rem; color: var(--chalk-dim); max-width: 46ch; margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-facts { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.hero-facts div { font-size: 0.85rem; color: var(--chalk-dim); }
.hero-facts b { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--chalk); }

/* hero diagram */
.diagram-card { background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)), var(--board-dark); border: 1px solid var(--line-strong); border-radius: 18px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.diagram-card .label-row { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; align-items: center; margin-bottom: 8px; font-family: var(--mono); font-size: 0.7rem; color: var(--chalk-dim); letter-spacing: 0.06em; }
.diagram-card .live { color: var(--copper-bright); display: flex; align-items: center; gap: 6px; }
.diagram-card .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--copper-bright); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.diagram-card svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.diagram-card svg text { font-family: var(--mono); }
.g-line { stroke: var(--chalk-dim); stroke-width: 1.5; opacity: .8; transition: stroke .25s ease, opacity .25s ease; }
.g-node { cursor: pointer; }
.g-node .dot { fill: var(--chalk-dim); transition: fill .2s ease; }
.g-node .halo { fill: transparent; }
.g-node:hover .dot, .g-node.on .dot, .g-node:focus .dot { fill: var(--copper-bright); }
.g-node:focus { outline: none; }
.g-arrow { stroke: var(--copper-bright); stroke-width: 2; opacity: 0; transition: opacity .2s ease; }
.g-node.on .g-arrow { opacity: 1; }
.diagram-readout { margin-top: 12px; min-height: 3.2em; font-family: var(--mono); font-size: 0.8rem; color: var(--chalk-dim); border-top: 1px solid var(--line); padding-top: 12px; }
.diagram-readout b { color: var(--copper-bright); font-weight: 500; }
.diagram-foot { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 0.82rem; color: var(--chalk-dim); }

/* ---------- ABOUT ---------- */
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.about-portrait { width: 100%; max-width: 380px; aspect-ratio: 4/5; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: var(--radius); background: var(--board-dark); }
.credentials { list-style: none; margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.credentials li { font-size: 0.9rem; color: var(--chalk-dim); padding-left: 18px; position: relative; }
.credentials li::before { content: "—"; position: absolute; left: 0; color: var(--blue); }
.about-copy p { color: var(--chalk-dim); margin-bottom: 16px; max-width: 60ch; }
.about-copy p:first-of-type { color: var(--chalk); font-size: 1.08rem; }
.stats-row { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat-cell { background: var(--board-dark); padding: 20px 22px; }
.stat-cell .stat-year { font-family: var(--mono); font-size: 0.72rem; color: var(--chalk-dim); letter-spacing: 0.06em; }
.stat-cell .stat-value { font-family: var(--serif); font-size: 2rem; margin: 6px 0 2px; color: var(--copper-bright); }
.stat-cell .stat-value span { font-size: 1rem; color: var(--chalk-dim); font-family: var(--sans); }
.stat-cell .stat-note { font-size: 0.8rem; color: var(--chalk-dim); }
.stats-caption { margin-top: 12px; font-size: 0.78rem; color: var(--chalk-dim); font-family: var(--mono); }

/* ---------- COURSES ---------- */
.course-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.course { background: var(--board); padding: 30px 26px; display: flex; flex-direction: column; }
.course .tag { font-family: var(--mono); font-size: 0.72rem; color: var(--blue-bright); letter-spacing: 0.08em; }
.course h3 { font-size: 1.3rem; margin: 10px 0 12px; }
.course p { color: var(--chalk-dim); font-size: 0.93rem; }
.course ul { margin: 14px 0 0; list-style: none; font-size: 0.87rem; color: var(--chalk-dim); }
.course li { padding: 6px 0 6px 16px; position: relative; border-top: 1px solid var(--line); }
.course li:first-child { border-top: none; }
.course li::before { content: "—"; position: absolute; left: 0; color: var(--copper); }
.course .course-when { margin-top: auto; padding-top: 18px; font-family: var(--mono); font-size: 0.76rem; color: var(--amber); }

/* ---------- SCHEDULE / FLYERS ---------- */
.flyer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.flyer-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--board-dark); }
.flyer-card img { width: 100%; height: auto; }
.flyer-caption { padding: 14px 18px; font-family: var(--mono); font-size: 0.8rem; color: var(--chalk-dim); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.flyer-caption a { font-family: var(--sans); }

/* ---------- CARDS (resources + simulations) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card {
  border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01)), var(--board-dark);
  display: flex; flex-direction: column; text-decoration: none; color: inherit; overflow: hidden;
  transition: border-color .2s ease, transform .15s ease, background .2s ease;
}
a.card:hover, a.card:focus-visible, .topic-card:hover { border-color: rgba(124,108,255,.6); transform: translateY(-3px); box-shadow: 0 14px 40px rgba(0,0,0,.35), 0 0 0 1px rgba(124,108,255,.25); }
.card .thumb { display: block; width: 100%; height: auto; aspect-ratio: 32 / 15; border-bottom: 1px solid var(--line); background: var(--board-deep); }
.card .body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 9px; flex-grow: 1; }
.card .kicker { font-family: var(--mono); font-size: 0.7rem; color: var(--blue-bright); letter-spacing: 0.06em; text-transform: uppercase; }
.card h3 { font-size: 1.15rem; font-weight: 700; }
.card p { color: var(--chalk-dim); font-size: 0.9rem; }
.card .go { margin-top: auto; padding-top: 8px; font-size: 0.88rem; color: var(--blue-bright); font-weight: 500; }
a.card:hover .go { text-decoration: underline; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-family: var(--mono); font-size: 0.68rem; letter-spacing: .04em; padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--chalk-dim); }
.section-foot { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* filters */
.sim-tools { display: flex; justify-content: space-between; align-items: center; gap: 14px 20px; flex-wrap: wrap; margin-bottom: 12px; }
.sim-tools .filters { margin-bottom: 0; }
.search input { width: 280px; max-width: 100%; background: var(--board-dark); border: 1px solid var(--line-strong); color: var(--chalk); border-radius: 999px; padding: 9px 16px; font: 400 0.9rem var(--sans); }
.search input::placeholder { color: var(--chalk-faint); }
.search input:focus { outline: none; border-color: var(--blue-bright); }
.result-count { font-family: var(--mono); font-size: 0.78rem; color: var(--chalk-dim); min-height: 1.2em; margin-bottom: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.card .chips { margin-top: auto; padding-top: 6px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter {
  font: 500 0.86rem var(--sans); color: var(--chalk-dim); background: transparent; border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: all .2s ease;
}
.filter:hover { color: var(--chalk); border-color: var(--chalk-dim); }
.filter[aria-pressed="true"] { background: var(--grad); color: #fff; border-color: transparent; }
.empty-note { color: var(--chalk-dim); display: none; }

/* ---------- PAGE HEADER (sub-pages) ---------- */
.page-head { padding: 64px 0 36px; }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 14px; }
.page-head p { color: var(--chalk-dim); font-size: 1.08rem; max-width: 62ch; }
.crumbs { font-size: 0.82rem; color: var(--chalk-faint); margin-bottom: 18px; }
.crumbs a { color: var(--chalk-dim); text-decoration: none; }
.crumbs a:hover { color: var(--chalk); text-decoration: underline; }
.page-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* ---------- HOW-TO STRIP ---------- */
.howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 56px; }
.howto div { background: var(--board-dark); padding: 22px 24px; }
.howto b { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.1rem; margin-bottom: 6px; }
.howto span { font-family: var(--mono); color: var(--copper-bright); font-size: 0.75rem; display: block; margin-bottom: 8px; }
.howto p { color: var(--chalk-dim); font-size: 0.9rem; }

/* ---------- BOOKING ---------- */
.booking { background: radial-gradient(800px 300px at 80% 0%, rgba(124,108,255,.18), transparent 70%), var(--board-dark); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; z-index: 1; }
.booking-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.booking h2 { margin: 6px 0 16px; font-size: clamp(1.7rem, 3vw, 2.2rem); }
.booking p { color: var(--chalk-dim); max-width: 44ch; }
.booking-steps { list-style: none; margin-top: 20px; display: grid; gap: 10px; counter-reset: s; }
.booking-steps li { counter-increment: s; font-size: 0.92rem; color: var(--chalk-dim); display: flex; gap: 12px; align-items: baseline; }
.booking-steps li::before { content: counter(s); font-family: var(--mono); font-size: 0.75rem; color: var(--copper-bright); border: 1px solid var(--copper); width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--board); padding: 36px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.contact-box .num { font-family: var(--mono); font-size: 0.85rem; color: var(--chalk-dim); letter-spacing: .05em; }
.contact-box small { font-size: 0.8rem; color: var(--chalk-dim); }

/* ---------- PROSE (worked problems) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.6rem; margin: 48px 0 14px; }
.prose h3 { font-size: 1.2rem; margin: 30px 0 10px; color: var(--copper-bright); }
.prose p, .prose li { color: var(--chalk-dim); font-size: 1.02rem; }
.prose p { margin-bottom: 14px; }
.prose strong { color: var(--chalk); font-weight: 600; }
.prose ol, .prose ul { padding-left: 22px; margin-bottom: 14px; }
.prose li { margin-bottom: 6px; }
.problem-box { border: 1px solid var(--line-strong); border-left: 3px solid var(--copper); background: var(--board-dark); padding: 22px 24px; border-radius: var(--radius); margin: 24px 0; }
.problem-box p:last-child { margin-bottom: 0; }
.math { font-family: var(--math); font-size: 1.12rem; color: var(--chalk); font-style: normal; }
.math i { font-style: italic; }
.eqn { display: block; text-align: center; margin: 18px 0; padding: 14px 10px; font-family: var(--math); font-size: 1.22rem; color: var(--chalk); background: rgba(237,230,214,0.03); border-radius: var(--radius); overflow-x: auto; white-space: nowrap; }
.eqn i, .frac i { font-style: italic; }
.frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 3px; line-height: 1.25; }
.frac > span:first-child { border-bottom: 1px solid currentColor; padding: 0 4px 1px; }
.frac > span:last-child { padding: 1px 4px 0; }
.answer { border: 1px solid rgba(91,143,201,.5); background: rgba(91,143,201,.08); border-radius: var(--radius); padding: 14px 18px; margin: 18px 0; color: var(--chalk); }
.figure { margin: 26px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--board-dark); padding: 18px; }
.figure svg { display: block; width: 100%; height: auto; }
.figure figcaption { font-family: var(--mono); font-size: 0.78rem; color: var(--chalk-dim); margin-top: 10px; }
.tip { border-left: 3px solid var(--amber); padding: 6px 0 6px 16px; margin: 22px 0; color: var(--chalk-dim); }
.tip b { color: var(--amber); font-weight: 600; }
details.reveal { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0 18px; margin: 18px 0; background: var(--board-dark); }
details.reveal summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--chalk); list-style: none; }
details.reveal summary::-webkit-details-marker { display: none; }
details.reveal summary::before { content: "▸ "; color: var(--copper-bright); }
details.reveal[open] summary::before { content: "▾ "; }
details.reveal > div { padding-bottom: 16px; }
.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 10px 0 30px; background: var(--board-dark); }
.toc b { font-family: var(--mono); font-size: 0.72rem; letter-spacing: .08em; color: var(--chalk-dim); text-transform: uppercase; }
.toc ol { margin: 8px 0 0 18px; }
.toc a { color: var(--blue-bright); text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---------- FORMULA SHEET ---------- */
.sheet { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.unit { border: 1px solid var(--line); border-radius: var(--radius); background: var(--board-dark); padding: 20px 22px; break-inside: avoid; }
.unit h2 { font-size: 1.15rem; display: flex; gap: 10px; align-items: baseline; margin-bottom: 12px; }
.unit h2 span { font-family: var(--mono); font-size: 0.72rem; color: var(--copper-bright); letter-spacing: .06em; }
.unit table { width: 100%; border-collapse: collapse; }
.unit td { padding: 7px 0; border-top: 1px solid var(--line); vertical-align: middle; font-size: 0.9rem; color: var(--chalk-dim); }
.unit tr:first-child td { border-top: none; }
.unit td.f { font-family: var(--math); font-size: 1.08rem; color: var(--chalk); white-space: nowrap; padding-right: 14px; width: 52%; }
.unit td.f i { font-style: italic; }
.sheet-consts { margin-top: 20px; }
.legend-line { font-size: 0.85rem; color: var(--chalk-dim); margin-top: 14px; }

/* ---------- FOOTER ---------- */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 56px 0 36px; background: var(--board-deep); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h4 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--chalk-faint); font-weight: 500; margin-bottom: 14px; }
.site-footer p, .site-footer li { color: var(--chalk-dim); font-size: 0.9rem; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; color: var(--chalk-dim); }
.site-footer a:hover { color: var(--chalk); text-decoration: underline; }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.8rem; color: var(--chalk-faint); }

/* ---------- FLOATING WHATSAPP ---------- */
.fab-book {
  position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 9px;
  background: var(--grad); color: #fff; padding: 13px 20px; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 0.92rem; box-shadow: 0 6px 20px rgba(0,0,0,0.35); transition: background .2s ease, transform .15s ease;
}
.fab-book:hover, .fab-book:focus-visible { filter: brightness(1.1); transform: translateY(-2px); }
.fab-book svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .card-grid.three { grid-template-columns: repeat(2, 1fr); }
  .navlinks { gap: 18px; }
}
@media (max-width: 860px) {
  :root { --nav-h: 64px; }
  .nav-toggle { display: inline-flex; }
  .navlinks {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--board-dark); border-bottom: 1px solid var(--line); padding: 6px 32px 14px; box-shadow: 0 14px 28px rgba(0,0,0,0.35);
  }
  .site-nav.open .navlinks { display: flex; }
  .navlinks a { padding: 14px 0; border-top: 1px solid var(--line); font-size: 1rem; }
  .navlinks a:first-child { border-top: none; }
  .navlinks a[aria-current="page"]::after { display: none; }
  .navlinks a[aria-current="page"] { color: var(--copper-bright); }
  .hero { grid-template-columns: 1fr; padding: 48px 0 60px; gap: 40px; }
  .course-list, .flyer-grid, .card-grid, .card-grid.three, .about-grid, .booking-inner, .howto, .sheet { grid-template-columns: 1fr; }
  .about-grid { gap: 32px; }
  .about-portrait { max-width: 340px; }
  .stats-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  section { padding: 64px 0; }
}
@media (max-width: 480px) {
  .search, .search input { width: 100%; }
  .wrap { padding: 0 18px; }
  .navlinks { padding: 6px 18px 14px; }
  .brand { font-size: 1.12rem; }
  .brand .sub { font-size: 0.72rem; }
  .nav-cta { padding: 8px 12px; font-size: 0.82rem; }
  .nav-cta .long { display: none; }
  .nav-cta .short { display: inline; }
  .site-nav .wrap { gap: 10px; }
  section { padding: 52px 0; }
  .hero h1 { font-size: 2.15rem; }
  .hero-ctas a { flex: 1 1 100%; }
  .course { padding: 24px 20px; }
  .card .body { padding: 18px 18px 20px; }
  .diagram-card { padding: 16px; }
  .fab-book { right: 16px; bottom: 16px; padding: 13px; }
  .fab-book .fab-label { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .eqn { font-size: 1.05rem; }
  .unit td.f { white-space: normal; }
}
@media (max-width: 340px) {
  .brand .sub { display: none; }
  .brand .dot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- PRINT ---------- */
@media print {
  :root { --board: #fff; --board-dark: #fff; --board-deep: #fff; --chalk: #111; --chalk-dim: #333; --chalk-faint: #555; --line: #ccc; --line-strong: #999; --copper-bright: #8a4f1c; --blue-bright: #1f4f8a; --amber: #7a5a00; }
  body { background: #fff; color: #111; font-size: 11pt; }
  body::before, .site-nav, .site-footer, .fab-book, .page-actions, .no-print { display: none !important; }
  .page-head { padding: 0 0 12px; }
  .page-head h1 { font-size: 20pt; }
  .wrap { padding: 0; max-width: none; }
  section { padding: 0; }
  .unit, .figure, .problem-box, .answer { border-color: #bbb; background: #fff; }
  @page { size: A4; margin: 10mm; }
  .crumbs, .eyebrow { display: none !important; }
  .page-head p { font-size: 9pt; }
  .sheet { gap: 8px; grid-template-columns: 1fr 1fr !important; }
  .sheet-consts { margin-top: 8px; }
  .unit h2 { font-size: 11pt; margin-bottom: 4px; }
  .legend-line { font-size: 8.5pt; margin-top: 6px; }
  .unit { padding: 7px 10px; }
  .unit td { padding: 1.5px 0; font-size: 7.6pt; }
  .unit td.f { font-size: 9pt; white-space: nowrap; width: 55%; }
  details.reveal { border: none; padding: 0; }
  details.reveal > div { display: block !important; }
  a { text-decoration: none; }
}

/* ---------- LESSONS ---------- */
.prose ol.steps { counter-reset: st; list-style: none; padding-left: 0; }
.prose ol.steps li { counter-increment: st; position: relative; padding-left: 38px; margin-bottom: 10px; }
.prose ol.steps li::before { content: counter(st); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--copper); color: var(--copper-bright); font: 500 0.75rem var(--mono); display: flex; align-items: center; justify-content: center; }
.prose ol.steps b, .prose ul b { color: var(--chalk); }
.prose ul.mistakes { list-style: none; padding-left: 0; }
.prose ul.mistakes li { position: relative; padding-left: 26px; }
.prose ul.mistakes li::before { content: "✕"; position: absolute; left: 0; color: #e07a6f; font-weight: 700; }
.prose i { font-family: var(--math); }
.lesson-eqs { margin: 6px 0 10px; }
.lesson-eqs td.f { width: 46%; }
.sim-callout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--board-dark); padding: 16px; margin: 40px 0 10px; }
.sim-callout img { border-radius: 2px; width: 100%; height: auto; border: 1px solid var(--line); }
.sim-callout b { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; color: var(--chalk); }
.sim-callout p { margin: 6px 0 12px; font-size: 0.95rem; }
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.lesson-nav a { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--chalk); font-family: var(--serif); font-weight: 600; font-size: 1rem; transition: border-color .2s ease; }
.lesson-nav a:hover { border-color: var(--copper); }
.lesson-nav a span { display: block; font: 500 0.72rem var(--mono); color: var(--chalk-faint); letter-spacing: .06em; margin-bottom: 4px; }
.lesson-nav a.next { text-align: right; }
.topic-card h3 a { text-decoration: none; color: var(--chalk); }
.topic-card h3 a:hover { color: var(--copper-bright); }
.topic-card .chips { margin-top: auto; padding-top: 4px; }
.topic-links { display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 6px; }
.topic-links .sim { color: var(--copper-bright); }
@media (max-width: 860px) { .sim-callout { grid-template-columns: 1fr; } .lesson-nav { grid-template-columns: 1fr; } .lesson-nav a.next { text-align: left; } }
@media print { .sim-callout, .lesson-nav, .chips { display: none !important; } }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- AP Physics C "going deeper" ---- */
.deep-zone { margin: 48px 0 10px; padding: 26px 24px 18px; border-radius: 16px; border: 1px solid rgba(124,108,255,.35); background: linear-gradient(180deg, rgba(124,108,255,.10), rgba(34,211,238,.03) 60%, transparent); position: relative; }
.deep-zone h2 { margin-top: 6px; }
.deep-zone h3 { font-family: var(--serif); font-size: 1.18rem; margin: 28px 0 8px; color: var(--chalk); }
.deep-tag { display: inline-block; font: 600 .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--grad); padding: 5px 10px; border-radius: 999px; }
.deep-lede { color: var(--chalk-dim, #b8c0d8); font-size: .97rem; }
.eqn { display: block; font-family: var(--math); font-size: 1.12rem; text-align: center; margin: 14px 0; padding: 12px 14px; border-radius: 10px; background: var(--board-dark); border: 1px solid var(--line); overflow-x: auto; line-height: 1.9; }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 3px; line-height: 1.25; }
.frac > span:first-child { border-bottom: 1px solid currentColor; padding: 0 3px; }
.frac > span:last-child { padding: 0 3px; }
.problem-box.drill { border-left-color: var(--amber); }
.chip.c-level { background: rgba(124,108,255,.18); border-color: rgba(124,108,255,.5); color: #c9c2ff; }
@media (max-width: 600px) { .deep-zone { padding: 20px 14px 12px; margin-left: -6px; margin-right: -6px; } .eqn { font-size: 1rem; } }
@media print { .deep-zone { background: none; border-color: #999; } }
.xsim { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: center; margin: 18px 0 6px; padding: 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--board-dark); text-decoration: none; color: var(--chalk); transition: border-color .2s ease; }
.xsim:hover { border-color: var(--copper); }
.xsim img { width: 100%; height: auto; border-radius: 6px; }
.xsim small { display: block; font: 500 .72rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--chalk-faint); }
.xsim b { display: block; font-family: var(--serif); font-size: 1.08rem; margin: 3px 0; }
.xsim em { font-style: normal; color: var(--copper-bright); font-size: .92rem; }
@media (max-width: 520px) { .xsim { grid-template-columns: 110px 1fr; gap: 12px; } }
.deep-zone.ap1 { border-color: rgba(34,211,238,.35); background: linear-gradient(180deg, rgba(34,211,238,.09), rgba(124,108,255,.03) 60%, transparent); }
.deep-zone.ap1 .deep-tag { background: linear-gradient(135deg,#22d3ee,#4f8cff); }
.chip.ap1-level { background: rgba(34,211,238,.14); border-color: rgba(34,211,238,.45); color: #a5f0fc; }
