:root {
  --paper: #f4f0e6;
  --paper-deep: #ebe4d5;
  --card: rgba(255, 253, 248, 0.78);
  --ink: #17231d;
  --muted: #657068;
  --forest: #234638;
  --forest-light: #355e4d;
  --red: #d75b45;
  --yellow: #e5b94f;
  --line: rgba(23, 35, 29, 0.15);
  --shadow: 0 18px 55px rgba(35, 48, 39, 0.09);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: ui-serif, "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 4%, rgba(229, 185, 79, 0.2), transparent 22rem),
    radial-gradient(circle at 5% 25%, rgba(35, 70, 56, 0.09), transparent 27rem),
    var(--paper);
  font-family: var(--sans);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 0.9rem;
  color: white;
  background: var(--forest);
  border-radius: 0.5rem;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  width: min(1180px, calc(100% - 3rem));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 720;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--forest);
  border-radius: 10px 4px 10px 4px;
  font-family: var(--serif);
  font-size: 1.15rem;
}

.topbar nav,
.site-footer div {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.topbar nav a,
.site-footer a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.topbar nav a:hover,
.site-footer a:hover {
  color: var(--ink);
}

.hero,
.catalog,
.method,
.scope-note,
.site-footer {
  width: min(1180px, calc(100% - 3rem));
  margin-inline: auto;
}

.catalog {
  width: min(1520px, calc(100% - 3rem));
}

.hero {
  min-height: 610px;
  padding: 7.5rem 0 5.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(290px, 0.7fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.4rem, 8vw, 7.6rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.hero h1 em {
  color: var(--forest);
  font-style: normal;
  white-space: nowrap;
}

.hero-lede {
  max-width: 690px;
  margin: 2.2rem 0 0;
  color: #47534b;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.2rem;
}

.button {
  min-height: 48px;
  padding: 0.78rem 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: white;
  background: var(--forest);
}

.button-primary:hover {
  background: var(--forest-light);
}

.button-secondary {
  color: var(--forest);
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(35, 70, 56, 0.3);
}

.stats {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  transform: rotate(1.5deg);
  box-shadow: var(--shadow);
}

.stats div {
  min-height: 142px;
  padding: 1.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(255, 253, 248, 0.72);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats dt {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.stats dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.scope-note {
  padding: 1.1rem 1.35rem;
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  background: var(--forest);
  color: #f7f2e8;
  border-radius: 1rem;
}

.scope-note span {
  flex: 0 0 auto;
  color: #f4c95d;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.scope-note p {
  margin: 0;
  font-size: 0.92rem;
}

.catalog,
.method {
  padding: 7rem 0;
}

.section-heading {
  margin-bottom: 2.5rem;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.62fr);
  gap: 3rem;
  align-items: end;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.catalog-tools {
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 253, 248, 0.58);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.search-box {
  position: relative;
  flex: 1 1 300px;
}

.search-box input {
  width: 100%;
  height: 44px;
  padding: 0 3rem 0 1rem;
  color: var(--ink);
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  outline: none;
}

.search-box input:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(35, 70, 56, 0.12);
}

.search-box kbd {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  min-width: 24px;
  padding: 0.05rem 0.35rem;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  text-align: center;
  transform: translateY(-50%);
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-button {
  padding: 0.5rem 0.75rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.filter-button:hover {
  color: var(--ink);
  border-color: var(--line);
}

.filter-button.is-active {
  color: white;
  background: var(--forest);
}

.result-count {
  margin: 1.25rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.channel-note {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.matrix-list {
  min-width: 0;
}

.matrix-board {
  min-width: 0;
}

.matrix-scroll {
  margin-top: 1.4rem;
  overflow-x: auto;
  background: rgba(255, 253, 248, 0.52);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  box-shadow: 0 12px 34px rgba(35, 48, 39, 0.05);
  scrollbar-color: rgba(35, 70, 56, 0.35) transparent;
  scrollbar-width: thin;
}

.matrix-scroll:focus-visible {
  outline: 3px solid rgba(35, 70, 56, 0.22);
  outline-offset: 3px;
}

.agent-matrix {
  width: 100%;
  min-width: 1720px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.78rem;
}

.agent-matrix th,
.agent-matrix td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.agent-matrix tr:last-child > * {
  border-bottom: 0;
}

.agent-matrix tr > *:last-child {
  border-right: 0;
}

.agent-matrix thead th {
  height: 66px;
  padding: 0.75rem;
  color: var(--muted);
  background: #eee8dc;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.matrix-corner {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 205px;
  min-width: 205px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--ink) !important;
  text-align: left !important;
}

.matrix-corner span:last-child {
  color: var(--red);
}

.agent-matrix tbody th {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 205px;
  min-width: 205px;
  padding: 1rem;
  color: var(--ink);
  background: #f6f2e9;
  text-align: left;
}

.agent-matrix tbody th strong {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.25;
}

.agent-matrix tbody th span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 500;
}

.vendor-row {
  min-height: 112px;
}

.vendor-row:hover > th,
.vendor-row:hover > td {
  background-color: rgba(229, 185, 79, 0.06);
}

.matrix-cell {
  min-width: 135px;
  height: 112px;
  padding: 0.45rem;
  vertical-align: top;
  background: rgba(255, 255, 255, 0.16);
}

.matrix-model-group + .matrix-model-group {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed rgba(101, 112, 104, 0.28);
}

.matrix-model-group h4 {
  margin: 0 0 0.45rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 0.78rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.matrix-entry {
  min-height: 92px;
  margin: 0;
  padding: 0.72rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--forest);
  background: rgba(35, 70, 56, 0.08);
  border: 1px solid rgba(35, 70, 56, 0.14);
  border-radius: 0.72rem;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.matrix-entry + .matrix-entry {
  margin-top: 0.4rem;
}

.matrix-entry:hover {
  border-color: currentColor;
  box-shadow: 0 7px 18px rgba(35, 48, 39, 0.09);
  transform: translateY(-2px);
}

.matrix-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.matrix-entry strong {
  font-size: 0.75rem;
}

.matrix-entry small {
  color: currentColor;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.61rem;
  opacity: 0.72;
}

.channel-badge {
  width: fit-content;
  max-width: 100%;
  padding: 0.15rem 0.42rem;
  color: #725512;
  background: rgba(229, 185, 79, 0.2);
  border: 1px solid rgba(114, 85, 18, 0.16);
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 750;
  line-height: 1.25;
}

.review-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--yellow);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(229, 185, 79, 0.18);
}

.matrix-empty {
  min-height: 92px;
  display: grid;
  place-items: center;
  color: rgba(101, 112, 104, 0.34);
}

.model-category {
  margin-top: 4rem;
}

.model-category:first-child {
  margin-top: 2rem;
}

.category-header {
  padding-bottom: 1.2rem;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 0.55fr);
  gap: 2rem;
  align-items: end;
  border-bottom: 2px solid var(--ink);
}

.category-header .eyebrow {
  margin-bottom: 0.45rem;
}

.category-header h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.category-header > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.model-list {
  display: grid;
  gap: 1.4rem;
  margin-top: 1.4rem;
}

.model-group {
  padding: 1.2rem;
  background: rgba(255, 253, 248, 0.34);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
}

.model-group-header {
  min-height: 46px;
  padding: 0.1rem 0.25rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.model-group-header h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}

.model-group-header span {
  color: var(--muted);
  font-size: 0.72rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.output-card {
  position: relative;
  min-height: 300px;
  padding: 1.45rem;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  box-shadow: 0 8px 24px rgba(35, 48, 39, 0.04);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.output-card:hover {
  z-index: 1;
  border-color: rgba(35, 70, 56, 0.45);
  box-shadow: var(--shadow);
  transform: translateY(-5px) rotate(-0.25deg);
}

.card-topline {
  min-height: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.harness-badge,
.review-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.harness-badge {
  color: var(--forest);
  background: rgba(35, 70, 56, 0.1);
}

.agent-codex,
.agent-cowork,
.agent-claude-code,
.agent-grok-build,
.agent-agy {
  color: #24465a;
  background: rgba(48, 78, 93, 0.12);
}

.agent-pi,
.agent-qoder,
.agent-kimi-code,
.agent-kimi-work {
  color: #8f2f21;
  background: rgba(215, 91, 69, 0.13);
}

.agent-dpsh,
.agent-workbuddy,
.agent-zcode,
.agent-doubao-pro {
  color: #725512;
  background: rgba(229, 185, 79, 0.2);
}

.review-badge {
  color: #725512;
  background: rgba(229, 185, 79, 0.2);
}

.output-card h3 {
  margin: 1.6rem 0 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.output-card h3 a {
  text-decoration: none;
}

.output-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.sample-id {
  margin: 0.4rem 0 0;
  color: var(--red);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
}

.run-time {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.67rem;
}

.card-title {
  margin: 1.4rem 0 0.65rem;
  color: #3e4942;
  font-weight: 700;
  line-height: 1.45;
}

.card-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

.card-footer {
  margin-top: auto;
  padding-top: 1.3rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.72rem;
  border-top: 1px solid var(--line);
}

.empty-state {
  padding: 5rem 1rem;
  color: var(--muted);
  text-align: center;
}

.method {
  border-top: 1px solid var(--line);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.method-grid article {
  min-height: 260px;
  padding: 1.7rem;
  background: var(--forest);
  color: #f6f1e8;
  border-radius: 1.1rem;
}

.method-grid article:nth-child(2) {
  background: #304e5d;
}

.method-grid article:nth-child(3) {
  background: #65493d;
}

.method-grid span {
  color: #f1c35d;
  font-family: var(--serif);
  font-size: 2.6rem;
}

.method-grid h3 {
  margin: 2.2rem 0 0.75rem;
  font-family: var(--serif);
  font-size: 1.45rem;
}

.method-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9rem;
}

.text-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--forest);
  font-weight: 700;
}

.site-footer {
  min-height: 110px;
  padding: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

.site-footer p {
  margin: 0;
}

/* Reader */
.reader-topbar {
  width: min(1380px, calc(100% - 3rem));
}

.reader-layout {
  width: min(1380px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 4rem 0 7rem;
  display: grid;
  grid-template-columns: 290px minmax(0, 820px);
  gap: clamp(3rem, 8vw, 8rem);
  justify-content: center;
  align-items: start;
}

.reader-sidebar {
  position: sticky;
  top: 1.5rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink);
}

.reader-identity {
  padding: 1.4rem;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.reader-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.reader-badges .channel-badge {
  min-height: 24px;
  padding: 0.2rem 0.55rem;
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
}

.reader-identity .eyebrow {
  margin: 1.4rem 0 0.25rem;
  font-size: 0.62rem;
}

.reader-identity h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1.15;
}

.reader-facts {
  margin: 1.2rem 0;
  padding: 0;
}

.reader-facts div {
  padding: 0.65rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
}

.reader-facts dt {
  color: var(--muted);
}

.reader-facts dd {
  margin: 0;
  text-align: right;
}

.reader-actions {
  display: grid;
  gap: 0.5rem;
}

.action-link {
  padding: 0.72rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--forest);
  background: rgba(255, 253, 248, 0.48);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  font-size: 0.78rem;
  text-decoration: none;
}

.action-link:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(35, 70, 56, 0.38);
}

.action-link span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  background: rgba(35, 70, 56, 0.1);
  border-radius: 50%;
}

.toc {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.toc > p {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.toc ol {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.48rem;
  list-style: none;
}

.toc a {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
  text-decoration: none;
}

.toc a:hover {
  color: var(--red);
}

.reader-main {
  min-width: 0;
}

.article-header {
  padding: 2rem 0 3.2rem;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  max-width: 820px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.article-output-title {
  margin: 1.15rem 0 0;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.article-subtitle {
  margin: 1.5rem 0 0;
  color: #46524a;
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.8;
}

.article-description {
  margin: 1.1rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
  border-left: 3px solid var(--yellow);
  font-size: 0.88rem;
}

.prose {
  padding: 3.2rem 0 1rem;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.6vw, 1.18rem);
  line-height: 2.02;
}

.prose p {
  margin: 1.2em 0;
}

.prose h1,
.prose h2,
.prose h3 {
  scroll-margin-top: 2rem;
  font-family: var(--serif);
  line-height: 1.3;
  letter-spacing: -0.035em;
}

.prose h1 {
  margin: 3.3em 0 1.15em;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.prose h1:first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 2.7em 0 1em;
  font-size: 1.7rem;
}

.prose h3 {
  margin: 2.2em 0 0.85em;
  font-size: 1.35rem;
}

.prose strong {
  color: #122b20;
  background: linear-gradient(transparent 65%, rgba(229, 185, 79, 0.3) 0);
}

.prose blockquote {
  margin: 2rem 0;
  padding: 1.2rem 1.5rem;
  color: #3d4a42;
  background: rgba(35, 70, 56, 0.07);
  border-left: 4px solid var(--forest);
}

.prose pre {
  margin: 2rem 0;
  padding: 1.3rem;
  overflow-x: auto;
  color: #e8eee9;
  background: #1b2922;
  border-radius: 0.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.65;
}

.prose :not(pre) > code {
  padding: 0.12rem 0.35rem;
  color: #8e392b;
  background: rgba(215, 91, 69, 0.1);
  border-radius: 0.3rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84em;
}

.prose ul,
.prose ol {
  padding-left: 1.5em;
}

.prose li {
  margin: 0.45em 0;
}

.table-wrap {
  margin: 2rem 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.85rem;
}

.prose th,
.prose td {
  padding: 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.prose th {
  background: rgba(35, 70, 56, 0.08);
}

.article-pagination {
  margin-top: 5rem;
  padding-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  border-top: 1px solid var(--line);
}

.article-pagination a {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 0.75rem;
}

.article-pagination a:hover {
  background: rgba(255, 255, 255, 0.45);
}

.article-pagination .next {
  text-align: right;
}

.article-pagination small {
  color: var(--muted);
}

.reader-footer {
  width: min(1380px, calc(100% - 3rem));
}

.not-found {
  width: min(680px, calc(100% - 3rem));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.not-found h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1;
}

.not-found p:not(.eyebrow) {
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .stats {
    max-width: 620px;
    transform: none;
  }

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

  .method-grid article:last-child {
    grid-column: 1 / -1;
  }

  .catalog-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .reader-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 3rem;
  }
}

@media (max-width: 720px) {
  .topbar,
  .hero,
  .catalog,
  .method,
  .scope-note,
  .site-footer,
  .reader-layout,
  .reader-topbar,
  .reader-footer {
    width: min(100% - 2rem, 1180px);
  }

  .topbar {
    min-height: 68px;
  }

  .topbar nav a:first-child {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 5rem 0 4rem;
  }

  .hero h1 {
    font-size: clamp(3.1rem, 15vw, 5.5rem);
  }

  .hero h1 em {
    white-space: normal;
  }

  .scope-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }

  .catalog,
  .method {
    padding: 5rem 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .category-header {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .model-group {
    padding: 0.85rem;
  }

  .model-group-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .card-grid,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .method-grid article:last-child {
    grid-column: auto;
  }

  .output-card {
    min-height: 300px;
  }

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

  .site-footer div {
    flex-wrap: wrap;
  }

  .reader-layout {
    padding-top: 2rem;
    grid-template-columns: 1fr;
  }

  .reader-sidebar {
    position: static;
  }

  .toc {
    display: none;
  }

  .reader-actions {
    grid-template-columns: 1fr 1fr;
  }

  .article-header {
    padding-top: 0;
  }

  .prose {
    font-size: 1.04rem;
    line-height: 1.95;
  }
}

@media (max-width: 460px) {
  .brand span:last-child {
    font-size: 0.85rem;
  }

  .stats div {
    min-height: 118px;
    padding: 1.2rem;
  }

  .stats dt {
    font-size: 2.3rem;
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .reader-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
