/* ============================================================
   AIDC Academy — /academy/**
   页面由 scripts/build-academy.mjs 生成；样式只在这里。类名一律 ac- 前缀，
   避开 site.css 的短类名。插图是白底黏土画，用 multiply 叠在课程底色（--tint）上。
   ============================================================ */

:root {
  /* 课程底色：取自 Adis 的机身色，低饱和、够浅，插图 multiply 上去仍然干净 */
  --t-cream: #f5efe4;
  --t-sage: #e6ede4;
  --t-blush: #f5e6e0;
  --t-mist: #e3e9f0;
  --t-stone: #ebe9e4;
  --t-lavender: #ebe7f2;
  --t-fog: #e7eaed;
  --t-sand: #f3eadb;
  --t-leaf: #e1ece5;
  --t-peach: #f8e5d7;
  --t-slate: #e4e6f0;
  --ac-r: 16px;
  --ac-r-lg: 24px;
  --ac-sub-h: 52px;
  --ac-read: 740px;
  --ac-ok: #1f7a4d;
}

body.acd { background: var(--bg); }
.acd main { display: block; }
.acd :is(h1, h2, h3):lang(zh) { letter-spacing: -0.01em; }
.acd :is(h1, h2, h3, .acd-card-tag) { text-wrap: balance; }
.acd .lede { max-width: 640px; }
.acd-idx { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--mut-2); font-weight: 500; }
.acd-fine { font-size: 0.86rem; color: var(--mut); line-height: 1.6; margin: 0; }
.acd-link { display: inline-flex; align-items: center; gap: 0.4em; font-weight: 600; color: var(--ink-strong); font-size: 0.95rem; }
.acd-link .arr { font-family: var(--font-mono); color: var(--signal); transition: transform .18s var(--ease); }
.acd-link:hover .arr { transform: translateX(4px); }
[hidden] { display: none !important; }
/* site.css 给所有 `li a` / `p a` 加了橙色下划线；Academy 的列表链接自己定样式 */
.acd li a, .acd p a { border-bottom: 0; }

/* 插图面板：底色 = 课程色；插图白底 multiply 进去 */
.acd-art { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; mix-blend-mode: multiply; }
:is(.acd-hero-art, .acd-card-art, .acd-path-art, .acd-lrow-art, .acd-lessonart, .acd-coursehead-art, .acd-feat-art) {
  position: relative;
  isolation: isolate;
  background: var(--tint, var(--t-cream));
  overflow: hidden;
}

/* ---------- 子导航 ---------- */
.acd-subnav {
  position: sticky;
  top: var(--nav-h, 64px);
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.acd-subnav .wrap { display: flex; align-items: center; gap: 26px; height: var(--ac-sub-h); }
.acd-brand { display: inline-flex; align-items: center; gap: 9px; flex: none; color: var(--ink-strong); }
.acd-brand .mark { font-size: 0.9rem; }
.acd-brand b { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.01em; }
.acd-subnav-links { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.acd-subnav-links::-webkit-scrollbar { display: none; }
.acd-subnav-links a { flex: none; font-size: 0.88rem; color: var(--mut); transition: color .15s; }
.acd-subnav-links a:hover, .acd-subnav-links a.cur { color: var(--ink-strong); }
.acd-subnav-links a.cur { font-weight: 600; }
.acd-search-btn {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 8px 0 12px; min-width: 200px;
  border: 1px solid var(--line); border-radius: var(--radius-full);
  background: var(--bg-2); color: var(--mut); font: inherit; font-size: 0.85rem; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.acd-search-btn:hover { color: var(--ink-strong); border-color: color-mix(in srgb, var(--ink-strong) 22%, transparent); }
.acd-search-btn svg { width: 15px; height: 15px; flex: none; }
.acd-search-btn kbd { margin-left: auto; font-family: var(--font-mono); font-size: 0.7rem; padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--mut-2); }
[id] { scroll-margin-top: calc(var(--nav-h, 64px) + var(--ac-sub-h) + 20px); }

/* ---------- 首页 ---------- */
.acd-hero { padding: clamp(40px, 6vw, 80px) 0 clamp(40px, 5vw, 64px); }
.acd-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.acd-hero h1 { font-size: clamp(2.5rem, 4.8vw, 4.1rem); line-height: 1.07; margin-bottom: 0.4em; }
.acd-hero .lede { font-size: 1.1rem; margin: 0; }
.acd-hero .btn-row { margin-top: 2rem; }
.acd-hero-art { border-radius: 28px; }
.acd-hero-art .acd-art { transform: scale(1.02); }
.acd-hero-stats { display: flex; gap: 0; margin-top: 2.6rem; border-top: 1px solid var(--line); padding-top: 1.2rem; max-width: 560px; }
.acd-hero-stats > div { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 0.82rem; color: var(--mut); padding-right: 12px; }
.acd-hero-stats > div + div { padding-left: 16px; border-left: 1px solid var(--line-soft); }
.acd-hero-stats b { font-size: 1.9rem; line-height: 1.1; font-weight: 700; color: var(--ink-strong); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.acd-continue { margin-top: 28px; }
.acd-continue a {
  display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 18px;
  padding: 12px 18px 12px 12px; border: 1px solid var(--line); border-radius: var(--ac-r);
  background: var(--bg); box-shadow: var(--shadow-card); transition: border-color .15s, transform .2s var(--ease);
}
.acd-continue a:hover { border-color: color-mix(in srgb, var(--ink-strong) 20%, transparent); transform: translateY(-1px); }
.acd-continue .acd-continue-art { border-radius: 10px; overflow: hidden; isolation: isolate; background: var(--tint, var(--t-cream)); }
.acd-continue small { display: block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--signal); }
.acd-continue b { display: block; color: var(--ink-strong); font-size: 1rem; margin-top: 2px; }
.acd-continue span.acd-continue-course { font-size: 0.85rem; color: var(--mut); }
.acd-continue .arr { font-family: var(--font-mono); color: var(--ink-strong); }

.acd-sec { padding: clamp(56px, 7vw, 96px) 0; }
.acd-sec + .acd-sec { border-top: 1px solid var(--line-soft); }
.acd-sec-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 44px); }
.acd-sec-head h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 0.35em; }
.acd-sec-head .lede { margin: 0; font-size: 1.05rem; }
.acd-sec-head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.acd-sec-head--row > div { max-width: 700px; }

