/*
Theme Name: VA Academy PH Network Theme
Description: Course-catalog theme for vaacademyph.com, part of the guide-sites network. Standalone, no page builder.
Version: 1.0.0
Text Domain: vaa-academy-ph-network-theme
*/

@font-face { font-family: "Figtree"; font-style: italic; font-weight: 400; font-display: optional; src: url("assets/fonts/figtree-italic-latin.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 700; font-display: optional; src: url("assets/fonts/figtree-latin.woff2") format("woff2"); }
@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 600; font-display: optional; src: url("assets/fonts/zilla-slab-latin.woff2") format("woff2"); }
@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 700; font-display: optional; src: url("assets/fonts/zilla-slab-latin-2.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --bg: #f7f8fc;
  --card: #ffffff;
  --ink: #171a2b;
  --soft: #4b5168;
  --line: #dde1ee;
  --blue: #1f4fd8;
  --blue-deep: #173a9f;
  --blue-tint: #e9eefd;
  --sun: #f2a900;
  --sun-tint: #fff5da;
  --red: #b3261e;
  --red-tint: #fdecea;
  --green: #1b7a4b;
  --green-tint: #e6f5ec;
  --head: "Zilla Slab", Georgia, serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 8px;

  --nm-bg: var(--card); --nm-ink: var(--ink); --nm-line: var(--line); --nm-accent: var(--blue);
  --nm-hover-bg: var(--blue-tint); --nm-hover-ink: var(--blue-deep); --nm-font: var(--body); --nm-head-font: var(--body);
  --nm-radius: 8px; --nm-shadow: 0 14px 34px rgba(23, 26, 43, 0.16);
  --cc-bg: var(--card); --cc-ink: var(--ink); --cc-line: var(--line); --cc-btn: var(--blue); --cc-btn-ink: #ffffff; --cc-font: var(--body); --cc-radius: 8px;

  --lead-bar-bg: var(--ink); --lead-bar-ink: var(--bg); --lead-btn-bg: #f2a900; --lead-btn-ink: #171a2b;
  --lead-accent: var(--blue); --lead-card: var(--card); --lead-ink: var(--ink); --lead-muted: var(--soft);
  --lead-rule: var(--line); --lead-field: var(--bg); --lead-head: var(--head); --lead-body: var(--body); --lead-radius: 8px;
  --lead-pop-bg: #ffffff; --lead-pop-ink: #171a2b; --lead-pop-muted: #4b5168; --lead-pop-accent: #1f4fd8; --lead-pop-btn-bg: #1f4fd8; --lead-pop-btn-ink: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11131f; --card: #1a1d2d; --ink: #eceef6; --soft: #a9afc4; --line: #2e3349;
    --blue: #86a4ff; --blue-deep: #b3c5ff; --blue-tint: #232b4d; --sun: #f7bd33; --sun-tint: #3a3016;
    --red: #ff9c94; --red-tint: #3c1f1e; --green: #7fd8a8; --green-tint: #17352a;
    --cc-btn-ink: #11131f;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.68 var(--body); overflow-wrap: break-word; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-deep); }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; line-height: 1.18; color: var(--ink); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--card); padding: 8px 12px; }
.kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 0.86rem; font-weight: 600; color: var(--soft); }
.lede { font-size: 1.15rem; color: var(--soft); }

/* Lesson stamp: the site's motif */
.stamp { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 2rem; height: 2rem; font: 700 0.85rem/1 var(--head); color: var(--blue-deep); background: var(--blue-tint); border-bottom: 3px solid var(--sun); border-radius: 6px 6px 2px 2px; }

/* Header and menu */
header.site { position: sticky; top: 0; z-index: 50; background: var(--card); border-bottom: 1px solid var(--line); }
.head-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; flex: none; }
.logo-mark { width: 32px; height: 32px; }
.logo-word { font: 700 1.3rem/1 var(--head); }
.logo-word em { font-style: normal; color: var(--blue); }
nav.main { display: flex; align-items: center; gap: 16px; }
.nm-top { color: var(--ink); text-decoration: none; font-size: 0.97rem; font-weight: 600; white-space: nowrap; }
.nm-top:hover { color: var(--blue); }
.menu-btn { display: none; width: 44px; height: 44px; padding: 11px 9px; background: none; border: 0; cursor: pointer; }
.menu-btn span { display: block; height: 2px; margin: 5px 0; background: var(--ink); transition: transform 0.15s, opacity 0.15s; }
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nm-item { position: relative; display: flex; align-items: center; }
.nm-item.wide { position: static; }
.nm-btn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: -2px; padding: 0; color: inherit; background: none; border: 0; border-radius: 4px; cursor: pointer; }
.nm-btn svg { width: 12px; height: 12px; transition: transform 0.15s; }
.nm-item.open .nm-btn svg { transform: rotate(180deg); }
.nm-btn:focus-visible { outline: 2px solid var(--nm-accent); outline-offset: 1px; }
.nm-panel { display: none; position: absolute; z-index: 60; top: calc(100% + 10px); left: 0; min-width: 16rem; max-width: 24rem; max-height: 72vh; overflow-y: auto; padding: 0.9rem 1rem; white-space: normal; background: var(--nm-bg); color: var(--nm-ink); border: 1px solid var(--nm-line); border-radius: var(--nm-radius); box-shadow: var(--nm-shadow); }
.nm-item.wide .nm-panel { top: 100%; left: 20px; right: 20px; max-width: none; }
.nm-item > .nm-top { position: relative; }
.nm-item > .nm-top::after { content: ""; position: absolute; left: -10px; right: -34px; top: 100%; height: 30px; display: none; }
.nm-item.open > .nm-panel { display: block; }
@media (hover: hover) and (min-width: 1081px) {
  .nm-item:hover > .nm-panel { display: block; }
  .nm-item:hover > .nm-top::after { display: block; }
}
.nm-groups { display: grid; gap: 0.9rem 1.4rem; }
.nm-item.wide .nm-groups { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.nm-h { margin: 0 0 0.35rem; font: 700 0.74rem/1.3 var(--nm-head-font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--nm-accent); }
.nm-group ul { list-style: none; margin: 0; padding: 0; }
.nm-group li { margin: 0; }
.nm-group li a { display: block; padding: 0.28rem 0.45rem; margin: 0 -0.45rem; font: 500 0.9rem/1.35 var(--nm-font); color: var(--nm-ink); text-decoration: none; border-radius: 5px; }
.nm-group li a:hover, .nm-group li a:focus-visible { background: var(--nm-hover-bg); color: var(--nm-hover-ink); }
.nm-all { display: block; margin-top: 0.8rem; padding-top: 0.6rem; border-top: 1px solid var(--nm-line); font: 600 0.88rem/1.3 var(--nm-font); color: var(--nm-accent); text-decoration: none; }

@media (max-width: 1080px) {
  .menu-btn { display: block; }
  nav.main { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; max-height: calc(100vh - 67px); overflow-y: auto; padding: 4px 20px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
  nav.main.open { display: flex; }
  nav.main > * { border-bottom: 1px solid var(--line); }
  nav.main > .nm-top, .nm-item > .nm-top { padding: 11px 0; font-size: 1.02rem; }
  .nm-item, .nm-item.wide { position: static; display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .nm-item > .nm-top::after { display: none !important; }
  .nm-btn { width: 44px; height: 44px; margin: 0; }
  .nm-btn svg { width: 16px; height: 16px; }
  .nm-panel, .nm-item.wide .nm-panel { position: static; grid-column: 1 / -1; min-width: 0; max-width: none; max-height: none; margin: 0 0 0.6rem; padding: 0.7rem 0.9rem; box-shadow: none; }
  .nm-item.wide .nm-groups { grid-template-columns: 1fr; }
  .nm-group li a { padding: 0.5rem 0.45rem; font-size: 0.97rem; }
  .nm-blank { display: none; }
  .nm-groups { gap: 0; }
}

/* Home */
.home-top { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 56px; padding-top: 52px; padding-bottom: 44px; align-items: start; }
.home-lead h1 { margin: 0 0 14px; font-size: clamp(2.1rem, 4.4vw, 3.3rem); letter-spacing: -0.01em; }
.home-lead .lede { max-width: 38rem; margin: 0 0 30px; }
.path { list-style: none; margin: 0; padding: 0; }
.path li { position: relative; display: flex; gap: 16px; padding-bottom: 20px; }
.path li:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: var(--line); }
.path-no { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; font: 700 1.05rem/1 var(--head); color: #fff; background: var(--blue); border-radius: 50%; box-shadow: 0 0 0 3px var(--sun-tint), 0 0 0 5px var(--sun); }
@media (prefers-color-scheme: dark) { .path-no { color: #11131f; } }
.path a { font: 700 1.2rem/1.25 var(--head); color: var(--ink); text-decoration: none; }
.path a:hover { color: var(--blue); }
.path p { margin: 2px 0 0; font-size: 0.98rem; color: var(--soft); }
.home-pop { padding: 22px 24px; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--sun); border-radius: 0 0 var(--radius) var(--radius); }
.home-pop h2 { margin: 0 0 10px; font-size: 1.3rem; }
.home-pop ul { list-style: none; margin: 0; padding: 0; }
.home-pop li { padding: 9px 0; border-top: 1px solid var(--line); line-height: 1.35; }
.home-pop li:first-child { border-top: 0; }
.home-pop a { color: var(--ink); text-decoration: none; font-weight: 500; }
.home-pop a:hover { color: var(--blue); }
.catalog { padding-bottom: 60px; }
.catalog-title { margin: 0 0 8px; font-size: 1.9rem; }
.track-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 8px 40px; padding: 28px 0; border-top: 2px solid var(--ink); }
.track-head h3 { margin: 0 0 6px; font-size: 1.5rem; }
.track-head h3 a { color: var(--ink); text-decoration: none; }
.track-head h3 a:hover { color: var(--blue); }
.track-head p { margin: 0 0 6px; font-size: 0.98rem; color: var(--soft); }
.track-count { font-size: 0.86rem !important; font-weight: 600; }
.track-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
.track-list li { display: flex; align-items: flex-start; gap: 10px; line-height: 1.32; }
.track-list a { color: var(--ink); text-decoration: none; font-weight: 500; padding-top: 4px; }
.track-list a:hover { color: var(--blue); text-decoration: underline; }
.track-list.wide { margin: 18px 0 60px; }
.track-all { grid-column: 2; margin-top: 8px; font-weight: 600; text-decoration: none; }

/* Lesson page */
.lesson, .listing, .read { padding-top: 22px; padding-bottom: 60px; }
.crumbs { font-size: 0.88rem; color: var(--soft); }
.crumbs a { color: var(--soft); }
.lesson-head { max-width: 48rem; margin: 16px 0 24px; }
.lesson-head h1 { margin: 0 0 12px; font-size: clamp(1.85rem, 3.6vw, 2.75rem); letter-spacing: -0.005em; }
.byline { margin: 0; font-size: 0.93rem; color: var(--soft); }
.read { max-width: 760px; }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 46rem) minmax(0, 17rem); gap: 56px; align-items: start; }
.lesson-side { grid-column: 2; grid-row: 1; position: sticky; top: 86px; max-height: calc(100vh - 110px); overflow-y: auto; }
.lesson-body { grid-column: 1; grid-row: 1; min-width: 0; }
.lesson-body > *:first-child, .vaa-content > *:first-child { margin-top: 0; }
.lesson-body h2 { position: relative; margin: 2.3em 0 0.6em; padding-top: 14px; font-size: 1.72rem; }
.lesson-body h2::before { content: ""; position: absolute; left: 0; top: 0; width: 42px; height: 4px; background: var(--sun); }
.lesson-body h3 { margin: 1.7em 0 0.4em; font-size: 1.3rem; }
.lesson-body h4 { margin: 1.3em 0 0.3em; font-size: 1.1rem; }
.lesson-body ul, .lesson-body ol { padding-left: 1.3em; }
.lesson-body li { margin: 0.32em 0; }
.lesson-body table { width: 100%; border-collapse: collapse; margin: 1.3em 0; font-size: 0.95rem; }
.lesson-body th, .lesson-body td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.lesson-body th { font-weight: 700; background: var(--blue-tint); }
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 46rem; margin-top: 44px; }
.lesson-nav a { display: block; padding: 14px 16px; font-weight: 600; line-height: 1.3; color: var(--ink); text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.lesson-nav a:hover { border-color: var(--blue); }
.lesson-nav span { display: block; margin-bottom: 3px; font-size: 0.8rem; color: var(--soft); font-weight: 500; }
.lesson-nav .next { grid-column: 2; text-align: right; }

.lesson-more { max-width: 46rem; margin-top: 34px; padding-top: 22px; border-top: 2px solid var(--ink); }
.lesson-more h2 { margin: 0 0 10px; font-size: 1.35rem; }
.lesson-more ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.lesson-more a { color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.32; }
.lesson-more a:hover { color: var(--blue); text-decoration: underline; }
@media (max-width: 620px) { .lesson-more ul { grid-template-columns: minmax(0, 1fr); } }

/* Components already inside the posts */
.vaa-intro p:first-child { font-size: 1.16rem; }
.vaa-toc h3 { margin: 0 0 8px; font: 700 0.76rem/1.3 var(--body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); }
.vaa-toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.vaa-toc li { margin: 0; }
.vaa-toc a { display: block; padding: 5px 0 5px 12px; font-size: 0.9rem; line-height: 1.32; color: var(--soft); text-decoration: none; }
.vaa-toc a:hover { color: var(--blue); }
.vaa-ownership { margin: 1.6em 0 0.6em; padding-left: 10px; font-size: 0.86rem; line-height: 1.45; color: var(--soft); border-left: 3px solid var(--sun); }
.vaa-parent-badge, .vaa-agency-badge { display: inline-block; padding: 1px 7px; font: 600 0.74rem/1.5 var(--body); color: var(--blue-deep); background: var(--blue-tint); border-radius: 4px; vertical-align: middle; }
.vaa-agency-badge { margin-bottom: 6px; }
.vaa-agency-card { margin: 0.6em 0 1.6em; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.vaa-agency-card h3 { margin: 0 0 6px; }
.vaa-agency-card p { margin: 0 0 10px; }
.vaa-card-note { font-size: 0.9rem; color: var(--soft); }
.vaa-btn { display: inline-block; padding: 9px 16px; font-weight: 600; color: #fff; background: var(--blue); border-radius: 6px; text-decoration: none; }
.vaa-btn:hover { color: #fff; background: var(--blue-deep); }
@media (prefers-color-scheme: dark) { .vaa-btn, .vaa-btn:hover { color: #11131f; } }
.vaa-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 12px; margin: 1.5em 0; }
.vaa-stat-item { padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.vaa-stat-number { font: 700 1.5rem/1.15 var(--head); color: var(--blue); }
.vaa-stat-label { font-size: 0.87rem; line-height: 1.3; color: var(--soft); }
.vaa-warning, .vaa-info, .vaa-highlight, .vaa-action { margin: 1.4em 0; padding: 14px 18px; border-radius: var(--radius); border-left: 4px solid; }
.vaa-warning > *:first-child, .vaa-info > *:first-child, .vaa-highlight > *:first-child, .vaa-action > *:first-child { margin-top: 0; }
.vaa-warning > *:last-child, .vaa-info > *:last-child, .vaa-highlight > *:last-child, .vaa-action > *:last-child { margin-bottom: 0; }
.vaa-warning { background: var(--red-tint); border-color: var(--red); }
.vaa-warning h4 { color: var(--red); }
.vaa-info { background: var(--blue-tint); border-color: var(--blue); }
.vaa-highlight { background: var(--sun-tint); border-color: var(--sun); }
.vaa-action { background: var(--green-tint); border-color: var(--green); }
.vaa-quote { margin: 1.4em 0; padding: 4px 0 4px 18px; font-style: italic; border-left: 3px solid var(--line); }
.vaa-quote cite { display: block; margin-top: 6px; font-style: normal; font-size: 0.88rem; color: var(--soft); }
.vaa-before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1.4em 0; }
.vaa-ba-before, .vaa-ba-after { padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.vaa-ba-before { border-top: 3px solid var(--red); }
.vaa-ba-after { border-top: 3px solid var(--green); }
.vaa-before-after h4 { margin-top: 0; }
.vaa-before-after ul { margin: 0; padding-left: 1.1em; font-size: 0.95rem; }
.vaa-compare { overflow-x: auto; margin: 0.6em 0 1.6em; }
.vaa-faq details { border-top: 1px solid var(--line); }
.vaa-faq details:last-of-type { border-bottom: 1px solid var(--line); }
.vaa-faq summary { padding: 13px 26px 13px 0; font-weight: 600; cursor: pointer; list-style: none; position: relative; }
.vaa-faq summary::-webkit-details-marker { display: none; }
.vaa-faq summary::after { content: "+"; position: absolute; right: 4px; top: 9px; font: 700 1.3rem/1.4 var(--head); color: var(--blue); }
.vaa-faq details[open] summary::after { content: "\2013"; }
.vaa-faq details > div { padding-bottom: 8px; }
.vaa-faq details > div > p:first-child { margin-top: 0; }
.vaa-video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 14px; margin: 1.2em 0; }
.vaa-video-wrap { position: relative; aspect-ratio: 16 / 9; background: var(--ink); border-radius: var(--radius); overflow: hidden; }
.vaa-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vaa-yt { position: absolute; inset: 0; width: 100%; color: #fff; font: 600 1rem/1 var(--body); background: linear-gradient(140deg, #1f4fd8, #171a2b); border: 0; cursor: pointer; }
.vaa-yt::before { content: "\25B6"; display: block; margin-bottom: 8px; font-size: 1.8rem; color: #f2a900; }
.vaa-video-title { margin-top: 6px; font-size: 0.93rem; font-weight: 600; line-height: 1.3; }

/* VA voices */
.vaa-va-voices { margin: 2em 0; padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--sun); border-radius: 0 0 var(--radius) var(--radius); }
.vaa-va-voices h3 { margin: 0 0 4px; }
.vaa-va-voices .vaa-ownership { margin: 4px 0 14px; padding-left: 0; border-left: 0; }
.vaa-vv-track { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 18px; }
.vaa-vv-card img { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 50%; margin-bottom: 8px; }
.vaa-vv-name { font: 700 1.05rem/1.2 var(--head); }
.vaa-vv-role { margin-bottom: 6px; font-size: 0.84rem; line-height: 1.3; color: var(--soft); }
.vaa-vv-text { font-size: 0.95rem; line-height: 1.5; }

/* Buttons used by the recruit pieces */
.btn { display: inline-block; padding: 11px 18px; font: 700 1rem/1.2 var(--body); color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: 6px; text-decoration: none; }
.btn:hover { color: #fff; background: var(--blue-deep); }
@media (prefers-color-scheme: dark) { .btn, .btn:hover { color: #11131f; } .lead-pop .btn, .lead-pop .btn:hover { color: #fff; } }
.lead-block { margin-bottom: 2.5rem; }
.quote { padding-bottom: 3.5rem; }
.lead-page { padding-bottom: 3.5rem; }

/* Footer */
footer.site { padding: 36px 0 26px; font-size: 0.94rem; background: var(--card); border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 30px; }
.foot-name { margin: 0 0 6px; font: 700 1.2rem/1.2 var(--head); }
.foot-grid p { margin-top: 0; color: var(--soft); }
.foot-links { list-style: none; margin: 0; padding: 0; columns: 2; }
.foot-links li { margin: 0 0 6px; }
.foot-links a { color: var(--ink); text-decoration: none; }
.foot-links a:hover { color: var(--blue); text-decoration: underline; }
.foot-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 22px; margin-top: 22px; padding-top: 14px; font-size: 0.86rem; color: var(--soft); border-top: 1px solid var(--line); }
.foot-note p { margin: 0; }
.foot-note a { color: inherit; }

@media (max-width: 1040px) {
  .lesson-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .lesson-side { grid-column: 1; grid-row: auto; position: static; max-height: none; margin-bottom: 24px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
  .lesson-body { grid-column: 1; grid-row: auto; }
}
@media (max-width: 860px) {
  .home-top { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-top: 30px; }
  .track-row { grid-template-columns: minmax(0, 1fr); }
  .track-all { grid-column: 1; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  body { font-size: 1.02rem; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .lesson-head h1 { font-size: 1.82rem; }
  .lesson-body h2 { font-size: 1.45rem; }
  .track-list { grid-template-columns: minmax(0, 1fr); }
  .vaa-before-after, .lesson-nav { grid-template-columns: minmax(0, 1fr); }
  .lesson-nav .next { grid-column: 1; text-align: left; }
  /* Tables with 3+ columns become one card per row */
  .vaa-compare { overflow: visible; }
  .lesson-body table { table-layout: fixed; overflow-wrap: anywhere; }
  .vaa-cards, .vaa-cards tbody, .vaa-cards tr, .vaa-cards td { display: block; width: 100%; }
  .vaa-cards thead { display: none; }
  .vaa-cards tr { margin-bottom: 12px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
  .vaa-cards td { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; text-align: right; }
  .vaa-cards td::before { content: attr(data-label); flex: 0 0 42%; text-align: left; font-weight: 600; color: var(--soft); font-size: 0.86rem; }
  .vaa-cards td:first-child { display: block; font: 700 1.12rem/1.25 var(--head); text-align: left; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 4px; }
  .vaa-cards td:first-child::before { content: none; }
  .vaa-cards td:last-child { border-bottom: 0; }
}
