/* ─────────────────────────────────────────────────────────────
   help.cloudnc.com public pages (CAM Assist and Quote Agent help): home, knowledge base,
   articles and the Academy. The frame (tokens, top bar, picker, footer) is in chrome.css,
   which loads first. Partner pages use site.css instead.
   ───────────────────────────────────────────────────────────── */

:root { color-scheme: light; }


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--hc-font);
  font-size: var(--hc-fs-body);
  line-height: 1.6;
  color: var(--hc-ink);
  background: var(--hc-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
a { color: var(--cnc-blue-500); text-decoration: none; transition: color var(--hc-ease); }
a:hover { color: var(--cnc-link-hover); }
:focus-visible { outline: 2px solid var(--cnc-blue-500); outline-offset: 2px; }
.band :focus-visible, .site-footer :focus-visible, .help-cta :focus-visible { outline-color: var(--cnc-blue-hover); }
h1, h2, h3 { text-wrap: balance; }

.wrap {
  max-width: var(--hc-wrap); margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
@media (max-width: 600px) {
  .wrap {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.label {
  font-size: var(--hc-fs-xs); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--hc-muted);
}

/* ── Top band: header and page head share the dark ground ──── */

.band { position: relative; background: var(--hc-band); color: var(--hc-band-ink); }


/* Page head */
.hero { position: relative; z-index: 1; padding-block: 36px 52px; }
.hero h1 { margin: 14px 0 10px; font-size: var(--hc-fs-title); line-height: 1.1; font-weight: 300; letter-spacing: -0.01em; }
.hero p.lede { margin: 0; max-width: 40em; font-size: var(--hc-fs-lg); line-height: 1.5; font-weight: 400; color: var(--hc-band-muted); }
@media (max-width: 600px) {
  .hero { padding-block: 24px 36px; }
  .hero h1 { font-size: var(--hc-fs-h2); }
}
.page-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 24px; }
.page-tools .search { flex: 1 1 320px; margin: 0; }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--hc-fs-sm); color: var(--hc-band-muted); list-style: none; padding: 0; margin: 0; }
.crumbs a { color: var(--hc-band-muted); }
.crumbs a:hover { color: var(--cnc-blue-hover); }
.crumbs li + li::before { content: '/'; margin-right: 6px; opacity: .5; }

/* Search */
.search { position: relative; max-width: 640px; margin-top: 28px; }
.search input {
  width: 100%; font: inherit; font-size: var(--hc-fs-lg); color: var(--hc-ink);
  padding: 15px 18px 15px 50px; border-radius: var(--hc-radius-btn); border: 1px solid transparent;
  background: var(--hc-surface);
}
.search input:focus-visible { outline: 2px solid var(--cnc-blue-hover); outline-offset: 2px; }
.search input::placeholder { color: var(--hc-muted); }
.search > svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--hc-muted); pointer-events: none; }

/* ── Home ──────────────────────────────────────────────────── */

/* "CAM Assist for [Fusion ▾]" */
.hero h1.cam-hero, .home-hero h1.cam-hero { white-space: nowrap; font-size: min(var(--hc-fs-title), 7.4vw); }
.cam-hero .cam-picker { display: inline-block; position: relative; vertical-align: baseline; }
.cam-hero-btn {
  font: inherit; letter-spacing: inherit; color: var(--cnc-blue-hover); background: none; border: 0; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; text-align: left;
  border-bottom: var(--hc-hairline) dashed rgba(83, 177, 255, .55);
}
.cam-hero-btn:hover, .cam-hero-btn[aria-expanded='true'] { border-bottom-style: solid; }
.cam-hero-btn svg { flex: none; opacity: .8; width: .6em; height: .6em; }
/* The name box eases to each name's width; the name slides up and out, the next slides in from below. */
.cam-hero-value { display: inline-block; position: relative; overflow: hidden; vertical-align: bottom; transition: width .4s ease; }
.cam-hero-text { display: inline-block; transition: transform .32s ease, opacity .32s ease; }
.cam-hero-text.out { transform: translateY(-70%); opacity: 0; }
.cam-hero-text.below { transform: translateY(70%); opacity: 0; transition: none; }
.cam-hero-measure { position: absolute; visibility: hidden; white-space: nowrap; left: 0; top: 0; }
.cam-hero .cam-menu { font-size: var(--hc-fs-body); letter-spacing: 0; line-height: 1.6; font-weight: 400; white-space: normal; }
@media (prefers-reduced-motion: reduce) { .cam-hero-value, .cam-hero-text { transition: none; } }

