:root {
  color-scheme: light;
  --paper: #f6f2eb;
  --card: #fffdf8;
  --ink: #252219;
  --muted: #504b40;
  --line: #d7cfc0;
  --forest: #203b31;
  --accent: #e7fb8b;
  --rust: #a03325;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "STSong", SimSun, serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; font: 1rem/1.75 var(--sans); color: var(--ink); background: var(--paper); }
a { color: var(--forest); text-underline-offset: .19em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #9f3626; outline-offset: 4px; }
.frame { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.skip { position: absolute; clip-path: inset(50%); }
.skip:focus { clip-path: none; z-index: 5; background: white; padding: .5rem 1rem; }

.site-header, .site-footer { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding-block: .9rem; }
.site-header { border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); font-size: .92rem; font-weight: 760; text-decoration: none; }
.mark { width: .85rem; height: .85rem; border: 2px solid var(--rust); border-radius: 50%; position: relative; }
.mark::before { content: ""; position: absolute; inset: .17rem; border-radius: 50%; background: var(--rust); }
.download { font-size: .875rem; font-weight: 700; padding-block: .55rem; }
.hero { display: grid; gap: 1.6rem; padding-block: 2.6rem; }
.hero h1 { font: 800 clamp(2.75rem, 9vw, 5.7rem)/1.07 var(--serif); letter-spacing: -.06em; margin: .55rem 0 1rem; }
.eyebrow, .week-label { color: var(--rust); font-size: .88rem; font-weight: 750; letter-spacing: .07em; margin: 0; }
.intro { color: var(--muted); max-width: 32rem; }
.intro p { margin: 0 0 1.2rem; }
.start { display: inline-block; background: var(--forest); color: white; font-weight: 700; border-radius: .22rem; padding: .62rem 1.1rem; text-decoration: none; }
.start:hover { background: #344e3e; }
.hero-study { background: var(--forest); color: white; padding: 1.25rem 1.35rem; align-self: end; border-radius: .3rem; border-top: .35rem solid var(--accent); }
.routine-title { font-size: 1.2rem; font-weight: 750; color: var(--accent); margin: 0 0 .5rem; }
.routine { margin: 0; padding: 0; list-style: none; }
.routine li { display: flex; justify-content: space-between; align-items: baseline; gap: .7rem; padding: .52rem 0; border-bottom: 1px solid #ffffff40; }
.routine li strong { font-size: .875rem; white-space: nowrap; }
.routine-note { margin: .75rem 0 0; color: #f0f4e7; font-size: .9rem; }

.study-layout { display: grid; gap: 1.55rem; align-items: start; }
.contents { border-block: 1px solid var(--line); padding: .85rem 0 .6rem; }
.contents h2 { margin: 0 0 .3rem; font-size: 1.1rem; }
.contents ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: .8rem; padding: 0; margin: 0; list-style: none; }
.contents a { display: flex; align-items: baseline; gap: .4rem; color: var(--ink); font-size: .875rem; text-decoration: none; padding-block: .5rem; }
.contents a:hover { text-decoration: underline; }
.contents a span { color: var(--rust); font-weight: 750; font-variant-numeric: tabular-nums; }
.lessons { min-width: 0; }
.chapter { margin: 0 0 1.25rem; padding: 1.23rem; background: var(--card); border: 1px solid var(--line); border-radius: .3rem; overflow-wrap: anywhere; }
.chapter:target { border-color: var(--forest); box-shadow: inset 0 .25rem 0 var(--forest); }
.chapter h2 { margin: .15rem 0 .7rem; font: 800 clamp(1.6rem, 6vw, 2.5rem)/1.2 var(--serif); }
.chapter h3 { margin: 1.25rem 0 .35rem; font-size: 1.1rem; line-height: 1.45; }
.chapter p { margin: .65rem 0; }
.chapter ul, .chapter ol { padding-inline-start: 1.4rem; }
.chapter li + li { margin-top: .33rem; }
.chapter blockquote { margin: .9rem 0; padding: .35rem .75rem; background: #edf0df; border-inline-start: 3px solid var(--forest); }
.chapter blockquote p { margin: .25rem 0; }
details { margin: .85rem 0 .25rem; background: #f3eee4; border: 1px solid var(--line); padding: .58rem .78rem; border-radius: .24rem; }
summary { cursor: pointer; font-weight: 750; color: var(--forest); }
summary::marker { color: var(--rust); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }

@media (min-width: 48rem) {
  .frame { width: min(100% - 5rem, 70rem); }
  .hero { grid-template-columns: 1.35fr 1fr; align-items: end; padding-block: 3.7rem; }
  .hero-study { padding: 1.65rem; }
  .study-layout { grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr); gap: 1.65rem; }
  .contents { position: sticky; top: 1rem; padding-block: 1rem; }
  .contents ol { grid-template-columns: 1fr; }
  .chapter { padding: 2rem; }
}

@media print {
  body { background: white; }
  .frame { width: 100%; }
  .site-header, .site-footer, .contents, .start { display: none; }
  .hero, .study-layout { display: block; }
  .hero-study { background: white; color: black; border: 1px solid black; }
  .routine-title, .routine-note { color: black; }
}
