:root {
  --ink: #1c2430;
  --ink-muted: #5a6573;
  --paper: #f6f3ee;
  --paper-deep: #ebe6de;
  --accent: #1f5c4d;
  --accent-soft: #d7e6e0;
  --rule: #d4cdc2;
  --focus: #0b57d0;
  --max: 42rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 80% at 100% -20%, #e4efe9 0%, transparent 55%),
    radial-gradient(ellipse 90% 60% at -10% 100%, #e8e2d6 0%, transparent 50%),
    linear-gradient(180deg, #f8f5f0 0%, var(--paper) 40%, var(--paper-deep) 100%);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover {
  color: #16483c;
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.site-header,
.site-footer,
.site-main {
  width: min(100% - 2rem, calc(var(--max) + 8rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--rule);
}

.brand {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.95rem;
}

.nav a {
  color: var(--ink-muted);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
}

.site-main {
  padding: 2rem 0 3.5rem;
}

.site-footer {
  padding: 1.25rem 0 2rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.5rem;
}

.hero-home {
  padding: 2.5rem 0 1rem;
}

.hero-home .brand-hero {
  display: block;
  margin: 0 0 0.75rem;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}

.hero-home p {
  max-width: 28rem;
  margin: 0 0 2rem;
  color: var(--ink-muted);
  font-size: 1.125rem;
}

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.doc-list a {
  display: block;
  padding: 1rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.doc-list a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.doc-list strong {
  display: block;
  font-size: 1.05rem;
}

.doc-list span {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.doc-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.doc-header h1 {
  margin: 0 0 0.75rem;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: clamp(1.85rem, 5vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.meta dt {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.meta dd {
  margin: 0;
}

.meta dd::before {
  content: attr(data-label) ": ";
  font-weight: 600;
  color: var(--ink);
}

.prose h2 {
  margin: 2.25rem 0 0.75rem;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.prose h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 650;
  line-height: 1.35;
}

.prose p,
.prose ul,
.prose ol,
.prose table {
  margin: 0 0 1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.35rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.prose strong {
  font-weight: 650;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 0 0 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.prose table {
  width: 100%;
  min-width: 18rem;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.prose th,
.prose td {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: rgba(255, 255, 255, 0.7);
  font-weight: 650;
}

.prose tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.35);
}

@media (max-width: 40rem) {
  body {
    font-size: 1rem;
  }

  .site-header,
  .site-footer,
  .site-main {
    width: min(100% - 1.5rem, calc(var(--max) + 8rem));
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .doc-header h1 {
    font-size: 1.75rem;
  }

  .prose table {
    font-size: 0.92rem;
  }
}