/* 路径 */
.acd-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.acd-path {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  border: 1px solid var(--line); border-radius: var(--ac-r-lg); overflow: hidden; background: var(--bg);
}
.acd-path:nth-child(1) { --tint: var(--t-cream); }
.acd-path:nth-child(2) { --tint: var(--t-sand); }
.acd-path:nth-child(3) { --tint: var(--t-peach); }
.acd-path:nth-child(4) { --tint: var(--t-slate); }
.acd-path-art { display: flex; align-items: center; }
.acd-path-art .acd-art { transform: scale(1.18); }
.acd-path-body { padding: 24px 24px 22px; display: flex; flex-direction: column; }
.acd-path-body h3 { font-size: 1.3rem; margin-bottom: 0.3em; }
.acd-path-body > p { font-size: 0.9rem; color: var(--mut); line-height: 1.65; margin-bottom: 14px; }
.acd-path-list { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--line-soft); }
.acd-path-list li { border-bottom: 1px solid var(--line-soft); }
.acd-path-list a { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; font-size: 0.92rem; color: var(--ink); transition: color .15s; }
.acd-path-list a:hover { color: var(--signal); }
.acd-path .acd-link { margin-top: auto; }

/* 从这六节课开始 */
.acd-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 20px; }
.acd-feat { display: flex; flex-direction: column; gap: 12px; }
.acd-feat-art { border-radius: 18px; transition: transform .3s var(--ease); }
.acd-feat:hover .acd-feat-art { transform: translateY(-3px); }
.acd-feat-body { display: flex; flex-direction: column; gap: 3px; }
.acd-feat-body small { font-size: 0.78rem; color: var(--mut-2); }
.acd-feat-body b { font-size: 1.08rem; color: var(--ink-strong); line-height: 1.4; }
.acd-feat-min { font-size: 0.8rem; color: var(--mut); }
.acd-feat.is-done .acd-feat-min::after { content: " · ✓"; color: var(--signal); }

/* 课程卡 */
.acd-grid { display: grid; gap: 20px; }
.acd-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.acd-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.acd-grid--products { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.acd-grid--products > :nth-child(-n+3) { grid-column: span 2; }
.acd-grid--products > :nth-child(n+4) { grid-column: span 3; }
.acd-grid--builders { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.acd-grid--builders > :first-child { grid-column: span 2; }
.acd-card {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--ac-r-lg); overflow: hidden; background: var(--bg);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s;
}
.acd-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-menu); border-color: color-mix(in srgb, var(--ink-strong) 16%, transparent); }
.acd-card-art { overflow: visible; }
.acd-card-art .acd-art { transition: transform .5s var(--ease); }
.acd-card:hover .acd-card-art .acd-art { transform: scale(1.03); }
.acd-card-art { clip-path: inset(0); }
.acd-picon { position: absolute; left: 18px; bottom: 14px; width: 42px; height: 42px; border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 6px 16px -6px rgba(0,0,0,.18); z-index: 2; }
.acd-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.acd-card-body h3 { font-size: 1.14rem; margin: 0 0 0.3em; }
.acd-card-tag { font-size: 0.9rem; color: var(--mut); line-height: 1.6; margin: 0 0 14px; }
.acd-card--big .acd-card-body { padding: 22px 26px 24px; }
.acd-card--big h3 { font-size: 1.42rem; }
.acd-card--big .acd-card-tag { font-size: 0.98rem; }
.acd-card--wide { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.acd-card--wide .acd-card-art { display: flex; align-items: center; }
.acd-card--wide .acd-card-body { padding: 28px 30px; justify-content: center; }
.acd-card--wide h3 { font-size: 1.5rem; }
.acd-meta { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--mut-2); }
.acd-meta i { font-style: normal; opacity: 0.6; }
.acd-progress { margin-top: 12px; height: 4px; border-radius: 4px; background: var(--bg-3); overflow: hidden; }
.acd-progress span { display: block; height: 100%; width: var(--p, 0%); background: var(--signal); border-radius: inherit; }

