:root {
  --paper: #f4efe8;
  --paper-strong: #fbf8f3;
  --ink: #231d18;
  --muted: #6f655c;
  --accent: #8a6042;
  --accent-soft: rgba(138, 96, 66, 0.12);
  --line: rgba(35, 29, 24, 0.12);
  --shadow: 0 24px 60px rgba(45, 34, 24, 0.08);
  --sans: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", serif;
  --mono: "SFMono-Regular", "SF Mono", "Cascadia Code", "Menlo", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(138, 96, 66, 0.16), transparent 28rem),
    linear-gradient(180deg, #efe6db 0%, var(--paper) 48%, #f8f5f0 100%);
  font-family: var(--serif);
  line-height: 1.72;
}

a {
  color: inherit;
  text-decoration-color: rgba(138, 96, 66, 0.45);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: rgba(138, 96, 66, 0.8);
}

code,
pre,
kbd {
  font-family: var(--mono);
}

.site-shell {
  width: min(1120px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero,
.panel,
.article-shell,
.topbar {
  background: rgba(251, 248, 243, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hero {
  padding: 3.25rem;
  border-radius: 1.75rem;
}

.eyebrow,
.section-label,
.topbar-note {
  margin: 0 0 0.8rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.lede,
.quiet-note {
  max-width: 44rem;
  margin: 1.4rem 0 0;
  font-size: 1.15rem;
}

.quiet-note {
  color: var(--muted);
  font-size: 1rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.95fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.panel {
  border-radius: 1.5rem;
  padding: 1.75rem;
}

.panel-compact {
  align-self: start;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.05;
}

.article-list,
.reference-list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.article-list {
  display: grid;
  gap: 0.9rem;
}

.article-card {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(138, 96, 66, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 239, 232, 0.92));
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.article-card:hover {
  transform: translateY(-1px);
  border-color: rgba(138, 96, 66, 0.32);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 246, 240, 0.96));
}

.article-number {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.16rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.article-copy {
  display: grid;
  gap: 0.28rem;
}

.article-copy strong {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
}

.article-copy span:last-child,
.reference-list li {
  color: var(--muted);
}

.reference-list {
  display: grid;
  gap: 0.85rem;
}

.reference-list a {
  font-family: var(--sans);
  font-weight: 600;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 1.25rem;
  margin-bottom: 1rem;
}

.brand {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.topbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--sans);
  font-size: 0.92rem;
}

.article-shell {
  border-radius: 1.6rem;
  padding: 0;
  overflow: hidden;
}

.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.4rem 1.6rem;
}

.article-body h1,
.article-body h2,
.article-body h3 {
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.article-body h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  margin: 0 0 1rem;
}

.article-body h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 2.6rem 0 1rem;
}

.article-body h3 {
  font-size: 1.2rem;
  margin: 1.8rem 0 0.7rem;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body table,
.article-body pre {
  margin: 1rem 0;
}

.article-body ul,
.article-body ol {
  padding-left: 1.25rem;
}

.article-body li + li {
  margin-top: 0.3rem;
}

.article-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.6rem 0;
}

.article-body blockquote {
  margin-left: 0;
  padding: 0.1rem 0 0.1rem 1rem;
  border-left: 3px solid rgba(138, 96, 66, 0.32);
  color: var(--muted);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.article-body th,
.article-body td {
  min-width: 8rem;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid rgba(35, 29, 24, 0.08);
  text-align: left;
  vertical-align: top;
}

.article-body thead th {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-body pre {
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: #221d1a;
  color: #f6efe5;
  overflow-x: auto;
}

.article-body code {
  font-size: 0.92em;
}

.article-body :not(pre) > code {
  padding: 0.12rem 0.35rem;
  border-radius: 0.42rem;
  background: var(--accent-soft);
}

.article-loading,
.article-error {
  font-family: var(--sans);
  color: var(--muted);
}

.article-error {
  color: #8b433c;
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 0 1.4rem 1.6rem;
  max-width: 940px;
  margin: 0 auto;
}

.nav-card {
  display: block;
  min-height: 100%;
  padding: 1rem 1.05rem;
  border-radius: 1rem;
  border: 1px solid rgba(138, 96, 66, 0.16);
  background: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.nav-card span {
  display: block;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1rem;
}

.nav-card-home {
  text-align: center;
}

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100vw - 1rem, 100%);
    padding-top: 0.75rem;
  }

  .hero,
  .panel {
    padding: 1.4rem;
  }

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

  .article-body {
    padding: 2rem 1rem 1.2rem;
  }

  .article-nav {
    grid-template-columns: 1fr;
    padding: 0 1rem 1.2rem;
  }
}
