:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #5f6368;
  --line: #d8d8d8;
  --link: #155f83;
  --link-hover: #0b435f;
  --page: #fff;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.5;
}

body {
  margin: 0;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.16em;
}

a:hover,
a:focus {
  color: var(--link-hover);
}

.skip-link {
  background: #fff;
  color: var(--ink);
  left: 1rem;
  padding: 0.5rem 0.75rem;
  position: absolute;
  top: -4rem;
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  border-bottom: 1px solid var(--line);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0 auto;
  max-width: 1040px;
  padding: 0.85rem 1rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.86rem;
  margin: 0 auto;
  max-width: 980px;
  padding: 1.25rem 1rem 2.5rem;
}

.site-footer a {
  color: var(--muted);
}

.brand {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
}

.syllabus-page,
.article-page {
  margin: 0 auto;
  max-width: 980px;
  padding: 2rem 1rem 4rem;
}

.syllabus-page h1 {
  font-size: 1.42rem;
  line-height: 1.25;
  margin: 0 0 0.9rem;
  text-align: center;
}

.subject-jump {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.88rem;
  gap: 0.35rem 0.75rem;
  justify-content: center;
  line-height: 1.45;
  margin: 0 auto 2rem;
  max-width: 860px;
  text-align: center;
}

.subject-jump span {
  color: var(--muted);
}

.subject {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding-top: 1.3rem;
}

.subject:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.subject h2 {
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 0 0 1rem;
  text-align: center;
}

.subject-notes {
  font-size: 0.95rem;
  margin: 0 auto 1.35rem;
  max-width: 780px;
}

.subject-notes p {
  margin: 0 0 0.8rem;
}

.back-top {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.86rem;
  margin: 1.15rem 0 0;
  text-align: right;
}

.outline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.outline .outline {
  margin-left: 1.4rem;
}

.outline li {
  margin: 0.2rem 0;
}

.roman-heading {
  font-weight: 700;
  margin: 1.15rem 0 0.35rem;
  text-align: center;
  text-transform: uppercase;
}

.roman-context {
  font-size: 0.96rem;
  margin: 0.1rem auto 0.65rem;
  max-width: 760px;
  text-align: center;
}

.syllabus-link {
  align-items: baseline;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: 2.45rem 1fr;
  min-height: 1.35em;
  text-decoration: none;
}

.level-3 > .syllabus-link,
.level-4 > .syllabus-link,
.level-5 > .syllabus-link,
.level-6 > .syllabus-link,
.level-7 > .syllabus-link {
  grid-template-columns: 2.1rem 1fr;
}

.marker {
  color: var(--ink);
  font-weight: 600;
}

.text {
  min-width: 0;
}

.syllabus-link .text {
  text-decoration-line: underline;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.16em;
}

.breadcrumbs {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.86rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.breadcrumbs a {
  color: var(--muted);
}

.outline-position {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
  margin: 0 0 0.35rem;
}

.article-page h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin: 0 0 1.5rem;
}

.related-topics {
  border-top: 1px solid var(--line);
  margin: 1.5rem 0 0;
  padding-top: 1.1rem;
}

.related-topics h2 {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.92rem;
  line-height: 1.35;
  margin: 0 0 0.6rem;
}

.related-topics ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-topics li {
  margin: 0.25rem 0;
}

.related-topics a {
  align-items: baseline;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: 2.1rem 1fr;
  text-decoration: none;
}

.child-marker {
  color: var(--ink);
  font-weight: 600;
}

.related-topics a span:not(.child-marker) {
  text-decoration-line: underline;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.16em;
}

.article-content {
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
  min-width: 0;
  min-height: 22rem;
  padding-top: 1.5rem;
}

.article-content h2 {
  font-size: 1.28rem;
  line-height: 1.35;
  margin: 1.6rem 0 0.55rem;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content h3 {
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 1.2rem 0 0.45rem;
}

.article-content p,
.article-content li {
  line-height: 1.65;
}

.article-content p {
  margin: 0 0 0.85rem;
}

.article-content ul,
.article-content ol {
  margin: 0 0 1rem 1.35rem;
  padding: 0;
}

.article-content li {
  margin: 0.25rem 0;
}

.article-content table {
  border-collapse: collapse;
  font-size: 0.94rem;
  margin: 1rem 0 1.25rem;
  width: 100%;
}

.article-content th,
.article-content td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

.article-content th {
  background: #f7f7f7;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 650;
}

.sample-form {
  border-bottom: 1px solid var(--line);
  margin: 0 0 1.6rem;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  padding: 0 0 1.35rem;
}

.sample-form h2 {
  margin-top: 0;
}

.sample-form h3 {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.96rem;
  font-weight: 650;
  line-height: 1.35;
  margin: 1rem 0 0.45rem;
}

.sample-form pre {
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: block;
  max-width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0 0 1rem;
  overflow-x: auto;
  overflow-wrap: anywhere;
  padding: 0.85rem;
  white-space: pre-wrap;
  width: 100%;
  word-break: break-word;
}

.content-placeholder {
  min-height: 18rem;
}

.article-disclaimer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 1.5rem 0 0;
  padding-top: 0.85rem;
}

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }

  .syllabus-page,
  .article-page {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .outline .outline {
    margin-left: 0.75rem;
  }

  .syllabus-link {
    grid-template-columns: 2.1rem 1fr;
  }

  .level-3 > .syllabus-link,
  .level-4 > .syllabus-link,
  .level-5 > .syllabus-link,
  .level-6 > .syllabus-link,
  .level-7 > .syllabus-link {
    grid-template-columns: 1.85rem 1fr;
  }

  .article-page h1 {
    font-size: 1.62rem;
  }

  .sample-form pre {
    font-size: 0.75rem;
    padding: 0.7rem;
  }

}
