:root {
  color-scheme: dark;
  --seed: #8b5000;
  --bg: #191411;
  --surface: #211b17;
  --surface-high: #2d241e;
  --surface-highest: #3b2e25;
  --text: #f1e0d5;
  --muted: #cbb8a9;
  --primary: #ffb871;
  --on-primary: #482600;
  --primary-container: #6a3c00;
  --on-container: #ffdcbe;
  --outline: #59483c;
  --success: #bfd59c;
  --code: #151310;
  --error: #ffb4ab;
  --font: 'Nunito Sans', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --header: 76px;
  --rail: 278px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #fff8f3;
  --surface: #f8eee5;
  --surface-high: #f0e2d5;
  --surface-highest: #e8d6c5;
  --text: #2d2118;
  --muted: #695444;
  --primary: #854900;
  --on-primary: #fff8f3;
  --primary-container: #ffdcbe;
  --on-container: #482600;
  --outline: #d5c0af;
  --success: #3c601e;
  --code: #201c18;
  --error: #9e302a;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 106px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  accent-color: var(--primary);
}
a {
  color: var(--primary);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-color: currentColor;
}
button,
input,
select {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
svg {
  display: block;
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.7;
}
a,
button,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
::selection {
  background: var(--primary-container);
  color: var(--on-container);
}
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
  border-radius: 4px;
}
input {
  caret-color: var(--primary);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--outline) transparent;
}
h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
p {
  margin: 0 0 1em;
}
code,
kbd {
  font-family: var(--mono);
  font-size: 0.83em;
}
code {
  overflow-wrap: anywhere;
}
h1 {
  font-size: clamp(2.4rem, 3.8vw, 3.5rem);
  font-weight: 800;
  margin: 0 0 20px;
}
h2 {
  font-size: 1.65rem;
  font-weight: 800;
}
h3 {
  font-size: 1.1rem;
  font-weight: 700;
}
small {
  font-size: 0.8rem;
}
button {
  border: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 20;
  padding: 12px 20px;
  border-radius: 24px;
  background: var(--primary);
  color: var(--on-primary);
}
.skip-link:focus {
  top: 10px;
}
.topbar {
  height: var(--header);
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 30px;
  background: var(--bg);
  border-bottom: 1px solid var(--outline);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.035em;
}
.brand svg {
  width: 32px;
  height: 32px;
  color: var(--primary);
}
.brand-guide {
  font-weight: 400;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.search-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--muted);
  background: var(--surface);
  border-radius: 24px;
  font-size: 0.85rem;
  min-width: 265px;
  text-align: left;
  transition: background 0.2s;
}
.search-trigger:hover,
.icon-button:hover {
  background: var(--surface-high);
}
.search-trigger svg {
  width: 18px;
  height: 18px;
}
.search-trigger kbd {
  margin-left: auto;
  font-size: 0.7rem;
  border: 1px solid var(--outline);
  border-radius: 5px;
  padding: 0 5px;
}
.icon-button {
  display: grid;
  place-items: center;
  background: transparent;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--primary);
}
.site-grid {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) 205px;
  max-width: 1700px;
  margin: auto;
}
.navigation {
  grid-column: 1;
  position: sticky;
  top: var(--header);
  align-self: start;
  max-height: calc(100dvh - var(--header));
  overflow-y: auto;
  padding: 28px 15px 24px 22px;
}
.navigation summary {
  display: none;
}
.navigation-inner {
  display: block;
}
.overview-link {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 28px;
  padding: 12px 18px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}