.home-hero { padding-block: 64px 104px; }
.home-hero h1 { margin: 0 0 8px; }
.home-hero .search { max-width: none; margin-top: 24px; }
@media (max-width: 600px) { .home-hero { padding-block: 36px 80px; } }

/* Utility row: overlaps the band (a CloudNC detail worth keeping) */
.utility {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: -40px; position: relative; z-index: 3;
  background: var(--hc-surface); border: 1px solid var(--hc-line); border-radius: var(--hc-radius); box-shadow: var(--hc-shadow-card);
}
.utility a {
  display: flex; align-items: center; gap: 12px; padding: 18px 20px; color: var(--hc-ink);
  font-weight: 500; min-width: 0;
}
.utility a + a { border-left: 1px solid var(--hc-line); }
.utility a:hover { background: var(--hc-tint); color: var(--hc-ink); }
.utility svg { color: var(--cnc-blue-500); flex: none; }
.utility small { display: block; font-size: var(--hc-fs-sm); font-weight: 400; color: var(--hc-muted); }
@media (max-width: 900px) {
  .utility { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .utility a:nth-child(3) { border-left: 0; }
  .utility a:nth-child(n+3) { border-top: 1px solid var(--hc-line); }
}
@media (max-width: 480px) {
  .utility a { padding: 12px 14px; gap: 10px; font-size: var(--hc-fs-sm); }
  .utility small { display: none; }
}
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--cnc-green); margin-right: 6px; vertical-align: 1px; }

/* ── Article rows (lists) ──────────────────────────────────── */

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hc-line); }
.rows > li { border-bottom: 1px solid var(--hc-line); }
.row { display: block; padding: 16px 0; color: var(--hc-ink); }
.row:hover { color: var(--hc-ink); }
.row:hover h3 { color: var(--cnc-link-hover); }
.row h3 { margin: 0; font-size: var(--hc-fs-lg); font-weight: 500; line-height: 1.35; transition: color var(--hc-ease); }
.row-summary { margin: 4px 0 0; font-size: var(--hc-fs-body); color: var(--hc-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 8px 0 0; font-size: var(--hc-fs-sm); color: var(--hc-muted); }
.meta-line .sep { opacity: .6; }
.meta-type { display: inline-flex; align-items: center; gap: 7px; color: var(--hc-ink-2); font-weight: 500; }
.meta-type::before, .type-badge::before { content: ''; width: 12px; height: var(--hc-hairline); background: var(--c, var(--hc-line-strong)); flex: none; }
[data-type='how-to'], [data-type='setup'], [data-type='settings'] { --c: var(--cnc-blue-500); }
[data-type='troubleshooting'], [data-type='error'], [data-type='warning'], [data-type='known-issue'] { --c: var(--cnc-red); }

.type-badge {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: var(--hc-fs-xs); font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--hc-ink-2); border: 1px solid var(--hc-line); padding: 3px 9px; border-radius: 2px;
}
.band .type-badge { color: var(--hc-band-ink); border-color: var(--hc-band-line); }
.band [data-type='licensing'], .band [data-type='concept'] { --c: var(--hc-band-muted); }

/* ── Knowledge base ────────────────────────────────────────── */

.kb-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; padding-block: 40px 80px; }
@media (max-width: 900px) { .kb-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-block: 24px 56px; } }

