:root {
  color-scheme: light;
  --ink: #161922;
  --muted: #5f6674;
  --line: #c8b98d;
  --line-soft: #e3ddcc;
  --field: #101827;
  --field-2: #1d2133;
  --surface: #fffdf7;
  --surface-alt: #f4efe3;
  --gold: #a98b43;
  --violet: #4f386f;
  --focus: #815db8;
  --max: 1180px;
  font-family: "Segoe UI", "Aptos", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
}
a { color: #4d3a73; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--surface);
  color: var(--ink);
  padding: .65rem .9rem;
  border: 2px solid var(--gold);
}
.skip-link:focus { top: 1rem; }
.site-header {
  background: var(--field);
  color: #fff9ec;
  border-bottom: 1px solid rgba(201,185,141,.55);
}
.site-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 1rem;
  align-items: center;
}
.site-mark {
  color: #fff9ec;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  min-width: 0;
}
.mark-symbol {
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: .85rem;
  letter-spacing: .08em;
}
.site-mark strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  line-height: 1.1;
  letter-spacing: 0;
}
.site-mark small {
  display: block;
  color: #d8cfb5;
  font-size: .78rem;
  line-height: 1.25;
}
.primary-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .35rem .75rem;
}
.primary-nav a, .site-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  font-size: .9rem;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"], .site-footer a:hover {
  border-color: var(--line);
}
.primary-nav .external-link {
  color: #f2dca3;
}
.site-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}
.page-content, .document-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}
.content-body {
  max-width: 820px;
}
.page-content > .content-body, .document-page > .content-body {
  width: 100%;
}
h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--ink);
}
h1 {
  font-size: clamp(2.4rem, 8vw, 5.2rem);
  max-width: 900px;
  margin: 0 0 1rem;
}
h2 {
  font-size: 1.75rem;
  margin: 2.75rem 0 .75rem;
  padding-top: .25rem;
  border-top: 1px solid var(--line-soft);
}
h3 { font-size: 1.25rem; margin: 2rem 0 .5rem; }
h4 { font-size: 1.05rem; margin: 1.5rem 0 .4rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: .25rem 0 1.25rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }
blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--gold);
  background: var(--surface-alt);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
}
code {
  font-family: "Cascadia Mono", Consolas, monospace;
  background: #eee8d8;
  padding: .08rem .28rem;
}
pre {
  overflow: auto;
  padding: 1rem;
  background: #111827;
  color: #fff9ec;
}
.cta-link {
  display: inline-block;
  margin: .25rem .4rem .25rem 0;
  padding: .55rem .75rem;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  background: #fffaf0;
}
.official-portrait {
  max-width: 430px;
  margin: 0 0 1.5rem;
  border: 1px solid var(--line-soft);
  padding: .75rem;
  background: #fffaf0;
}
.official-portrait img {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 35%;
}
.official-portrait figcaption {
  margin-top: .65rem;
  color: var(--muted);
  font-size: .88rem;
}
.document-meta {
  border: 1px solid var(--line);
  background: #fffaf0;
  max-width: 980px;
}
.document-meta dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.document-meta div {
  padding: .8rem .9rem;
  border-bottom: 1px solid var(--line-soft);
}
.document-meta dt {
  color: var(--muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.document-meta dd {
  margin: .15rem 0 0;
  overflow-wrap: anywhere;
}
.document-toc {
  max-width: 980px;
  border-left: 3px solid var(--gold);
  padding: .5rem 0 .5rem 1rem;
}
.document-toc h2 {
  border: 0;
  margin: 0 0 .65rem;
  font-size: 1.1rem;
}
.document-toc a {
  display: block;
  padding: .12rem 0;
  color: var(--muted);
  text-decoration: none;
}
.document-toc a:hover { color: var(--ink); text-decoration: underline; }
.document-toc .toc-level-3 { padding-left: 1rem; font-size: .92rem; }
.breadcrumbs {
  max-width: 980px;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  color: var(--muted);
  font-size: .88rem;
}
.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.inline-status {
  display: inline-block;
  margin-left: .35rem;
  color: var(--muted);
  font-size: .85rem;
}
.directory-links {
  margin-top: 2.25rem;
  padding-top: 1rem;
  border-top: 2px solid var(--line);
  max-width: 100%;
  overflow-x: auto;
}
.directory-links a {
  overflow-wrap: anywhere;
}
.directory-links table {
  width: 100%;
  border-collapse: collapse;
  margin: .75rem 0 1rem;
  font-size: .95rem;
}
.directory-links th, .directory-links td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
  padding: .65rem .5rem;
}
.directory-links thead th {
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.site-footer {
  background: var(--field-2);
  color: #f6efdd;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem max(1.25rem, calc((100vw - var(--max)) / 2 + 1.25rem));
}
.site-footer p {
  max-width: 720px;
  margin: .25rem 0 0;
  color: #d8cfb5;
  font-size: .9rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-content: flex-start;
  justify-content: flex-end;
}
@media (min-width: 980px) {
  .page-content {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
  .page-content .official-portrait {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-left: auto;
  }
  .page-content .content-body {
    grid-column: 1;
    grid-row: 1;
  }
}
@media (max-width: 820px) {
  body { font-size: 16px; }
  .site-header-inner {
    grid-template-columns: 1fr;
  }
  .primary-nav {
    justify-content: flex-start;
  }
  .document-meta dl {
    grid-template-columns: 1fr;
  }
  .site-footer {
    display: block;
  }
  .site-footer nav {
    justify-content: flex-start;
    margin-top: 1rem;
  }
}