/* 学习方式 */
.acd-sec--method { background: var(--bg-2); }
.acd-method { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.acd-method-item { padding: 22px 22px 6px 0; }
.acd-method-item + .acd-method-item { padding-left: 22px; border-left: 1px solid var(--line-soft); }
.acd-method-item .acd-idx { color: var(--signal); }
.acd-method-item h3 { font-size: 1.1rem; margin: 10px 0 6px; }
.acd-method-item p { font-size: 0.9rem; color: var(--mut); line-height: 1.65; margin: 0; }

/* 概念 */
.acd-terms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.acd-term { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--ac-r); transition: border-color .15s, background .15s; }
.acd-term:hover { border-color: color-mix(in srgb, var(--ink-strong) 18%, transparent); background: var(--bg-2); }
.acd-term b { color: var(--ink-strong); font-size: 1rem; }
.acd-term span { font-size: 0.86rem; color: var(--mut); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 收尾 */
.acd-cta { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: clamp(28px, 4vw, 48px); border-radius: 28px; background: var(--t-cream); }
.acd-cta h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: 0.3em; }
.acd-cta .lede { margin: 0; font-size: 1rem; }
.acd-cta .btn-row { flex: none; }
.acd-sec--cta { border-top: 0 !important; padding-top: 0; }

/* ---------- 列表页页头 ---------- */
.acd-pagehead { padding: clamp(36px, 5vw, 64px) 0 clamp(20px, 3vw, 32px); }
.acd-pagehead h1 { font-size: clamp(2.2rem, 4vw, 3.3rem); margin-bottom: 0.3em; }
.acd-pagehead .lede { margin: 0; }
.acd-crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 0.84rem; color: var(--mut); margin-bottom: 18px; }
.acd-crumb a { color: var(--mut); transition: color .15s; }
.acd-crumb a:hover { color: var(--ink-strong); }
.acd-crumb span { color: var(--mut-2); }

.acd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.acd-chip {
  display: inline-flex; align-items: center; height: 32px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: var(--radius-full);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 0.85rem; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
button.acd-chip:hover { border-color: color-mix(in srgb, var(--ink-strong) 24%, transparent); }
.acd-chip.is-on { background: var(--ink-strong); border-color: var(--ink-strong); color: var(--bg); }
.acd-chips--meta { margin-top: 20px; }
.acd-chips--meta .acd-chip { cursor: default; height: 28px; font-size: 0.8rem; color: var(--mut); background: color-mix(in srgb, var(--bg) 70%, transparent); border-color: color-mix(in srgb, var(--ink-strong) 10%, transparent); }

.acd-catalog { padding-bottom: 96px; }
.acd-group { padding-top: 40px; }
.acd-group + .acd-group { margin-top: 24px; border-top: 1px solid var(--line-soft); }
.acd-group-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.acd-group-head h2 { font-size: 1.5rem; margin: 0; }
.acd-group-head p { margin: 0; color: var(--mut); font-size: 0.92rem; }

/* 概念词典 */
.acd-filter { display: flex; align-items: center; gap: 10px; max-width: 420px; margin-top: 24px; height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-full); background: var(--bg-2); color: var(--mut); }
.acd-filter svg { width: 16px; height: 16px; flex: none; }
.acd-filter input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 0.95rem; color: var(--ink-strong); }
.acd-glossary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 12px 0 96px; }
.acd-gterm { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--ac-r); background: var(--bg); transition: border-color .2s, box-shadow .2s; }
.acd-gterm:target { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.acd-gterm header { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.acd-gterm h3 { font-size: 1.2rem; margin: 0; }
.acd-gterm-en { font-family: var(--font-mono); font-size: 0.74rem; color: var(--mut-2); letter-spacing: 0.02em; }
html[lang^="en"] .acd-gterm-en { display: none; }
.acd-gterm-short { font-weight: 600; color: var(--ink-strong); margin-bottom: 6px; }
.acd-gterm p { font-size: 0.93rem; line-height: 1.75; }
.acd-gterm-see { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 0.84rem; }
.acd-gterm-see > span { color: var(--mut-2); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; }
.acd-gterm-see a { color: var(--ink-strong); border-bottom: 1px solid var(--signal); }
.acd-gterm-see a:hover { color: var(--signal); }

/* ---------- 课程页 ---------- */
.acd-coursehead { background: var(--tint); padding: clamp(32px, 5vw, 56px) 0 clamp(32px, 5vw, 60px); }
.acd-coursehead-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.acd-coursehead .acd-crumb, .acd-coursehead .acd-crumb a { color: color-mix(in srgb, var(--ink-strong) 62%, transparent); }
.acd-coursehead-title { display: flex; align-items: center; gap: 16px; }
.acd-coursehead-title .acd-picon { position: static; width: 56px; height: 56px; border-radius: 13px; flex: none; }
.acd-coursehead h1 { font-size: clamp(2.1rem, 3.9vw, 3.3rem); margin: 0; }
.acd-coursehead .lede { margin-top: 1.1rem; color: color-mix(in srgb, var(--ink-strong) 72%, transparent); font-size: 1.04rem; }
.acd-coursehead .btn-row { margin-top: 26px; }

.acd-course { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 64px); padding-top: clamp(32px, 4vw, 56px); padding-bottom: 96px; align-items: start; }
.acd-box { border: 1px solid var(--line); border-radius: var(--ac-r); padding: 22px 24px; background: var(--bg); }
.acd-box h2 { font-size: 1.3rem; margin-bottom: 0.7em; }
.acd-box h3 { font-size: 0.8rem; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mut-2); margin-bottom: 10px; }
.acd-outcomes { background: var(--bg-2); }
.acd-outcomes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.acd-outcomes li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 0.98rem; line-height: 1.6; color: var(--ink); }
.acd-outcomes svg, .acd-takeaways svg { width: 18px; height: 18px; color: var(--signal); margin-top: 3px; }
.acd-lessons { margin-top: 40px; }
.acd-lessons h2 { font-size: 1.3rem; margin-bottom: 12px; }
.acd-lrows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.acd-lrows > li { border-bottom: 1px solid var(--line); }
.acd-lrow { display: grid; grid-template-columns: 132px minmax(0, 1fr) 28px; gap: 20px; align-items: center; padding: 16px 8px; margin: 0 -8px; border-radius: 12px; transition: background .15s; }
.acd-lrow:hover { background: var(--bg-2); }
.acd-lrow-art { border-radius: 10px; }
.acd-lrow-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.acd-lrow-n { font-size: 0.78rem; color: var(--mut-2); display: flex; gap: 6px; }
.acd-lrow-n i { font-style: normal; opacity: .6; }
.acd-lrow-body b { font-size: 1.06rem; color: var(--ink-strong); font-weight: 650; }
.acd-lrow-sum { font-size: 0.9rem; color: var(--mut); line-height: 1.55; }
.acd-lrow-check { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; color: transparent; transition: all .2s; }
.acd-lrow-check svg { width: 14px; height: 14px; }
.is-done .acd-lrow-check { background: var(--signal); border-color: var(--signal); color: #fff; }

.acd-course-side { display: grid; gap: 14px; position: sticky; top: calc(var(--nav-h, 64px) + var(--ac-sub-h) + 20px); }
.acd-meter { height: 6px; border-radius: 6px; background: var(--bg-3); overflow: hidden; }
.acd-meter span { display: block; height: 100%; width: var(--p, 0%); background: var(--signal); border-radius: inherit; transition: width .5s var(--ease); }
.acd-side-count { margin: 10px 0 6px; font-size: 0.9rem; color: var(--mut); }
.acd-side-count b { color: var(--ink-strong); font-size: 1.3rem; }
.acd-side-strong { font-weight: 600; color: var(--ink-strong); margin-bottom: 4px; }
.acd-side-paths { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.acd .acd-side-paths a { font-size: 0.93rem; color: var(--ink-strong); border-bottom: 1px solid var(--signal); }
.acd-side-next { display: flex; flex-direction: column; gap: 4px; background: var(--tint); border-color: transparent; transition: transform .2s var(--ease); }
.acd-side-next:hover { transform: translateY(-2px); }
.acd-side-next b { font-size: 1.05rem; color: var(--ink-strong); }
.acd-side-next span { font-size: 0.86rem; color: color-mix(in srgb, var(--ink-strong) 65%, transparent); line-height: 1.55; }

.acd-badge { grid-column: 1 / -1; display: flex; align-items: center; gap: 24px; padding: 24px 28px; border-radius: var(--ac-r-lg); background: var(--bg-2); border: 1px dashed var(--line); }
.acd-badge-medal { width: 76px; height: 76px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); filter: grayscale(1); opacity: .55; transition: all .4s var(--ease); }
.acd-badge-medal .acd-picon { position: static; width: 44px; height: 44px; box-shadow: none; }
.acd-badge-medal .mark { font-size: 1.4rem; }
.acd-badge h3 { font-size: 1.05rem; font-family: var(--font-display); letter-spacing: 0; text-transform: none; color: var(--ink-strong); margin: 0 0 4px; }
.acd-badge p { margin: 0; color: var(--mut); font-size: 0.92rem; }
.acd-badge.is-earned { background: var(--tint); border: 1px solid transparent; }
.acd-badge.is-earned .acd-badge-medal { filter: none; opacity: 1; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--signal), 0 10px 30px -10px rgba(227, 68, 0, .5); }

