/* ==========================================================================
   Skylake Lab 课程界面 —— 样式表（纯 CSS，无外部字体 / 图片 / 脚本）

   一份界面挂在三个入口：/courses/（访客）、/learn/（注册用户）、/private/（本人）。
   视觉沿用主页新稿（public/styles.css）：深石墨吸顶条与课程首屏、柔和象牙阅读区、电光青只标“信号”
   （当前分段、已完成、焦点、下一关）；同一套系统字体与字号阶梯；不用全大写眉标、不用等宽数据标签——
   等宽字体只用于代码块。课程看板沿用原课程“两条竖轨”的结构，画成主页的版图语汇：走线 + 方形焊盘节点。
   结构：1 设计令牌（与主页 styles.css 第 1 节同值，测试会核对）→ 2 基础与可访问性 → 3 色带主题
         → 4 吸顶条 → 4b 账号入口条（2026-10-28 Root 范围补全）→ 5 提示横幅 → 6 课程首屏（访客引导 / 账号 / 本人区接入状态）→ 7 时间预算与下一关
         → 8 看板（主线在前、加餐在后）→ 9 章节页（规格、正文、测验、口头答辩、笔记、锁定引导）→ 10 进度与弱点 → 10b 站内聊天
         → 10c 私人课程“听此章节课程”（2026-11-03：章节入口与页面底部常驻播放条，只在本人区）
         → 11 页脚 → 12 动效（只在允许动效时）→ 13 强制配色与打印
   2026-10-12 课程结构调整（用户确认的 P0 + P1）新增：首屏的说明与本人区“进入对话学习”（第 6 节）、轨道定位文字 / 轨道说明 /
         标签图例与文字标签 .tag--label（第 8 节）、章节页的前置提示 .prereq 与说明 .lesson__note（第 9 节；正式第 1/3 次整改起
         放正文前的分类说明，见该规则上方的注释）。
         标签靠文字表达（“PM 必看 / 工程师选修”），颜色与线型只是辅助；所有新文字都正常折行，320px 下不截断、不撑出页面。
   单位：字号一律 rem / clamp(rem…)；对比度按令牌计算（WCAG AA，见 tests/）。
   依赖：course-web/index.html 的结构与 assets/course.js 生成的类名。
   ========================================================================== */

/* ── 1. 设计令牌 ─────────────────────────────────────────────── */

:root {
  --graphite: #1a1d21;
  --graphite-2: #22262b;
  --graphite-3: #2a2f35;
  --ivory: #f1f0ea;
  --ivory-2: #e7e5dd;
  --text-on-dark: #eeeee8;
  --muted-on-dark: #a3abb2;
  --text-on-light: #1a1d21;
  --muted-on-light: #575e66;
  --cyan: #45dce8;
  --cyan-deep: #006f7b;
  --line-on-dark: rgba(226, 232, 236, 0.14);
  --line-strong-on-dark: rgba(226, 232, 236, 0.3);
  --line-on-light: rgba(26, 29, 33, 0.14);
  --line-strong-on-light: rgba(26, 29, 33, 0.3);
  --glass-tint: 196, 236, 244;
  /* 课程界面新增：错误与答错标记，只用于边线和图形，不用作文字色 */
  --alert: #a3392b;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Segoe UI",
    "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  --font-code: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --step-2: clamp(1.3125rem, 1.15rem + 0.75vw, 1.75rem);
  --step-3: clamp(1.625rem, 1.3rem + 1.6vw, 2.5rem);
  --step-4: clamp(2.125rem, 1.45rem + 3.2vw, 4rem);

  --wrap: 78rem;
  --gutter: clamp(1rem, 0.4rem + 3vw, 3.5rem);
  --masthead-h: 3.5rem;
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  --measure: 42rem;      /* 正文阅读宽度：中文约 40 字一行 */
}

@media (min-width: 45rem) {
  :root {
    --masthead-h: 4rem;
  }
}

/* ── 2. 基础与可访问性 ───────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-padding-top: calc(var(--masthead-h) + 1rem);
  background: var(--graphite);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--ivory);
  color: var(--text-on-light);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.8;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
fieldset {
  margin: 0;
}

a {
  color: var(--link, var(--cyan-deep));
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
}

a:hover {
  text-decoration-thickness: 2px;
}

strong,
b {
  font-weight: 600;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus, var(--cyan-deep));
  outline-offset: 3px;
  border-radius: 4px;
}

main:focus,
[data-focus-target]:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-s);
  background: var(--ivory);
  color: var(--text-on-light);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* 只给读屏软件的文字（例如轨道定位文字两边的括号：看得见的是“选修”标签，读出来是“AI 工程加餐（选修）”） */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* ── 3. 色带主题：石墨 / 象牙两套变量；组件只用变量，不直接写颜色 ── */

[data-theme="graphite"] {
  --bg: var(--graphite);
  --fg: var(--text-on-dark);
  --muted: var(--muted-on-dark);
  --accent: var(--cyan);
  --line: var(--line-on-dark);
  --line-strong: var(--line-strong-on-dark);
  --link: var(--cyan);
  --focus: var(--cyan);
  --surface: rgba(var(--glass-tint), 0.05);
  background-color: var(--bg);
  color: var(--fg);
  color-scheme: dark;
}

[data-theme="ivory"] {
  --bg: var(--ivory);
  --fg: var(--text-on-light);
  --muted: var(--muted-on-light);
  --accent: var(--cyan-deep);
  --line: var(--line-on-light);
  --line-strong: var(--line-strong-on-light);
  --link: var(--cyan-deep);
  --focus: var(--cyan-deep);
  --surface: rgba(255, 255, 255, 0.6);
  background-color: var(--bg);
  color: var(--fg);
  color-scheme: light;
}

/* 通用按钮：主按钮在石墨底用亮青、在象牙底用石墨实底；次按钮是描边胶囊 */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  border-color: var(--accent);
}

.button--primary {
  border-color: var(--graphite);
  background: var(--graphite);
  color: var(--text-on-dark);
}

.button--primary:hover {
  border-color: var(--graphite-3);
  background: var(--graphite-3);
}

[data-theme="graphite"] .button--primary {
  border-color: var(--cyan);
  background: var(--cyan);
  color: var(--graphite);
}

[data-theme="graphite"] .button--primary:hover {
  border-color: #8ae9f0;
  background: #8ae9f0;
}

