@font-face {
  font-family: ArchiveSerif;
  src: url("assets/type/serif.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: ArchiveBrush;
  src: url("assets/type/brush.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f6f2e9;
  --navy: #172e4d;
  --blue: #153e67;
  --red: #a53b27;
  --muted: #53574f;
  --rule: #c8c4b8;
  --standard-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --display: ArchiveSerif, var(--standard-serif);
  --sans: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--navy); font: 16px/1.65 var(--sans); }
body::before {
  content: ""; position: fixed; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 10% 10%, #fffaf0, transparent 49%), radial-gradient(ellipse at 90% 44%, #eee9df, transparent 65%);
}
button, a { -webkit-tap-highlight-color: transparent; color: inherit; font: inherit; }
button { cursor: pointer; }
button, a, figure, h1, h2, p { margin: 0; }
a { text-decoration: none; }
button { background: none; border: 0; }
img { display: block; max-width: 100%; }
::selection { color: #fff; background: #8b402e; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }
.wrap { width: min(1264px, 88%); margin-inline: auto; }
.skip { position: fixed; left: 1rem; top: -5rem; z-index: 10; padding: .6rem 1.3rem; background: var(--navy); color: white; }
.skip:focus { top: .5rem; }

.brand, .page-footer, .ink-link, .print-button { display: flex; align-items: center; }
.brand { gap: 13px; font: 800 22px/1.15 var(--display); letter-spacing: .10em; }
.book-mark { width: 27px; height: 29px; position: relative; display: inline-block; transform: rotate(-5deg); }
.book-mark::before, .book-mark::after {
  content: ""; position: absolute; width: 13px; height: 22px; top: 3px; border: 2px solid var(--navy); background: var(--paper);
}
.book-mark::before { left: 1px; transform: skewY(14deg); border-right-width: 1px; }
.book-mark::after { top: 3px; left: 13px; transform: skewY(-18deg); border-color: var(--red); }
.nav-link { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0; font-size: 14px; font-weight: 600; letter-spacing: .06em; }
.nav-link::after, .ink-link::after { content: ""; position: absolute; bottom: 5px; left: 0; right: 0; height: 1px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.nav-link:focus-visible::after, .ink-link:focus-visible::after { transform: scaleX(1); }

.print-button {
  position: relative; isolation: isolate; justify-content: center; gap: 23px; width: fit-content; min-height: 46px;
  padding: 11px 22px; color: #fffaf0; background: var(--navy); border: 1px solid var(--navy);
  font-size: 14px; font-weight: 600; letter-spacing: .075em;
  box-shadow: 3px 3px 0 var(--paper), 4px 4px 0 #536173; transition: transform .22s ease, box-shadow .22s ease;
}
.print-button::before { content: ""; position: absolute; z-index: -1; inset: -1px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .32s cubic-bezier(.2,.75,.25,1); }
.print-button:focus-visible::before { transform: scaleX(1); }
.print-button:active { transform: translate(3px,3px); box-shadow: 0 0 transparent; }
.ink-link { width: fit-content; min-height: 44px; position: relative; gap: 12px; font-size: 14px; font-weight: 600; }
.ink-link::after { bottom: 4px; background: currentColor; }
.arrow { --angle: 0deg; position: relative; display: inline-block; flex: 0 0 18px; width: 18px; height: 1px; background: currentColor; transform: rotate(var(--angle)); transition: transform .25s ease; }
.arrow::after { content: ""; display: block; position: absolute; width: 7px; height: 7px; right: 0; top: -3px; transform: rotate(45deg); border-right: 1px solid; border-top: 1px solid; }
.arrow.down { --angle: 90deg; width: 14px; flex-basis: 14px; }
.arrow.up { --angle: -90deg; width: 14px; flex-basis: 14px; }
.arrow.diagonal { --angle: -45deg; }


.page-footer { justify-content: space-between; border-top: 1px solid var(--rule); color: var(--muted); padding-block: 17px; font-size: 13px; }
.page-footer .ink-link { font-size: 12px; }

dialog { --spread-width: 890px; position: fixed; inset: 0; width: min(var(--spread-width),92vw); max-width: none; max-height: 88vh; max-height: 88dvh; padding: 0; background: var(--paper); color: var(--navy); border: 1px solid #b8b2a6; overflow: auto; box-shadow: 0 25px 90px #11192752; }
body:has(dialog[open]) { overflow: hidden; }
dialog::backdrop { background: #172538a3; }
.folio-layout { display: grid; grid-template-columns: .65fr 1fr; min-height: 490px; }
.folio-art { position: relative; background: #203d54; }
.folio-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.folio-page { position: relative; background: var(--paper); }
.folio-content { padding: 57px clamp(23px,3.6vw,54px) 40px; }
.close-button { position: absolute; right: 9px; top: 9px; width: 44px; height: 44px; display: grid; place-items: center; z-index: 1; font: 30px/1 Georgia,serif; }
.close-button span { display: block; transition: transform .26s ease; }
#folio-title { font: 800 clamp(26px,3vw,44px)/1.32 var(--display); margin: 9px 0 17px; }
#folio-title:focus { outline: none; }
#folio-intro { color: var(--muted); line-height: 1.85; }
#folio-details { margin: 22px 0 26px; font-size: 14px; }
#folio-details :is(ul,ol,dl) { padding: 0; margin: 0; list-style: none; }
#folio-details :is(li,dt) { border-top: 1px solid var(--rule); padding-top: 8px; }
#folio-details li { padding-bottom: 8px; }
#folio-details li span { display: block; color: var(--muted); margin-top: 2px; }
#folio-details strong, #folio-details dt { color: var(--blue); font-weight: 650; }
#folio-details dd { margin: 3px 0 12px; color: var(--muted); }
#folio-next { gap: 12px; font-size: 13px; }
@media (hover:hover) and (pointer:fine) {
  .nav-link:hover::after, .ink-link:hover::after, .print-button:hover::before { transform: scaleX(1); }
  .print-button:hover .arrow, .ink-link:hover .arrow { transform: rotate(var(--angle)) translateX(3px); }
  .close-button:hover span { transform: rotate(90deg); }
}
@media (max-width: 870px) {
  .wrap { width: 90%; }
  .print-button { padding-inline: 17px; gap: 15px; }
}
@media (max-width: 660px) {
  .brand { font-size: 18px; gap: 8px; }
  .nav-link { font-size: 12px; }
  .folio-layout { display: block; min-height: 0; }
  .folio-art { height: clamp(95px,19dvh,175px); }
  .folio-content { padding: 24px 22px 27px; }
  .close-button { position: sticky; float: right; margin-right: 3px; top: 3px; background: var(--paper); }
  #folio-intro { font-size: 15px; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
