@font-face {
  font-family: "Playfair Display";
  src: url("PlayfairDisplay.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}
:root {
  color-scheme: light dark;
  --paper: light-dark(#f8f5eb, #222223);
  --sheet: light-dark(#fffdf7, #2b2a2b);
  --ink: light-dark(#2d2928, #f1ece3);
  --muted: light-dark(#625d58, #c0bab2);
  --plum: light-dark(#644b65, #d4b9d6);
  --leaf: light-dark(#42573c, #c0ceb4);
  --gilt: light-dark(#b6a178, #95866c);
  --line: light-dark(#d6cfc5, #504b4b);
  --wash: light-dark(#eeebe4, #292829);
  --inverse: light-dark(#fffaf4, #282329);
  --serif: "Playfair Display", "Songti SC", "Noto Serif CJK SC", SimSun, Georgia, serif;
  --sans: system-ui, "Microsoft YaHei", sans-serif;
}
:root[data-appearance="light"] { color-scheme: light; }
:root[data-appearance="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.7 var(--sans); }
.wrap { width: min(1136px, calc(100% - 80px)); margin-inline: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--plum); }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 4px; }
.skip { position: absolute; left: 10px; top: -6rem; padding: 8px 14px; background: var(--sheet); z-index: 10; }
.skip:focus { top: 8px; }
header { position: relative; }
header::after, .journal-band::before, .resources::before, footer::before {
  content: ""; position: absolute; inset: auto 0 -6px; height: 13px;
  background: url("wave.svg") repeat-x center; pointer-events: none;
}
.mast, footer > div, .actions, .selectors, .selectors > div { display: flex; align-items: center; }
.mast { min-height: 76px; gap: 40px; }
.brand { display: inline-flex; align-items: center; gap: 18px; font: 700 34px/1 var(--serif); letter-spacing: -.045em; }
.mast nav { margin-left: auto; display: flex; gap: 30px; }
.mast nav, .language, footer { font-size: 14px; }
.language { padding-left: 20px; border-left: 1px solid var(--line); }
h1,h2,h3,p,figure { margin: 0; }
h1,h2,h3 { font-family: var(--serif); text-wrap: balance; }
.hero { display: grid; grid-template-columns: minmax(0,1fr) minmax(120px,30%); gap: 24px; align-items: center; padding-block: clamp(38px,5vw,72px); }
.hero h1 { font-size: clamp(42px,5.3vw,76px); letter-spacing: -.045em; line-height: 1.14; }
.app-mark { display: block; width: min(80%,220px); height: auto; justify-self: center; }
.actions { gap: 25px; flex-wrap: wrap; margin-top: 31px; }
.button { display: inline-flex; gap: 18px; align-items: center; border: 1px solid var(--gilt); border-radius: 999px; background: var(--leaf); color: var(--inverse); padding: 11px 24px; font: 600 16px/1.6 var(--serif); }
.button:hover { color: var(--inverse); filter: brightness(1.12); }
.button-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.button-secondary:hover { background: var(--wash); color: var(--ink); border-color: var(--gilt); filter: none; }
.button span { font-size: 19px; }
.text-link { display: inline-block; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--line); }
.journal-band { position: relative; background: var(--wash); border-radius: 45% 12% 0 0 / 12px 6px 0 0; }
.journal-band::before, .resources::before, footer::before { inset: -6px 0 auto; }
.journal-feature { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(20px,4vw,55px); padding-block: 34px; }
.journal-feature a { display: grid; grid-template-columns: 35% 1fr; align-items: center; gap: 18px; }
.paper-thumb { height: clamp(90px,9vw,136px); overflow: hidden; border-radius: 26px 12px; border: 1px solid var(--line); background: white; }
.paper-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.journal-feature h2 { font-size: clamp(20px,2.1vw,31px); line-height: 1.4; }
.gallery h2, .resources h2 { font-size: clamp(28px,3.2vw,44px); letter-spacing: -.045em; line-height: 1.3; }
.gallery, .resources { padding-block: clamp(38px,6vw,78px); }
.selectors { flex-wrap: wrap; justify-content: space-between; gap: 15px; margin: 22px 0 13px; }
.selectors[hidden] { display: none; }
.selectors > div { gap: 4px; flex-wrap: wrap; }
.selectors button { font: inherit; font-size: 14px; padding: 5px 12px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 22px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.selectors button[aria-pressed=true] { background: var(--sheet); border-color: var(--line); color: var(--ink); }
.selectors i { width: 10px; height: 10px; border-radius: 50%; }
.iris { background: #8b6db5; } .celadon { background: #49857b; } .coral { background: #a6666d; }
.screen { border: 1px solid var(--gilt); border-radius: clamp(14px,2.5vw,32px); padding: clamp(3px,.65vw,8px); overflow: hidden; background: var(--sheet); }
.screen a { display: block; border-radius: inherit; overflow: hidden; }
.screen img { display: block; width: 100%; height: auto; }
.resources { position: relative; }
.support { max-width: 620px; margin-bottom: 44px; padding: 18px 24px; border: 1px solid var(--line); border-radius: 20px 10px; background: var(--sheet); scroll-margin-top: 20px; text-align: center; }
.support h2 { font-size: 22px; line-height: 1.4; }
.support p { margin-block: 4px 8px; font-size: 14px; color: var(--muted); }
.support figure a { display: block; width: min(100%, 320px); margin: 14px auto 8px; }
.support figure img { display: block; width: 100%; height: auto; }
.support figcaption { font-size: 14px; color: var(--muted); }
.resource-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; margin-top: 25px; }
.resource-grid a { border: 1px solid var(--line); border-radius: 28px 12px 28px 12px; padding: 22px 24px; background: var(--sheet); }
.reading-layout { display: grid; grid-template-columns: 205px minmax(0,740px); gap: clamp(35px,6vw,96px); align-items: start; padding-block: 50px 84px; }
aside { border-right: 1px solid var(--line); padding-right: 20px; }
aside summary { font: 600 18px var(--serif); margin-bottom: 15px; cursor: pointer; }
aside a { display: block; padding: 3px 9px; font-size: 14px; color: var(--muted); }
aside a[aria-current] { border-left: 2px solid var(--plum); color: var(--plum); font-weight: 700; }
article { overflow-wrap: anywhere; }
.journal-film { display: block; width: 100%; height: auto; border-radius: 12px; }
article h1 { font-size: clamp(36px,5vw,61px); line-height: 1.15; letter-spacing: -.045em; margin: 17px 0 28px; }
article h2 { font-size: 28px; margin: 34px 0 12px; }
article h3 { font-size: 21px; }
article > p, article ol, article ul { margin-block: 13px; font: 17px/1.85 var(--serif); }
article > p a, article li a { text-decoration: underline; text-underline-offset: .2em; color: var(--plum); }
article blockquote { border-left: 2px solid var(--plum); margin: 20px 0; padding: 10px 20px; background: var(--wash); }
article pre { overflow: auto; background: var(--wash); border: 1px solid var(--line); padding: 16px; border-radius: 5px; }
article code { font: .88em/1.6 ui-monospace,Consolas,monospace; }
article .gallery { padding-block: 12px; }
article table { width: 100%; border-collapse: collapse; margin-block: 18px; font: 15px/1.65 var(--serif); }
article th, article td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
article th { font-weight: 600; }
article p img, article td img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 14px; }
article p:has(> img), article p:has(> a > img) { margin-block: 22px; }
.poem { margin: 26px auto; max-width: 551px; }
.poem img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 20px; }
.search div { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; padding: 8px 18px; font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--line); border-radius: 999px; }
.search button { border: 0; cursor: pointer; white-space: nowrap; }
footer { position: relative; }
footer > div { min-height: 88px; gap: 22px; flex-wrap: wrap; }
footer .brand { font-size: 27px; } footer span { margin-right: auto; color: var(--muted); }
.site-appearance { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.site-appearance[hidden] { display: none; }
.site-appearance button { color: var(--muted); font: inherit; font-size: 13px; white-space: nowrap; background: transparent; border: 0; border-radius: inherit; padding: 5px 9px; cursor: pointer; }
.site-appearance button[aria-pressed=true] { background: var(--ink); color: var(--paper); }
.mast { gap: clamp(12px,2.5vw,34px); }
@media(max-width:900px) {
  .wrap { width: calc(100% - 36px); }
  .mast { gap: 12px; flex-wrap: wrap; padding-block: 12px 9px; }
  .brand { font-size: 29px; }
  .mast nav { order: 3; width: 100%; flex-wrap: wrap; gap: 4px 16px; margin: 0; }
  .site-appearance { margin-left: auto; }
  .language { padding-left: 0; border: 0; }
  .resource-grid { grid-template-columns: 1fr; gap: 12px; }
  .reading-layout { grid-template-columns: minmax(0,1fr); padding-block: 25px 45px; gap: 24px; }
  aside { order: 2; border: 0; border-top: 1px solid var(--line); padding: 25px 0 0; }
  footer > div { gap: 12px; }
}
@media(max-width:600px) {
  .hero { grid-template-columns: minmax(0,1fr) 25%; gap: 10px; padding-block: 32px; }
  .hero h1 { font-size: clamp(28px,7.4vw,44px); }
  .hero-copy { display: contents; }
  .app-mark { grid-column: 2; grid-row: 1; width: 100%; }
  .actions { grid-column: 1 / -1; gap: 12px; margin-top: 6px; }
  .actions .button { gap: 8px; padding-inline: 14px; }
  .journal-feature { grid-template-columns: 1fr; gap: 16px; padding-block: 22px; }
  .journal-feature a { grid-template-columns: 32% 1fr; }
  .paper-thumb { height: 72px; }
  .selectors { gap: 6px; } .selectors button { font-size: 12px; padding: 5px 7px; }
  .site-appearance button { padding: 5px 7px; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .button, .resource-grid a, .selectors button {
    transition: color .5s ease-in-out, border-color .5s ease-in-out, background-color .5s ease-in-out;
  }
  .button span { transition: transform .5s ease-in-out; }
  .button:hover span { transform: translateY(2px); }
  .resource-grid a:hover { border-color: var(--gilt); }
}
