:root {
  color-scheme: light;
  --paper: #fbf8f1;
  --surface: #fffdf9;
  --ink: #282541;
  --indigo: #464278;
  --muted: #5e5a6e;
  --line: #ded7df;
  --peach: #f3c29e;
  font-family: system-ui, -apple-system, "PingFang TC", "Noto Sans CJK TC", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

:root:lang(zh-Hans) { font-family: system-ui, -apple-system, "PingFang SC", "Noto Sans CJK SC", sans-serif; }
:root:lang(ja) { font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans CJK JP", sans-serif; }
:root:lang(ko) { font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans CJK KR", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--indigo); text-underline-offset: .25em; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--indigo); outline-offset: 4px; border-radius: .15rem; }
.shell { width: min(100% - 3rem, 68rem); margin-inline: auto; }
.skip { position: absolute; top: .5rem; left: .5rem; padding: .75rem; background: var(--surface); }
.skip:not(:focus) { clip-path: inset(50%); }

.site-header, .site-footer { background: var(--surface); }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; flex-wrap: wrap; }
.header-inner { min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: .625rem; color: var(--ink); font-size: 1.25rem; font-weight: 750; text-decoration: none; }
.brand img { border-radius: .65rem; }
.documents { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.documents a { display: inline-flex; align-items: center; min-height: 2.75rem; border-bottom: 3px solid transparent; font-size: .9375rem; font-weight: 650; text-decoration: none; }
.documents a:hover { text-decoration: underline; }
.documents [aria-current] { border-bottom-color: var(--peach); color: var(--ink); }

.intro { padding: clamp(2.5rem, 8vw, 5rem) 0 1.75rem; }
h1 { margin: 0; color: var(--indigo); font-size: clamp(2.25rem, 6vw, 4rem); line-height: 1.15; letter-spacing: -.035em; }
.summary { max-width: 56ch; margin: 1rem 0; font-size: clamp(1.0625rem, 2.15vw, 1.25rem); line-height: 1.65; }
.date { margin: 0; color: var(--muted); font-size: .9375rem; }
.date time { margin-inline-start: .25em; }

.languages { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .5rem; padding: .875rem 0; border-block: 1px solid var(--line); font-size: .9375rem; }
.languages span { color: var(--muted); margin-inline-end: .375rem; }
.languages a { display: inline-flex; align-items: center; padding: .5rem .625rem; min-height: 2.25rem; border-radius: .375rem; }
.languages [aria-current] { background: var(--indigo); color: white; font-weight: 650; text-decoration: none; }

.reading-layout { display: grid; grid-template-columns: minmax(9rem, 1fr) minmax(0, 3fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding: 2rem 0 4rem; }
.contents { position: sticky; top: 1.5rem; border-inline-start: 2px solid var(--peach); padding-inline-start: 1rem; }
.contents p { margin: 0 0 .375rem; font-size: .9375rem; font-weight: 700; }
.contents ul { list-style: none; margin: 0; padding: 0; }
.contents a { display: inline-block; padding: .3rem 0; font-size: .9375rem; line-height: 1.5; }
article { background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; padding: 0 clamp(1.125rem, 4vw, 2.5rem); }
article section { padding: 1.65rem 0; scroll-margin-block-start: 1.25rem; }
article section + section { border-top: 1px solid var(--line); }
article h2 { color: var(--indigo); font-size: clamp(1.1875rem, 2.8vw, 1.5rem); line-height: 1.35; margin: 0 0 .75rem; }
article p { font-size: 1rem; line-height: 1.8; margin: 0; overflow-wrap: anywhere; }
article p + p { margin-top: .75rem; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 4.75rem; padding-block: 1rem; color: var(--muted); overflow-wrap: anywhere; }

@media (max-width: 44rem) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { padding-block-start: .625rem; }
  .reading-layout { grid-template-columns: minmax(0, 1fr); padding: 1.5rem 0 2.5rem; }
  .contents { position: static; }
  .contents ul { display: flex; flex-wrap: wrap; column-gap: 1rem; }
}

@media print {
  :root, article { background: white; color: black; }
  .site-header, .languages, .contents, .skip { display: none; }
  .shell { width: 100%; }
  .intro { padding: 0 0 1rem; }
  .reading-layout { display: block; padding: 0; }
  article { border: 0; padding: 0; }
  article h2 { break-after: avoid; }
}
