/* 金钱与投资常识 —— 手写样式，无构建依赖 */

:root {
  --bg: #faf8f4;
  --bg-soft: #f2efe8;
  --fg: #191a1c;
  --muted: #5c6068;
  --faint: #9a9691;
  --line: #e3ded5;
  --line-strong: #cfc8bc;
  --accent: #a35a12;
  --accent-soft: #f6ece0;
  --ok: #1c6b4a;
  --ok-soft: #e8f2ec;
  --bad: #a92a20;
  --bad-soft: #f9eae7;
  --warn: #96650a;
  --warn-soft: #f8f0dc;
  --info: #2b5670;
  --info-soft: #e9f1f6;
  --shadow: 0 1px 2px rgb(25 26 28 / 6%), 0 8px 24px -16px rgb(25 26 28 / 18%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131417;
    --bg-soft: #1b1d21;
    --fg: #e9e5de;
    --muted: #a5a6ac;
    --faint: #75767d;
    --line: #2a2c32;
    --line-strong: #3a3d45;
    --accent: #e0a35e;
    --accent-soft: #2a2115;
    --ok: #6fcaa0;
    --ok-soft: #17281f;
    --bad: #ef8b7f;
    --bad-soft: #2b1a18;
    --warn: #e0b45e;
    --warn-soft: #2a2314;
    --info: #86b6d2;
    --info-soft: #16242c;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 10px 30px -18px rgb(0 0 0 / 70%);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16.5px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.005em;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 20;
  padding: 8px 14px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 6px;
}

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.masthead-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 15px 28px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.wordmark span {
  color: var(--faint);
  font-weight: 400;
  margin-left: 8px;
  font-size: 13.5px;
}

.stamp {
  font-size: 12.5px;
  color: var(--faint);
  letter-spacing: 0.03em;
}

/* ---------- shell ---------- */

.shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 28px 96px;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.shell-wide {
  display: block;
  max-width: 1000px;
  padding-top: 64px;
}

.toc {
  position: sticky;
  top: 76px;
  font-size: 13.5px;
}

.toc-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--faint);
  margin: 0 0 14px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li + li {
  margin-top: 1px;
}

.toc a {
  display: flex;
  gap: 10px;
  padding: 5px 8px 5px 0;
  color: var(--muted);
  text-decoration: none;
  border-radius: 5px;
  line-height: 1.45;
}

.toc a:hover {
  color: var(--fg);
  background: var(--bg-soft);
}

.toc a[aria-current="page"] {
  color: var(--fg);
  font-weight: 600;
}

.toc-num {
  color: var(--faint);
  font-size: 12px;
  min-width: 18px;
  font-variant-numeric: tabular-nums;
}

.toc a[aria-current="page"] .toc-num {
  color: var(--accent);
}

.toc-back {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  color: var(--faint);
  text-decoration: none;
}

.toc-back:hover {
  color: var(--accent);
}

/* ---------- article ---------- */