.button--done {
  border-color: var(--cyan-deep);
  background: var(--cyan-deep);
  color: #ffffff;
}

.button--small {
  min-height: 2.25rem;
  padding: 0 0.9rem;
  font-size: 0.875rem;
}

.button[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ── 4. 吸顶条 ─────────────────────────────────────────────── */

.bar {
  position: sticky;
  z-index: 50;
  top: 0;
  height: var(--masthead-h);
  border-bottom: 1px solid var(--line-on-dark);
  background: rgba(26, 29, 33, 0.92);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
}

.bar__inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--text-on-dark);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand__mark {
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.brand__plate--top,
.brand__via {
  stroke: var(--cyan);
}

.brand__via {
  stroke-width: 2;
  stroke-linecap: round;
}

.brand__name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.bar__area {
  flex: none;
  padding: 0.1rem 0.65rem;
  border: 1px solid var(--line-strong-on-dark);
  border-radius: 999px;
  color: var(--muted-on-dark);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.bar__nav {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.125rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.bar__nav::-webkit-scrollbar {
  display: none;
}

.bar__nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  color: var(--muted-on-dark);
  font-size: 0.9375rem;
  white-space: nowrap;
  text-decoration: none;
}

.bar__nav a::after {
  content: "";
  position: absolute;
  right: 0.7rem;
  bottom: 0.4rem;
  left: 0.7rem;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
}

.bar__nav a:hover,
.bar__nav a[aria-current="page"] {
  color: var(--text-on-dark);
}

.bar__nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.bar__nav a:focus-visible {
  outline-color: var(--cyan);
  outline-offset: -2px;
}

.bar__login {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 1rem;
  border-radius: 999px;
  background: var(--cyan);
  color: var(--graphite);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.bar__login:hover {
  background: #8ae9f0;
}

.bar__login:focus-visible {
  outline-color: var(--cyan);
}

@media (max-width: 29.99rem) {
  .bar__area {
    display: none;
  }

  .bar__login {
    padding: 0 0.75rem;
  }
}

@media (min-width: 45rem) {
  .bar__inner {
    gap: 1.25rem;
  }

  .brand__name {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }
}

/* ── 4b. 账号入口条（2026-10-28 Root 范围补全，ACCOUNT_SCOPE_20261028） ──────────
   吸顶条下面单独一条石墨色带（元素上带 data-theme="graphite"），不往 320 宽的吸顶条里塞：右边是“我的账号”（与主页右上角的
   账号入口同一侧）。它不吸顶：每次切页都会滚回顶部（course.js 的 hashchange），所以每个视图打开时它都在最上面。高度按最小来：
   只有一行 2.25rem（与小按钮同高，整条约 41px）——本人区对话页的首屏预算（正式第 1/3 次局部 UX 整改：390×900 要露出完整的
   输入框与发送按钮）因此只多这一行。同日的用户需求变更“本人只用私人课程”之后，范围补全时给本人放在注册区入口条里的两个按钮
   与一句说明（.acctbar__actions / .acctbar__note）随之去掉，这里只剩“我的账号”。 */
.acctbar {
  border-bottom: 1px solid var(--line);
}

.acctbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  padding-block: 0.125rem;
}

.acctbar__account {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  margin-left: auto;
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ── 5. 提示横幅（登录失效 / 没有保存） ───────────────────────── */

.alert {
  width: calc(100% - var(--gutter) * 2);
  max-width: var(--wrap);
  margin: 1rem auto 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line-strong-on-light);
  border-left: 4px solid var(--alert);
  border-radius: var(--radius-m);
  background: #fbfaf6;
  color: var(--text-on-light);
}

.alert strong {
  display: block;
}

.alert p + p {
  margin-top: 0.4rem;
}

.alert__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* “离开本页”对话框（正式第 2/3 次整改）：点了会换文档的链接、笔记还没落定时由 course.js 打开的模态 <dialog>，
   打开期间页面其余部分不可操作。三种状态：正在保存 / 没存上（可重试）/ 登录失效（先复制）；草稿卡片沿用 .prompt，
   长草稿在卡片里滚动（“复制”拿到的始终是全文）。配色沿用象牙主题（元素上带 data-theme="ivory"）。 */
.leave {
  width: min(100% - 2rem, 36rem);
  max-width: none;
  max-height: calc(100% - 2rem);
  margin: auto;
  padding: 1.5rem 1.4rem 1.4rem;
  overflow: auto;
  border: 1px solid var(--line-strong-on-light);
  border-radius: var(--radius-l);
}

.leave::backdrop {
  background: rgba(26, 29, 33, 0.6);
}

.leave__title {
  margin: 0 0 0.6rem;
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.35;
}

.leave__text {
  margin: 0;
  color: var(--muted);
}

.leave .prompt__body {
  max-height: 12rem;
  overflow: auto;
}

/* 对话框里卡片窄（320 宽的手机上只有约 240px）：复制按钮不收缩、不折行，让卡片标题去换行 */
.leave .prompt__head .button {
  flex: none;
  white-space: nowrap;
}

.leave__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.25rem 0 0;
}

/* 放弃并离开：写明后果的按钮，用警示色边线与其他按钮区分（警示色只用于边线，不用作文字色） */
.leave__discard {
  border-color: var(--alert);
}

/* ── 6. 课程首屏（石墨） ───────────────────────────────────────── */

.view {
  flex: 1 0 auto;
}

.booting,
.noscript {
  padding: 3rem var(--gutter);
  color: var(--muted-on-light);
}

.course-head {
  position: relative;
  padding-block: clamp(2.75rem, 2rem + 4vw, 5rem) clamp(2.25rem, 1.75rem + 3vw, 4rem);
  overflow: hidden;
}

/* 背景：一块倾斜的玻璃板与细网格，和主页联系区同一语汇；只是装饰，组件内裁切 */
.course-head::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -12%;
  width: min(58%, 38rem);
  aspect-ratio: 62 / 44;
  border: 1px solid rgba(var(--glass-tint), 0.2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 1px 1px, rgba(var(--glass-tint), 0.14) 1px, transparent 1.4px) 0 0 / 14px 14px,
    linear-gradient(140deg, rgba(69, 220, 232, 0.12), rgba(var(--glass-tint), 0.02) 60%);
  transform: perspective(1400px) rotateX(58deg) rotateZ(-38deg);
  pointer-events: none;
}

