/* Readcast — 视觉令牌照 Clarus 复刻（样式基准.md）：米白底、衬线大标题、黑粗线分区、无圆角无阴影 */
/* 字体自托管（可变字重单文件，四件套：源入库+build拷贝+缺源exit(1)+遍历锁见 tests/assets.test.mjs） */
@font-face {
  font-family: 'Newsreader';
  src: url('/assets/fonts/newsreader-var.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --paper: #FAFAF7;
  --ink: #141416;
  --gray1: #4A4D55;
  --gray2: #6B6E76;
  --hairline: #E3E1DA;
  --teal: #0C5B4A;
  --teal-tint: #E3F0EC;
  --navy: #33336E;
  --callout: #EEF2F7;
  --cover: #DDDACB;
  --cover-dark: #26262A;
  --dark: #1F1F21;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --wrap: 1264px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; }
body { background: var(--paper); color: var(--ink); font-family: var(--serif); line-height: 1.55; -webkit-font-smoothing: antialiased; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration-color: var(--hairline); text-underline-offset: 3px; }
a:hover { color: var(--teal); text-decoration-color: var(--teal); }
h1 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 400; line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); font-weight: 500; line-height: 1.2; margin: 2.2em 0 0.7em; }
h3 { font-size: 1.2rem; font-weight: 500; line-height: 1.3; }
p { color: var(--gray1); }
.lede { font-size: 1.18rem; color: var(--gray1); max-width: 46em; margin-top: 0.8em; }
.fineprint, .post-date { font-family: var(--sans); font-size: 0.82rem; color: var(--gray2); }

/* 顶栏 */
.site-header { border-bottom: 1px solid var(--ink); }
.header-inner { display: flex; align-items: baseline; justify-content: space-between; padding-top: 18px; padding-bottom: 16px; }
.brand { font-size: 1.5rem; font-weight: 500; text-decoration: none; letter-spacing: -0.01em; }
.brand-dot { color: var(--teal); }
.site-nav { display: flex; gap: 26px; font-family: var(--sans); font-size: 0.88rem; }
.site-nav a { text-decoration: none; color: var(--gray1); }
.site-nav a:hover { color: var(--teal); }

/* 首页 hero */
.hero { display: grid; grid-template-columns: 1.7fr 1fr; gap: 48px; padding: 56px 0 40px; border-bottom: 3px solid var(--ink); }
.kicker { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); font-weight: 600; margin-bottom: 14px; }
.hero .lede { margin: 1em 0 1.6em; }
.hero-actions { display: flex; gap: 14px; }
.btn { display: inline-block; font-family: var(--sans); font-size: 0.92rem; font-weight: 600; background: var(--ink); color: var(--paper); padding: 12px 22px; text-decoration: none; border: none; cursor: pointer; }
.btn:hover { background: var(--teal); color: var(--paper); }
.hero-brief { border-left: 4px solid var(--navy); padding-left: 22px; }
.side-heading { font-family: var(--sans); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--navy); padding-top: 4px; margin-bottom: 14px; }
.brief-list { padding-left: 24px; list-style-position: outside; }
.brief-list li { margin-bottom: 12px; color: var(--gray1); padding-left: 4px; }