.filters { position: sticky; top: calc(var(--hc-header-h) + 24px + env(safe-area-inset-top, 0px)); align-self: start; display: grid; gap: 28px; }
.filter-group h3 { margin: 0 0 8px; }
.filter-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.filter-group button {
  width: 100%; text-align: left; font: inherit; font-size: var(--hc-fs-body); font-weight: 500;
  color: var(--hc-ink-2); background: none; border: 0; border-left: var(--hc-hairline) solid transparent;
  padding: 6px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px;
  transition: background-color var(--hc-ease), color var(--hc-ease);
}
.filter-group button span { color: var(--hc-muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.filter-group button:hover { background: var(--hc-surface); }
.filter-group button[aria-pressed='true'] { background: var(--hc-tint); color: var(--cnc-blue-500); border-left-color: var(--cnc-blue-500); }
.filter-group button:disabled { color: var(--hc-line-strong); cursor: default; background: none; }
.filter-toggle { display: none; }
@media (max-width: 900px) {
  .filter-toggle {
    display: inline-flex; align-items: center; gap: 8px; justify-self: start;
    font: inherit; font-weight: 500; color: var(--hc-ink); background: var(--hc-surface);
    border: 1px solid var(--hc-line-strong); border-radius: var(--hc-radius-btn); padding: 8px 14px; cursor: pointer;
  }
  .filter-toggle .n { color: var(--cnc-blue-500); }
  .filters { position: static; display: none; gap: 20px; padding: 16px; background: var(--hc-surface); border: 1px solid var(--hc-line); border-radius: var(--hc-radius); }
  .filters.open { display: grid; }
}

.result-note { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: 0 0 12px; color: var(--hc-muted); font-size: var(--hc-fs-sm); }
.result-note strong { color: var(--hc-ink); font-weight: 600; }
.linkish { font: inherit; font-weight: 500; color: var(--cnc-blue-500); background: none; border: 0; padding: 0; cursor: pointer; }
.linkish:hover { color: var(--cnc-link-hover); }

.kb-section + .kb-section { margin-top: 40px; }
.kb-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.kb-section-head h2 { margin: 0; font-size: var(--hc-fs-h3); font-weight: 500; }
.kb-section-head p { margin: 2px 0 10px; color: var(--hc-muted); font-size: var(--hc-fs-sm); flex-basis: 100%; }
.kb-section-head { flex-wrap: wrap; }

.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 24px; }
.pager button {
  font: inherit; font-weight: 500; min-width: 40px; padding: 8px 12px; cursor: pointer;
  background: var(--hc-surface); color: var(--hc-ink); border: 1px solid var(--hc-line); border-radius: var(--hc-radius-btn);
  font-variant-numeric: tabular-nums;
}
.pager button:hover:not(:disabled) { border-color: var(--cnc-blue-500); }
.pager button[aria-current='page'] { background: var(--cnc-blue-500); border-color: var(--cnc-blue-500); color: var(--cnc-white); }
.pager button:disabled { color: var(--hc-line-strong); cursor: default; }

/* Zero results: recovery, not a dead end */
.no-results { padding: 28px; background: var(--hc-surface); border: 1px solid var(--hc-line); border-radius: var(--hc-radius); display: grid; gap: 18px; }
.no-results h2 { margin: 0; font-size: var(--hc-fs-h3); font-weight: 500; }
.no-results p { margin: 0; color: var(--hc-muted); }
.no-results .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.no-results ul { margin: 6px 0 0; padding-left: 20px; }
.no-results li { margin: 4px 0; }

.empty { padding: 32px 24px; color: var(--hc-muted); background: var(--hc-surface); border: 1px solid var(--hc-line); border-radius: var(--hc-radius); }
.empty h2 { margin: 0 0 6px; font-size: var(--hc-fs-h3); font-weight: 500; color: var(--hc-ink); }
.empty p { margin: 0; }

/* ── Article page ──────────────────────────────────────────── */

.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: var(--hc-fs-sm); color: var(--hc-band-muted); margin-top: 6px; }
.article-meta > span { display: inline-flex; align-items: center; gap: 6px; }

/* Reading column capped at ~68 characters in Barlow; spare width goes to the rail. */
.article-layout { display: grid; grid-template-columns: minmax(0, 34em) 260px; justify-content: space-between; gap: 56px; padding-block: 44px 80px; }
@media (max-width: 980px) { .article-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-block: 24px 56px; } }
.article-main { min-width: 0; }
.article-main .prose { max-width: 32em; }

