:root {
  --ink: #09152b;
  --ink-soft: #34405a;
  --chalk: #fbfaf4;
  --paper: #f3efe2;
  --stone: #d8cfb8;
  --field: #31583f;
  --hedge: #163d2c;
  --plum: #653a56;
  --line: rgba(9, 21, 43, .16);
  --shadow: 0 18px 48px rgba(9, 21, 43, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.62;
  overflow-x: hidden;
}

main,
.site-header,
.site-footer,
.hero,
.page-hero,
.section {
  width: 100%;
  max-width: 100vw;
}

main {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 52px);
  background: rgba(251, 250, 244, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--chalk);
  font-size: 12px;
  letter-spacing: 0;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 18px;
  font-size: 14px;
  font-weight: 700;
}

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

nav a[aria-current="page"] {
  color: var(--hedge);
  border-bottom: 2px solid var(--hedge);
}

.hero {
  min-height: 78vh;
  display: flex;
  align-items: end;
  background-size: cover;
  background-position: center;
  color: var(--chalk);
  padding: clamp(72px, 10vw, 132px) clamp(20px, 6vw, 88px);
}

.hero-inner {
  max-width: 940px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--plum);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f4dba8;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 980px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 700;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4vw, 54px);
}

h3 {
  font-size: 22px;
  line-height: 1.18;
}

.hero-copy {
  max-width: 720px;
  margin: 24px 0 0;
  font-size: clamp(19px, 2vw, 24px);
  color: rgba(251, 250, 244, .88);
}

.hero-actions,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.social-row {
  margin-top: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid currentColor;
  text-decoration: none;
  font-weight: 800;
}

.button.primary {
  background: var(--chalk);
  color: var(--ink);
}

.button.secondary {
  color: var(--chalk);
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.proof-strip span {
  padding: 18px 22px;
  border-right: 1px solid var(--line);
  font-size: 14px;
  font-weight: 900;
  color: var(--hedge);
}

.section {
  padding: clamp(56px, 8vw, 104px) clamp(20px, 6vw, 88px);
}

.section > *,
.page-hero > *,
.article-header > *,
.route-card,
.note-panel {
  min-width: 0;
}

.split-intro,
.two-column {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(280px, 1.1fr);
  gap: clamp(30px, 6vw, 84px);
  align-items: start;
}

.split-intro p:last-child,
.page-hero p,
.article-header p {
  max-width: 760px;
  color: var(--ink-soft);
  font-size: 20px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.text-link {
  color: var(--hedge);
  font-weight: 900;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}

.card-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.compact-section {
  padding-top: clamp(32px, 5vw, 64px);
  padding-bottom: clamp(38px, 5vw, 72px);
}

.previous-work-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .46);
}

.previous-work-box .route-card {
  box-shadow: none;
}

.article-card,
.note-panel,
.research-row,
.route-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .56);
}

.article-card {
  overflow: hidden;
  box-shadow: var(--shadow);
}

.note-panel {
  overflow-wrap: anywhere;
}

.card-image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 20px;
}

.card-body h3 a,
.research-row h3 a {
  text-decoration: none;
}

.card-body p:last-child,
.research-row p:last-child {
  color: var(--ink-soft);
}

.meta,
.meta-line,
.archive-stats {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.tone-band {
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.research-list {
  display: grid;
  gap: 14px;
}

.research-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 22px;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.route-card {
  display: grid;
  gap: 10px;
  padding: 24px;
  text-decoration: none;
}

.route-card span {
  color: var(--plum);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.route-card strong {
  font-size: 22px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.route-card p {
  margin: 0;
  color: var(--ink-soft);
}

.route-card small {
  color: var(--hedge);
  font-weight: 900;
  line-height: 1.35;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.topic-card {
  align-content: start;
}

.page-hero,
.article-header {
  padding: clamp(58px, 8vw, 108px) clamp(20px, 6vw, 88px) clamp(38px, 5vw, 72px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.archive-hero {
  background: var(--chalk);
}

.archive-stats,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 22px;
}

.archive-stats span,
.meta-line span {
  border-left: 3px solid var(--field);
  padding-left: 10px;
}

.article-shell {
  background: var(--chalk);
}

.back-link {
  display: inline-block;
  margin-bottom: 26px;
  color: var(--hedge);
  font-weight: 900;
}

.article-hero-image {
  width: min(1120px, calc(100% - 40px));
  margin: clamp(34px, 5vw, 64px) auto 0;
  border-bottom: 1px solid var(--line);
}

.article-hero-image img {
  display: block;
  width: 100%;
  height: auto;
}

.article-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 760px);
  gap: clamp(28px, 5vw, 72px);
  justify-content: center;
  padding: clamp(42px, 7vw, 90px) 20px;
}

.article-layout > * {
  min-width: 0;
}

.toc {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 18px 0;
  border-top: 2px solid var(--ink);
}

.toc h2 {
  font-family: inherit;
  font-size: 14px;
  text-transform: uppercase;
}

.toc a {
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
}

.article-body {
  min-width: 0;
  max-width: 72ch;
  font-size: 18px;
  line-height: 1.68;
  overflow-wrap: break-word;
}

.article-body a,
.citation-block a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article-body h2 {
  scroll-margin-top: 110px;
  margin-top: 2.2em;
  margin-bottom: .55em;
  font-size: clamp(30px, 3vw, 42px);
}

.article-body h3 {
  scroll-margin-top: 110px;
  margin-top: 1.8em;
  margin-bottom: .45em;
}

.article-body p,
.article-body ul,
.article-body ol {
  margin: 0 0 1.1em;
}

.article-body blockquote {
  position: relative;
  margin: 34px 0;
  padding: 24px 28px 24px 34px;
  border-left: 5px solid var(--field);
  border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, rgba(237, 243, 232, .96), rgba(255, 253, 246, .72));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .74);
}

.article-body blockquote::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0;
  width: 5px;
  height: 100%;
  border-radius: 999px;
  background: var(--field);
}

.article-body blockquote p {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(23px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0;
}

.agent-steps {
  margin: 24px 0 0;
  padding-left: 1.25em;
}

.agent-steps li {
  margin-bottom: .8em;
  overflow-wrap: anywhere;
}

.article-body img {
  width: 100%;
  height: auto;
  margin: 28px 0;
  border-radius: 8px;
  border: 1px solid var(--line);
}

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

.article-share {
  margin-top: 42px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .58), rgba(243, 239, 226, .88));
}