.overview-link svg {
  width: 19px;
  height: 19px;
}
.overview-link.selected {
  background: var(--primary-container);
  color: var(--on-container);
}
.nav-group {
  margin-top: 24px;
}
.nav-group h2 {
  font-size: 0.74rem;
  letter-spacing: 0.025em;
  font-weight: 800;
  color: var(--muted);
  margin: 0 0 8px 18px;
  text-transform: uppercase;
}
.nav-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-group a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  line-height: 1.35;
  color: var(--muted);
  font-size: 0.83rem;
  text-decoration: none;
  padding: 9px 15px 9px 18px;
  border-radius: 22px;
  min-height: 36px;
}
.nav-group a:hover {
  background: var(--surface);
}
.nav-group a[aria-current='page'] {
  color: var(--on-container);
  background: var(--primary-container);
  font-weight: 700;
}
.nav-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--outline);
  flex-shrink: 0;
  align-self: center;
}
.completed .nav-dot {
  background: var(--success);
}
.progress-summary {
  margin: 30px 12px 0;
  padding-top: 20px;
  border-top: 1px solid var(--outline);
  font-size: 0.74rem;
  color: var(--muted);
}
.progress-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.progress-summary strong {
  font-weight: 700;
}
.progress-summary span {
  font-variant-numeric: tabular-nums;
}
.progress-summary progress {
  display: block;
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-high);
  margin: 10px 0;
}
.progress-summary progress::-webkit-progress-bar {
  border-radius: 10px;
  background: var(--surface-high);
}
.progress-summary progress::-webkit-progress-value {
  background: var(--primary);
  border-radius: 10px;
}
.progress-summary progress::-moz-progress-bar {
  background: var(--primary);
  border-radius: 10px;
}
.progress-summary p {
  margin: 0;
}
.text-button {
  background: none;
  color: var(--muted);
  padding: 5px 0;
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-button:hover {
  color: var(--primary);
}
main {
  min-width: 0;
  padding: 44px clamp(28px, 4vw, 68px) 0;
  max-width: 1000px;
  width: 100%;
}
main.hub {
  margin: 0 auto;
}
main:focus {
  outline: none;
}
.contents {
  padding: 50px 24px 20px 0;
  align-self: start;
  position: sticky;
  top: var(--header);
  max-height: calc(100dvh - var(--header));
  overflow: auto;
  font-size: 0.78rem;
  color: var(--muted);
}
.contents strong {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 14px;
  color: var(--text);
}
.contents nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contents nav a {
  color: var(--muted);
  text-decoration: none;
  line-height: 1.5;
}
.contents nav a:hover,
.contents nav a.active {
  color: var(--primary);
}
.source-badge {
  display: flex;
  flex-direction: column;
  gap: 9px;
  border-top: 1px solid var(--outline);
  margin-top: 30px;
  padding-top: 20px;
  text-decoration: none;
  font-size: 0.7rem;
}
.source-badge span:first-child {
  color: var(--muted);
}
.source-badge code {
  color: var(--text);
  font-size: 0.73rem;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.74rem;
  border-top: 1px solid var(--outline);
  padding: 24px 0 36px;
  margin-top: 64px;
}
.site-footer a {
  color: var(--muted);
}
.welcome {
  background: var(--surface-high);
  padding: 36px;
  border-radius: 28px 28px 12px 28px;
  position: relative;
  overflow: hidden;
}
.welcome-mark {
  position: absolute;
  right: 30px;
  top: 28px;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  background: var(--primary-container);
  border-radius: 24px;
  color: var(--primary);
  transform: rotate(8deg);
}
.welcome-mark svg {
  width: 46px;
  height: 46px;
}
.welcome h1 {
  font-size: clamp(2.35rem, 3.8vw, 3.8rem);
  max-width: 90%;
  margin: 0 0 24px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
}
.welcome h1 span {
  color: var(--primary);
}
.lead {
  font-size: 1.14rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 58ch;
}
.welcome .lead {
  max-width: 43ch;
  margin-bottom: 28px;
}
.welcome-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.button {
  min-height: 44px;
  border-radius: 28px;
  padding: 12px 23px;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition:
    background 0.18s,
    border-radius 0.25s var(--ease);
}
.primary {
  background: var(--primary);
  color: var(--on-primary);
}
.primary:hover {
  background: var(--on-container);
  border-radius: 16px;
}
.text-link {
  font-size: 0.86rem;
  text-decoration: none;
  font-weight: 700;
}
.text-link:hover {
  text-decoration: underline;
}
.welcome-foot {
  border-top: 1px solid var(--outline);
  margin-top: 32px;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.72rem;
  color: var(--muted);
}
.welcome-foot a {
  text-decoration: none;
  color: var(--muted);
}
.course-intro {
  margin: 42px 0;
}
.course-intro h2 {
  margin: 0 0 16px;
}
.course-intro p {
  color: var(--muted);
  max-width: 65ch;
}
.course-path {
  margin-top: 35px;
}
.stage {
  margin: 0 0 42px;
}
.stage-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--outline);
}
.stage-number {
  font-size: 1.05rem;
  color: var(--primary);
  background: var(--surface-high);
  min-width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.stage-heading h2 {
  font-size: 1.2rem;
  margin: 0 0 4px;
}
.stage-heading p {
  font-size: 0.75rem;
  margin: 0;
  color: var(--muted);
}
.lesson-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 10px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--outline);
  transition: background 0.2s;
}
.lesson-row:hover {
  background: var(--surface);
  border-radius: 12px;
}
.lesson-status {
  width: 17px;
  height: 17px;
  border: 1px solid var(--outline);
  border-radius: 50%;
  flex: 0 0 auto;
}
.lesson-row.completed .lesson-status {
  background: var(--success);
  border-color: var(--success);
}
.lesson-row h3 {
  font-size: 1rem;
  margin: 0 0 5px;
  font-weight: 700;
}
.lesson-row p {
  font-size: 0.83rem;
  line-height: 1.5;
  margin: 0;
  color: var(--muted);
}
.row-arrow {
  margin-left: auto;
  color: var(--primary);
  padding-left: 12px;
}
.baseline-note {
  padding: 24px 28px;
  background: var(--surface);
  border-radius: 20px;
}
.baseline-note p {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 8px 0 0;
}
.article-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.75rem;
  margin-bottom: 28px;
}
.article-meta a {
  text-decoration: none;
}
.article-header {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--outline);
  margin-bottom: 34px;
}
.article-header h1 {
  max-width: 16ch;
}
.article-header .lead {
  margin-bottom: 20px;
}
.reading-meta {
  display: flex;
  gap: 24px;
  font-size: 0.75rem;
  color: var(--muted);
}
.prose {
  font-size: 1rem;
  line-height: 1.85;
  max-width: 72ch;
  overflow-wrap: anywhere;
}
.prose h2 {
  font-size: 1.55rem;
  margin: 2.3em 0 0.8em;
  scroll-margin-top: 106px;
}
.prose > h2:first-child {
  margin-top: 0;
}
.prose h3 {
  margin: 2em 0 0.8em;
}
.prose p {
  margin-bottom: 1.2em;
}
.prose ul,
.prose ol {
  padding-left: 24px;
  margin: 1em 0 1.5em;
}
.prose li {
  padding-left: 5px;
  margin: 0.5em 0;
}
.prose a {
  text-decoration-color: var(--outline);
}
.prose a:hover {
  text-decoration-color: var(--primary);
}
.prose strong {
  font-weight: 800;
}
.prose :not(pre) > code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface-high);
  color: var(--on-container);
  font-size: 0.8em;
}
.code-wrap {
  position: relative;
  margin: 26px 0;
}
.prose pre {
  border-radius: 16px;
  margin: 0;
  padding: 45px 22px 24px;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.8;
  background: var(--code) !important;
  color: #e6dbcf;
  tab-size: 4;
}
.prose pre code {
  font-size: inherit;
  overflow-wrap: normal;
}
.copy-code {
  position: absolute;
  right: 12px;
  top: 10px;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 20px;
  background: #3b3027;
  color: #ffdcbe;
  font-size: 0.68rem;
}
.copy-code:hover {
  background: #59402c;
}
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin: 24px 0 30px;
  border-radius: 12px;
  border: 1px solid var(--outline);
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.8rem;
  line-height: 1.7;
  text-align: left;
}
.prose th {
  background: var(--surface-high);
  font-weight: 800;
  white-space: nowrap;
}
.prose th,
.prose td {
  padding: 13px 15px;
  vertical-align: top;
}
.prose tr + tr td,
.prose tbody tr:first-child td {
  border-top: 1px solid var(--outline);
}
.prose td code {
  word-break: normal;
  overflow-wrap: anywhere;
}
.prose blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--muted);
}
.prose blockquote p:last-child {
  margin: 0;
}
.prose details {
  padding: 18px 22px;
  margin: 25px 0;
  background: var(--surface);
  border-radius: 16px;
}
.prose details summary {
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  line-height: 1.5;
}
.prose details[open] summary {
  margin-bottom: 18px;
}
.prose details p:last-child {
  margin-bottom: 0;
}
.prose details .code-wrap:last-child {
  margin-bottom: 0;
}
.lesson-completion {
  background: var(--surface-high);
  padding: 24px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 48px;
}
.lesson-completion p {
  font-size: 0.8rem;
  margin: 6px 0 0;
  color: var(--muted);
}
.lesson-completion button {
  flex-shrink: 0;
}
.page-turn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}
.page-turn a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.5;
  font-size: 0.85rem;
}
.page-turn small {
  color: var(--muted);
  font-size: 0.7rem;
  margin-bottom: 6px;
}
.page-turn .next {
  text-align: right;
}
.page-turn a:hover span {
  text-decoration: underline;
}
dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--outline);
  border-radius: 24px;
  max-width: 650px;
  width: calc(100% - 32px);
  padding: 24px;
  max-height: 80dvh;
  margin: 12dvh auto auto;
  box-shadow: 0 24px 70px #0006;
}
dialog::backdrop {
  background: #0009;
}
.search-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.search-top label {
  font-weight: 800;
}
.search-top kbd {
  font-size: 0.75em;
  margin-left: 5px;
}
#search-input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--outline);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  padding: 12px 16px;
  font-size: 1rem;
}
#search-input::placeholder {
  color: var(--muted);
}
#search-status {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 16px 0;
}
#search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 45dvh;
  overflow-y: auto;
}
#search-results a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
}
#search-results a:hover,
#search-results a:focus {
  background: var(--surface-high);
}
#search-results small {
  font-size: 0.68rem;
  color: var(--primary);
}
#search-results span {
  color: var(--muted);
  font-size: 0.8rem;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  background: var(--primary);
  color: var(--on-primary);
  padding: 12px 22px;
  border-radius: 24px;
  font-size: 0.85rem;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.3s var(--ease);
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1500px) {
  :root {
    --rail: 300px;
  }
  .site-grid {
    grid-template-columns: var(--rail) minmax(0, 1fr) 230px;
  }
  main {
    padding-left: 80px;
    padding-right: 80px;
  }
}
@media (max-width: 1190px) {
  .site-grid {
    grid-template-columns: 255px minmax(0, 1fr);
  }
  .contents {
    display: none;
  }
  :root {
    --rail: 255px;
  }
  main {
    max-width: 900px;
    padding: 36px 38px 0;
  }
  .welcome h1 {
    font-size: 3rem;
  }
  .welcome-mark {
    width: 58px;
    height: 58px;
    right: 24px;
  }
  .welcome-mark svg {
    width: 36px;
    height: 36px;
  }
}
@media (max-width: 900px) {
  :root {
    --header: 66px;
  }
  .topbar {
    padding: 0 20px;
    gap: 12px;
  }
  .header-actions {
    gap: 8px;
  }
  .search-trigger {
    min-width: 0;
    padding: 10px;
  }
  .search-trigger span,
  .search-trigger kbd,
  .version-history {
    display: none;
  }
  .site-grid {
    display: block;
  }
  .navigation {
    position: sticky;
    top: var(--header);
    max-height: calc(100dvh - var(--header));
    padding: 0;
    background: var(--surface);
    z-index: 9;
    border-bottom: 1px solid var(--outline);
  }
  .navigation summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 22px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    list-style: none;
  }
  .navigation summary::-webkit-details-marker {
    display: none;
  }
  .navigation summary svg {
    width: 19px;
    height: 19px;
    color: var(--primary);
  }
  .nav-summary-arrow {
    margin-left: auto;
  }
  .navigation-inner {
    padding: 12px 22px 26px;
    max-width: 600px;
  }
  .navigation[open] {
    box-shadow: 0 15px 28px #0003;
  }
  .navigation nav {
    columns: 2;
    column-gap: 20px;
  }
  .nav-group {
    break-inside: avoid;
    display: inline-block;
    width: 100%;
    margin: 20px 0 0;
  }
  .progress-summary {
    max-width: 340px;
  }
  .overview-link {
    max-width: 300px;
  }
  main {
    padding: 28px 30px 0;
    max-width: 800px;
    margin: auto;
  }
  .welcome h1 {
    font-size: clamp(2.5rem, 6vw, 3.4rem);
  }
  .article-header h1 {
    max-width: 22ch;
  }
}
@media (max-width: 540px) {
  body {
    font-size: 15px;
  }
  .topbar {
    padding: 0 16px;
  }
  .brand {
    gap: 8px;
    font-size: 1.2rem;
  }
  .brand-guide {
    font-size: 0.8rem;
  }
  .brand svg {
    width: 26px;
    height: 26px;
  }
  .icon-button {
    width: 34px;
    height: 38px;
  }
  .search-trigger svg {
    width: 19px;
    height: 19px;
  }
  main {
    padding: 24px 20px 0;
  }
  .welcome {
    padding: 28px 24px;
    border-radius: 24px 24px 10px 24px;
  }
  .welcome h1 {
    font-size: 2.6rem;
    max-width: 100%;
    padding-top: 50px;
    line-height: 1.12;
  }
  .welcome-mark {
    left: 24px;
    top: 21px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
  .welcome-mark svg {
    width: 25px;
    height: 25px;
  }
  .lead {
    font-size: 1.02rem;
  }
  .welcome-actions {
    gap: 18px;
  }
  .welcome-foot {
    display: block;
  }
  .welcome-foot a {
    display: block;
    margin-top: 8px;
  }
  .course-intro {
    margin: 34px 0;
  }
  .course-intro h2 {
    font-size: 1.45rem;
  }
  .lesson-row {
    gap: 12px;
    padding: 17px 2px;
  }
  .lesson-row p {
    font-size: 0.8rem;
  }
  .lesson-row h3 {
    font-size: 0.95rem;
  }
  .stage-heading {
    gap: 12px;
  }
  .stage-number {
    min-width: 40px;
    height: 40px;
    border-radius: 13px;
  }
  .article-meta {
    font-size: 0.69rem;
    margin-bottom: 24px;
  }
  .article-header h1 {
    font-size: 2.35rem;
  }
  .reading-meta {
    gap: 15px;
    font-size: 0.69rem;
  }
  .prose {
    font-size: 0.96rem;
    line-height: 1.85;
  }
  .prose h2 {
    font-size: 1.4rem;
  }
  .prose th,
  .prose td {
    padding: 10px 12px;
  }
  .prose pre {
    padding-left: 16px;
    padding-right: 16px;
    font-size: 0.72rem;
  }
  .lesson-completion {
    display: block;
    padding: 22px;
  }
  .lesson-completion button {
    margin-top: 20px;
  }
  .page-turn {
    gap: 18px;
  }
  .page-turn a {
    font-size: 0.78rem;
  }
  .site-footer {
    display: block;
    margin-top: 44px;
  }
  .site-footer a {
    display: block;
    margin-top: 8px;
  }
  .navigation nav {
    columns: 1;
  }
  .navigation-inner {
    padding: 10px 16px 24px;
  }
  .nav-group {
    margin-top: 19px;
  }
  dialog {
    padding: 18px;
    margin-top: 8dvh;
  }
  .search-top label {
    font-size: 0.9rem;
  }
  #search-input {
    font-size: 0.86rem;
  }
  .baseline-note {
    padding: 22px;
  }
  .article-header {
    padding-bottom: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
@media print {
  .topbar,
  .navigation,
  .contents,
  .lesson-completion,
  .page-turn,
  .site-footer,
  .copy-code,
  #toast,
  dialog {
    display: none !important;
  }
  .site-grid {
    display: block;
  }
  main {
    max-width: none;
    padding: 0;
  }
  body {
    background: white;
    color: black;
  }
  .prose {
    max-width: none;
    font-size: 11pt;
  }
  a {
    color: #713b00;
  }
  .prose pre {
    white-space: pre-wrap;
    background: #f5f0ec !important;
    color: black !important;
  }
  .prose pre span {
    color: black !important;
  }
  .table-wrap {
    overflow: visible;
  }
  .article-header h1 {
    font-size: 28pt;
  }
  .welcome {
    background: none;
  }
  .prose details {
    background: none;
  }
}
.article-header .source-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  overflow-wrap: anywhere;
}
.source-view pre {
  padding: 16px 0;
  border-radius: 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.6;
  counter-reset: line;
}
.source-view .line {
  display: inline-block;
  min-width: 100%;
  padding-right: 16px;
  scroll-margin-top: calc(var(--header) + 24px);
}
.source-view .line::before {
  counter-increment: line;
  content: counter(line);
  display: inline-block;
  width: 3.5em;
  margin-right: 1.2em;
  text-align: right;
  color: var(--muted);
  user-select: none;
}
.source-view .line:target {
  background: color-mix(in srgb, var(--primary) 22%, transparent);
}
.source-list {
  list-style: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