/* ---------- 课时页 ---------- */
.acd-lesson { display: grid; grid-template-columns: minmax(0, var(--ac-read)) 272px; justify-content: center; gap: clamp(40px, 5vw, 72px); padding-top: clamp(24px, 3.5vw, 44px); padding-bottom: 96px; align-items: start; }
.acd-lessonhead h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.12; margin: 0; }
.acd-lessonhead .acd-chips { margin-top: 16px; }
.acd-lessonhead .lede { margin: 18px 0 0; font-size: 1.1rem; }
.acd-lessonart { margin: 28px 0 32px; border-radius: 22px; }
.acd-objectives { background: var(--bg-2); }
.acd-objectives h2 { font-size: 1.1rem; margin: 0 0 2px; }
.acd-objectives ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.acd-objectives li { position: relative; padding-left: 22px; font-size: 0.98rem; line-height: 1.65; }
.acd-objectives li::before { content: "→"; position: absolute; left: 0; top: 0; font-family: var(--font-mono); color: var(--signal); font-size: 0.9rem; }

.acd-lsec { margin-top: clamp(44px, 5vw, 60px); }
.acd-lsec > h2 { font-size: clamp(1.4rem, 2.2vw, 1.7rem); margin: 0 0 18px; }
.acd-lsec > p, .acd-lsec li, .acd-lsec td, .acd-lsec th { font-size: 1.04rem; }
.acd-lsec > p { line-height: 1.9; color: var(--ink); margin: 0 0 1.1em; }
.acd-lsec > p:lang(zh) { text-align: justify; }
.acd-lsec > * + figure, .acd-lsec > * + div, .acd-lsec > * + aside, .acd-lsec > * + blockquote, .acd-lsec > * + ol, .acd-lsec > * + ul, .acd-lsec > * + pre { margin-top: 20px; }
.acd-lsec > figure + p, .acd-lsec > div + p, .acd-lsec > aside + p, .acd-lsec > blockquote + p, .acd-lsec > ol + p, .acd-lsec > ul + p, .acd-lsec > pre + p { margin-top: 22px; }

