:root {
  --text: #2c2825;
  --muted: #8a8279;
  --background: #f7f5f0;
  --rule: #e3ddd4;
  --accent: #b44a2f;
}

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

html {
  font-size: clamp(16px, 0.875rem + 0.5vw, 20px);
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

.page {
  max-width: 68ch;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.home-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding-top: 0;
  padding-bottom: 0;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.02em;
}

.article-title {
  max-width: 54ch;
  font-size: clamp(1.6rem, 4vw, 2rem);
  line-height: 1.18;
}

h2 {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.prose h2 {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.25em;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
  line-height: 1.3;
  margin: 3.5rem 0 1rem;
}

.prose h2:first-child {
  margin-top: 0.5rem;
}

.prose h3 {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.1em;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin: 2rem 0 0.75rem;
}

p {
  margin: 0 0 18px;
}

.prose {
  max-width: 65ch;
}

.prose p {
  margin: 0 0 1.4em;
}

.prose hr {
  border: none;
  margin: 0;
  height: 0;
}

.article-subtitle {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin: 0 0 4px;
}

.article-meta {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 28px;
}

.prose aside {
  border-left: 2px solid var(--rule);
  padding-left: 1.2em;
  color: var(--muted);
  margin: 0 0 1.4em;
}

.nav-row,
.link-row {
  color: var(--muted);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
}

.nav-row {
  margin: 0 0 20px;
}

.nav-row a {
  color: inherit;
  text-decoration: none;
}

.nav-row a:hover {
  text-decoration: underline;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 22px 0 0;
}

.link-row a {
  color: inherit;
  text-decoration: none;
}

.link-row a:hover {
  text-decoration: underline;
}

.subsection {
  margin-top: 36px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

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

.plain-list li {
  padding: 4px 0;
}

.plain-list a {
  text-decoration: none;
}

.plain-list a:hover {
  text-decoration: underline;
}

.list-more {
  font-style: italic;
  font-size: 0.92em;
  color: var(--muted);
}

.book-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.book-list li {
  padding: 3px 0;
}

.gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.gate input {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  outline: none;
}

.gate input:focus {
  border-color: var(--muted);
}

.thesis-box {
  border-left: 2px solid var(--accent);
  padding-left: 1.2em;
  margin: 0 0 1.4em;
}

.thesis-box > :last-child {
  margin-bottom: 0;
}

.thesis-label {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.glossary {
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.25rem 1.5rem;
  margin: 0 0 1.4em;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  line-height: 1.6;
}

.glossary-title {
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.glossary dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1rem;
  margin: 0;
}

.glossary dt {
  font-weight: 600;
  color: var(--text);
}

.glossary dd {
  margin: 0;
  color: var(--muted);
}

.chart-container {
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.5rem;
  margin: 0 0 1.4em;
}

.chart-title {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.75rem;
  text-align: center;
}

.chart-subtitle {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
}

.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0 0 1.4em;
}

.flow-diagram {
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.5rem 1.25rem;
  margin: 0 0 1.4em;
  overflow-x: auto;
}

.flow-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.72rem;
}

.flow-step {
  text-align: center;
  padding: 0.45rem 0.5rem;
  border-radius: 3px;
  line-height: 1.3;
  flex-shrink: 0;
}

.flow-step strong {
  display: block;
  font-weight: 600;
  font-size: 0.75rem;
}

.flow-step span {
  font-size: 0.6rem;
  opacity: 0.75;
}

.flow-arrow {
  font-size: 1rem;
  color: var(--muted);
  flex-shrink: 0;
  padding: 0 0.2rem;
}

.company-table-wrap {
  overflow-x: auto;
  margin: 0 0 1.4em;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  line-height: 1.5;
}

.company-table th {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 0.4rem 0.5rem;
  border-bottom: 1.5px solid var(--text);
  white-space: nowrap;
}

.company-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.company-table td:first-child {
  font-weight: 600;
  white-space: nowrap;
}

.company-table th:nth-child(2),
.company-table th:nth-child(3),
.company-table th:nth-child(4),
.company-table td:nth-child(2),
.company-table td:nth-child(3),
.company-table td:nth-child(4) {
  text-align: right;
  white-space: nowrap;
}

.company-table td:nth-child(2),
.company-table td:nth-child(3),
.company-table td:nth-child(4) {
  font-variant-numeric: tabular-nums;
}

.company-table td:last-child {
  color: var(--muted);
  line-height: 1.45;
}

.choke-item {
  margin-bottom: 1.4em;
}

.choke-label {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
}

.choke-item p {
  font-size: 0.95em;
  line-height: 1.62;
  margin-bottom: 0;
}

.closing-statement {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.prose .footnotes {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

@media (max-width: 640px) {
  body {
    font-size: 1.02rem;
  }

  .page {
    padding: 38px 18px 56px;
  }

  .home-page {
    padding: 0 18px;
  }

  .subsection {
    margin-top: 30px;
    padding-top: 12px;
  }

  .chart-row {
    grid-template-columns: 1fr;
  }
}
