/* Mastering Essentials. RTL-first; logical properties throughout. */
:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --tint: #f3eee5;
  --ink: #14232a;
  --muted: #5b6a6f;
  --line: #e6dfd3;
  --brand: #00696d;
  --brand-ink: #004a4d;
  --brand-soft: #e2f0ee;
  --accent: #c46a12;
  --accent-soft: #fcefdc;
  --yt: #e3242b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(20 35 42 / 6%), 0 8px 24px rgb(20 35 42 / 8%);
  --shadow-lg: 0 24px 60px rgb(20 35 42 / 18%);
  --wrap: 1200px;
  --urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;
  --latin: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--urdu);
  font-size: 17px;
  line-height: 2;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.75; margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[lang="en"], [dir="ltr"] { font-family: var(--latin); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 6px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.icon-lg { width: 28px; height: 28px; }
.center { display: flex; justify-content: center; margin-top: 28px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgb(251 248 243 / 92%);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 40px; height: 40px; }
.brand-name { font-family: var(--latin); font-weight: 700; font-size: 13px; line-height: 1.15; letter-spacing: 0.02em; text-transform: uppercase; color: var(--brand-ink); text-align: left; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { padding: 4px 12px; border-radius: 999px; font-size: 15px; color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--brand-ink); background: var(--brand-soft); }
.header-search { margin-inline-start: auto; position: relative; display: flex; align-items: center; }
.header-search input {
  width: 200px; height: 40px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); padding-inline: 16px 40px; font-size: 14px; line-height: 1;
}
.header-search button { position: absolute; inset-inline-end: 4px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.subscribe { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding-inline: 16px; border-radius: 999px; background: var(--yt); color: #fff; font-size: 15px; flex: none; }
.subscribe:hover { background: #c81d23; }
.subscribe .icon { width: 20px; height: 20px; }
.menu-toggle { display: none; }

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding-inline: 22px; border-radius: 999px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font-size: 16px; cursor: pointer; line-height: 1.6;
}
.btn:hover { background: var(--brand-ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface); border-color: var(--brand); color: var(--brand-ink); }
.btn-light { background: #fff; color: var(--brand-ink); }
.btn-light:hover { background: var(--accent-soft); }
.btn .icon { width: 20px; height: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-center { justify-content: center; margin-top: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 14px; cursor: pointer; line-height: 2.1;
}
.chip:hover { border-color: var(--brand); color: var(--brand-ink); }
.chip small { color: var(--muted); font-size: 12px; }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-soft { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
.kicker { color: var(--accent); font-size: 14px; font-weight: 700; }
.more { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-size: 15px; white-space: nowrap; }
.more:hover { color: var(--brand-ink); }
.more .icon { width: 18px; height: 18px; }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(900px 400px at 85% 0%, rgb(0 105 109 / 10%), transparent 70%),
    radial-gradient(700px 400px at 0% 100%, rgb(196 106 18 / 10%), transparent 70%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; padding-block: 56px 64px; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.9; margin-block: 6px 10px; color: var(--ink); }
.lede { color: var(--muted); font-size: 18px; max-width: 60ch; }
.hero-search {
  display: flex; align-items: center; gap: 8px; margin-block: 26px 16px; max-width: 560px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px; padding-inline-start: 18px; box-shadow: var(--shadow);
}
.hero-search .icon { color: var(--muted); width: 22px; height: 22px; }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; height: 46px; font-size: 17px; line-height: 1; outline: none; }
.hero-search button { border: 0; border-radius: 999px; background: var(--brand); color: #fff; padding-inline: 22px; height: 46px; cursor: pointer; line-height: 1; }
.hero-search button:hover { background: var(--brand-ink); }
.hero-search:focus-within { border-color: var(--brand); }

.hero-stack { position: relative; height: 440px; }
.stack-card {
  position: absolute; top: 50%; width: 210px; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow-lg); border: 4px solid #fff; background: #000;
}
.stack-card img { width: 100%; height: 100%; object-fit: cover; }
.stack-1 { inset-inline-start: 50%; transform: translate(50%, -50%); z-index: 3; }
.stack-2 { inset-inline-start: 6%; transform: translateY(-46%) rotate(6deg); z-index: 2; width: 180px; }
.stack-3 { inset-inline-end: 6%; transform: translateY(-54%) rotate(-6deg); z-index: 1; width: 180px; }
.stack-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.stack-play .icon { width: 54px; height: 54px; padding: 15px; border-radius: 50%; background: rgb(0 0 0 / 45%); backdrop-filter: blur(4px); }

/* ---------- sections ---------- */
.section { padding-block: 64px; }
.section-tight { padding-block: 32px 64px; }
.section-tint { background: var(--tint); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }

/* topic cards */
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.topic-card {
  --hue: var(--brand); --soft: var(--brand-soft);
  display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--hue); }
.topic-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--soft); color: var(--hue); }
.topic-icon .icon { width: 26px; height: 26px; }
.topic-text { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.topic-text strong { font-size: 18px; line-height: 1.9; }
.topic-text span { color: var(--muted); font-size: 14px; line-height: 1.95; }
.topic-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.topic-count { font-size: 14px; color: var(--hue); font-weight: 700; }
.topic-thumbs { display: flex; }
.topic-thumbs img { width: 30px; height: 40px; object-fit: cover; border-radius: 7px; border: 2px solid #fff; margin-inline-start: -10px; box-shadow: 0 1px 3px rgb(0 0 0 / 15%); }
.topic-children { --hue: #b4467a; --soft: #fbe8f0; }
.topic-medicines { --hue: #2f62c9; --soft: #e6eefc; }
.topic-food { --hue: #3b8a3e; --soft: #e6f3e5; }
.topic-home-safety { --hue: #c4521a; --soft: #fdebe0; }
.topic-conditions { --hue: #c0313a; --soft: #fbe6e7; }
.topic-body-habits { --hue: #00696d; --soft: #e2f0ee; }
.topic-air-water-heat { --hue: #4f6fa0; --soft: #e8edf6; }
.topic-health-sense { --hue: #7a55b8; --soft: #efe9f8; }

/* video cards */
.vgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px 16px; }
.vcard a { display: flex; flex-direction: column; gap: 8px; }
.vthumb { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: var(--radius-sm); overflow: hidden; background: #1b2b30; box-shadow: var(--shadow); }
.vthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.vcard a:hover .vthumb img { transform: scale(1.04); }
.vcard-wide .vthumb { aspect-ratio: 16 / 9; }
.vdur { position: absolute; inset-block-end: 8px; inset-inline-start: 8px; padding: 0 7px; border-radius: 6px; background: rgb(0 0 0 / 70%); color: #fff; font-size: 12px; line-height: 1.7; font-weight: 500; }
.vtitle { font-size: 15px; line-height: 1.95; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vcard a:hover .vtitle { color: var(--brand-ink); }
.vtopic { font-size: 12px; color: var(--muted); line-height: 1.6; }
.vrail { display: grid; grid-auto-flow: column; grid-auto-columns: 180px; gap: 16px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.vrail .vcard { scroll-snap-align: start; }

/* promise */
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.promise li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.promise .icon { color: var(--brand); margin-bottom: 8px; }
.promise h3 { font-size: 19px; }
.promise p { color: var(--muted); font-size: 15px; }
.disclaimer { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--accent-soft); color: #6d3c08; font-size: 14px; }
.disclaimer .icon { margin-top: 0.55em; }

/* students */
.paths { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.path-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.path-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.path-card .icon-lg { color: var(--accent); }
.path-card strong { font-size: 19px; }
.path-card > span:not(.more) { color: var(--muted); font-size: 15px; flex: 1; }

/* cta */
.cta { background: linear-gradient(120deg, var(--brand-ink), var(--brand)); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 44px; }
.cta h2 { font-size: 26px; }
.cta p { opacity: 0.85; }

/* ---------- page head / breadcrumbs ---------- */
.page-head { padding-block: 28px 8px; }
.page-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-block: 4px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumbs li:not(:last-child)::after { content: "‹"; margin-inline-start: 6px; }
.crumbs a:hover { color: var(--brand); }
.crumbs li[aria-current] { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; max-width: 40ch; }
.page-404 { padding-block: 80px; text-align: center; }
.page-404 .hero-search { margin-inline: auto; }

/* ordered learning path */
.path-list { display: grid; gap: 14px; max-width: 820px; }
.path-list a { display: grid; grid-template-columns: 44px 96px 1fr; align-items: center; gap: 16px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.path-list a:hover { border-color: var(--brand); }
.path-list img { width: 96px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; }
.step { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; }

/* ---------- watch page ---------- */
.watch { padding-block: 24px 56px; }
.watch-grid { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 48px; align-items: start; }
.watch-wide { grid-template-columns: 1fr; }
.player-col { position: sticky; top: 88px; }
.player, .player-col iframe {
  display: block; width: 100%; aspect-ratio: 9 / 16; border: 0; padding: 0; border-radius: 22px; overflow: hidden;
  background: #000; box-shadow: var(--shadow-lg); position: relative; cursor: pointer;
}
.watch-wide .player, .watch-wide .player-col iframe { aspect-ratio: 16 / 9; }
.player img { width: 100%; height: 100%; object-fit: cover; }
.watch-wide .player img { object-fit: contain; }
.play-btn { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.play-btn .icon { width: 76px; height: 76px; padding: 22px; border-radius: 50%; background: var(--yt); box-shadow: 0 8px 24px rgb(0 0 0 / 35%); transition: transform .15s ease; }
.player:hover .play-btn .icon { transform: scale(1.08); }
.watch-copy h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-block: 10px 4px; }
.watch-meta { color: var(--muted); font-size: 14px; }
.watch-body { margin-top: 18px; display: grid; gap: 12px; font-size: 18px; }
.watch-body ul { display: grid; gap: 8px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.watch-body li { position: relative; padding-inline-start: 24px; }
.watch-body li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 0.95em; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.watch-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.watch-actions .btn:first-child { background: var(--yt); }
.watch-actions .btn:first-child:hover { background: #c81d23; }

/* written guide */
.vguide { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; padding: 0 8px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 11px; line-height: 2; }
.guide-jump { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--brand); font-weight: 700; }
.guide-jump .icon { transform: rotate(-90deg); }
.guide { max-width: 780px; margin: 56px auto 0; padding-top: 32px; border-top: 1px solid var(--line); }
.guide-body { font-size: 18px; line-height: 2.15; display: grid; gap: 14px; }
.guide-body h2 { font-size: clamp(1.3rem, 2.4vw, 1.65rem); margin-top: 18px; color: var(--brand-ink); }
.guide-body h3 { font-size: 1.12rem; margin-top: 6px; }
.guide-body ul, .guide-body ol { display: grid; gap: 6px; padding-inline-start: 4px; }
.guide-body ul li { position: relative; padding-inline-start: 24px; }
.guide-body ul li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 0.95em; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.guide-body ol { counter-reset: n; }
.guide-body ol li { counter-increment: n; position: relative; padding-inline-start: 34px; }
.guide-body ol li::before { content: counter(n, arabic-indic); position: absolute; inset-inline-start: 0; top: 0.35em; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-size: 14px; line-height: 1; }
.guide-body strong { color: var(--ink); }
.guide-sources { margin-top: 28px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.guide-sources h2 { font-size: 17px; }
.guide-sources ol { list-style: decimal; padding-inline-start: 22px; display: grid; gap: 4px; margin-block: 6px 10px; }
.guide-sources a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.guide-sources p { color: var(--muted); }

/* topic articles */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.article-card { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .18s ease, border-color .18s ease; }
.article-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.article-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--line); aspect-ratio: 16 / 9; overflow: hidden; }
.article-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.article-text { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 20px; }
.article-text strong { font-size: 19px; line-height: 1.9; }
.article-text > span:last-child { color: var(--muted); font-size: 14px; }
.article { padding-block: 24px 56px; }
.article-head { max-width: 780px; }
.article-head h1 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); margin-block: 4px 6px; }
.byline { color: var(--muted); font-size: 14px; margin-top: 8px; }
.article-layout { display: grid; grid-template-columns: 240px minmax(0, 780px); gap: 48px; margin-top: 28px; align-items: start; }
.toc { position: sticky; top: 88px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; font-size: 14px; }
.toc h2 { font-size: 15px; margin-bottom: 4px; }
.toc ol { display: grid; gap: 2px; list-style: decimal; padding-inline-start: 20px; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--brand); }
.article-body h2 { scroll-margin-top: 90px; }
.inline-video { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: center; margin: 10px 0; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.inline-video .player, .inline-video iframe { width: 170px; aspect-ratio: 9 / 16; border-radius: 14px; box-shadow: var(--shadow); border: 0; }
.inline-video .play-btn .icon { width: 52px; height: 52px; padding: 15px; }
.inline-video figcaption { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.inline-video figcaption strong { font-size: 17px; line-height: 1.9; }
.inline-video figcaption span { color: var(--muted); font-size: 13px; }
.inline-video figcaption a { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 700; }
.inline-video figcaption a .icon { width: 16px; height: 16px; }
.article-backlink { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--brand-soft); color: var(--brand-ink); font-size: 15px; }
.article-backlink .icon { width: 22px; height: 22px; flex: none; }

/* ---------- library ---------- */
.library-tools { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 20px 14px; align-items: center; }
.library-search { position: relative; flex: 1; min-width: 240px; max-width: 560px; }
.library-search .icon { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.library-search input { width: 100%; height: 50px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding-inline: 46px 18px; font-size: 16px; line-height: 1; }
.library-search input:focus { outline: none; border-color: var(--brand); }
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.sort select { height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding-inline: 14px; font-size: 14px; }
.filters { padding-bottom: 8px; }
.library-status { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.library-empty { text-align: center; padding: 40px; color: var(--muted); }

/* social links */
.social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.social a { display: inline-flex; align-items: center; height: 36px; padding-inline: 14px; border-radius: 999px; border: 1px solid rgb(255 255 255 / 25%); font-family: var(--latin); font-size: 14px; font-weight: 500; }
.social a:hover { background: rgb(255 255 255 / 12%); color: #fff; }
.social-cta a { height: 44px; padding-inline: 18px; background: #fff; color: var(--brand-ink); border: 0; }
.social-cta a:hover { background: var(--accent-soft); color: var(--brand-ink); }
.follow-title { margin-top: 18px; }

/* ---------- footer ---------- */
.site-footer { background: #10201f; color: #c9d4d2; padding-top: 48px; font-size: 15px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 32px; }
.footer-brand strong { color: #fff; font-size: 18px; }
.site-footer h2 { color: #fff; font-size: 16px; margin-bottom: 6px; }
.site-footer a:hover { color: #fff; }
.footer-note { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid rgb(255 255 255 / 12%); padding-block: 18px 28px; font-size: 13px; color: #9fb0ad; }
.footer-note .icon { vertical-align: -0.3em; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .vgrid { grid-template-columns: repeat(4, 1fr); }
  .header-search { display: none; }
  .site-nav { margin-inline-start: auto; }
}
@media (max-width: 1080px) {
  .article-layout { grid-template-columns: 1fr; gap: 20px; }
  .toc { position: static; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 8px; padding-block: 36px 40px; }
  .hero-stack { height: 300px; order: -1; }
  .stack-card { width: 150px; }
  .stack-2, .stack-3 { width: 130px; }
  .vgrid { grid-template-columns: repeat(3, 1fr); }
  .watch-grid { grid-template-columns: 1fr; gap: 24px; }
  .player-col { position: static; max-width: 340px; margin-inline: auto; width: 100%; }
  .watch-wide .player-col { max-width: none; }
  .promise, .paths { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .cta-inner { flex-direction: column; align-items: flex-start; }

  .menu-toggle {
    display: grid; gap: 4px; place-content: center; margin-inline-start: auto;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer;
  }
  .menu-toggle span:not(.sr-only) { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
  .site-nav {
    display: none; position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: var(--shadow);
  }
  .menu-open .site-nav { display: flex; }
  .site-nav a { font-size: 17px; padding: 8px 12px; border-radius: 10px; }
  .subscribe span { display: none; }
  .subscribe { width: 44px; padding: 0; justify-content: center; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .article-grid { grid-template-columns: 1fr; }
  .inline-video { grid-template-columns: 120px 1fr; gap: 12px; padding: 10px; }
  .inline-video .player, .inline-video iframe { width: 120px; }
  .section { padding-block: 44px; }
  .topic-grid { grid-template-columns: 1fr; }
  .vgrid { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }
  .vrail { grid-auto-columns: 150px; }
  .hero-search input { font-size: 16px; }
  .hero-search button { padding-inline: 16px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .lede { font-size: 16px; }
  .path-list a { grid-template-columns: 36px 72px 1fr; gap: 10px; }
  .path-list img { width: 72px; }
  .player-col { max-width: 250px; }
  .watch-wide .player-col { max-width: none; }
  .step { width: 36px; height: 36px; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