/* 区块 */
.section-head { max-width: 40em; margin-bottom: 26px; }
.section-head p { margin-top: 8px; }
.tool-section, .latest-section { padding: 44px 0; border-bottom: 1px solid var(--ink); }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--hairline); border-left: 1px solid var(--hairline); }
.tool-card { display: block; padding: 24px 22px 28px; border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); text-decoration: none; }
.tool-card:hover { background: var(--teal-tint); color: inherit; }
.tool-card:hover h3 { color: var(--teal); }
.tool-icon { width: 38px; height: 38px; background: var(--teal-tint); color: var(--teal); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.tool-card h3 { margin-bottom: 8px; font-size: 1.12rem; }
.tool-card p { font-family: var(--sans); font-size: 0.88rem; color: var(--gray1); }

/* 读本行（首页最新） */
.readback-row { padding: 22px 0; border-bottom: 1px solid var(--hairline); }
.readback-title { font-size: 1.35rem; text-decoration: none; }
.readback-meta { font-family: var(--sans); font-size: 0.8rem; color: var(--gray2); margin: 6px 0; }
.readback-row p { font-size: 0.98rem; max-width: 52em; }

/* 课程库 */
.page-head { padding: 44px 0 28px; border-bottom: 3px solid var(--ink); }
.pill-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.pill { font-family: var(--sans); font-size: 0.82rem; font-weight: 600; padding: 7px 16px; border: 1px solid var(--ink); background: transparent; cursor: pointer; }
.pill.is-active { background: var(--ink); color: var(--paper); }
.cat-section { padding: 34px 0; border-bottom: 1px solid var(--ink); }
.cat-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.cat-head h2 { margin: 0; }
.cat-swatch { width: 16px; height: 16px; background: var(--cat-color, var(--teal)); display: inline-block; transform: translateY(2px); }
.cat-swatch.sm { width: 10px; height: 10px; margin-right: 8px; }
.cat-count { font-family: var(--sans); font-size: 0.82rem; color: var(--gray2); }
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.course-grid > :only-child { grid-column: 1 / 3; }
.course-card { text-decoration: none; display: block; }
.course-card:hover h3 { color: var(--teal); }
.cc-cover { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--cat-color, var(--teal)) 0%, var(--cover-dark) 130%); display: flex; align-items: flex-end; padding: 10px; }
.cc-cover .cc-ep { position: absolute; top: 10px; left: 10px; font-family: var(--sans); font-size: 0.72rem; font-weight: 700; color: #fff; background: rgba(20,20,22,0.85); padding: 3px 8px; }
.cc-cover .cc-dur { position: absolute; bottom: 10px; right: 10px; font-family: var(--sans); font-size: 0.75rem; font-weight: 700; color: #fff; background: rgba(20,20,22,0.85); padding: 3px 8px; }
.cc-cover .cc-cat { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.92); padding-left: 4px; }
.cc-body { padding-top: 14px; }
.cc-body h3 { margin-bottom: 8px; }
.cc-body p { font-family: var(--sans); font-size: 0.86rem; margin-bottom: 10px; }
.cc-meta { font-family: var(--sans); font-size: 0.78rem; color: var(--gray2); }

/* 读本页 */
.crumbs { font-family: var(--sans); font-size: 0.82rem; color: var(--gray2); padding: 20px 0; }
.course-head { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; padding-bottom: 26px; border-bottom: 3px solid var(--ink); }
.course-cat { font-family: var(--sans); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; margin-bottom: 12px; }
.course-sub { margin-top: 14px; font-size: 1.05rem; }
.course-facts { display: flex; gap: 34px; align-items: flex-start; justify-content: flex-end; }
.course-facts span { display: block; font-family: var(--sans); font-size: 0.75rem; color: var(--gray2); text-transform: uppercase; letter-spacing: 0.08em; }
.course-facts strong { font-family: var(--sans); font-size: 1.5rem; font-weight: 600; }
.course-cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; padding: 30px 0; }
.player iframe { width: 100%; aspect-ratio: 16/9; border: none; background: var(--cover-dark); }
.player-note { font-family: var(--sans); font-size: 0.78rem; color: var(--gray2); margin-top: 8px; }
.side-block { border-top: 4px solid var(--navy); padding-top: 14px; margin-bottom: 34px; }
.toc-block { border-top-color: var(--ink); margin-top: 30px; }
.toc-list { list-style: none; font-family: var(--sans); font-size: 0.9rem; }
.toc-mod { margin-bottom: 16px; }
.toc-mod-title { font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); display: block; margin-bottom: 6px; }
.toc-mod ol { list-style: none; }
.toc-mod ol li { padding: 3px 0; border-bottom: 1px solid var(--hairline); }
.toc-mod ol a { text-decoration: none; color: var(--gray1); display: block; }
.toc-mod ol a:hover { color: var(--teal); }
.the-point { background: var(--callout); padding: 26px 28px; margin-bottom: 34px; }
.the-point p { font-size: 1.18rem; color: var(--ink); font-style: italic; }
.who-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.who-label { font-family: var(--sans); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; color: var(--teal); }
.who-cols ul { list-style: none; }
.who-cols li { font-size: 0.92rem; color: var(--gray1); padding: 7px 0 7px 18px; border-bottom: 1px solid var(--hairline); position: relative; }
.who-cols li::before { content: '—'; position: absolute; left: 0; color: var(--gray2); }