.article-aside { position: sticky; top: calc(var(--hc-header-h) + 24px + env(safe-area-inset-top, 0px)); align-self: start; display: flex; flex-direction: column; gap: 32px; }
@media (max-width: 980px) { .article-aside { position: static; margin-top: 40px; } }
.aside-box h3 { margin: 0 0 10px; }
.toc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-left: 1px solid var(--hc-line); }
.toc a { display: block; font-size: var(--hc-fs-sm); color: var(--hc-muted); padding: 5px 0 5px 14px; margin-left: -1px; border-left: var(--hc-hairline) solid transparent; line-height: 1.35; }
.toc a:hover { color: var(--hc-ink); }
.toc a.active { color: var(--cnc-blue-500); border-left-color: var(--cnc-blue-500); font-weight: 500; }
.toc .l3 a { padding-left: 26px; }
.related { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.related a { font-size: var(--hc-fs-sm); font-weight: 500; line-height: 1.4; }
@media (max-width: 980px) { .aside-box.toc-box { display: none; } }

/* Collapsed contents for phones */
.toc-mobile { display: none; margin-bottom: 24px; border: 1px solid var(--hc-line); border-radius: var(--hc-radius); background: var(--hc-surface); }
.toc-mobile summary { cursor: pointer; padding: 12px 16px; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile[open] summary svg { transform: rotate(180deg); }
.toc-mobile .toc { margin: 0 16px 14px; }
@media (max-width: 980px) { .toc-mobile.has-toc { display: block; } }

.article-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; max-width: 32em; }
.article-pager a { display: block; padding: 14px 16px; border: 1px solid var(--hc-line); border-radius: var(--hc-radius); color: var(--hc-ink); background: var(--hc-surface); }
.article-pager a:hover { border-color: var(--cnc-blue-500); color: var(--hc-ink); }
.article-pager small { display: block; font-size: var(--hc-fs-xs); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--hc-muted); }
.article-pager span { font-weight: 500; line-height: 1.35; }
.article-pager .next { text-align: right; grid-column: 2; }
@media (max-width: 600px) { .article-pager { grid-template-columns: minmax(0, 1fr); } .article-pager .next { grid-column: 1; } }

.help-cta {
  margin-top: 32px; padding: 24px 28px; border-radius: var(--hc-radius); max-width: 32em;
  background: var(--hc-band); color: var(--hc-band-ink);
  display: flex; align-items: center; justify-content: space-between; gap: 16px 20px; flex-wrap: wrap;
}
.help-cta h3 { margin: 0 0 2px; font-size: var(--hc-fs-h3); font-weight: 500; }
.help-cta p { margin: 0; color: var(--hc-band-muted); }

/* ── Prose (rendered markdown) ─────────────────────────────── */

.prose { color: var(--hc-ink-2); font-size: var(--hc-fs-body); }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: var(--hc-fs-h3); line-height: 1.25; font-weight: 500; color: var(--hc-ink); margin: 40px 0 12px; scroll-margin-top: calc(var(--hc-header-h) + 24px); }
.prose h3 { font-size: var(--hc-fs-lg); line-height: 1.35; font-weight: 600; color: var(--hc-ink); margin: 28px 0 8px; scroll-margin-top: calc(var(--hc-header-h) + 24px); }
.prose h4 { font-size: var(--hc-fs-body); font-weight: 600; color: var(--hc-ink); margin: 22px 0 6px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose p, .prose li { overflow-wrap: break-word; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--cnc-blue-500); font-weight: 600; }
.prose strong { color: var(--hc-ink); font-weight: 600; }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose hr { border: 0; border-top: 1px solid var(--hc-line); margin: 32px 0; }
.prose img { border-radius: var(--hc-radius); border: 1px solid var(--hc-line); margin: 8px 0; }
.prose code { font-family: var(--hc-mono); font-size: .88em; background: var(--hc-code-bg); padding: 2px 6px; border-radius: 2px; overflow-wrap: anywhere; }
.prose pre { background: var(--hc-band-solid); color: var(--cnc-white); padding: 18px 20px; border-radius: var(--hc-radius); overflow-x: auto; font-size: var(--hc-fs-sm); line-height: 1.55; margin: 0 0 20px; }
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }
.prose blockquote { margin: 0 0 20px; padding: 14px 18px; color: var(--hc-ink-2); background: var(--hc-tint); border-left: var(--hc-hairline) solid var(--cnc-blue-500); border-radius: var(--hc-radius); }
.prose blockquote > :last-child { margin-bottom: 0; }

