:root {
  --bg: #f4f1ea;
  --ink: #1c1a17;
  --muted: #4a453c;
  --line: rgba(28, 26, 23, 0.18);
  --max: 28rem;
  --max-prose: 42rem;
  --focus: #1c1a17;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

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

a:hover { color: var(--muted); }

a:focus-visible,
.home-link:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin: auto;
  padding: 4rem 0 3rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 1.25rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--muted);
}

.rule {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  margin: 0 auto 1.75rem;
  max-width: 10rem;
}

.rule::before,
.rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.dot { font-size: 0.9rem; line-height: 1; }

h1 {
  margin: 0 0 1.25rem;
  font-weight: 400;
  font-size: clamp(1.5rem, 5vw, 2rem);
  letter-spacing: -0.01em;
}

.lede {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.75rem;
}

.disclosure {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Inner pages: left-aligned article column */
.site-header {
  width: min(100% - 2.5rem, var(--max-prose));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0 0;
  flex-wrap: nowrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0.25rem 0.5rem 0;
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.6rem;
}

.wrap.prose {
  width: min(100% - 2.5rem, var(--max-prose));
  margin: 0 auto;
  padding: 2rem 0 3.5rem;
  text-align: left;
  flex: 1;
}

.prose h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.6rem, 4.5vw, 2.15rem);
  line-height: 1.2;
}

.prose h2 {
  margin: 2.25rem 0 0.75rem;
  font-weight: 400;
  font-size: 1.35rem;
}

.prose h3 {
  margin: 1.5rem 0 0.4rem;
  font-weight: 400;
  font-size: 1.12rem;
}

.prose p,
.prose li {
  color: var(--ink);
}

.prose .lede,
.prose .meta,
.prose .disclosure,
.prose .note {
  color: var(--muted);
}

.prose .lede { font-size: 1.05rem; margin: 0 0 0.85rem; }
.prose .meta { font-size: 0.9rem; margin: 0 0 1.25rem; }
.prose .disclosure { margin: 0 0 1.25rem; font-size: 0.95rem; }
.prose .note { margin: 0 0 1rem; font-size: 0.9rem; }

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.prose li { margin: 0.35rem 0; }

.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

caption {
  text-align: left;
  caption-side: top;
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  vertical-align: middle;
  padding: 0.35rem 0.7rem 0.35rem 0;
  border-bottom: 1px solid var(--line);
}

th { font-weight: 600; }

/* Keep compact columns on one line; the table wraps can scroll. */
td:nth-child(2),
td:nth-child(3),
td:nth-child(4),
td:nth-child(5) {
  white-space: nowrap;
}

table a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}

.buy { margin: 0.35rem 0 0; font-size: 0.95rem; }

.buy a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0;
}

.faq dt { margin: 1rem 0 0.25rem; font-weight: 600; }
.faq dd { margin: 0; }

.sources { font-size: 0.92rem; }
.sources li { margin: 0.35rem 0; }

/* Expand inline citation and meta link hit areas without stretching line height. */
.prose p a,
.prose li a,
.prose .meta a {
  position: relative;
}

.prose p a::after,
.prose li a::after,
.prose .meta a::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 44px);
  height: max(100%, 44px);
  transform: translate(-50%, -50%);
}

footer {
  padding: 1.25rem 1rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

footer p { margin: 0; }

footer .disclosure {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
}

.footer-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem 0.5rem;
  margin: 0 0 0.25rem;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.75rem;
}

@media (max-width: 390px) {
  .wrap {
    width: min(100% - 2rem, var(--max));
    padding: 3rem 0 2.5rem;
  }

  .site-header,
  .wrap.prose {
    width: min(100% - 2rem, var(--max-prose));
  }

  .wrap.prose { padding: 1.5rem 0 2.5rem; }

  .nav a,
  .footer-nav a {
    padding: 0.5rem 0.45rem;
  }
}