.acd-list { margin: 0 0 1em; padding: 0; list-style: none; display: grid; gap: 8px; }
.acd-list li { position: relative; padding-left: 20px; line-height: 1.8; }
.acd-list li::before { content: ""; position: absolute; left: 3px; top: 0.72em; width: 4px; height: 10px; background: var(--signal); transform: skewX(-20deg); border-radius: 1px; }

.acd-steps { counter-reset: st; list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 0; }
.acd-steps li { counter-increment: st; position: relative; padding: 0 0 18px 48px; }
.acd-steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; color: var(--ink-strong); background: var(--tint); }
.acd-steps li::after { content: ""; position: absolute; left: 14.5px; top: 34px; bottom: 4px; width: 1px; background: var(--line); }
.acd-steps li:last-child::after { display: none; }
.acd-steps b { display: block; color: var(--ink-strong); font-size: 1.02rem; line-height: 30px; }
.acd-steps p { margin: 2px 0 0; color: var(--mut); line-height: 1.75; font-size: 0.97rem; }

.acd-cards { display: grid; gap: 12px; margin-bottom: 1em; }
.acd-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.acd-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.acd-cardlet { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.acd-k { display: block; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal); margin-bottom: 8px; }
.acd-cardlet h4 { font-size: 1rem; margin: 0 0 6px; }
.acd-cardlet p { margin: 0; font-size: 0.92rem; color: var(--mut); line-height: 1.7; }

.acd-compare { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 1em; }
.acd-compare table { width: 100%; border-collapse: collapse; }
.acd-compare th, .acd-compare td { padding: 12px 16px; text-align: left; vertical-align: top; line-height: 1.6; border-bottom: 1px solid var(--line-soft); font-size: 0.95rem !important; }
.acd-compare tr:last-child th, .acd-compare tr:last-child td { border-bottom: 0; }
.acd-compare thead th { font-size: 0.82rem !important; font-weight: 600; color: var(--mut); background: var(--bg-2); }
.acd-compare tbody th { font-weight: 600; color: var(--ink-strong); width: 24%; }
.acd-compare td { color: var(--mut); }
.acd-compare .is-b { background: color-mix(in srgb, var(--tint) 55%, transparent); color: var(--ink-strong); }
.acd-compare thead .is-b { color: var(--ink-strong); }

/* 图解 */
.acd-flow { margin: 0 0 1.1em; }
.acd-flow ol { list-style: none; margin: 0; padding: 0; }
.acd-flow-item { position: relative; display: flex; flex-direction: column; gap: 3px; }
.acd-flow-item b { color: var(--ink-strong); font-size: 0.98rem; line-height: 1.35; }
.acd-flow-item small { color: var(--mut); font-size: 0.84rem; line-height: 1.55; }
.acd-flow-tag { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--mut-2); }
.acd-flow-note { margin-top: 6px; align-self: flex-start; font-size: 0.72rem; font-weight: 600; color: var(--signal); background: var(--signal-soft); border-radius: var(--radius-full); padding: 2px 9px; }
.acd-flow-icon { width: 34px; height: 34px; border-radius: 9px; margin-bottom: 6px; }

.acd-flow--line ol { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; }
.acd-flow--line .acd-flow-item { padding: 14px 14px 16px; border-radius: 14px; background: var(--tint); }
.acd-flow--line .acd-flow-item:not(:last-child)::after { content: ""; position: absolute; right: -9px; top: 50%; width: 8px; height: 8px; border-top: 1.5px solid var(--mut-2); border-right: 1.5px solid var(--mut-2); transform: translateY(-50%) rotate(45deg); z-index: 1; }
.acd-flow--line .is-hi { background: var(--ink-strong); }
.acd-flow--line .is-hi b { color: var(--bg); }
.acd-flow--line .is-hi small, .acd-flow--line .is-hi .acd-flow-tag { color: color-mix(in srgb, var(--bg) 70%, transparent); }

.acd-flow--loop ol { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "a b" "d c"; gap: 26px; position: relative; padding: 4px; }
.acd-flow--loop .acd-flow-item { padding: 16px 18px; border-radius: 16px; background: var(--tint); min-height: 104px; }
.acd-flow--loop .acd-flow-item:nth-child(1) { grid-area: a; }
.acd-flow--loop .acd-flow-item:nth-child(2) { grid-area: b; }
.acd-flow--loop .acd-flow-item:nth-child(3) { grid-area: c; }
.acd-flow--loop .acd-flow-item:nth-child(4) { grid-area: d; }
.acd-flow--loop .acd-flow-item::after { position: absolute; font-family: var(--font-mono); font-size: 1rem; color: var(--signal); line-height: 1; }
.acd-flow--loop .acd-flow-item:nth-child(1)::after { content: "→"; right: -21px; top: 50%; transform: translateY(-50%); }
.acd-flow--loop .acd-flow-item:nth-child(2)::after { content: "↓"; bottom: -22px; left: 50%; transform: translateX(-50%); }
.acd-flow--loop .acd-flow-item:nth-child(3)::after { content: "←"; left: -21px; top: 50%; transform: translateY(-50%); }
.acd-flow--loop .acd-flow-item:nth-child(4)::after { content: "↑"; top: -22px; left: 50%; transform: translateX(-50%); }
.acd-flow--loop .is-hi { outline: 1.5px solid var(--signal); }