/* Tables: scroll in their wrapper, never break words */
.prose .table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--hc-line); border-radius: var(--hc-radius); }
.prose table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: var(--hc-fs-sm); font-variant-numeric: tabular-nums; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--hc-line); vertical-align: top; overflow-wrap: normal; word-break: normal; }
.prose th { background: var(--hc-code-bg); font-weight: 600; color: var(--hc-ink); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }

/* Numbered steps: top-level ordered lists */
.prose ol.steps { list-style: none; padding: 0; counter-reset: step; }
.prose ol.steps > li { counter-increment: step; position: relative; padding: 0 0 18px 48px; margin: 0; }
.prose ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -1px;
  width: 30px; height: 30px; display: grid; place-items: center;
  font-size: var(--hc-fs-sm); font-weight: 600; color: var(--cnc-blue-500);
  border: var(--hc-hairline) solid var(--cnc-blue-500); border-radius: var(--hc-radius-btn); background: var(--hc-surface);
}
.prose ol.steps > li::after { content: ''; position: absolute; left: 15px; top: 34px; bottom: 4px; width: 1px; background: var(--hc-line); }
.prose ol.steps > li:last-child::after { display: none; }
.prose ol.steps > li:last-child { padding-bottom: 0; }

/* Callouts: the lead word carries the meaning; red only for warnings */
.prose blockquote.callout-warning,
.prose blockquote.callout-danger { border-left-color: var(--cnc-red); background: var(--hc-danger-bg); }
.prose blockquote.callout-tip { border-left-color: var(--cnc-green); background: var(--hc-surface); }

/* YouTube: embedded player, or link-out where embedding is blocked */
.video-embed {
  position: relative; aspect-ratio: 16 / 9; width: 100%; max-width: 100%;
  border-radius: var(--hc-radius); overflow: hidden; background: var(--hc-band-solid); margin: 8px 0 24px;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-link a { position: absolute; inset: 0; display: grid; place-items: center; color: var(--cnc-white); }
.video-link img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; border: 0; border-radius: 0; margin: 0; }
.video-link .play { position: relative; width: 76px; height: 76px; border-radius: var(--hc-radius-btn); display: grid; place-items: center; background: var(--cnc-blue-500); transition: background-color var(--hc-ease); }
.video-link a:hover .play { background: var(--cnc-blue-600); }
.video-link-label {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: var(--hc-fs-sm);
  background: rgba(3, 0, 16, .82); padding: 6px 14px; border-radius: var(--hc-radius-btn); white-space: nowrap;
}

/* ── Academy ───────────────────────────────────────────────── */

.tracks { display: grid; gap: 48px; padding-block: 44px 80px; }
.track-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 8px; }
.track-head h2 { margin: 0; font-size: var(--hc-fs-h3); font-weight: 500; }
.track-head .label { margin-left: auto; }

