:root {
  color-scheme: light;
  --paper: #f7f5ee;
  --ink: #182c27;
  --quiet: #50625a;
  --leaf: #28594a;
  --pink: #f4beaa;
  --line: #d8dbce;
  font-family: "Instrument Sans", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body, p, h1, h2, h3, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, input:focus-visible { outline: 2px solid #a43e22; outline-offset: 4px; }
.wrap { width: min(1120px, calc(100% - 64px)); margin: auto; }
.skip { position: fixed; z-index: 2; top: 12px; left: 12px; padding: 12px; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }
.top { min-height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark, .top nav { display: flex; align-items: center; gap: 12px; }
.wordmark { font-weight: 800; letter-spacing: .055em; }
.mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: var(--ink); color: white; font-size: 19px; }
.top nav { gap: 30px; color: var(--quiet); font-size: 14px; }
.top nav a:hover, .footer a:hover { color: var(--leaf); text-decoration: underline; text-underline-offset: 5px; }
.hero { display: grid; grid-template-columns: 1fr 1.02fr; gap: 42px; align-items: center; padding: 65px 0 69px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--leaf); font-size: 13px; font-weight: 750; letter-spacing: .10em; }
.eyebrow span { display: inline-block; width: 20px; height: 1px; background: currentColor; }
h1 { margin: 13px 0 21px; font-size: clamp(48px, 7.1vw, 96px); line-height: 1.12; letter-spacing: -.07em; font-weight: 900; }
h1 span { color: #a7442a; padding-left: .09em; }
.intro { max-width: 330px; color: var(--quiet); line-height: 1.9; font-size: 17px; }
.hero-action { display: inline-flex; gap: 21px; align-items: center; margin-top: 28px; padding: 13px 17px; border-radius: 5px; background: var(--ink); color: white; font-size: 14px; font-weight: 750; }
.hero-action:hover { background: var(--leaf); }
.hero-art { overflow: hidden; border-radius: 12px; background: #173b33; color: #e5ecdf; }
.hero-art canvas { display: block; width: 100%; height: auto; }
.hero-art figcaption { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid #416055; padding: 13px 19px; font-size: 12px; letter-spacing: .06em; }
.library { background: #eeefe6; border-block: 1px solid var(--line); padding: 55px 0 65px; }
#resources, .volume { scroll-margin-top: 22px; }
.library-head, .volume-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.library-head { margin-bottom: 34px; }
h2 { font-size: clamp(32px, 5vw, 49px); margin-top: 7px; letter-spacing: -.06em; }
.search { position: relative; width: min(300px, 100%); }
.search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.search svg { position: absolute; width: 20px; top: 12px; left: 12px; color: var(--leaf); pointer-events: none; }
.search input { width: 100%; padding: 11px 13px 11px 39px; font: inherit; color: var(--ink); background: #fafaf5; border: 1px solid #a9b8ab; border-radius: 6px; min-height: 44px; }
.results { margin: -13px 0 25px; color: var(--quiet); }
.volume + .volume { margin-top: 36px; }
.volume-head { justify-content: flex-start; border-bottom: 1px solid #cbd2c4; padding-bottom: 12px; margin-bottom: 15px; }
.volume-head h3 { font-size: 17px; }
.book { background: #dbe6d9; color: #244c3d; padding: 5px 9px; border-radius: 4px; font-size: 12px; font-weight: 800; }
.second .book { background: #f1dbca; color: #683c2a; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.lesson { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid #d4dacd; border-radius: 8px; background: #fbfaf5; }
.lesson-art { display: grid; place-items: center; height: 88px; color: #3b6251; background-color: #e2ebe0; background-image: linear-gradient(#557e641c 1px, transparent 1px), linear-gradient(90deg, #557e641c 1px, transparent 1px); background-size: 16px 16px; background-position: center; }
.lesson:nth-child(even) .lesson-art { background-color: #f4e4d4; color: #915139; background-image: linear-gradient(#985d4218 1px, transparent 1px), linear-gradient(90deg, #985d4218 1px, transparent 1px); }
.lesson-art svg { width: 61px; }
.lesson-content { padding: 15px 15px 18px; flex: 1; }
.unit, .desc { color: var(--quiet); }
.unit { font-size: 12px; font-weight: 700; }
.lesson h3 { font-size: 19px; margin: 4px 0 10px; line-height: 1.4; }
.case { font-size: 13px; color: var(--leaf); font-weight: 800; margin-bottom: 5px; }
.desc { font-size: 13px; line-height: 1.7; }
.lesson-files { padding: 0 12px 11px; }
.file-link { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 53px; border-top: 1px solid #dce1d5; padding: 5px 3px; }
.file-link strong, .file-link small { display: block; line-height: 1.55; }
.file-link strong { font-size: 12px; }
.file-link small { color: var(--quiet); font-size: 11px; }
.download-btn { display: inline-flex; align-items: center; gap: 4px; padding: 7px 6px; border-radius: 4px; background: #e4ede2; color: #224d3c; white-space: nowrap; font-size: 12px; font-weight: 800; }
.download-btn svg { width: 15px; }
.file-link:hover .download-btn, .file-link:focus-visible .download-btn { background: #28594a; color: white; }
.footer { padding: 24px 0; display: flex; justify-content: space-between; gap: 12px; color: var(--quiet); font-size: 13px; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 690px) {
  .wrap { width: calc(100% - 36px); }
  .top { min-height: 60px; }
  .top nav { gap: 14px; }
  .hero { grid-template-columns: 1fr; gap: 25px; padding: 38px 0; }
  h1 { margin-bottom: 12px; }
  .hero-action { margin-top: 20px; }
  .library { padding: 36px 0 40px; }
  .library-head { align-items: flex-start; flex-direction: column; margin-bottom: 24px; }
}
@media (max-width: 460px) { .grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