.course-head > .wrap {
  position: relative;
}

.course-head__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.course-head__eyebrow::before {
  content: "";
  width: 2.75rem;
  height: 1px;
  background: var(--accent);
}

.course-head__title {
  max-width: 22em;
  margin-top: 0.9rem;
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.course-head__sub {
  max-width: 36em;
  margin-top: 1rem;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.7;
  text-wrap: pretty;
}

.course-head__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.course-head__facts div {
  display: grid;
  gap: 0.1rem;
}

.course-head__facts dt {
  color: var(--muted);
  font-size: var(--step--1);
}

.course-head__facts dd {
  font-size: var(--step-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.course-head__facts dd small {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 400;
}

/* 访客引导：实线框 + 左侧青色“开放路径”，和主页公共课程封面一致 */
.callout {
  display: grid;
  gap: 1rem;
  max-width: 46rem;
  margin-top: 2rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--accent);
}

.callout__title {
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.5;
}

.callout__text {
  margin-top: 0.25rem;
  color: var(--muted);
}

.callout__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.callout__note {
  color: var(--muted);
  font-size: 0.875rem;
}

/* 首屏的一句说明（总纲 meta.note：公共课程是“固定教材”，私人课程是“你的个人学习课程”，2026-10-12） */
.course-head__note {
  max-width: 40em;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.75;
}

/* 本人区“进入对话学习”（原有的站内对话入口 #/chat，2026-10-12）：按钮旁的说明只指向下面的真实状态，不替它下结论 */
.course-head__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-top: 1.75rem;
}

.course-head__hint {
  max-width: 30em;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* 本人区：对话学习 / Notion 同步——尚未接入时只画虚线空心环，不用代表“在线”的实心点 */
.links {
  display: grid;
  gap: 0.75rem;
  max-width: 46rem;
  margin-top: 2rem;
}

.links__title {
  font-size: var(--step-1);
  font-weight: 600;
}

.links__list {
  display: grid;
  gap: 0.6rem;
  padding: 0;
  list-style: none;
}

.links__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.15rem 0.85rem;
  align-items: baseline;
  padding: 0.85rem 1.1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-m);
}

.links__dot {
  width: 0.7rem;
  height: 0.7rem;
  border: 2px dashed var(--accent);
  border-radius: 50%;
  transform: translateY(0.05rem);
}

.links__name {
  font-weight: 600;
}

.links__state {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* 测试连接器的一行（站内聊天，2026-10-08）：不画成接入项，状态由脚本按服务端真实状态写入 */
.links__connector {
  color: var(--muted);
  font-size: 0.9375rem;
}

.links__connector a {
  color: var(--link);
}

/* 正式原学习目标（owner_learning，2026-10-12）：脚本按实时状态给那一项写 data-tone。只有真的连上（ok）才画实心点；
   等待 / 忙 / 需要核对仍是虚线空心环（与“尚未接入”同一种样子），不让圆点替文字说“在线”。 */
.links__item[data-tone="ok"] .links__dot {
  border-style: solid;
  background: var(--accent);
}

/* ── 7. 时间预算与下一关（象牙） ─────────────────────────────── */

.section {
  padding-block: clamp(2.25rem, 1.75rem + 2.5vw, 3.75rem);
}

.section + .section {
  padding-top: 0;
}

.section__title {
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.section__sub {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.chip {
  min-height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9375rem;
  cursor: pointer;
}

.chip:hover {
  color: var(--fg);
  border-color: var(--accent);
}

.chip[aria-pressed="true"] {
  border-color: var(--graphite);
  background: var(--graphite);
  color: var(--text-on-dark);
}

.nextup {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nextup__eyebrow {
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 600;
}

.nextup__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
}

.code {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nextup__code {
  color: var(--accent);
  font-size: var(--step-1);
}

.nextup__title {
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.35;
}

.nextup__goal {
  max-width: var(--measure);
  color: var(--muted);
}

.nextup__deliver {
  max-width: var(--measure);
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line-strong);
  font-size: 0.9375rem;
}

.nextup__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 0.25rem;
}

.meta {
  color: var(--muted);
  font-size: 0.875rem;
}

/* ── 8. 看板：走线 + 方形焊盘节点（2026-10-12 起总纲 B 轨主线在前、A 轨加餐在后） ─────────── */

.rails {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  margin-top: 2.5rem;
}

@media (min-width: 60rem) {
  .rails {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2rem, 1rem + 3vw, 4rem);
  }
}

.rail__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-strong);
}

/* 轨道字母：一块方形焊盘 */
.rail__letter {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1.5px solid var(--accent);
  border-radius: 5px;
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 600;
}