.article-share h2 {
  margin-bottom: 10px;
  font-size: clamp(27px, 3vw, 36px);
}

.article-share p:not(.eyebrow) {
  max-width: 56ch;
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 16px;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-actions a,
.share-actions button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--field);
  border-radius: 999px;
  background: transparent;
  color: var(--hedge);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
}

.share-actions a:hover,
.share-actions button:hover,
.share-actions a:focus-visible,
.share-actions button:focus-visible {
  background: var(--field);
  color: var(--chalk);
}

.citation-block,
.code-list {
  margin-top: 42px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.citation-block h2 {
  margin-bottom: 18px;
  font-size: clamp(28px, 3vw, 38px);
}

.citation-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.citation-list div {
  min-width: 0;
}

.citation-list dt {
  color: var(--plum);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.citation-list dd {
  margin: 4px 0 0;
}

.citation-list code {
  display: block;
  color: var(--ink);
  white-space: normal;
  overflow-wrap: anywhere;
}

.citation-note {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.code-list {
  display: grid;
  gap: 10px;
}

.code-list a,
.code-list code {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.code-list code {
  display: block;
}

.search-shell {
  padding-top: clamp(42px, 6vw, 72px);
}

.search-form {
  display: grid;
  gap: 10px;
  max-width: 860px;
}

.search-form label {
  color: var(--plum);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.search-form input[type="search"] {
  width: 100%;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  color: var(--ink);
  font: inherit;
  font-size: 20px;
}

.search-form input[type="search"]:focus {
  outline: 3px solid rgba(49, 88, 63, .22);
  border-color: var(--field);
}

.search-meta {
  max-width: 860px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
}

.search-results {
  display: grid;
  gap: 14px;
  max-width: 960px;
  margin-top: 24px;
}

.search-result,
.search-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .56);
  padding: 22px;
}

.search-result h2 {
  margin: 6px 0 10px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
}

.search-result h2 a {
  text-decoration: none;
}

.search-result p {
  max-width: 72ch;
}

.search-result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 900;
}

.search-result-links a {
  color: var(--hedge);
  overflow-wrap: anywhere;
}

.connect-band {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--plum);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 36px clamp(20px, 6vw, 88px);
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: var(--chalk);
}

.site-footer p {
  margin: 6px 0 0;
  color: rgba(251, 250, 244, .72);
}

.site-footer .copyright {
  font-size: 14px;
}

.site-footer .site-version {
  font-size: 13px;
}

.site-footer a {
  color: var(--chalk);
}

@media (max-width: 900px) {
  .site-header,
  .site-footer,
  .connect-band,
  .section-heading,
  .research-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .proof-strip,
  .split-intro,
  .two-column,
  .card-grid.three,
  .previous-work-box,
  .route-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 72vh;
  }

  .toc {
    position: static;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 34px;
    line-height: 1.08;
  }

  h2 {
    font-size: 30px;
    line-height: 1.1;
  }

  h3 {
    font-size: 20px;
  }

  .page-hero,
  .article-header,
  .section,
  .hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .split-intro p:last-child,
  .page-hero p,
  .article-header p {
    font-size: 18px;
  }

  .route-card {
    padding: 20px;
  }

  .route-card strong {
    font-size: 20px;
  }

  .site-header {
    position: static;
  }

  nav {
    justify-content: flex-start;
  }

  .proof-strip {
    display: none;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 30px;
  }
}