.doc {
  max-width: 720px;
  min-width: 0;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

h1 {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  font-weight: 640;
  text-wrap: balance;
}

.lede {
  font-size: 19px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 40px;
}

h2 {
  font-size: 22px;
  line-height: 1.4;
  margin: 52px 0 16px;
  font-weight: 620;
  letter-spacing: -0.01em;
  scroll-margin-top: 80px;
}

h2::before {
  content: "";
  display: block;
  width: 26px;
  height: 2px;
  background: var(--accent);
  opacity: 0.7;
  margin-bottom: 12px;
}

h3 {
  font-size: 17px;
  margin: 32px 0 10px;
  font-weight: 620;
}

p {
  margin: 0 0 18px;
}

.doc ul,
.doc ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.doc li {
  margin-bottom: 8px;
}

.doc li::marker {
  color: var(--faint);
}

strong {
  font-weight: 620;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  white-space: nowrap;
}

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

.small {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

/* ---------- note ---------- */

.note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  background: var(--bg-soft);
  border-radius: 0 10px 10px 0;
  padding: 18px 20px 4px;
  margin: 26px 0;
}

.note p:last-child {
  margin-bottom: 14px;
}

.note-label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.note.warn {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.note.warn .note-label {
  color: var(--warn);
}

.note.good {
  border-left-color: var(--ok);
  background: var(--ok-soft);
}

.note.good .note-label {
  color: var(--ok);
}

.note.info {
  border-left-color: var(--info);
  background: var(--info-soft);
}

.note.info .note-label {
  color: var(--info);
}

/* ---------- table ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 480px;
}

th,
td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

thead th {
  background: var(--bg-soft);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr.hl td {
  background: var(--accent-soft);
  font-weight: 600;
}

/* ---------- kv ---------- */

.kv {
  margin: 26px 0;
  border-top: 1px solid var(--line);
}

.kv-row {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.kv-term {
  font-weight: 620;
  font-size: 15px;
}

.kv-desc {
  color: var(--muted);
  font-size: 15px;
}

.kv-term code {
  font-size: 0.85em;
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 16px;
  margin: 26px 0;
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  background: var(--bg-soft);
}

.card-title {
  font-weight: 640;
  margin: 0 0 8px;
  font-size: 15.5px;
}

.card-body {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.7;
}

.card-body code {
  background: var(--bg);
}

/* ---------- steps ---------- */

.steps {
  margin: 28px 0;
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 52px;
  padding-bottom: 24px;
  border-left: 1px solid var(--line);
  margin-left: 15px;
}

.step:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.step-num {
  position: absolute;
  left: -15px;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-size: 13px;
  font-weight: 640;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.step-title {
  font-weight: 640;
  margin: 2px 0 6px;
}

.step-body {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- flow ---------- */

.flow {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin: 30px 0 10px;
  background: var(--bg-soft);
}

.flow-col {
  flex: 1;
  padding: 22px 22px 24px;
  min-width: 0;
}

.flow-col + .flow-col {
  border-left: 1px solid var(--line);
}

.flow-arrow {
  display: flex;
  align-items: center;
  padding: 0 2px;
  color: var(--faint);
  font-size: 18px;
}

.flow-title {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 14px;
}

.flow-item {
  margin-bottom: 16px;
}

.flow-item:last-child {
  margin-bottom: 0;
}

.flow-name {
  font-weight: 620;
  margin: 0 0 4px;
  font-size: 15px;
}

.flow-desc {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.flow-caption {
  font-size: 13.5px;
  color: var(--faint);
  line-height: 1.7;
  margin: 0 0 30px;
}

/* ---------- bars ---------- */

.bars {
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
}

.bar-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 14px;
  padding: 7px 0;
}

.bar-label {
  font-size: 14px;
  color: var(--muted);
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--bg)));
  transition: width 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.bar-row:nth-child(3n + 2) .bar-fill {
  background: linear-gradient(90deg, var(--info), color-mix(in srgb, var(--info) 55%, var(--bg)));
}

.bar-row:nth-child(3n) .bar-fill {
  background: linear-gradient(90deg, var(--bad), color-mix(in srgb, var(--bad) 55%, var(--bg)));
}

.bar-val {
  text-align: right;
  font-size: 14px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}

/* ---------- big / verdict / pill ---------- */

.big {
  font-size: 17px;
  line-height: 1.6;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  margin: 30px 0;
}

.big-num {
  display: block;
  font-size: clamp(34px, 6vw, 50px);
  font-weight: 660;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--accent);
  margin-bottom: 8px;
}

.verdict {
  border-radius: 12px;
  padding: 20px 22px 6px;
  margin: 30px 0;
  border: 1px solid var(--line-strong);
  background: var(--bg-soft);
}

.verdict.bad {
  border-color: color-mix(in srgb, var(--bad) 40%, var(--line));
  background: var(--bad-soft);
}

.verdict.warn {
  border-color: color-mix(in srgb, var(--warn) 40%, var(--line));
  background: var(--warn-soft);
}

.verdict.good {
  border-color: color-mix(in srgb, var(--ok) 40%, var(--line));
  background: var(--ok-soft);
}

.verdict-title {
  font-weight: 660;
  font-size: 16.5px;
  margin: 0 0 8px;
}

.verdict.bad .verdict-title {
  color: var(--bad);
}

.verdict.warn .verdict-title {
  color: var(--warn);
}

.verdict.good .verdict-title {
  color: var(--ok);
}

.verdict-body {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--muted);
}

.pill {
  display: inline-block;
  font-size: 12.5px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-soft);
  color: var(--muted);
  margin-right: 6px;
  white-space: nowrap;
}

.chips {
  list-style: none;
  padding: 0;
  margin: 22px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips li {
  margin: 0;
  font-size: 13.5px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
}

/* ---------- figure ---------- */

.fig {
  margin: 30px 0;
  padding: 0;
}

.fig-art {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  padding: 22px;
  overflow: hidden;
}

.fig-art svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.fig figcaption {
  font-size: 13.5px;
  color: var(--faint);
  margin-top: 12px;
  line-height: 1.7;
}

/* ---------- sources ---------- */

.sources {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 14px;
}

.sources li {
  margin-bottom: 10px;
  color: var(--muted);
}

.sources a {
  color: var(--fg);
}

.sources span {
  display: block;
  color: var(--faint);
  font-size: 13px;
}

/* ---------- 交互组件（计算器 / 滑块 / 模拟） ---------- */

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  padding: 22px 24px 24px;
  margin: 28px 0;
}