.rail__name {
  min-width: 0;
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.4;
  /* 2026-10-12：轨道名后面多了定位文字（必修 / 选修）。320px 下 B 轨一行约 282px（内容区 288px），放不下时只在空格处
     或定位文字之前折行，不把“产品经理主线”这样的词拆开；词本身放不下才任意处折行，绝不撑出页面 */
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.rail__count {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.rail__tagline {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* 轨道定位文字（“必修 / 选修”，2026-10-12）：紧跟轨道名的小标签；选修用虚线框。读屏读作“轨道名（定位）” */
.rail__role {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0 0.45rem;
  border: 1px solid var(--accent);
  border-radius: 5px;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.6;
  vertical-align: 0.15em;
  white-space: nowrap;
}

.rail[data-role="elective"] .rail__role {
  border-style: dashed;
}

/* 轨道标题正下方的说明（A 轨：“A 轨为技术附录，产品主线学员按‘PM 必看’标签选学即可。”）：左侧青线的一段正文，
   照常折行，手机上不截断 */
.rail__note {
  margin-top: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  background: var(--surface);
  color: var(--fg);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* 标签图例：各标签几章（例如“PM 必看 8 章”“工程师选修 14 章”） */
.rail__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.rail__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.stage {
  margin-top: 1.75rem;
}

.stage__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.6rem;
}

.stage__code {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stage__name {
  font-weight: 600;
}

.stage__goal {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

/* 走线：一条竖线；已完成部分着青色（--fill 由脚本按已完成节点位置给出） */
.nodes {
  position: relative;
  margin: 0.85rem 0 0;
  padding: 0 0 0 1.75rem;
  list-style: none;
}

.nodes::before,
.nodes::after {
  content: "";
  position: absolute;
  top: 1.15rem;
  left: 0.42rem;
  width: 2px;
}

.nodes::before {
  bottom: 1.15rem;
  background: var(--line-strong);
}

.nodes::after {
  height: calc((100% - 2.3rem) * var(--fill, 0) / 100);
  background: var(--cyan-deep);
}

.node {
  position: relative;
}

/* 节点：方形焊盘（已完成实心、当前带光圈、待学空心、锁定虚线） */
.node__pad {
  position: absolute;
  top: 0.85rem;
  left: -1.75rem;
  z-index: 1;
  width: 0.85rem;
  height: 0.85rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 3px;
  background: var(--bg);
}

.node[data-state="done"] .node__pad {
  border-color: var(--cyan-deep);
  background: var(--cyan-deep);
}

.node[data-state="now"] .node__pad {
  border: 2px solid var(--cyan-deep);
  box-shadow: 0 0 0 4px rgba(0, 111, 123, 0.16);
}

.node[data-state="locked"] .node__pad {
  border-style: dashed;
}

.node__link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.1rem 0.7rem;
  align-items: baseline;
  margin-left: -0.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-s);
  color: var(--fg);
  text-decoration: none;
}

.node__link:hover {
  background: rgba(255, 255, 255, 0.7);
}

.node__code {
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.node__title {
  line-height: 1.5;
}

.node[data-state="done"] .node__code {
  color: var(--cyan-deep);
}

.node[data-state="done"] .node__title {
  color: var(--muted);
}

.node[data-state="locked"] .node__title {
  color: var(--muted);
}

.node__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0 0.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.6;
  white-space: nowrap;
}

.tag--optional {
  border-style: dashed;
}

/* 章节标签（2026-10-12）：看板节点、章节页工具条、图例里是同一段标记（.tag--label + data-tag）。“PM 必看”用深青实线加粗，
   “工程师选修”与其他小标签一样保持中性——意思靠文字表达，颜色与字重只是辅助 */
.tag--label[data-tag="pm_must"] {
  border-color: var(--cyan-deep);
  color: var(--cyan-deep);
  font-weight: 600;
}

.tag--lock {
  gap: 0.25rem;
}

.tag--lock svg {
  width: 0.7rem;
  height: 0.7rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.node.is-dimmed .node__link {
  color: var(--muted);
}

.node.is-dimmed .node__title {
  color: var(--muted);
}

.node.is-dimmed .node__pad {
  border-style: dotted;
}

@media (max-width: 29.99rem) {
  .node__link {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .node__meta {
    grid-column: 2;
    justify-content: flex-start;
  }
}

/* ── 9. 章节页 ─────────────────────────────────────────────── */

.lesson {
  max-width: calc(var(--measure) + var(--gutter) * 2);
  margin-inline: auto;
  padding: clamp(1.75rem, 1.25rem + 2vw, 3rem) var(--gutter) clamp(3rem, 2rem + 4vw, 5rem);
}

.lesson__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.lesson__code {
  color: var(--cyan-deep);
}

.lesson__spacer {
  flex: 1 1 auto;
}

.lesson__title {
  margin-top: 1.6rem;
  font-size: var(--step-3);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lesson__goal {
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--cyan-deep);
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.7;
}

.spec {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.spec div {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.75rem;
  font-size: 0.9375rem;
}

.spec dt {
  color: var(--muted);
}

/* 前置提示（2026-10-12：B4.4 需先完成 A4.1–A4.4，B2.5 建议先看 A1.5）：章节目标下面的一块提示，逐章写“已完成 / 未完成”。
   需先完成是实线框，建议先看是虚线框；它只是提示，不锁章节 */
.prereq {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--accent);
}

.prereq[data-prereq="suggested"] {
  border-style: dashed;
}

.prereq__title {
  font-weight: 600;
  line-height: 1.6;
}

.prereq__list {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.6rem;
  padding: 0;
  list-style: none;
}

.prereq__list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 0.6rem;
}

.prereq__state {
  color: var(--muted);
  font-size: 0.875rem;
}

.prereq__list li[data-done="true"] .prereq__state {
  color: var(--cyan-deep);
  font-weight: 600;
}

.prereq__progress,
.prereq__note {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* 正文前的一句分类说明（正式第 1/3 次整改起：只在正文页眉认不出来、正文里又出现旧分类词时出现，例如私人 B1.5；
   文字由 course.js 的 adaptLessonMeta 按总纲算出。原先放 A 轨章节页说明 lessonNote，那句已不再显示） */
.lesson__note {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin: 3.25rem 0 1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: var(--step-1);
  font-weight: 600;
}

.section-head__hint {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 400;
}

/* Markdown 正文 */
.md {
  margin-top: 2.25rem;
  font-size: 1.0625rem;
  line-height: 1.9;
}

.md > *:first-child {
  margin-top: 0;
}

.md h1,
.md h2,
.md h3,
.md h4 {
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.md h1 {
  margin: 2.2em 0 0.7em;
  font-size: 1.6rem;
}

.md h2 {
  margin: 2.3em 0 0.8em;
  padding-top: 0.9em;
  border-top: 1px solid var(--line);
  font-size: 1.3rem;
}

.md h3 {
  margin: 1.9em 0 0.6em;
  font-size: 1.1rem;
}

.md h4 {
  margin: 1.6em 0 0.5em;
  font-size: 1rem;
}

.md p,
.md ul,
.md ol {
  margin: 1.1em 0;
}

.md ul,
.md ol {
  padding-left: 1.4em;
}

.md li {
  margin: 0.4em 0;
}

.md li > ul,
.md li > ol {
  margin: 0.35em 0;
}

/* 自检清单项（正文里的“- [ ] …”）：方框只是记号，不是可勾选的控件；方框画在原来圆点的位置，
   边线用正文次要色（与象牙底对比度约 5.8:1），不用浅分隔线色（约 1.9:1，看不清） */
.md li.md-task {
  position: relative;
  list-style: none;
}

.md li.md-task::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: -1.35em;
  width: 0.85em;
  height: 0.85em;
  border: 1.5px solid var(--muted);
  border-radius: 3px;
}

.md li.md-task[data-task="done"]::before {
  border-color: var(--cyan-deep);
  background: var(--cyan-deep);
}

.md hr {
  margin: 2.4em 0;
  border: 0;
  border-top: 1px solid var(--line-strong);
}

.md code {
  padding: 0.05em 0.35em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
  font-family: var(--font-code);
  font-size: 0.86em;
}

.md pre {
  margin: 1.5em 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-m);
  background: var(--graphite);
  color: var(--text-on-dark);
  line-height: 1.65;
}

.md pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.85rem;
}

/* 代码块复制按钮放在 pre 外面：pre 会横向滚动，放里面会跟着跑出视野 */
.codewrap {
  position: relative;
}

.codewrap pre {
  padding-right: 4.75rem;
}

.codewrap .code-copy {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 1;
  border-color: var(--line-strong-on-dark);
  background: var(--graphite-2);
  color: var(--text-on-dark);
}

.codewrap .code-copy:focus-visible {
  outline-color: var(--cyan);
}

.md blockquote {
  margin: 1.6em 0;
  padding: 0.1em 0 0.1em 1.1rem;
  border-left: 3px solid var(--cyan-deep);
  color: var(--muted);
}

.md blockquote p {
  margin: 0.5em 0;
}

.md-scroll {
  margin: 1.5em 0;
  overflow-x: auto;
}

.md table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.md th,
.md td {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.md th {
  background: rgba(255, 255, 255, 0.6);
  font-weight: 600;
}

.notice {
  margin-top: 2rem;
  padding: 1.1rem 1.25rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-m);
  color: var(--muted);
}

.notice strong {
  color: var(--fg);
}

/* 测验 */
.q {
  margin-bottom: 0.9rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.q__stem {
  display: flex;
  gap: 0.6rem;
  font-weight: 600;
  line-height: 1.65;
}

.q__n {
  flex: none;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.q__options {
  display: grid;
  gap: 0.25rem;
  min-inline-size: 0;    /* fieldset 默认按内容的最小宽度撑开，窄屏会把整页撑出横向滚动 */
  margin-top: 0.75rem;
  padding: 0;
  border: 0;
}

/* 题干与选项里会有很长、中间不能断的英文或代码标识（如 usage.cache_read_input_tokens）：
   允许在任意处折行（anywhere 同时缩小内容最小宽度；break-word 不会），题目框才能收进 320 宽的手机屏 */
.q__stem,
.opt {
  overflow-wrap: anywhere;
}

.opt {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.55rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  line-height: 1.6;
  cursor: pointer;
}

.opt:hover {
  background: rgba(255, 255, 255, 0.75);
}

.opt input {
  flex: none;
  margin: 0.3rem 0 0;
  accent-color: var(--cyan-deep);
}

.opt[data-mark="right"] {
  border-color: var(--cyan-deep);
  background: rgba(0, 111, 123, 0.08);
}

.opt[data-mark="wrong"] {
  border-color: var(--alert);
  background: rgba(163, 57, 43, 0.07);
}

.opt__mark {
  margin-left: auto;
  flex: none;
  color: var(--muted);
  font-size: 0.8125rem;
}

.explain {
  margin-top: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-left: 2px solid var(--line-strong);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-size: 0.9375rem;
}

.explain strong {
  color: var(--fg);
}

.score {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

/* 口头答辩提示词 */
.prompt {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.prompt--top {
  margin: 1.5rem 0 0.5rem;
}

.prompt__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.prompt__head .button {
  margin-left: auto;
}

.prompt__body {
  margin: 0;
  padding: 1rem 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* 笔记 */
.note-area {
  display: block;
  width: 100%;
  min-height: 8rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  background: #fbfaf6;
  line-height: 1.75;
  resize: vertical;
}

.note-area::placeholder {
  color: var(--muted);
}

.save-hint {
  min-height: 1.6em;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* 本人区每一关页面底部的“就这一关提问”（站内聊天入口） */
.lesson__ask {
  margin-top: 1.25rem;
}

/* 课程网页作业（2026-11-01：首交 TASK_ASSIGNMENTS_20261101 → R1 全章节补全；由 assets/assignments.js 渲染，三个区章节页的正文后面）。
   沿用笔记框（.note-area）、提示词卡片（.prompt）与按钮的样式；出错、冲突、超限只用左边线标出（--alert 只用于边线、不用作文字色，
   文字仍是正文色，对比度与正文相同）。320 宽度下：文本框占满一栏、按钮与长文字都换行，不产生横向溢出；字号全部用 rem。
   R1：一章几项作业，每项一张卡（.asg，带细边框，彼此分开）；正文里原文标题后面的入口（.asg-entry）用左边线 + 浅底标出，
   入口与卡片互相跳转时留出吸顶条的高度（scroll-margin-top），没有任何动画。 */
.asg-slot,
.asg-list,
.asg {
  min-width: 0;
}

.asg-list__intro,
.asg-list__download {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.asg {
  margin-top: 1.5rem;
  padding: 1.1rem 1.25rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  scroll-margin-top: calc(var(--masthead-h) + 1rem);
}

.asg:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.asg__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.asg__badge {
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.asg__def {
  margin-top: 0.6rem;
}

.asg__source,
.asg__req,
.asg__deliverable,
.asg__practice,
.asg__refs-title,
.asg__guest,
.asg__unplaced {
  overflow-wrap: anywhere;
}

.asg__source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.asg__req {
  margin-top: 0.5rem;
}

.asg__deliverable,
.asg__practice {
  margin-top: 0.5rem;
  padding-left: 0.6rem;
  border-left: 3px solid var(--line-strong);
  color: var(--muted);
  font-size: 0.875rem;
}

.asg__accept,
.asg__initial,
.asg__ref {
  margin-top: 0.5rem;
}

.asg__accept summary,
.asg__initial summary,
.asg__ref summary {
  min-height: 2rem;
  color: var(--muted);
  font-size: 0.875rem;
  cursor: pointer;
}

.asg__accept-list {
  margin: 0.3rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
}

.asg__refs {
  margin-top: 0.9rem;
  padding: 0.6rem 0.9rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-m);
}

.asg__refs-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.asg__limit {
  font-variant-numeric: tabular-nums;
}

.asg__limit[data-state="over"] {
  padding-left: 0.6rem;
  border-left: 3px solid var(--alert);
  color: var(--text-on-light);
  font-weight: 600;
}

.asg__guest {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* 正文里原文标题后面的“这一节的作业在网页上完成”入口（只是渲染层提示，正文不改） */
.md .asg-entry {
  margin: 0.4rem 0 1.2rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
  background: var(--surface);
  line-height: 1.6;
  scroll-margin-top: calc(var(--masthead-h) + 1rem);
}

.md .asg-entry__label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.md .asg-entry__list {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.md .asg-entry__item + .asg-entry__item {
  margin-top: 0.4rem;
}

.asg-entry__go {
  max-width: 100%;
  height: auto;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.md .asg-entry__note {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.asg__intro,
.asg__prompt,
.asg__status,
.asg__budget,
.asg__note,
.asg__meta,
.asg__warning {
  overflow-wrap: anywhere;
}

.asg__intro {
  color: var(--muted);
  font-size: 0.9375rem;
}

.asg__warning {
  margin-top: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-left: 3px solid var(--alert);
  background: var(--surface);
  font-size: 0.875rem;
}

.asg__status {
  min-height: 1.6em;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.asg__status[data-state="failed"],
.asg__status[data-state="lost"],
.asg__status[data-state="conflict"],
.asg__status[data-state="too_long"],
.asg__status[data-state="invalid"],
.asg__budget[data-state="over"],
.asg__note[data-state="failed"],
.asg__note[data-state="unknown"] {
  padding-left: 0.6rem;
  border-left: 3px solid var(--alert);
  color: var(--text-on-light);
}

.asg__section {
  margin-top: 1.5rem;
}

.asg__label {
  display: block;
  font-weight: 600;
}

.asg__prompt {
  margin: 0.25rem 0 0.6rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.asg__input {
  min-height: 9rem;
}

.asg__input[readonly] {
  background: var(--ivory-2);
}

.asg__hint {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.asg__hint-label {
  font-weight: 600;
}

.asg__hint-list {
  margin: 0.15rem 0 0;
  padding-left: 1.25rem;
}

.asg__hint-item[data-tone="bad"] {
  color: var(--text-on-light);
  font-weight: 600;
}

.asg__budget {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.asg__budget[data-state="over"] {
  font-weight: 600;
}

.asg__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 0.9rem;
}

.asg__note {
  color: var(--muted);
  font-size: 0.875rem;
}

.asg__conflict,
.asg__discarded {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--alert);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.asg__conflict-title {
  font-weight: 600;
}

.asg__conflict-text {
  margin-top: 0.75rem;
}

.asg__versions {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}

.asg__subhead {
  font-size: var(--step-0);
  font-weight: 600;
}

.asg__latest {
  margin-top: 0.6rem;
}

.asg__meta {
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.asg__view,
.asg__older {
  margin-top: 0.5rem;
}

.asg__view summary,
.asg__older summary {
  min-height: 2rem;
  color: var(--muted);
  cursor: pointer;
}

.asg__view-body {
  margin-top: 0.4rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.asg__view-title {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.asg__view-text {
  padding: 0.25rem 0 0;
}

.asg__older-list {
  margin: 0.4rem 0 0;
  padding-left: 1.25rem;
}

.asg__older-item + .asg__older-item {
  margin-top: 0.75rem;
}

.asg__failed,
.asg__loading {
  margin-top: 1rem;
}

/* 访客：锁定章节与“登录后可用”的引导 */
.locked {
  margin-top: 2rem;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-l);
}

.locked__icon {
  width: 2.25rem;
  height: 2.25rem;
  fill: none;
  stroke: var(--cyan-deep);
  stroke-width: 2;
  stroke-linecap: round;
}

.locked__title {
  margin-top: 0.75rem;
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.35;
}

.locked__text {
  max-width: 34em;
  margin-top: 0.5rem;
  color: var(--muted);
}

.locked__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.25rem;
}

.guest-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-m);
  color: var(--muted);
}

/* ── 10. 进度与弱点 ─────────────────────────────────────────── */

.page {
  padding-block: clamp(2rem, 1.5rem + 2.5vw, 3.5rem) clamp(3rem, 2rem + 4vw, 5rem);
}

.page__title {
  font-size: var(--step-3);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.page__sub {
  max-width: 40em;
  margin-top: 0.5rem;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.stat {
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.stat__k {
  color: var(--muted);
  font-size: 0.875rem;
}

.stat__v {
  margin-top: 0.15rem;
  font-size: var(--step-3);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.stat__u {
  margin-left: 0.2rem;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 400;
}

.bar-meter {
  height: 6px;
  margin-top: 0.75rem;
  overflow: hidden;
  border-radius: 3px;
  background: var(--line);
}

.bar-meter span {
  display: block;
  height: 100%;
  background: var(--cyan-deep);
  transform: scaleX(var(--value, 0));
  transform-origin: left center;
}

.log {
  display: grid;
  margin-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.log div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}

.log dt {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.export {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
}

.weak {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  margin-top: 0.75rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--alert);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.weak input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.3rem 0 0;
  accent-color: var(--cyan-deep);
}

.weak[data-resolved="true"] {
  border-left-color: var(--cyan-deep);
  background: transparent;
}

.weak[data-resolved="true"] .weak__topic {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.weak__topic {
  font-weight: 600;
  line-height: 1.55;
}

.weak__meta {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.weak__note {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.empty {
  margin-top: 1.5rem;
  padding: 2.5rem 1.25rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-l);
  color: var(--muted);
  text-align: center;
}

/* ── 10b. 站内聊天（只在本人区 #/chat；2026-10-08 新集成阶段） ──────────
   说明框（测试连接器 / 尚未接入原学习会话）、连接器状态、断线与“需要核对”横幅、输入区、每条消息一张卡片。
   消息与回复是纯文本（脚本用 textContent 写入），保留换行、超长不换行的字符串在卡片内断开，不撑出横向滚动。
   状态色只用在左边线（青 = 正常完成，警示色 = 未完成 / 需要核对 / 离线），文字始终是正文色或次要色。 */

.chat__notice {
  max-width: var(--measure);
  margin-top: 0.75rem;
  padding: 1rem 1.15rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-m);
  color: var(--muted);
}

.chat__notice strong {
  color: var(--fg);
}

.chat__status,
.chat__net,
.chat__blocked {
  max-width: var(--measure);
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: var(--radius-m);
  background: var(--surface);
  overflow-wrap: anywhere;
}

.chat__status[data-tone="ok"] {
  border-left-color: var(--cyan-deep);
}

.chat__status[data-tone="bad"],
.chat__net,
.chat__blocked {
  border-left-color: var(--alert);
}

.chat__composer {
  max-width: var(--measure);
  margin-top: 1.5rem;
}

.chat__label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.chat__input {
  min-height: 7rem;
}

.chat__context {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.75rem;
}

/* 勾选项整行可点，触控目标至少 44px 高 */
.chat__check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding-top: 0.55rem;
  cursor: pointer;
}

.chat__check input {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.25rem 0 0;
  accent-color: var(--cyan-deep);
}

.chat__preview {
  max-height: 12rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.chat__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 0.9rem;
}

.chat__hint {
  color: var(--muted);
  font-size: 0.875rem;
}

.chat__jobs {
  display: grid;
  gap: 1rem;
  max-width: var(--measure);
  margin-top: 1rem;
  padding: 0;
  list-style: none;
}

.job {
  min-width: 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.job[data-tone="ok"] {
  border-left-color: var(--cyan-deep);
}

.job[data-tone="bad"] {
  border-left-color: var(--alert);
}

.job__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}

.job__state {
  font-weight: 600;
}

.job__time,
.job__meta,
.job__receipts,
.job__steps {
  color: var(--muted);
  font-size: 0.875rem;
}

.job__detail {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.job__part {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.job__label {
  color: var(--muted);
  font-size: 0.8125rem;
}

.job__text {
  margin-top: 0.3rem;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.job__receipts {
  margin-top: 0.9rem;
}

.job__steps {
  margin-top: 0.5rem;
}

.job__steps summary {
  min-height: 2rem;
  cursor: pointer;
}

.job__steps ol {
  margin: 0.4rem 0 0;
  padding-left: 1.25rem;
  overflow-wrap: anywhere;
}

/* 学习进度快照与 Notion 同步（2026-10-26）：只在服务器打开对应开关时出现；都是纯文字，颜色之外另有文字说明状态 */
.chat__progress {
  margin-top: 0.5rem;
}

.chat__progress-note {
  color: var(--muted);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.job__context,
.job__notion {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--line);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.job__context-label,
.job__notion-label {
  font-weight: 600;
}

.job__context[data-tone="ok"] .job__context-label,
.job__notion[data-tone="ok"] .job__notion-label {
  color: var(--cyan-deep);
}

.job__context[data-tone="bad"] .job__context-label,
.job__notion[data-tone="bad"] .job__notion-label {
  color: var(--alert);
}

.job__context-detail,
.job__notion-detail,
.job__notion-meta,
.job__sent-meta {
  margin-top: 0.25rem;
  color: var(--muted);
}

.job__notion-link {
  margin-top: 0.3rem;
}

.job__notion-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 0.5rem;
}

.job__sent {
  margin-top: 0.4rem;
}

.job__sent summary {
  min-height: 2rem;
  color: var(--muted);
  cursor: pointer;
}

.job__sent-body {
  max-height: 18rem;
  margin-top: 0.4rem;
  padding: 0.6rem 0.75rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.job__sent-title {
  margin-top: 0.5rem;
  font-weight: 600;
}

.job__sent-list {
  margin: 0.2rem 0 0;
  padding-left: 1.25rem;
  white-space: pre-wrap;
}

/* ── 10c. 私人课程“听此章节课程”（2026-11-03 阶段 1，PRIVATE_LISTENING_PHASE1_20261103；结构与规则见 assets/private-listening.js） ──
   两块：章节页标题与目标下面的入口 .listen（只在本人区由 course.js 放进 #listen-slot），以及页面底部常驻的播放条 .listen-dock
   （外壳里的 [data-listen-dock]，在 #main 之外，切页不中断；默认 hidden，/courses/、/learn/ 上一直隐藏）。
   控件都是原生按钮 / 滑块 / 下拉框，沿用 .button 与令牌；没有任何动画或过渡（悬停反馈也不加，减少动效时无需另外处理）。
   所有文字正常折行，320px 下标题、按钮、进度条、倍速分行排开，不撑出页面；播放条显示时 body 底部留出它的实际高度
   （--listen-dock-h 由脚本按 getBoundingClientRect 写入，脚本没写之前用 10rem），页脚不会被挡住。打印时两块都不出现。 */
.listen {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.listen[data-listen="loading"],
.listen[data-listen="unavailable"],
.listen[data-listen="problem"] {
  border-style: dashed;
}

.listen__title {
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.4;
}

.listen__meta {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.listen__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.listen__note {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.listen__note:empty {
  display: none;
}

.listen-dock {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
}

.listen-dock__panel {
  padding: 0.65rem 0 calc(0.65rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line-strong-on-dark);
  box-shadow: 0 -0.5rem 1.5rem rgba(0, 0, 0, 0.25);
}

.listen-dock__inner {
  display: grid;
  gap: 0.45rem;
}

.listen-dock__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
}

.listen-dock__title {
  flex: 1 1 12rem;
  min-width: 0;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.listen-dock__title .code {
  color: var(--accent);
}

.listen-dock__back {
  color: var(--link);
  font-size: 0.875rem;
}

.listen-dock__close {
  min-height: 2.25rem;
  margin-left: auto;
  padding: 0 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.listen-dock__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.6rem;
}

.listen-dock__toggle {
  min-width: 5.5rem;
}

.listen-dock__seek {
  flex: 1 1 10rem;
  min-width: 0;
  min-height: 2.25rem;
  accent-color: var(--cyan);
}

.listen-dock__time {
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.listen-dock__rate {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.listen-dock__rate select {
  min-height: 2.25rem;
  padding: 0 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--graphite-2);
  color: var(--fg);
  font: inherit;
}

.listen-dock__status {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.listen-dock__status:empty {
  display: none;
}

html.has-listen-dock body {
  padding-bottom: var(--listen-dock-h, 10rem);
}

@media (max-width: 29.99rem) {
  .listen-dock__seek {
    flex-basis: 100%;
    order: 5;
  }

  .listen-dock__time {
    order: 6;
  }

  .listen-dock__rate {
    order: 7;
    margin-left: auto;
  }
}

@media (forced-colors: active) {
  .listen-dock__panel {
    border-top-color: CanvasText;
  }
}

@media print {
  .listen,
  .listen-dock {
    display: none !important;
  }

  html.has-listen-dock body {
    padding-bottom: 0;
  }
}

/* ── 11. 页脚 ─────────────────────────────────────────────── */

.foot {
  padding-block: 1.75rem;
  border-top: 1px solid var(--line-on-dark);
  font-size: 0.9375rem;
}

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

.foot p {
  color: var(--muted);
}

/* 页脚账号与退出（2026-10-28，ACCOUNT_SESSION_20261028）：退出改成同源 POST 表单，按钮画成与正文链接同一个样子
   （颜色 / 下划线跟随 a 的规则），与“当前账号 …”排在同一行，窄屏放不下时整体换行 */
.foot__account {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.75rem;
}

.foot__logout {
  margin: 0;
}

.foot__logout-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link, var(--cyan-deep));
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
  cursor: pointer;
}

.foot__logout-button:hover {
  text-decoration-thickness: 2px;
}

/* ── 12. 动效：只在用户允许动效时出现（只做悬停反馈，没有循环动画） ── */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .bar__nav a::after {
    transition: transform 0.2s ease;
  }

  .chip,
  .button,
  .node__link {
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ── 13. 强制配色与打印 ─────────────────────────────────────── */

@media (forced-colors: active) {
  .node__pad,
  .rail__letter,
  .links__dot,
  .rail__role,
  .tag--label {
    border-color: CanvasText;
  }

  .node[data-state="done"] .node__pad {
    background: Highlight;
  }
}

@media print {
  .bar,
  .acctbar,
  .alert,
  .foot,
  .callout__actions,
  .chips,
  .code-copy,
  .prompt__head .button {
    display: none !important;
  }

  body,
  [data-theme] {
    background: #ffffff !important;
    color: #000000 !important;
  }
}

/* ── 14. 页面右侧可拖的原生竖条（2026-11-11，SCROLLBAR-TASK：用户反馈“网页上下滑动时右边没有可拖滚动条”）────────────
   为什么：三个入口的页面都只在文档本身（视口，根元素 html）上滚动。上面只给吸顶条的横向导航 .bar__nav 藏了滚动条，根元素从没写过
   滚动条样式，视口竖条完全交给系统：macOS 默认“根据鼠标或触控板自动显示”时是浮层滚动条（不占位、停下就隐藏），看起来就是
   “右边没有可拖的滚动条”。本节只追加，上面的规则一条不改；没有脚本，滚动始终是浏览器原生的文档滚动。
   范围：
   - 只在能悬停、有精确指针的设备上生效（桌面鼠标 / 触控板）。手机、平板的触控滚动一行不变；全文不写 overflow，短页不会被
     强制出现滚动；选择器只落在 html 上（html::-webkit-scrollbar 只画视口这一根），代码块、对话框、失败面板、吸顶条横向导航
     这些嵌套滚动容器一个不碰。
   - scrollbar-gutter: stable：给竖条预留位置。课程是同一文档里的 #/… 路由，长页、短页来回切换时版面不再左右跳；短页只在右边
     留一条石墨色空槽（就是 html 的石墨底色），没有滑块、不能滚动。
   - Chromium / WebKit（Chrome、Edge、Safari）：给 html::-webkit-scrollbar 写了宽度，浏览器就改用常显的经典滚动条，不需要改
     macOS 的“显示滚动条”设置。滑块仍是原生滑块：拖动、点轨道翻页、滚轮、触控板、键盘（空格 / PageUp / PageDown / 方向键 /
     Home / End）全由浏览器处理。轨道用石墨色，与短页的空槽、吸顶条、页脚同色；滑块是石墨上的浅灰 --muted-on-dark（对石墨约 7.3:1，
     令牌对比度由 tests/ 核对 ≥ 4.5），悬停或拖动时更亮（--text-on-dark）。整条 14px 都能按住拖，3px 透明边只是视觉留白；滑块最短 40px。
   - Firefox：没有 ::-webkit-scrollbar，改用标准属性：scrollbar-width: auto（正常宽度，不是 thin）加 scrollbar-color（同一套颜色）。
     Firefox 用根元素的 scrollbar-color 画视口，但这个属性会继承，所以 body 改回 auto，嵌套容器的滚动条保持原样。
     浮层还是常显由系统与 Firefox 的设置决定，没有标准 CSS 能强制常显。
   - 两套写法用 @supports selector(::-webkit-scrollbar) 分开：Chromium 121 起也认 scrollbar-color / scrollbar-width，而元素上这两个
     标准属性只要有一个不是 auto（scrollbar-color 还会继承），Chromium 就不再用 ::-webkit-scrollbar。所以标准属性只给不认
     ::-webkit-scrollbar 的浏览器。
   - 高对比：强制配色（forced-colors: active，例如 Windows 高对比主题）时不画自定义颜色，用系统原生滚动条和系统配色，只保留预留位置；
     系统要求“增加对比度”（prefers-contrast: more）时，滑块换成象牙白，留白收窄到 2px。打印没有悬停与精确指针，本节不生效。
   ─────────────────────────────────────────────────────────────── */

@media (hover: hover) and (pointer: fine) {
  html {
    scrollbar-gutter: stable;
  }
}

@media (hover: hover) and (pointer: fine) and (forced-colors: none) {
  @supports selector(::-webkit-scrollbar) {
    html::-webkit-scrollbar {
      width: 14px;
      height: 14px;
      background: var(--graphite);
    }

    html::-webkit-scrollbar-track,
    html::-webkit-scrollbar-corner {
      background: var(--graphite);
    }

    html::-webkit-scrollbar-thumb {
      min-width: 40px;
      min-height: 40px;
      border: 3px solid transparent;
      border-radius: 999px;
      background: var(--muted-on-dark) padding-box;
    }

    html::-webkit-scrollbar-thumb:hover,
    html::-webkit-scrollbar-thumb:active {
      background-color: var(--text-on-dark);
    }
  }

  @supports not selector(::-webkit-scrollbar) {
    html {
      scrollbar-width: auto;
      scrollbar-color: var(--muted-on-dark) var(--graphite);
    }

    body {
      scrollbar-color: auto;
    }
  }
}

@media (hover: hover) and (pointer: fine) and (forced-colors: none) and (prefers-contrast: more) {
  @supports selector(::-webkit-scrollbar) {
    html::-webkit-scrollbar-thumb {
      border-width: 2px;
      background-color: var(--ivory);
    }
  }

  @supports not selector(::-webkit-scrollbar) {
    html {
      scrollbar-color: var(--ivory) var(--graphite);
    }
  }
}
