
:root {
  color-scheme: light;
  --ink: #18202a;
  --muted: #66717f;
  --line: #d9e0e8;
  --paper: #fbfcfd;
  --band: #eef4f7;
  --accent: #176b68;
  --accent-2: #b06b21;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.72;
}
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.nav { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.nav-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-size: 14px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.shell { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.hero {
  min-height: 76vh;
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(12, 35, 42, .86), rgba(12, 35, 42, .56)),
    url('assets/hero.svg');
  background-size: cover;
  background-position: center;
  color: white;
}
.hero h1 { font-size: clamp(40px, 7vw, 82px); line-height: 1.06; margin: 0 0 22px; letter-spacing: 0; max-width: 980px; }
.hero p { font-size: 20px; max-width: 760px; color: rgba(255,255,255,.88); margin: 0 0 28px; }
.eyebrow { font-size: 13px; letter-spacing: 0; color: rgba(255,255,255,.78); margin-bottom: 14px; font-weight: 700; }
.subtitle { font-size: 22px; max-width: 820px; color: rgba(255,255,255,.9); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; min-height: 42px; padding: 9px 15px; border: 1px solid rgba(255,255,255,.42); color: white; background: rgba(255,255,255,.1); }
.button.dark { color: var(--ink); border-color: var(--line); background: white; }
.btn { display: inline-flex; align-items: center; min-height: 42px; padding: 9px 15px; border: 1px solid var(--line); background: white; color: var(--ink); }
.btn.primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn.secondary { background: white; color: var(--accent); }
.band { padding: 52px 0; background: var(--band); }
.section { padding: 52px 0; }
.centerline { border-left: 5px solid var(--accent); background: white; padding: 22px 24px; margin: 0 0 28px; font-size: 20px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.item { border: 1px solid var(--line); background: white; padding: 18px; min-height: 132px; }
.card { border: 1px solid var(--line); background: white; padding: 20px; }
.item h3 { margin: 0 0 8px; font-size: 18px; }
.item p { margin: 0; color: var(--muted); font-size: 14px; }
.toc-grouped { display: grid; gap: 22px; }
.toc-part { border: 1px solid var(--line); background: white; padding: 20px; }
.toc-part h2 { margin: 0 0 12px; font-size: 22px; }
.toc-list { display: grid; gap: 8px; }
.toc-item { display: block; padding: 12px 14px; border: 1px solid var(--line); background: #f9fbfc; color: var(--ink); }
.toc-item small { color: var(--accent-2); font-weight: 800; }
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 34px; padding: 28px 24px 60px; max-width: 1180px; margin: 0 auto; }
.sidebar { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow: auto; padding: 22px 0; border-right: 1px solid var(--line); }
.sidebar h2 { font-size: 16px; margin: 0 18px 14px 0; }
.search { width: calc(100% - 18px); min-height: 38px; border: 1px solid var(--line); padding: 8px 10px; margin: 0 18px 14px 0; font-size: 14px; }
.side-part-title { margin: 18px 18px 6px 0; font-size: 13px; color: var(--accent-2); font-weight: 800; }
.sidebar a { display: block; padding: 7px 16px 7px 0; color: var(--muted); font-size: 14px; }
.sidebar a.active { color: var(--accent); font-weight: 700; }
.article { max-width: 820px; }
.article h1 { font-size: 34px; line-height: 1.18; margin: 28px 0 24px; }
.article h2 { font-size: 24px; margin: 34px 0 12px; border-top: 1px solid var(--line); padding-top: 24px; }
.article h3 { font-size: 19px; margin: 24px 0 10px; }
.article p, .article li { font-size: 18px; }
.article blockquote { border-left: 4px solid var(--accent); margin: 20px 0; padding: 8px 18px; background: #eef7f6; color: #29484b; }
.article-nav { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 42px; padding-top: 20px; }
.tool-btn { min-height: 34px; min-width: 34px; padding: 5px 9px; border: 1px solid var(--line); background: white; color: var(--ink); font-weight: 700; cursor: pointer; }
.tool-btn:hover { border-color: var(--accent); color: var(--accent); }
.swatch { width: 28px; min-width: 28px; padding: 0; border-radius: 50%; }
.swatch.yellow { background: #ffe45c; }
.swatch.green { background: #85e0a3; }
.swatch.blue { background: #cce7ff; }
.swatch.pink { background: #ffd3df; }
.mark-yellow { background: #ffe45c; box-shadow: 0 0 0 2px rgba(255,228,92,.28); }
.mark-green { background: #85e0a3; box-shadow: 0 0 0 2px rgba(133,224,163,.24); }
.mark-blue { background: #cce7ff; }
.mark-pink { background: #ffd3df; }
.mark-underline { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.mark-wavy { text-decoration-line: underline; text-decoration-style: wavy; text-decoration-color: #b06b21; text-underline-offset: 4px; }
.mark-strike { text-decoration: line-through; text-decoration-thickness: 2px; }
.mark-red { color: #b42318; font-weight: 700; }
.mark-teal { color: #176b68; font-weight: 700; }
.mark-note { background: #fff7cc; border-bottom: 2px dotted #b06b21; }
.mark-note::after { content: "✎"; color: #b06b21; font-size: .78em; font-weight: 800; margin-left: 2px; vertical-align: super; }
.selection-menu { position: fixed; display: none; align-items: center; gap: 6px; z-index: 40; padding: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.98); box-shadow: 0 12px 30px rgba(24,32,42,.18); backdrop-filter: blur(10px); }
.selection-menu.show { display: flex; }
.selection-menu .tool-btn { min-height: 32px; min-width: 32px; padding: 4px 8px; font-size: 13px; }
.selection-menu .swatch { width: 24px; min-width: 24px; height: 24px; }
.selection-menu .delete-mark { color: #b42318; border-color: #f3b4ac; }
.selection-menu .note-mark { color: #b06b21; border-color: #e7c28f; }
.topbar { border-bottom: 1px solid var(--line); background: white; }
.topbar .shell { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-weight: 800; color: var(--ink); }
.footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); font-size: 14px; }
@media (max-width: 860px) {
  .grid, .grid.three { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; padding: 18px 18px 44px; }
  .sidebar { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .article h1 { font-size: 28px; }
  .article p, .article li { font-size: 17px; }
}