.acd-flow--stack ol { display: grid; gap: 8px; }
.acd-flow--stack .acd-flow-item { display: grid; grid-template-columns: auto 64px minmax(0, 11em) minmax(0, 1fr); align-items: center; gap: 4px 16px; padding: 14px 18px; border-radius: 14px; background: color-mix(in srgb, var(--tint) calc(100% - var(--i) * 12%), var(--bg-2)); }
.acd-flow--stack .acd-flow-item:not(:has(.acd-flow-icon)) { grid-template-columns: 64px minmax(0, 11em) minmax(0, 1fr); }
.acd-flow--stack .acd-flow-icon { margin: 0; }
.acd-flow--stack .acd-flow-note { grid-column: -2 / -1; margin-top: 0; }
.acd-flow--stack .is-hi { box-shadow: inset 3px 0 0 var(--signal); }

.acd-flow--ladder ol { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; align-items: end; padding-top: 30px; }
.acd-flow--ladder .acd-flow-item { justify-content: flex-start; min-height: calc(92px + var(--i) * 26px); padding: 14px 14px 16px; border-radius: 14px 14px 6px 6px; background: color-mix(in srgb, var(--tint) 70%, var(--bg-2)); }
.acd-flow--ladder .is-hi { background: var(--ink-strong); }
.acd-flow--ladder .is-hi b { color: var(--bg); }
.acd-flow--ladder .is-hi small, .acd-flow--ladder .is-hi .acd-flow-tag { color: color-mix(in srgb, var(--bg) 72%, transparent); }
.acd-flow--ladder .is-hi .acd-flow-note { position: absolute; top: -30px; left: 0; white-space: nowrap; }

.acd-quote { margin: 26px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--signal); }
.acd-quote p { margin: 0; font-size: 1.28rem !important; line-height: 1.6; font-weight: 600; color: var(--ink-strong); letter-spacing: -0.005em; }
.acd-note { margin: 22px 0; padding: 14px 18px 15px; border-radius: 14px; background: var(--signal-soft); }
.acd-note-k { display: block; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal); margin-bottom: 4px; }
.acd-note p { margin: 0; font-size: 0.98rem !important; line-height: 1.8; color: var(--ink-strong); }
.acd-example { display: grid; grid-template-columns: 1fr 1.25fr; gap: 12px; margin-bottom: 1em; }
.acd-example > div { padding: 16px 18px; border-radius: 14px; }
.acd-ex-bad { background: var(--bg-2); border: 1px dashed var(--line); }
.acd-ex-good { background: var(--tint); }
.acd-ex-k { display: block; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mut-2); margin-bottom: 8px; }
.acd-ex-good .acd-ex-k { color: var(--signal); }
.acd-example p { margin: 0; font-size: 0.95rem !important; line-height: 1.8; white-space: pre-line; }
.acd-ex-bad p { color: var(--mut); }
.acd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; margin: 4px 0 1.1em; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.acd-stats > div { padding: 16px 16px 16px 0; display: flex; flex-direction: column; gap: 2px; }
.acd-stats > div + div { padding-left: 16px; border-left: 1px solid var(--line-soft); }
.acd-stats b { font-size: 1.7rem; line-height: 1.15; font-weight: 700; color: var(--ink-strong); letter-spacing: -0.02em; }
.acd-stats span { font-size: 0.85rem; color: var(--mut); line-height: 1.5; }
.acd-code { margin: 0 0 1em; padding: 14px 16px; border-radius: 12px; font-size: 0.84rem; line-height: 1.7; overflow-x: auto; }
.acd-code code { background: none; border: 0; padding: 0; font-size: inherit; white-space: pre; }

.acd-takeaways ul { list-style: none; margin: 0; padding: 20px 22px; display: grid; gap: 10px; border-radius: var(--ac-r); background: var(--tint); }
.acd-takeaways li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; line-height: 1.7; color: var(--ink-strong); }

.acd-practice h3 { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0; text-transform: none; color: var(--ink-strong); margin: 0 0 4px; }
.acd-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 12px; }
.acd-tabs button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-full); background: var(--bg); color: var(--mut); font: inherit; font-size: 0.88rem; cursor: pointer; transition: all .15s; }
.acd-tabs button[aria-selected="true"] { background: var(--ink-strong); color: var(--bg); border-color: var(--ink-strong); }
.acd-tabs button[aria-selected="true"] .acd-idx { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.acd-tabpanel p { margin: 0; padding: 16px 18px; border-radius: 12px; background: var(--bg-2); line-height: 1.85; font-size: 1rem; }

.acd-quiz > .acd-fine { margin: -8px 0 16px; }
.acd-q { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--ac-r); margin-bottom: 12px; }
.acd-q-q { display: flex; gap: 10px; align-items: baseline; margin: 0 0 12px; font-weight: 600; color: var(--ink-strong); font-size: 1.02rem !important; line-height: 1.6; }
.acd-q-q .acd-idx { color: var(--signal); }
.acd-q-opts { display: grid; gap: 8px; }
.acd-q-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-size: 0.96rem; line-height: 1.55; cursor: pointer; transition: border-color .15s, background .15s; }
.acd-q-opt:hover:not(:disabled) { border-color: color-mix(in srgb, var(--ink-strong) 28%, transparent); background: var(--bg-2); }
.acd-q-opt:disabled { cursor: default; }
.acd-q-dot { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid var(--mut-2); position: relative; }
.acd-q-opt.is-right { border-color: var(--ac-ok); background: color-mix(in srgb, var(--ac-ok) 8%, var(--bg)); color: var(--ink-strong); }
.acd-q-opt.is-right .acd-q-dot { border-color: var(--ac-ok); background: var(--ac-ok); box-shadow: inset 0 0 0 3px var(--bg); }
.acd-q-opt.is-wrong { border-color: var(--signal); background: var(--signal-soft); }
.acd-q-opt.is-wrong .acd-q-dot { border-color: var(--signal); background: var(--signal); box-shadow: inset 0 0 0 3px var(--bg); }
.acd-q-explain { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); }
.acd-q-explain p { margin: 0; font-size: 0.94rem !important; line-height: 1.75; color: var(--ink); }
.acd-q-explain .acd-q-verdict { display: block; font-weight: 700; margin-bottom: 2px; }
.acd-q.is-right .acd-q-verdict { color: var(--ac-ok); }
.acd-q.is-wrong .acd-q-verdict { color: var(--signal); }

