:root {
  --ink: #243447;
  --muted: #52616b;
  --paper: #fffaf0;
  --surface: #ffffff;
  --line: #d9e2dc;
  --teal: #1f785e;
  --teal-dark: #155644;
  --maroon: #9d3f4f;
  --gold: #c5862d;
  --blue: #355c7d;
  --shadow: 0 16px 42px rgba(36, 52, 71, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--teal-dark);
  text-decoration: none;
}

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

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(36, 52, 71, 0.12);
  background: rgba(255, 250, 240, 0.94);
  backdrop-filter: blur(12px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--teal);
  font-family: "JetBrains Mono", monospace;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  font-size: 0.92rem;
  font-weight: 700;
}

.section-nav a {
  color: var(--muted);
}

.section-nav a:hover {
  color: var(--teal-dark);
}

.hero {
  padding: 72px 0 38px;
  border-bottom: 1px solid rgba(36, 52, 71, 0.1);
}

.hero-grid {
  display: block;
}

.hero-copy {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--maroon);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.16;
}

h1 {
  margin: 0 auto;
  max-width: 960px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2rem, 4.2vw, 3.7rem);
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.authors,
.affiliation {
  margin: 16px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.lead {
  max-width: none;
  margin: 22px auto 0;
  font-size: 1rem;
  text-align: justify;
  text-justify: inter-word;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.action-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(31, 120, 94, 0.28);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(36, 52, 71, 0.08);
  color: var(--ink);
  font-weight: 800;
}

.action-pill.primary {
  color: #fff;
  background: var(--teal);
}

.action-pill:hover {
  transform: translateY(-1px);
}

.section {
  padding: 64px 0;
}

.section.alt {
  background: #f3f7f1;
}

.section-header {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 26px;
}

.section-kicker {
  color: var(--maroon);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 800;
  text-transform: uppercase;
}

.section-title-only {
  grid-column: 1 / -1;
}

.section h2 {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.45rem, 2.35vw, 2.35rem);
  text-align: center;
}

.section h2.section-subtitle {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  margin-top: 0.05rem;
}

.section h3 {
  margin: 28px 0 10px;
  font-size: 1.18rem;
}

.prose {
  width: 100%;
  max-width: none;
}

.prose p {
  margin: 0 0 16px;
  max-width: none;
}

.lead,
.prose p,
.callout,
.meta-item,
.agent,
.feature,
.case,
.ethic,
.figure figcaption,
.excerpt,
td,
.reference-list li,
.footer p {
  text-align: justify;
  text-justify: inter-word;
}

.callout {
  margin: 26px 0;
  padding: 20px 22px;
  border-left: 5px solid var(--gold);
  background: #fff6de;
  font-weight: 650;
}

.meta-grid,
.agent-grid,
.feature-grid,
.case-grid,
.ethics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0;
}

.agent-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meta-item,
.agent,
.feature,
.case,
.ethic {
  min-height: 100%;
  padding: 20px;
  border: 1px solid rgba(36, 52, 71, 0.12);
  border-radius: 8px;
  background: var(--surface);
}

.meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  box-shadow: 0 10px 24px rgba(31, 120, 94, 0.18);
  font-size: 1.15rem;
}

.meta-item strong,
.agent strong,
.feature strong,
.case strong,
.ethic strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.figure {
  margin: 32px 0;
  border: 1px solid rgba(36, 52, 71, 0.12);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(36, 52, 71, 0.08);
}

.figure img {
  width: 100%;
  background: #fff;
}

.compact-figure {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.figure figcaption {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.excerpt {
  margin: 24px 0;
  padding: 22px;
  border: 1px solid #d7cab1;
  border-left: 5px solid var(--maroon);
  border-radius: 8px;
  background: #fffdf8;
  color: #2f3842;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-x: auto;
}

.table-wrap {
  margin: 26px 0;
  overflow-x: auto;
  border: 1px solid rgba(36, 52, 71, 0.12);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink);
  background: #edf4ec;
  font-size: 0.9rem;
}

td {
  color: #354650;
}

.reference-list {
  padding-left: 22px;
}

.reference-list li {
  margin-bottom: 12px;
}

.footer {
  padding: 32px 0;
  border-top: 1px solid rgba(36, 52, 71, 0.12);
  color: var(--muted);
  background: var(--surface);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .topbar,
  .hero-grid,
  .section-header {
    display: block;
  }

  .section-nav {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .meta-grid,
  .agent-grid,
  .feature-grid,
  .case-grid,
  .ethics-grid,
  .screenshot-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  .hero {
    padding-top: 44px;
  }

  .section {
    padding: 46px 0;
  }

  .actions {
    display: grid;
  }

  .action-pill {
    justify-content: center;
  }
}