.lessons { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hc-line); counter-reset: lesson; }
.lessons > li { border-bottom: 1px solid var(--hc-line); }
.lesson-row { display: grid; grid-template-columns: 36px 168px minmax(0, 1fr) auto; gap: 16px 20px; align-items: center; padding: 14px 0; color: var(--hc-ink); }
.lesson-row:hover { color: var(--hc-ink); }
.lesson-row:hover h3 { color: var(--cnc-link-hover); }
.lesson-num { font-size: var(--hc-fs-lg); font-weight: 500; color: var(--hc-muted); font-variant-numeric: tabular-nums; text-align: right; }
.lesson-row h3 { margin: 0; font-size: var(--hc-fs-lg); font-weight: 500; line-height: 1.35; transition: color var(--hc-ease); }
.lesson-row p { margin: 2px 0 0; color: var(--hc-muted); }
.lesson-row .meta-line { margin-top: 6px; }
.lesson-dur { font-size: var(--hc-fs-sm); color: var(--hc-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 700px) {
  .lesson-row { grid-template-columns: 28px 112px minmax(0, 1fr); gap: 12px; align-items: start; }
  .lesson-dur { display: none; }
  .lesson-num { font-size: var(--hc-fs-body); padding-top: 2px; }
}

.thumb { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: var(--hc-band-solid); overflow: hidden; border-radius: var(--hc-radius); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .play {
  position: absolute; inset: 0; margin: auto; width: 36px; height: 36px; border-radius: var(--hc-radius-btn);
  background: rgba(3, 0, 16, .78); display: grid; place-items: center; color: var(--cnc-white);
  transition: background-color var(--hc-ease);
}
.lesson-row:hover .play, .playlist a:hover .play { background: var(--cnc-blue-500); }
.thumb .duration { position: absolute; right: 6px; bottom: 6px; background: rgba(3, 0, 16, .85); color: var(--cnc-white); font-size: var(--hc-fs-xs); font-weight: 500; padding: 1px 6px; border-radius: 2px; font-variant-numeric: tabular-nums; }

.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; padding-block: 36px 80px; }
@media (max-width: 1020px) { .lesson-layout { grid-template-columns: minmax(0, 1fr); padding-block: 24px 56px; } }
.lesson-main { min-width: 0; }
.lesson-main .video-embed { margin-top: 0; }
.lesson-text { max-width: 34em; }
.lesson-text .lede-dark { font-size: var(--hc-fs-lg); color: var(--hc-ink); margin: 0 0 16px; }
.playlist { background: var(--hc-surface); border: 1px solid var(--hc-line); border-radius: var(--hc-radius); overflow: hidden; align-self: start; position: sticky; top: calc(var(--hc-header-h) + 24px + env(safe-area-inset-top, 0px)); box-shadow: var(--hc-shadow-card); }
@media (max-width: 1020px) { .playlist { position: static; } }
.playlist-head { padding: 14px 16px; border-bottom: 1px solid var(--hc-line); display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.playlist-head strong { font-weight: 500; }
.playlist ol { list-style: none; margin: 0; padding: 6px; max-height: 70vh; overflow-y: auto; }
.playlist a { display: grid; grid-template-columns: 24px 96px minmax(0, 1fr); gap: 10px; padding: 8px; color: var(--hc-ink); align-items: center; border-left: var(--hc-hairline) solid transparent; }
.playlist a:hover { background: var(--hc-bg); color: var(--hc-ink); }
.playlist a[aria-current='true'] { background: var(--hc-tint); border-left-color: var(--cnc-blue-500); }
.playlist .n { font-size: var(--hc-fs-sm); color: var(--hc-muted); font-variant-numeric: tabular-nums; text-align: right; }
.playlist .t { font-size: var(--hc-fs-sm); font-weight: 500; line-height: 1.35; }
.playlist .d { font-size: var(--hc-fs-xs); color: var(--hc-muted); font-variant-numeric: tabular-nums; }
.playlist .thumb .play { width: 24px; height: 24px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* ── Notices, loading, errors ──────────────────────────────── */

.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; margin-bottom: 24px; max-width: 32em;
  background: var(--hc-tint); border-left: var(--hc-hairline) solid var(--cnc-blue-500); border-radius: var(--hc-radius);
  color: var(--hc-ink); font-size: var(--hc-fs-body);
}
.notice svg { flex: none; margin-top: 3px; color: var(--cnc-blue-500); }

.skeleton { display: flex; flex-direction: column; gap: 12px; }
.skeleton i {
  display: block; height: 14px;
  background: linear-gradient(90deg, var(--hc-line) 0%, var(--hc-code-bg) 50%, var(--hc-line) 100%);
  background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite;
}
.skeleton i:nth-child(3n) { width: 72%; }
.skeleton i.h { height: 26px; width: 45%; margin: 12px 0 4px; }
.band .skeleton i { background: linear-gradient(90deg, rgba(251,251,251,.08), rgba(251,251,251,.16), rgba(251,251,251,.08)); background-size: 200% 100%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton i { animation: none; } * { transition: none !important; } html { scroll-behavior: auto; } }

.error-box { padding: 24px; border-radius: var(--hc-radius); background: var(--hc-danger-bg); border-left: var(--hc-hairline) solid var(--cnc-red); color: var(--hc-ink); }
.error-box h2 { margin: 0 0 6px; font-size: var(--hc-fs-h3); font-weight: 500; color: var(--hc-ink); }
.error-box p { margin: 0; }
/* ── Skip link ─────────────────────────────────────────────── */

.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--cnc-blue-500); color: var(--cnc-white); padding: 8px 16px; }
.skip:focus { left: 16px; top: 8px; color: var(--cnc-white); }

/* ── Page not found ────────────────────────────────────────── */

.not-found { display: flex; flex-wrap: wrap; gap: 12px; padding-block: 40px 80px; }