/* walkthrough */
.walkthrough { padding: 40px 0; border-top: 3px solid var(--ink); }
.section-intro { max-width: 46em; margin-bottom: 30px; }
.wt-mod { margin-bottom: 42px; }
.wt-mod > h3 { border-top: 1px solid var(--ink); padding-top: 16px; margin-bottom: 8px; }
.wt-mod-num { font-family: var(--sans); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.wt-ch { padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.wt-ch-head { display: flex; gap: 14px; align-items: baseline; margin-bottom: 6px; }
.wt-ts { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; color: var(--teal); text-decoration: none; white-space: nowrap; }
.wt-ch h4 { font-size: 1.08rem; font-weight: 500; }
.wt-ch p { font-size: 0.96rem; max-width: 68ch; }

/* 表格类区块 */
.moments, .donext, .faqs, .spot-mistake, .more-courses { padding: 30px 0; border-top: 1px solid var(--ink); }
.moment-table, .alt-table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.9rem; }
.moment-table th, .moment-table td, .alt-table th, .alt-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.moment-table th, .alt-table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray2); }
.moment-table td:first-child { white-space: nowrap; font-weight: 700; }
.moment-table td:first-child a { color: var(--teal); text-decoration: none; }
.self-row td { background: var(--teal-tint); }
.donext ol { padding-left: 22px; }
.donext li { margin-bottom: 10px; color: var(--gray1); }
.faq-item { padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.faq-item h3 { margin-bottom: 6px; font-size: 1.05rem; }
.spot-mistake { background: var(--callout); padding: 30px; margin: 30px 0; border-top: none; }
.spot-mistake h2 { margin-top: 0; }
.more-list { list-style: none; }
.more-list li { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.more-list a { font-size: 1.08rem; text-decoration: none; display: block; }
.more-list span { font-family: var(--sans); font-size: 0.8rem; color: var(--gray2); }

/* 工具页 */
.tool-input-row { display: flex; gap: 12px; max-width: 720px; margin: 26px 0 14px; }
.tool-input-row input { flex: 1; font-family: var(--sans); font-size: 0.95rem; padding: 13px 16px; border: 1px solid var(--ink); background: #fff; color: var(--ink); }
.tool-input-row input:focus { outline: 2px solid var(--teal); outline-offset: -1px; }
.tool-limit-note { font-family: var(--sans); font-size: 0.84rem; max-width: 46em; }
.tool-status { font-family: var(--sans); font-size: 0.88rem; min-height: 1.4em; margin-bottom: 10px; }
.tool-status.error { color: #B3261E; }
.tool-out-meta { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--sans); font-size: 0.8rem; color: var(--gray2); margin-bottom: 8px; }
.linklike { background: none; border: none; font-family: var(--sans); font-size: 0.82rem; color: var(--teal); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.tool-output { font-family: var(--sans); font-size: 0.88rem; line-height: 1.6; background: #fff; border: 1px solid var(--ink); padding: 20px; max-height: 480px; overflow-y: auto; white-space: pre-wrap; }
.ai-output { font-size: 0.95rem; white-space: pre-wrap; }
.how-it-works { padding: 30px 0; border-top: 1px solid var(--ink); margin-top: 36px; }
.how-it-works ol { padding-left: 22px; margin-bottom: 14px; }
.how-it-works li { margin-bottom: 8px; color: var(--gray1); }
.tool-placeholder { padding: 26px 0; }
.ph-step { display: flex; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--hairline); max-width: 640px; }
.ph-num { font-family: var(--sans); font-weight: 700; color: var(--teal); }

/* 页脚 */
.site-footer { border-top: 3px solid var(--ink); margin-top: 60px; padding: 34px 0 44px; }
.footer-line { font-size: 0.98rem; margin-bottom: 6px; }
.footer-nav { display: flex; gap: 22px; margin: 20px 0 14px; font-family: var(--sans); font-size: 0.85rem; }
.footer-meta { font-family: var(--sans); font-size: 0.8rem; color: var(--gray2); }

/* 文章 */
.post-body { max-width: 46em; }
.post-body p { margin-bottom: 1em; font-size: 1.05rem; }

/* 响应式 */
@media (max-width: 900px) {
  .hero, .course-head, .course-cols { grid-template-columns: 1fr; }
  .course-facts { justify-content: flex-start; }
  .tool-grid, .course-grid { grid-template-columns: 1fr; }
  .hero-brief { border-left: none; border-top: 4px solid var(--navy); padding: 20px 0 0; }
  .site-nav { gap: 16px; font-size: 0.8rem; flex-wrap: wrap; }
  .who-cols { grid-template-columns: 1fr; }
  .tool-input-row { flex-direction: column; }
}
