:root {
  color-scheme: light;
  --page: #fff;
  --white: #fff;
  --ink: #171717;
  --body: #333;
  --muted: #565656;
  --border: #dfdfdf;
  --accent: #24488f;
  --accent-strong: #234581;
  --accent-wash: #f5f5f5;
  --good: #17613e;
  --good-wash: #e5f3e9;
  --frame-width: min(54rem, 100% - 2.2rem);
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--page);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.5; }
body:has(dialog[open]) { overflow: hidden; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { color: var(--ink); background: #dce5fc; }
.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  z-index: 3;
  top: .75rem;
  left: .75rem;
  padding: .65rem .9rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: .4rem;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.site-header-inner {
  width: var(--frame-width);
  min-height: 3.2rem;
  margin-inline: auto;
  padding-bottom: .45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-bottom: 1px solid var(--border);
}
.site-name {
  color: var(--ink);
  font-size: clamp(1.34rem, 3vw, 1.63rem);
  font-weight: 720;
  letter-spacing: -.035em;
  text-decoration: none;
}
.menu-button, .primary-button, .secondary-button, .read-button, .close-button {
  display: inline-flex;
  width: fit-content;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .54rem .95rem;
  border: 1px solid transparent;
  border-radius: .35rem;
  font-size: .94rem;
  font-weight: 660;
  line-height: 1.25;
  text-decoration: none;
}
.primary-button { color: var(--white); background: var(--accent); }
.primary-button:hover { color: var(--white); background: var(--accent-strong); }
.menu-button {
  gap: .45rem;
  padding: .35rem 0 .35rem .45rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: .85rem;
}
.menu-button:hover { text-decoration: underline; }
.site-header--sticky {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  pointer-events: none;
}
.site-header--sticky .site-header-inner { transition: border-color .2s ease; }
.site-header--sticky :is(.site-name, .menu-button) { pointer-events: auto; }
.site-header--sticky .site-name { opacity: var(--site-logo-opacity, 1); }
.site-header--sticky .menu-button {
  border: 1px solid transparent;
  transition: padding-inline .2s ease, border-color .2s ease, border-radius .2s ease,
    background-color .2s ease, box-shadow .2s ease;
}
.site-header--compact .site-header-inner { border-color: transparent; }
.site-header--logo-hidden .site-name {
  visibility: hidden;
  pointer-events: none;
}
.site-header--compact .menu-button {
  padding-inline: .75rem;
  border-color: var(--border);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 2px 6px rgb(0 0 0 / 8%);
}
@media (prefers-reduced-motion: reduce) {
  .site-header--sticky :is(.site-header-inner, .menu-button) { transition: none; }
  .site-header--sticky .site-name { opacity: 1; }
}
.burger { display: flex; width: 1rem; flex-direction: column; gap: .19rem; }
.burger i { display: block; height: 2px; background: currentColor; border-radius: 2px; }
.burger i:last-child { width: .66rem; }
.menu-count { display: none; }
.secondary-button, .read-button { color: var(--accent-strong); background: transparent; border-color: var(--border); }
.secondary-button:hover, .read-button:hover { background: var(--accent-wash); }

.main-content:focus, .article h1:focus, .home h1:focus { outline: none; }
.home {
  width: var(--frame-width);
  margin: 1.4rem auto 3rem;
}
.home-intro { padding-bottom: .95rem; }
.home-intro h1 {
  margin: 0;
  font: 700 clamp(1.93rem, 4.5vw, 2.65rem)/1.12 var(--sans);
  letter-spacing: -.038em;
  overflow-wrap: break-word;
  text-wrap: pretty;
}
.home-intro-body > p, #home-answer {
  max-width: 54ch;
  margin: .55rem 0 .14rem;
  color: var(--body);
  line-height: 1.55;
}
.home-intro-actions, .hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .1rem 1.3rem;
  margin-top: .2rem;
}
.home-intro-actions > a, .hero-actions > *, #home-open-contents {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: .35rem 0;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font-size: .91rem;
  font-weight: 630;
  text-decoration: underline;
  text-underline-offset: .23em;
}
.home-intro-actions > .home-intro-about, #shuffle-question {
  color: var(--muted);
  font-weight: 520;
}
.home-intro-actions > a:hover, .hero-actions > *:hover, #home-open-contents:hover {
  color: var(--ink);
  text-decoration-thickness: 2px;
}
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  padding-block: 1.2rem 1.55rem;
  border-top: 1px solid var(--border);
}
.eyebrow {
  margin: 0 0 .53rem;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
}
.question-copy h2, .home-index h2 {
  margin: 0;
  font: 690 clamp(1.48rem, 3.35vw, 2rem)/1.18 var(--sans);
  letter-spacing: -.026em;
  overflow-wrap: break-word;
  text-wrap: pretty;
}
.question-copy h2 a {
  color: inherit;
  text-decoration-color: #9c9c9c;
  text-decoration-thickness: 1px;
}
.question-copy h2 a:is(:hover, :focus-visible) {
  color: var(--accent-strong);
  text-decoration-color: currentColor;
}
.hero-figure { min-width: 0; margin: 0; }
.hero-figure img { display: block; width: 100%; height: auto; }
.hero-figure figcaption {
  margin-top: .4rem;
  color: var(--muted);
  font: .81rem/1.35 var(--sans);
}
.hero-figure figcaption a, .article-figure figcaption a { color: inherit; }
.home-index {
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}
.home-index .reading-progress { margin: .45rem 0 0; }
#home-open-contents { margin-top: .28rem; }
.home-blocks {
  padding: 0;
  margin: .58rem 0 0;
  list-style: none;
}
.home-blocks li { position: relative; padding: .35rem 0; border-top: 1px solid var(--border); }
.home-blocks li:last-child { border-bottom: 1px solid var(--border); }
.home-section-trigger, .contents-all-sections {
  padding: 0;
  color: var(--accent);
  border: 0;
  background: transparent;
  text-align: start;
  text-decoration: underline;
  text-underline-offset: .18em;
}
.home-section-trigger { margin: 0; font-size: .94rem; font-weight: 700; }
.home-section-trigger::after { content: ""; position: absolute; inset: 0; }
.home-section-trigger:hover, .contents-all-sections:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
.contents-all-sections { min-height: 2.65rem; margin: -.45rem 0 .45rem; }