.acd-reading ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.acd-reading li { border-bottom: 1px solid var(--line); }
.acd-reading a { display: flex; justify-content: space-between; gap: 16px; padding: 13px 2px; color: var(--ink-strong); border: 0; font-size: 1rem; transition: color .15s; }
.acd-reading a:hover { color: var(--signal); }
.acd-reading .arr { font-family: var(--font-mono); color: var(--mut-2); }

.acd-done { margin-top: 48px; display: flex; justify-content: center; }
.acd-done-btn { gap: 10px; height: 48px; padding: 0 22px; border-radius: var(--radius-full); }
.acd-done-btn svg { width: 18px; height: 18px; color: var(--mut-2); }
.acd-done-btn.is-done { background: var(--ink-strong); border-color: var(--ink-strong); color: var(--bg); }
.acd-done-btn.is-done svg { color: var(--signal); }
.acd-pns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.acd-pn { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, background .15s; }
.acd-pn:hover { border-color: color-mix(in srgb, var(--ink-strong) 22%, transparent); background: var(--bg-2); }
.acd-pn--next { text-align: right; }
.acd-pn-k { font-size: 0.78rem; color: var(--mut-2); }
.acd-pn b { color: var(--ink-strong); font-size: 1rem; }

.acd-lesson-side { position: sticky; top: calc(var(--nav-h, 64px) + var(--ac-sub-h) + 20px); }
.acd-side-sticky { display: grid; gap: 20px; max-height: calc(100vh - var(--nav-h, 64px) - var(--ac-sub-h) - 40px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 8px; }
.acd-outline { padding: 14px 12px; }
.acd-outline-course { display: flex; align-items: center; gap: 10px; padding: 2px 6px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 8px; }
.acd-outline-course .acd-picon { position: static; width: 30px; height: 30px; border-radius: 8px; box-shadow: none; flex: none; }
.acd-outline-course span { display: flex; flex-direction: column; min-width: 0; }
.acd-outline-course small { font-size: 0.72rem; color: var(--mut-2); }
.acd-outline-course b { font-size: 0.92rem; color: var(--ink-strong); line-height: 1.35; }
.acd-outline ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.acd-outline ol a { display: grid; grid-template-columns: 22px 1fr 16px; gap: 6px; align-items: baseline; padding: 7px 6px; border-radius: 8px; font-size: 0.86rem; line-height: 1.45; color: var(--mut); transition: background .15s, color .15s; }
.acd-outline ol a:hover { background: var(--bg-2); color: var(--ink-strong); }
.acd-outline .cur a { background: var(--bg-2); color: var(--ink-strong); font-weight: 600; }
.acd-lcheck { color: transparent; align-self: center; }
.acd-lcheck svg { width: 14px; height: 14px; }
.is-done .acd-lcheck { color: var(--signal); }
.acd-toc h3 { font-size: 0.72rem; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mut-2); margin: 0 0 8px 8px; }
.acd-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.acd-toc a { display: block; padding: 5px 0 5px 12px; margin-left: -1px; border-left: 1px solid transparent; font-size: 0.84rem; line-height: 1.45; color: var(--mut); transition: color .15s, border-color .15s; }
.acd-toc a:hover { color: var(--ink-strong); }
.acd-toc a.is-active { color: var(--ink-strong); border-left-color: var(--signal); }