.panel-title {
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  margin: 0 0 18px;
}

.ctl {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 92px;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.ctl-label {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.ctl-val {
  font-size: 14.5px;
  font-weight: 620;
  text-align: right;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  margin: 0;
  cursor: grab;
}

input[type="range"]:active {
  cursor: grabbing;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 1px 4px rgb(0 0 0 / 25%);
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.out-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin-top: 20px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.out {
  background: var(--bg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}

.out-label {
  font-size: 12.5px;
  color: var(--faint);
  margin: 0 0 6px;
}

.out-val {
  font-size: 21px;
  font-weight: 640;
  letter-spacing: -0.02em;
  margin: auto 0 0;
  font-variant-numeric: tabular-nums;
}

.out-val.mono-sm {
  font-size: 17px;
}

.out.ok .out-val {
  color: var(--ok);
}

.out.bad .out-val {
  color: var(--bad);
}

.out.warn .out-val {
  color: var(--warn);
}

.chart {
  margin: 22px 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  padding: 14px 14px 8px;
}

.chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-cap {
  font-size: 13px;
  color: var(--faint);
  margin: 8px 2px 6px;
  line-height: 1.7;
}

.seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  margin: 0 0 18px;
}

.seg button {
  font: inherit;
  font-size: 13.5px;
  border: 0;
  background: var(--bg);
  color: var(--muted);
  padding: 7px 14px;
  cursor: pointer;
}

.seg button + button {
  border-left: 1px solid var(--line);
}

.seg button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ---------- home ---------- */

.hero {
  padding: 8px 0 44px;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
}

.hero-sub {
  font-size: 19px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 26px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 620;
  font-size: 15px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
}

.cta:hover {
  background: var(--accent);
  color: #fff;
}

.home-index {
  display: block;
  margin-top: 44px;
}

.home-index a {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  align-items: baseline;
}

.home-num {
  font-size: 12.5px;
  color: var(--faint);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.home-title {
  display: block;
  font-size: 18px;
  font-weight: 620;
  margin-bottom: 5px;
  transition: color 0.18s ease;
}

.home-index a:hover .home-title {
  color: var(--accent);
}

.home-desc {
  display: block;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.65;
}

/* ---------- pager ---------- */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}

.pager a {
  text-decoration: none;
  max-width: 46%;
}

.pager a:hover {
  color: var(--accent);
}

.pager-dir {
  display: block;
  font-size: 12px;
  color: var(--faint);
  margin-bottom: 4px;
  letter-spacing: 0.06em;
}

.pager-next {
  text-align: right;
}

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.foot-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 26px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  font-size: 13px;
  color: var(--faint);
}

/* ---------- 动画 ---------- */

/* 只在 JS 可用时才隐藏待入场元素，避免脚本失败导致正文不可见 */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

.reveal.d2 {
  transition-delay: 0.09s;
}

.reveal.d3 {
  transition-delay: 0.18s;
}

.draw {
  stroke-dasharray: var(--len, 600);
  stroke-dashoffset: var(--len, 600);
  transition: stroke-dashoffset 1.6s cubic-bezier(0.33, 0.7, 0.3, 1) 0.15s;
}

.in .draw,
.fig .draw.in {
  stroke-dashoffset: 0;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.82);
  }
}

.pulse {
  animation: pulse-dot 2.2s ease-in-out infinite;
  transform-origin: center;
}

@keyframes drift-up {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  18% {
    opacity: 1;
    transform: translateY(0);
  }
  82% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-14px);
  }
}

.fig .drift {
  animation: drift-up 3.6s ease-in-out infinite;
}

.fig .drift.two {
  animation-delay: 1.2s;
}

.fig .drift.three {
  animation-delay: 2.4s;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 32px 20px 72px;
  }

  .toc {
    position: static;
    min-width: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
  }

  .toc ol {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
  }

  .toc a {
    padding: 3px 0;
  }

  .shell-wide {
    padding: 40px 20px 72px;
  }

  .masthead-inner,
  .foot-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .flow {
    flex-direction: column;
  }

  .flow-col + .flow-col {
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .flow-arrow {
    justify-content: center;
    padding: 4px 0;
    transform: rotate(90deg);
  }

  .kv-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .bar-row {
    grid-template-columns: 100px minmax(0, 1fr) 56px;
    gap: 10px;
  }

  .ctl {
    grid-template-columns: 96px minmax(0, 1fr) 76px;
    gap: 10px;
  }

  .table-wrap {
    border-radius: 8px;
  }

  .home-index a {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .masthead,
  .toc,
  .pager,
  .seg,
  .foot {
    display: none;
  }

  .shell {
    display: block;
    padding: 0;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