.contents {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(100%, 30rem);
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  padding: clamp(1.15rem, 4vw, 1.8rem);
  border: 0;
  color: var(--ink);
  background: var(--page);
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: -1rem 0 4rem #17244925;
}
.contents::backdrop { background: #121b36a3; }
.drawer-header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.drawer-header h2 { margin: 0; font: 700 2rem/1.12 var(--serif); }
.reading-progress { margin: .25rem 0 0; color: var(--muted); font-size: .94rem; font-variant-numeric: tabular-nums; }
.close-button {
  min-width: 2.8rem;
  padding: 0;
  border-color: var(--border);
  color: var(--ink);
  background: var(--white);
  font-size: 1.55rem;
  font-weight: 500;
}
.close-button:hover { background: var(--accent-wash); }
.article-search {
  width: 100%;
  min-height: 2.8rem;
  padding: .53rem .78rem;
  border: 1px solid #c9cdd5;
  border-radius: .55rem;
  color: var(--ink);
  background: var(--white);
}
.article-search::placeholder { color: var(--muted); opacity: 1; }
.search-status { margin: .57rem 0 0; color: var(--muted); font-size: .9rem; }
.chapter-nav { margin-top: 1.2rem; }
.nav-section + .nav-section { margin-top: 1.28rem; }
.block-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .35rem;
  min-height: 1.4rem;
}
.block-label h3 { margin: 0; font-size: .94rem; font-weight: 700; }
.block-count { color: var(--muted); font-size: .87rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.block-progress {
  display: block;
  width: 100%;
  height: .32rem;
  margin-top: .31rem;
  overflow: hidden;
  border: none;
  border-radius: .3rem;
  color: var(--good);
  background: #e0e5e2;
  appearance: none;
}
.block-progress::-webkit-progress-bar { background: #e0e5e2; }
.block-progress::-webkit-progress-value { background: var(--good); }
.block-progress::-moz-progress-bar { background: var(--good); }
.nav-section ul, .related ul, .sources ul { margin: 0; padding: 0; list-style: none; }
.nav-section ul { margin-top: .47rem; }
.nav-section li { display: grid; grid-template-columns: minmax(0, 1fr) 2.75rem; align-items: center; gap: .12rem; }
.nav-link {
  min-height: 2.65rem;
  padding: .5rem .51rem;
  display: flex;
  align-items: center;
  color: var(--body);
  border-radius: .38rem;
  text-decoration: none;
  font-size: .94rem;
  line-height: 1.32;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--accent-strong); background: var(--accent-wash); }
.nav-link[aria-current="page"] { font-weight: 680; }
.nav-mark {
  display: grid;
  place-items: center;
  width: 2.65rem;
  min-height: 2.65rem;
  border: 0;
  border-radius: .35rem;
  color: var(--good);
  background: transparent;
  font-size: 1rem;
  font-weight: 730;
}
.nav-mark[aria-pressed="false"]::before { content: ""; height: .95rem; width: .95rem; border: 1px solid #798398; border-radius: .22rem; }
.nav-mark[aria-pressed="true"] { background: var(--good-wash); }
.nav-mark:hover { background: var(--accent-wash); }

.article, .empty-state {
  width: min(100% - clamp(2.2rem, 10vw, 6rem), 44rem);
  margin: clamp(2rem, 5vw, 4.4rem) auto 4rem;
}
.article-meta { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin: 0 0 .75rem; color: var(--muted); font-size: .92rem; }
#article-section { color: var(--accent-strong); font-weight: 700; }
.meta-separator { height: .2rem; width: .2rem; background: var(--muted); border-radius: 50%; }
.article-status { margin-inline-start: .2rem; padding: .1rem .42rem; color: var(--good); background: var(--good-wash); border-radius: .3rem; font-size: .87rem; }
.article h1 {
  margin: 0;
  font: 700 clamp(2.18rem, 5.2vw, 4.1rem)/1.06 var(--serif);
  letter-spacing: -.026em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.article-lead { margin: 1.2rem 0 0; color: var(--ink); font: 700 clamp(1.24rem, 2.25vw, 1.58rem)/1.48 var(--serif); }
.article-body { margin: 1.47rem 0 0; color: var(--body); font: 400 clamp(1.12rem, 1.65vw, 1.23rem)/1.65 var(--serif); overflow-wrap: break-word; }
.article-body p, .article-body ul, .article-body ol, .article-body blockquote { margin: 0 0 .95rem; }
.article-body ul, .article-body ol { padding-inline-start: 1.4em; }
.article-body li + li { margin-top: .32rem; }
.article-body h2, .article-body h3 { margin: 1.6em 0 .45em; color: var(--ink); line-height: 1.18; }
.article-body h2 { font-size: clamp(1.42rem, 2.7vw, 1.72rem); }
.article-body h3 { font-size: 1.26rem; }
.article-body blockquote { border-inline-start: 3px solid var(--border); padding-inline-start: .9rem; }
.article-body img { display: block; max-width: 100%; height: auto; }
.article-body figure { margin: 1.3rem 0; }
.article-body figure img { max-width: min(100%, 28rem); border-radius: .6rem; }
.article-body figcaption { margin-top: .5rem; color: var(--muted); font: .9rem/1.45 var(--sans); }
.article-body .article-figure { margin: 1.35rem 0 1.5rem; }
.article-body .article-figure img { width: 100%; max-width: 100%; border-radius: 0; }
.article-figure figcaption { text-align: center; }
.article-body details { margin: 1.45rem 0; padding: .7rem .85rem; border: 1px solid var(--border); border-radius: .6rem; }
.article-body summary { cursor: pointer; font: 650 .95rem/1.45 var(--sans); color: var(--accent-strong); }
.article-body details ul { margin: .55rem 0 0; }
.article-body .practice { margin-top: -.25rem; background: var(--white); }
.article-body .practice p { margin: .65rem 0 0; }
.article-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.article-body th, .article-body td { padding: .35em .5em; border-bottom: 1px solid var(--border); text-align: left; }
.article-body code { font-size: .88em; }
.sources { margin: 1.65rem 0 0; }
.sources h2, .related h2 { margin: 0 0 .48rem; color: var(--ink); font-size: 1.02rem; font-weight: 730; }
.sources ul { display: flex; flex-wrap: wrap; gap: .25rem .85rem; font-size: .9rem; }
.article-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: 1.8rem; }
.read-button[aria-pressed="true"] { color: var(--good); background: var(--good-wash); border-color: #b8d5c3; }
.storage-status { color: var(--muted); font-size: .9rem; }
.route-intro { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 1.5rem 0 .7rem; }
.route-guide { margin: 0 0 1.5rem; color: var(--muted); font-size: .94rem; }
.route-situations { margin: 0 0 1.35rem; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: .65rem; background: var(--white); }
.route-situations h2 { margin: 0; font-size: 1.02rem; }
.route-situations ul { display: flex; flex-wrap: wrap; gap: 0 1rem; margin: .15rem 0 0; padding: 0; list-style: none; }
.route-situations a { display: inline-flex; align-items: center; min-height: 2rem; }
.route-module { padding: 1rem 0; border-top: 1px solid var(--border); }
.route-module h2 { margin: 0; font: 700 clamp(1.28rem, 2.7vw, 1.55rem)/1.18 var(--serif); }
.route-module ol { padding-inline-start: 1.8rem; margin: .55rem 0 0; }
.route-module li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.route-row { display: grid; grid-template-columns: minmax(0, 1fr) 2.65rem; align-items: start; gap: .35rem; }
.route-row-copy { padding-block: .55rem; overflow-wrap: anywhere; }
.route-time, .route-mark { display: inline-block; margin-inline-start: .55rem; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.route-mark-read { color: var(--good); }
.article-route { margin-top: 1.8rem; padding: 1rem; border-radius: .65rem; background: var(--accent-wash); }
.article-route-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem .75rem; font-size: .94rem; }
.article-route-meta p { margin: 0; }
.next-question { display: block; width: fit-content; margin-top: .65rem; padding-block: .25rem; }
.next-question span { display: block; margin-bottom: .15rem; color: var(--muted); font-size: .88rem; }
.next-question strong { font: 700 clamp(1.12rem, 2vw, 1.32rem)/1.25 var(--serif); }
.route-end { margin: .55rem 0 0; }
.related { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.related li + li { margin-top: .35rem; }
.related a { display: inline-block; padding-block: .13rem; }
.empty-state { color: var(--muted); }
.site-footer {
  width: var(--frame-width);
  margin: 0 auto;
  padding: 1.15rem 0 2rem;
  border-top: 1px solid var(--border);
  font-size: .94rem;
}
.observation-form { display: grid; gap: .65rem; margin-top: 1.6rem; }
.observation-form label { font-weight: 680; }
.observation-form textarea {
  display: block;
  width: 100%;
  min-height: 9rem;
  resize: vertical;
  padding: .8rem;
  border: 1px solid #9fa7b8;
  border-radius: .65rem;
  color: var(--ink);
  background: var(--white);
}
.observation-form textarea::placeholder { color: var(--muted); opacity: 1; }
.observation-form button { margin-top: .35rem; }
.observation-form button:disabled { opacity: .7; cursor: default; }
.observation-status { margin: 0; color: var(--muted); }
.observation-status:empty { display: none; }

@media (max-width: 42rem) {
  .article { margin-block-start: 2rem; }
  .article-lead { margin-top: .93rem; }
  .article-body { margin-top: 1.1rem; }
}
@media (min-width: 46rem) {
  .site-header-inner { min-height: 3.55rem; }
  .home { margin-top: 1.65rem; }
  .home-intro-body > p, #home-answer { font-size: 1.075rem; }
  .home-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, .66fr);
    gap: clamp(1.75rem, 5vw, 4rem);
    padding-block: 1.65rem;
  }
  .home-hero:has(.hero-figure[hidden]) { grid-template-columns: minmax(0, 1fr); }
  .home-index { padding-top: 1.65rem; }
}