/* ---------- 搜索 ---------- */
.acd-search { position: fixed; inset: 0; z-index: 300; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(10, 10, 10, 0.28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.acd-search-panel { width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.35); overflow: hidden; }
.acd-search-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--line); color: var(--mut); }
.acd-search-in svg { width: 18px; height: 18px; flex: none; }
.acd-search-in input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: 1.02rem; color: var(--ink-strong); }
.acd-search-in input:focus-visible, .acd-filter input:focus-visible { box-shadow: none; }
.acd-filter:focus-within { border-color: color-mix(in srgb, var(--ink-strong) 30%, transparent); }
.acd-search-in kbd { font-family: var(--font-mono); font-size: 0.7rem; padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--mut-2); }
.acd-search-list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.acd-search-list a { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.acd-search-list a.is-sel, .acd-search-list a:hover { background: var(--bg-2); }
.acd-search-list small { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mut-2); }
.acd-search-list b { display: block; color: var(--ink-strong); font-size: 0.95rem; font-weight: 600; }
.acd-search-list span { display: block; font-size: 0.84rem; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acd-search-empty { padding: 28px; text-align: center; color: var(--mut); font-size: 0.92rem; }

/* ---------- 深色 ---------- */
[data-theme="dark"] .acd-coursehead { background: color-mix(in srgb, var(--tint) 11%, var(--bg)); }
[data-theme="dark"] .acd-coursehead .lede, [data-theme="dark"] .acd-coursehead .acd-crumb, [data-theme="dark"] .acd-coursehead .acd-crumb a { color: var(--mut); }
[data-theme="dark"] .acd-coursehead-art { background: var(--tint); border-radius: 22px; }
[data-theme="dark"] :is(.acd-flow--line .acd-flow-item, .acd-flow--loop .acd-flow-item, .acd-flow--ladder .acd-flow-item, .acd-ex-good, .acd-takeaways ul, .acd-steps li::before) { background: color-mix(in srgb, var(--tint) 13%, var(--bg-2)); }
[data-theme="dark"] :is(.acd-flow--line, .acd-flow--ladder) .acd-flow-item.is-hi { background: var(--ink-strong); }
[data-theme="dark"] .acd-flow--stack .acd-flow-item { background: color-mix(in srgb, var(--tint) calc(16% - var(--i) * 2%), var(--bg-2)); }
[data-theme="dark"] .acd-compare .is-b { background: color-mix(in srgb, var(--tint) 10%, transparent); }
[data-theme="dark"] :is(.acd-cta, .acd-side-next, .acd-badge.is-earned) { background: color-mix(in srgb, var(--tint, var(--t-cream)) 12%, var(--bg-2)); }
[data-theme="dark"] .acd-cta { --tint: var(--t-cream); }
[data-theme="dark"] :is(.acd-side-next span, .acd-coursehead .acd-chips--meta .acd-chip) { color: var(--mut); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .acd-lesson { grid-template-columns: minmax(0, 1fr); }
  .acd-lesson-side { position: static; }
  .acd-side-sticky { max-height: none; overflow: visible; }
  .acd-toc { display: none; }
  .acd-course { grid-template-columns: minmax(0, 1fr); }
  .acd-course-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acd-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acd-method { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acd-method-item:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 900px) {
  .acd-hero-grid, .acd-coursehead-grid { grid-template-columns: minmax(0, 1fr); }
  .acd-hero-art { order: -1; border-radius: 20px; }
  .acd-paths, .acd-grid--2 { grid-template-columns: minmax(0, 1fr); }
  .acd-grid--3, .acd-grid--products, .acd-grid--builders, .acd-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acd-grid--products > *, .acd-grid--builders > * { grid-column: auto !important; }
  .acd-card--wide { display: flex; }
  .acd-glossary { grid-template-columns: minmax(0, 1fr); }
  .acd-search-btn { min-width: 0; }
  .acd-search-btn kbd, .acd-search-btn span { display: none; }
  .acd-sec-head--row { flex-direction: column; align-items: flex-start; }
  .acd-cta { flex-direction: column; align-items: flex-start; }
  .acd-flow--line ol { grid-template-columns: minmax(0, 1fr); }
  .acd-flow--line .acd-flow-item:not(:last-child)::after { right: auto; left: 24px; top: auto; bottom: -9px; transform: rotate(135deg); }
  .acd-flow--ladder ol { grid-template-columns: minmax(0, 1fr); padding-top: 0; }
  .acd-flow--ladder .acd-flow-item { min-height: 0; border-radius: 12px; margin-left: calc(var(--i) * 10px); }
  .acd-flow--ladder .is-hi .acd-flow-note { position: static; }
}
@media (max-width: 640px) {
  .acd-subnav .wrap { gap: 14px; }
  .acd-brand b { display: none; }
  .acd-subnav-links { gap: 16px; }
  .acd-hero-stats b { font-size: 1.5rem; }
  .acd-hero-stats > div + div { padding-left: 10px; }
  .acd-path { grid-template-columns: minmax(0, 1fr); }
  .acd-path-art .acd-art { transform: none; }
  .acd-grid--3, .acd-grid--products, .acd-grid--builders, .acd-terms, .acd-method, .acd-feats { grid-template-columns: minmax(0, 1fr); }
  .acd-method-item, .acd-method-item + .acd-method-item { padding: 18px 0 4px; border-left: 0; }
  .acd-course-side { grid-template-columns: minmax(0, 1fr); }
  .acd-lrow { grid-template-columns: 88px minmax(0, 1fr) 24px; gap: 14px; }
  .acd-lrow-sum { display: none; }
  .acd-cards--2, .acd-cards--3, .acd-example, .acd-pns { grid-template-columns: minmax(0, 1fr); }
  .acd-pn--next { text-align: left; }
  .acd-flow--loop ol { grid-template-columns: minmax(0, 1fr); grid-template-areas: "a" "b" "c" "d"; gap: 20px; }
  .acd-flow--loop .acd-flow-item:nth-child(1)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -18px; transform: translateX(-50%); }
  .acd-flow--loop .acd-flow-item:nth-child(3)::after { content: "↓"; left: 50%; top: auto; bottom: -18px; transform: translateX(-50%); }
  .acd-flow--loop .acd-flow-item:nth-child(4)::after { content: "↺"; top: auto; bottom: -18px; }
  .acd-flow--stack .acd-flow-item, .acd-flow--stack .acd-flow-item:not(:has(.acd-flow-icon)) { grid-template-columns: minmax(0, 1fr); }
  .acd-compare { overflow-x: auto; }
  .acd-compare table { min-width: 520px; }
  .acd-badge { flex-direction: column; align-items: flex-start; }
  .acd-lsec > p:lang(zh) { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .acd *, .acd *::before, .acd *::after { transition: none !important; animation: none !important; }
}
