/* Mechanical Engineering Tutor — site styles */
:root {
  --ink: #0b0b0b;
  --ink-2: #161616;
  --ink-3: #222;
  --paper: #f6f5f0;
  --paper-2: #ecebe4;
  --white: #ffffff;
  --text: #1b1b1b;
  --muted: #5b5b57;
  --muted-on-dark: #b9b9b4;
  --steel: #bdbdbd;
  --yellow: #f2ea00;
  --yellow-ink: #1b1b00;
  --line: #dcdbd3;
  --radius: 14px;
  --max: 1120px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
  --font-head: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--yellow); color: var(--ink); padding: 10px 14px; z-index: 100; }
.skip:focus { left: 10px; top: 10px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* Header */
.site-header { background: var(--ink); color: var(--white); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid #1f1f1f; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 52px; height: 52px; border-radius: 10px; box-shadow: 0 0 0 2px var(--yellow), 0 0 18px rgba(242,234,0,.35); }
.brand span { font-family: var(--font-head); font-weight: 800; font-size: 1rem; line-height: 1.1; }
.brand small { display: block; color: var(--yellow); font-weight: 700; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.nav-toggle { display: none; background: none; border: 1px solid #333; color: var(--white); border-radius: 10px; padding: 9px 12px; font: 600 .95rem var(--font-body); cursor: pointer; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; align-items: center; }
.site-nav a { display: block; text-decoration: none; padding: 9px 11px; border-radius: 10px; font-weight: 600; font-size: .95rem; color: #e9e9e4; }
.site-nav a:hover { background: var(--ink-3); color: var(--white); }
.site-nav a[aria-current="page"] { color: var(--yellow); }
.site-nav .nav-cta { background: var(--yellow); color: var(--ink); margin-left: 6px; }
.site-nav .nav-cta:hover { background: #fff45a; color: var(--ink); }

@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 76px; background: var(--ink); border-bottom: 1px solid #1f1f1f; padding: 8px 20px 18px; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a { padding: 14px 12px; font-size: 1.05rem; }
  .site-nav .nav-cta { margin: 8px 0 0; text-align: center; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 22px; border-radius: 12px; font: 700 1rem var(--font-body); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .08s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-primary:hover { background: #fff45a; }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #262626; }
.btn-ghost { border-color: #4a4a4a; color: var(--white); }
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 520px) { .btn-row .btn { width: 100%; } }

/* Hero */
.hero { background: var(--ink); color: var(--white); padding: 64px 0 72px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#ffffff10 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font: 700 .78rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); margin-bottom: 14px; }
.hero h1 { color: var(--white); }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero .lead { font-size: 1.15rem; color: var(--muted-on-dark); max-width: 36em; margin-bottom: 28px; }
.hero-logo-wrap { justify-self: center; position: relative; }
.hero-logo-wrap::before { content: ""; position: absolute; inset: -18%; background: radial-gradient(closest-side, rgba(242,234,0,.28), transparent 70%); filter: blur(6px); }
.hero-logo { position: relative; width: min(360px, 100%); border-radius: 26px; box-shadow: 0 0 0 3px var(--yellow), 0 0 40px rgba(242,234,0,.35), 0 24px 60px rgba(0,0,0,.6); }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; padding: 0; list-style: none; color: var(--muted-on-dark); font-size: .92rem; }
.trust li::before { content: "✓"; color: var(--yellow); font-weight: 800; margin-right: 8px; }
@media (max-width: 860px) {
  .hero { padding: 40px 0 52px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-logo-wrap { display: none; }
}

.page-hero { background: var(--ink); color: var(--white); padding: 48px 0 44px; }
.page-hero h1 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); }
.page-hero p { color: var(--muted-on-dark); font-size: 1.1rem; max-width: 40em; margin: 0; }
.crumbs { font-size: .88rem; color: var(--muted-on-dark); margin-bottom: 12px; }
.crumbs a { color: var(--muted-on-dark); }
.crumbs a:hover { color: var(--yellow); }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--ink-2); color: var(--white); }
.section-dark p { color: var(--muted-on-dark); }
.section-head { max-width: 46em; margin-bottom: 32px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-dark .section-head p { color: var(--muted-on-dark); }
@media (max-width: 600px) { .section { padding: 46px 0; } }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.section-alt .card { background: var(--paper); box-shadow: none; }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card .muted, .muted { color: var(--muted); }

.step-num { display: inline-flex; width: 40px; height: 40px; border-radius: 10px; background: var(--ink); color: var(--yellow); font: 800 1.1rem var(--font-head); align-items: center; justify-content: center; margin-bottom: 14px; }

.tag { display: inline-block; font: 700 .72rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--paper-2); color: var(--muted); }
.tag-live { background: var(--yellow); color: var(--ink); }
.tag-free { background: #e7f6e8; color: #1d6b2a; }

.ticks { list-style: none; padding: 0; margin: 0 0 1.2em; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 9px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 16px; height: 9px; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(-45deg); }
.section-dark .ticks li::before, .offer .ticks li::before { border-color: var(--yellow); }

/* Offer / product block */
.offer { background: var(--ink); color: var(--white); border-radius: 20px; padding: 36px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; }
.offer p { color: var(--muted-on-dark); }
.offer h2, .offer h3 { color: var(--white); }
.offer .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fact { background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 12px; padding: 16px; }
.fact b { display: block; font: 800 1.6rem var(--font-head); color: var(--yellow); line-height: 1.1; }
.fact span { font-size: .88rem; color: var(--muted-on-dark); }
.note { font-size: .88rem; color: var(--muted-on-dark); margin-top: 12px; }
@media (max-width: 860px) { .offer { grid-template-columns: 1fr; padding: 26px; } }

/* Video facade */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video button, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video button { padding: 0; cursor: pointer; background: #000 center / cover no-repeat; }
.video button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; margin: -27px 0 0 -38px; border-radius: 14px; background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%230b0b0b'/%3E%3C/svg%3E") center / 30px no-repeat; box-shadow: 0 6px 20px rgba(0,0,0,.45); }
.video button:hover::after { background-color: #fff45a; }
.video-caption { font-size: .92rem; color: var(--muted); margin-top: 10px; }

/* Topic list */
.unit { margin-bottom: 36px; }
.unit h2 { font-size: 1.4rem; margin-bottom: 14px; }
.topic { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); text-decoration: none; margin-bottom: 10px; }
a.topic:hover { border-color: var(--ink); }
.topic strong { font-family: var(--font-head); font-size: 1.05rem; }
.topic .muted { font-size: .92rem; display: block; }
.topic .go { font-weight: 700; white-space: nowrap; }

.two-col { display: grid; grid-template-columns: 1.4fr .6fr; gap: 36px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } .side-card { position: static; } }
.side-card { position: sticky; top: 90px; }

.prose { max-width: 44em; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }

.callout { border-left: 4px solid var(--yellow); background: var(--white); padding: 18px 20px; border-radius: 0 12px 12px 0; margin: 1.4em 0; }

/* Footer */
.site-footer { background: var(--ink); color: var(--muted-on-dark); padding: 48px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer h3 { color: var(--white); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--muted-on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; color: var(--white); font: 800 1rem var(--font-head); }
.footer-brand img { width: 40px; height: 40px; border-radius: 8px; }
.footer-base { border-top: 1px solid #222; margin-top: 32px; padding-top: 20px; font-size: .85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* --- v2 additions --- */
.eyebrow-dark { color: var(--muted); }
.hero-sub { margin: 18px 0 0; color: var(--muted-on-dark); font-size: .95rem; }
.hero-sub a { color: var(--yellow); }
.stats { list-style: none; margin: 44px 0 0; padding: 22px 0 0; border-top: 1px solid #262626; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; z-index: 1; }
.stats b { display: block; font: 800 1.9rem var(--font-head); color: var(--yellow); line-height: 1.1; }
.stats span { color: var(--muted-on-dark); font-size: .92rem; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); margin-top: 32px; } }

.ico { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico-wrap { display: inline-flex; width: 48px; height: 48px; border-radius: 12px; background: var(--ink); color: var(--yellow); align-items: center; justify-content: center; margin-bottom: 14px; }
.ocard { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s ease, transform .15s ease; }
.ocard:hover { border-color: var(--ink); transform: translateY(-2px); }
.ocard-top { display: flex; justify-content: space-between; align-items: flex-start; }
.ocard p { color: var(--muted); flex: 1; }
.ocard-cta { font-weight: 700; }
.card-link { text-decoration: none; display: block; padding: 20px 22px; }
.card-link:hover { border-color: var(--ink); }
.card-link h3 { margin-bottom: .2em; }
.card-link p { margin: 0; }

.utile { display: block; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; border-left: 5px solid var(--yellow); }
.utile:hover { border-color: var(--ink); border-left-color: var(--yellow); }
.utile-n { font: 700 .78rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.utile h3 { margin: 6px 0 4px; font-size: 1.2rem; }
.utile p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Lesson library */
.lib-tools { position: sticky; top: 76px; z-index: 20; background: var(--paper); padding: 14px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.search input { width: 100%; font: 400 1rem var(--font-body); padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px; background: var(--white); }
.search input:focus { outline: none; border-color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; scrollbar-width: none; }
.chip { flex: none; text-decoration: none; font-weight: 600; font-size: .9rem; padding: 8px 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); }
.chip:hover { border-color: var(--ink); }
.unit-sec { padding-top: 36px; scroll-margin-top: 190px; }
.unit-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 8px; border-bottom: 3px solid var(--ink); padding-bottom: 10px; }
.unit-head h2 { margin: 0; }
.topic-block { margin-top: 22px; }
.topic-block h3 { font-size: 1.05rem; margin-bottom: 12px; }
.count { display: inline-block; font: 700 .75rem var(--font-body); background: var(--ink); color: var(--yellow); border-radius: 999px; padding: 2px 8px; vertical-align: middle; margin-left: 6px; }
.vgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.vgrid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .vgrid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .vgrid, .vgrid-2 { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 420px) { .vgrid, .vgrid-2 { grid-template-columns: 1fr; } }
.vcard { display: block; text-decoration: none; background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.vcard:hover { border-color: var(--ink); }
.vcard .thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #111; }
.vcard img { width: 100%; height: 100%; object-fit: cover; }
.vcard .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.82); color: #fff; font-size: .78rem; font-weight: 600; padding: 2px 6px; border-radius: 6px; }
.vcard .vtitle { display: block; padding: 10px 12px 12px; font-size: .9rem; font-weight: 600; line-height: 1.35; }

.player { width: min(960px, 94vw); padding: 0; border: 0; border-radius: 16px; background: #000; color: #fff; }
.player::backdrop { background: rgba(0,0,0,.8); }
.player-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; font-weight: 600; font-size: .95rem; }
.player-bar button { background: var(--yellow); color: var(--ink); border: 0; border-radius: 8px; padding: 8px 14px; font: 700 .9rem var(--font-body); cursor: pointer; }
.player .video { border-radius: 0; box-shadow: none; }

.footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand img { width: 44px; height: 44px; border-radius: 9px; box-shadow: 0 0 0 2px var(--yellow); }
@media (max-width: 860px) { .footer-grid > div:first-child { grid-column: 1 / -1; } }
.vcard[hidden], .topic-block[hidden], .unit-sec[hidden] { display: none; }
@media (max-width: 600px) {
  .vgrid, .vgrid-2 { grid-template-columns: 1fr; gap: 8px; }
  .vcard { display: flex; align-items: center; gap: 12px; padding: 8px; }
  .vcard .thumb { flex: none; width: 128px; border-radius: 8px; overflow: hidden; }
  .vcard .vtitle { padding: 0; font-size: .88rem; }
  .vcard .dur { right: 4px; bottom: 4px; font-size: .72rem; }
}

/* --- v3: dark home page (matches the practice pack panels) --- */
body.dark { background: var(--ink); }
.dsec { background: var(--ink); color: var(--white); padding: 76px 0; border-top: 1px solid #1c1c1c; }
.dsec-alt { background: #111; }
.dsec p { color: var(--muted-on-dark); }
.dsec h2, .dsec h3 { color: var(--white); }
.dhead { max-width: 46em; margin-bottom: 34px; }
.dhead p { font-size: 1.08rem; }
.dgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

@media (max-width: 900px) { .dgrid { grid-template-columns: 1fr; } }
.dcard { position: relative; display: flex; flex-direction: column; text-decoration: none; background: #171717; border: 1px solid #2a2a2a; border-radius: 16px; padding: 26px; transition: border-color .15s ease, transform .15s ease; }
.dcard:hover { border-color: var(--yellow); transform: translateY(-2px); }
.dcard h3 { margin: 10px 0 8px; font-size: 1.2rem; }
.dcard p { flex: 1; margin-bottom: 18px; }
.dnum { font: 800 .82rem var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.dtag { position: absolute; top: 24px; right: 24px; font: 700 .7rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: var(--yellow); padding: 4px 9px; border-radius: 999px; }
.dcta { font-weight: 700; color: var(--yellow); }
.dunits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 1000px) { .dunits { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .dunits { grid-template-columns: repeat(2, 1fr); } }
.dunit { display: flex; flex-direction: column; gap: 4px; text-decoration: none; background: #171717; border: 1px solid #2a2a2a; border-left: 4px solid var(--yellow); border-radius: 12px; padding: 16px 18px; }
.dunit:hover { border-color: var(--yellow); }
.dunit b { font: 700 1.05rem var(--font-head); color: var(--white); }
.dmeta { font-size: .88rem; color: var(--muted-on-dark); }
.dsteps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid #2a2a2a; border-radius: 16px; overflow: hidden; }
.dsteps > div { padding: 28px; background: #171717; }
.dsteps > div + div { border-left: 1px solid #2a2a2a; }
.dsteps h3 { margin: 10px 0 8px; }
.dsteps p { margin: 0; }
@media (max-width: 900px) { .dsteps { grid-template-columns: 1fr; } .dsteps > div + div { border-left: 0; border-top: 1px solid #2a2a2a; } }
.dsec .offer { border: 1px solid #2a2a2a; background: #171717; }
.dsplit { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .dsplit { grid-template-columns: 1fr; } }
.dpanel { background: #171717; border: 1px solid #2a2a2a; border-top: 4px solid var(--yellow); border-radius: 16px; padding: 28px; }
body.dark .section-dark { background: #111; border-top: 1px solid #1c1c1c; }

/* --- v3: course-style lessons page --- */
.course { display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: start; }
.course-index { position: sticky; top: 96px; }
.course-index ol { list-style: none; margin: 16px 0 0; padding: 0; border-left: 2px solid var(--line); }
.course-index a { display: flex; gap: 10px; text-decoration: none; padding: 7px 0 7px 14px; margin-left: -2px; border-left: 2px solid transparent; font-weight: 600; font-size: .95rem; color: var(--text); }
.course-index a span { font: 800 .8rem var(--font-head); color: var(--muted); padding-top: 2px; }
.course-index a:hover { border-left-color: var(--yellow); }
@media (max-width: 900px) {
  .course { grid-template-columns: 1fr; gap: 16px; }
  .course-index { position: static; }
  .course-index ol { display: flex; gap: 8px; overflow-x: auto; border: 0; margin-top: 12px; scrollbar-width: none; }
  .course-index a { flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; margin: 0; background: var(--white); white-space: nowrap; }
}
details.unit { background: var(--white); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; overflow: hidden; scroll-margin-top: 100px; }
details.unit[open] { border-color: #bdbcb4; }
details.unit summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 18px 20px; background: var(--ink); color: var(--white); }
details.unit summary::-webkit-details-marker { display: none; }
details.unit summary::after { content: "+"; grid-column: 3; grid-row: 1; justify-self: end; font: 700 1.4rem var(--font-head); color: var(--yellow); width: 24px; text-align: center; }
details.unit[open] summary::after { content: "–"; }
.unum { font: 800 .78rem var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); background: var(--yellow); border-radius: 8px; padding: 6px 9px; white-space: nowrap; }
.uname { font: 700 1.15rem var(--font-head); }
.uname small { display: block; font: 400 .9rem var(--font-body); color: var(--muted-on-dark); margin-top: 2px; }
.ucount { grid-column: 3; grid-row: 1; font-size: .85rem; color: var(--muted-on-dark); padding-right: 36px; white-space: nowrap; }
@media (max-width: 600px) { details.unit summary { grid-template-columns: 1fr auto; gap: 8px 12px; } .unum { justify-self: start; } .uname { grid-column: 1 / -1; } .ucount { grid-column: 1; grid-row: 1; justify-self: end; padding-right: 0; } details.unit summary::after { grid-column: 2; grid-row: 1; } .unum { grid-column: 1; grid-row: 1; justify-self: start; } .ucount { grid-column: 1; } }
.ubody { padding: 6px 20px 18px; }
.ltopic { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
ol.lessons { list-style: none; margin: 0; padding: 0; }
ol.lessons li + li { border-top: 1px solid var(--paper-2); }
.lrow { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 11px 6px; text-decoration: none; border-radius: 8px; }
.lrow:hover { background: var(--paper); }
.lnum { font: 800 .85rem var(--font-head); color: var(--muted); }
.ltitle { font-weight: 600; line-height: 1.35; }
.ldur { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.ldur::before { content: ""; width: 26px; height: 26px; border-radius: 50%; background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6v12l9-6z' fill='%230b0b0b'/%3E%3C/svg%3E") center / 14px no-repeat; order: 2; }
details.unit[hidden], .topic-block[hidden], ol.lessons li[hidden] { display: none; }
.course > * { min-width: 0; }
@media (max-width: 600px) { .lrow { grid-template-columns: 30px 1fr auto; gap: 10px; } .ubody { padding: 4px 12px 14px; } }

/* --- v4: never yellow on white/light backgrounds --- */
:focus-visible { outline-color: var(--ink); }
.site-header :focus-visible, .page-hero :focus-visible, .hero :focus-visible, .dsec :focus-visible, .section-dark :focus-visible, .offer :focus-visible, .site-footer :focus-visible, details.unit summary:focus-visible, .player :focus-visible { outline-color: var(--yellow); }
.section:not(.section-dark) .btn-primary { background: var(--ink); color: var(--yellow); }
.section:not(.section-dark) .btn-primary:hover { background: #262626; }
.section:not(.section-dark) .offer .btn-primary { background: var(--yellow); color: var(--ink); }
.section:not(.section-dark) .offer .btn-primary:hover { background: #fff45a; }
.section:not(.section-dark) .eyebrow { color: var(--muted); }
.card .tag-live, .side-card .tag-live { background: var(--ink); color: var(--yellow); }
.callout { border-left-color: var(--ink); }
.course-index a:hover { border-left-color: var(--ink); }
.ldur::before { background-color: var(--ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6v12l9-6z' fill='%23f2ea00'/%3E%3C/svg%3E"); }
.tool-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 760px) { .tool-list { grid-template-columns: 1fr; } }
.tool-list li { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: 12px; padding: 20px 22px; }
.tool-list h3 { margin-bottom: .3em; }
.tool-list p { margin: 0; color: var(--muted); }
.skip { background: var(--ink); color: var(--yellow); }

/* --- v5: practice-pack theme (light page, black panels, white cards) --- */
.panel { background: var(--ink); color: var(--white); border-radius: 20px; padding: 36px; }
.panel h2, .panel h3 { color: var(--white); }
.panel p { color: var(--muted-on-dark); }
.panel-lead { font-size: 1.05rem; max-width: 44em; margin-bottom: 26px; }
.panel .tag-live { background: var(--yellow); color: var(--ink); }
.panel :focus-visible { outline-color: var(--yellow); }
.section:not(.section-dark) .panel .btn-primary { background: var(--yellow); color: var(--ink); }
.section:not(.section-dark) .panel .btn-primary:hover { background: #fff45a; }
@media (max-width: 600px) { .panel { padding: 24px 20px; border-radius: 16px; } }
.panel .dcard, .panel .dunit { background: #171717; }

/* lessons: each unit is a black panel */
details.unit { background: var(--ink); border: 0; border-radius: 16px; margin-bottom: 14px; }
details.unit[open] { border: 0; }
details.unit summary { background: transparent; padding: 22px 24px; }
.ubody { padding: 0 24px 20px; }
.ltopic { color: var(--yellow); font-size: .78rem; margin: 20px 0 6px; }
ol.lessons li + li { border-top: 1px solid #262626; }
details.unit .lrow { color: var(--white); }
details.unit .lrow:hover { background: #1a1a1a; }
details.unit .lnum { color: var(--yellow); }
details.unit .ldur { color: var(--muted-on-dark); }
details.unit .ldur::before { background-color: var(--yellow); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6v12l9-6z' fill='%230b0b0b'/%3E%3C/svg%3E"); }
details.unit :focus-visible { outline-color: var(--yellow); }
@media (max-width: 600px) { details.unit summary { padding: 18px 16px; } .ubody { padding: 0 12px 14px; } }
.section:not(.section-dark) .panel .ldur::before { background-color: var(--yellow); }
.dgrid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .dgrid-2 { grid-template-columns: 1fr; } }
.dcard .btn { align-self: flex-start; margin-top: auto; }
.offer .tag-live { background: var(--yellow); color: var(--ink); }
.offer .note a { color: var(--yellow); }

/* --- v6: header buttons pop with a yellow glow on hover (like the logo) --- */
.site-nav a { transition: box-shadow .18s ease, color .18s ease, transform .18s ease, background .18s ease; }
.site-nav a:hover, .site-nav a:focus-visible { background: transparent; color: var(--yellow); box-shadow: 0 0 0 2px var(--yellow), 0 0 16px rgba(242,234,0,.35); transform: translateY(-1px); outline: none; }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--yellow); }
.site-nav .nav-cta:hover, .site-nav .nav-cta:focus-visible { background: var(--yellow); color: var(--ink); box-shadow: 0 0 0 2px var(--yellow), 0 0 22px rgba(242,234,0,.6); }
.brand img { transition: box-shadow .18s ease; }
.brand:hover img { box-shadow: 0 0 0 2px var(--yellow), 0 0 26px rgba(242,234,0,.6); }
@media (prefers-reduced-motion: reduce) { .site-nav a { transition: none; } .site-nav a:hover { transform: none; } }

/* --- v7: larger brand in header --- */
.site-header .wrap { min-height: 88px; }
.brand { gap: 14px; }
.brand img { width: 64px; height: 64px; border-radius: 12px; }
.brand span { font-size: 1.25rem; letter-spacing: -0.01em; }
@media (max-width: 1100px) { .site-nav { top: 88px; } }
.course-index { top: 108px; }
details.unit { scroll-margin-top: 104px; }
@media (max-width: 600px) {
  .site-header .wrap { min-height: 74px; }
  .brand img { width: 52px; height: 52px; }
  .brand span { font-size: 1.05rem; }
  .site-nav { top: 74px; }
}

/* --- v6: lesson units open from links like /lessons/#beams --- */
details.unit { scroll-margin-top: 96px; }
#exams { scroll-margin-top: 80px; }

/* --- v7: Step by Step book offer --- */
.book-price { font-size: 1.05rem; margin: 4px 0 18px; }
.book-price b { font: 800 1.5rem var(--font-head); color: var(--yellow); margin-right: 4px; }
.offer .chapters { margin-top: 14px; background: #171717; border: 1px solid #2a2a2a; border-radius: 14px; padding: 18px 22px; }
.offer .chapters h3 { color: var(--white); font-size: 1rem; margin-bottom: 8px; }
.offer .chapters ol { margin: 0; padding-left: 20px; color: var(--muted-on-dark); }
.offer .chapters li { margin-bottom: 4px; }

/* contact: quick-question strip */
.qcard { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; margin-top: 20px; background: var(--ink); color: var(--white); border: 1px solid #2a2a2a; border-left: 5px solid var(--yellow); border-radius: 16px; padding: 22px 26px; }
.qcard p { margin: 6px 0 0; color: var(--muted-on-dark); }
.section .qcard .btn-primary, .qcard .btn-primary { background: var(--yellow); color: var(--ink); }
.section .qcard .btn-primary:hover, .qcard .btn-primary:hover { background: #fff45a; }

/* ---- Book launch: phases (see site.js) and countdown ---- */
html:not([data-book-phase]) [data-phase-show]:not([data-phase-show~="pre"]) { display: none; }
html[data-book-phase] [data-phase-show] { display: none; }
html[data-book-phase="pre"] [data-phase-show~="pre"],
html[data-book-phase="launch"] [data-phase-show~="launch"],
html[data-book-phase="post"] [data-phase-show~="post"] { display: revert; }
html[data-book-phase] .btn-row[data-phase-show] { display: none; }
html[data-book-phase="pre"] .btn-row[data-phase-show~="pre"],
html[data-book-phase="launch"] .btn-row[data-phase-show~="launch"],
html[data-book-phase="post"] .btn-row[data-phase-show~="post"],
html:not([data-book-phase]) .btn-row[data-phase-show~="pre"] { display: flex; }
.countdown { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 6px 0 10px; color: var(--muted-on-dark); font-weight: 600; }
html[data-book-phase="pre"] .countdown, html[data-book-phase="launch"] .countdown { display: flex; }
.countdown .cd { font: 800 1.35rem var(--font-head); color: var(--yellow); letter-spacing: .01em; }
.book-price s { color: var(--muted-on-dark); margin-right: 6px; }
.book-hero { display: block; width: 100%; height: auto; border-radius: 14px; margin-bottom: 14px; }
