:root {
  --paper: #f2f3ee;
  --surface: #fbfcf8;
  --ink: #12201b;
  --body: #435049;
  --muted: #6d7771;
  --line: #d8ddd6;
  --line-dark: #b8c2bb;
  --pine: #205741;
  --pine-dark: #143d2d;
  --pine-soft: #dce8e0;
  --rust: #a45236;
  --rust-soft: #f0dfd8;
  --blue: #345f7d;
  --blue-soft: #dbe6ed;
  --gold: #8b6b25;
  --gold-soft: #eee7d4;
  --sans: "Manrope", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --shadow: 0 20px 55px rgba(24, 45, 36, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.dialog-open { overflow: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
::selection { background: var(--pine); color: #fff; }
:focus-visible { outline: 3px solid rgba(32, 87, 65, .35); outline-offset: 3px; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-140%);
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
}
.skip-link:focus { transform: translateY(0); }
.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 {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(184, 194, 187, .72);
  background: rgba(242, 243, 238, .88);
  backdrop-filter: blur(16px);
}
.brand { font-weight: 700; text-decoration: none; letter-spacing: -.02em; }
.topbar nav { display: flex; gap: 24px; }
.topbar nav a {
  color: var(--body);
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
}
.topbar nav a:hover { color: var(--pine); }

.hero {
  display: grid;
  min-height: calc(100svh - 64px);
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, .65fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: center;
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(72px, 11vw, 150px) clamp(22px, 6vw, 90px);
}
.eyebrow, .panel-label, .map-index, .message-label {
  margin: 0 0 14px;
  color: var(--pine);
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 {
  max-width: 12ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.3rem, 8vw, 7rem);
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: .94;
}
h1 span { color: var(--pine); }
.dek {
  max-width: 730px;
  margin: 30px 0 0;
  color: var(--body);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.52;
}
.hero-actions, .download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pine);
  border-radius: 999px;
  padding: 10px 18px;
  background: transparent;
  color: var(--pine);
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button.primary { background: var(--pine); color: #fff; }
.button:hover { background: var(--pine-dark); border-color: var(--pine-dark); color: #fff; }
.hero-note {
  max-width: 690px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: .82rem;
}
.signal-panel {
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  padding: clamp(24px, 4vw, 40px);
  background: rgba(251, 252, 248, .72);
  box-shadow: var(--shadow);
}
.signal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  color: var(--body);
  font-size: .87rem;
}
.signal-row:last-of-type { border-bottom: 1px solid var(--line); }
.signal {
  border-radius: 999px;
  padding: 4px 9px;
  font-family: var(--mono);
  font-size: .62rem;
  white-space: nowrap;
}
.signal.strong { background: var(--pine-soft); color: var(--pine-dark); }
.signal.mixed { background: var(--gold-soft); color: #624814; }
.signal.limited { background: var(--rust-soft); color: #783824; }
.panel-foot { margin: 18px 0 0; color: var(--muted); font-size: .72rem; }

.section {
  padding: clamp(74px, 10vw, 130px) clamp(22px, 6vw, 90px);
  border-top: 1px solid var(--line-dark);
}
.section > * { max-width: 1320px; margin-left: auto; margin-right: auto; }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(300px, .62fr);
  gap: clamp(30px, 7vw, 100px);
  align-items: end;
  margin-bottom: 50px;
}
.section-head.compact { align-items: center; margin-bottom: 30px; }
h2 {
  margin: 0;
  max-width: 15ch;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1.02;
}
.section-head > p { margin: 0; color: var(--body); font-size: 1.02rem; }
.map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-dark);
  border-left: 1px solid var(--line-dark);
}
.map-card {
  min-height: 315px;
  padding: clamp(24px, 4vw, 42px);
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  background: rgba(251, 252, 248, .48);
}
.map-card h3 {
  max-width: 22ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.1;
}
.map-card > p:not(.map-index) { max-width: 62ch; color: var(--body); }
.map-card.cost .map-index { color: var(--rust); }
.map-card.market .map-index { color: var(--blue); }
.map-card.real .map-index { color: var(--gold); }
.text-button, .citation-demo {
  border: 0;
  padding: 0;
  background: none;
  color: var(--pine);
  font-size: .83rem;
  font-weight: 700;
  cursor: pointer;
}
.text-button:hover, .citation-demo:hover { text-decoration: underline; }
.tension {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  margin-top: 28px;
  padding: 28px;
  background: var(--ink);
  color: #f4f6f2;
}
.tension p { margin: 0; }
.tension-label {
  color: #9dc2ae;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.library { background: #e8ebe5; }
.download-links { justify-content: flex-end; margin: 0; }
.download-links a {
  border-bottom: 1px solid var(--pine);
  color: var(--pine);
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
}
.filters {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) repeat(3, minmax(155px, .55fr));
  gap: 10px;
}
.filters input, .filters select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
}
.filters input::placeholder { color: var(--muted); }
.result-line {
  margin: 20px auto;
  color: var(--body);
  font-size: .84rem;
}
.result-line span { color: var(--muted); }
.paper-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.paper-card {
  position: relative;
  display: flex;
  min-height: 340px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line-dark);
  padding: 23px;
  background: var(--surface);
}
.paper-card.top-venue { border-top: 3px solid var(--pine); }
.paper-card .paper-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.source-id { color: var(--pine); font-weight: 500; }
.paper-card h3 {
  margin: 22px 0 10px;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
}
.paper-authors, .paper-venue { margin: 0; color: var(--body); font-size: .78rem; }
.paper-venue { margin-top: 5px; color: var(--muted); }
.paper-finding { margin: 22px 0; color: var(--body); font-size: .88rem; }
.paper-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.evidence-pill {
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--gold-soft);
  color: #624814;
  font-family: var(--mono);
  font-size: .56rem;
  line-height: 1.2;
}
.evidence-pill.stronger { background: var(--pine-soft); color: var(--pine-dark); }
.evidence-pill.descriptive { background: var(--blue-soft); color: #244a64; }
.paper-open {
  border: 0;
  padding: 5px;
  background: none;
  color: var(--pine);
  font-weight: 700;
  cursor: pointer;
}
.paper-open::after { content: " ↗"; }
.show-more { display: flex; margin-top: 24px; }
.show-more[hidden] { display: none; }
.empty-state {
  grid-column: 1 / -1;
  padding: 50px;
  border: 1px solid var(--line-dark);
  text-align: center;
}

.chat-section {
  display: grid;
  grid-template-columns: minmax(280px, .65fr) minmax(0, 1fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
  background: var(--ink);
  color: #f4f6f2;
}
.chat-section > * { max-width: none; margin: 0; }
.chat-intro { position: sticky; top: 100px; }
.chat-intro .eyebrow { color: #9dc2ae; }
.chat-intro h2 { max-width: 11ch; }
.chat-intro > p:not(.eyebrow) { color: #b8c2bc; }
.chat-intro .citation-demo { color: #a8d0ba; }
.prompt-list { display: grid; gap: 8px; margin-top: 28px; }
.prompt-list button {
  border: 1px solid rgba(221, 232, 225, .23);
  padding: 12px 14px;
  background: transparent;
  color: #e5ece7;
  text-align: left;
  cursor: pointer;
}
.prompt-list button:hover { border-color: #9dc2ae; background: rgba(157, 194, 174, .08); }
.chat-disclosure { margin-top: 22px; font-size: .74rem; }
.chat-shell {
  overflow: hidden;
  min-height: 650px;
  border: 1px solid rgba(221, 232, 225, .28);
  background: #f6f7f3;
  color: var(--ink);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .25);
}
.chat-head {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  font-size: .8rem;
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #3a8c62;
}
.chat-head button {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: .72rem;
  cursor: pointer;
}
.messages {
  display: flex;
  height: 500px;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  padding: 22px;
}
.message {
  max-width: 85%;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
}
.message.user { align-self: flex-end; background: var(--pine); color: #fff; border-color: var(--pine); }
.message-label { margin-bottom: 7px; color: var(--muted); }
.message.user .message-label { color: #c6ddd0; }
.message-body p { margin: 0 0 10px; }
.message-body p:last-child { margin-bottom: 0; }
.message-body ul { margin: 8px 0; padding-left: 20px; }
.message-body a.citation {
  display: inline-block;
  border-radius: 4px;
  padding: 0 4px;
  background: var(--pine-soft);
  color: var(--pine-dark);
  font-family: var(--mono);
  font-size: .77em;
  font-weight: 500;
  text-decoration: none;
}
.typing::after { content: "▋"; animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.chat-form textarea {
  min-height: 50px;
  max-height: 140px;
  resize: vertical;
  border: 1px solid var(--line-dark);
  padding: 11px 12px;
  color: var(--ink);
}
.chat-form button {
  min-width: 76px;
  border: 0;
  background: var(--pine);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.chat-form button:disabled, .chat-form textarea:disabled { opacity: .55; cursor: not-allowed; }
.chat-status { min-height: 21px; margin: 0; padding: 0 16px 10px; color: var(--rust); font-size: .72rem; }

.submission-section { background: var(--paper); }
.submission-layout {
  display: grid;
  grid-template-columns: minmax(260px, .65fr) minmax(0, 1.35fr);
  gap: clamp(28px, 6vw, 78px);
  align-items: start;
}
.submission-policy {
  border-left: 3px solid var(--pine);
  padding: 4px 0 4px 24px;
  color: var(--body);
}
.submission-policy h3 { margin: 0 0 12px; font-family: var(--serif); font-size: 1.45rem; }
.submission-policy ul { margin: 0; padding-left: 20px; }
.submission-policy li + li { margin-top: 8px; }
.submission-policy p { margin: 20px 0 0; color: var(--muted); font-size: .82rem; }
.submission-form {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line-dark);
  padding: clamp(22px, 4vw, 38px);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.submission-form label { display: grid; gap: 7px; color: var(--body); font-size: .78rem; font-weight: 700; }
.submission-form label small { color: var(--muted); font-weight: 500; }
.submission-form input, .submission-form textarea {
  width: 100%;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}
.submission-form input[type="file"] { min-height: 48px; padding: 8px; font-size: .78rem; }
.submission-form textarea { resize: vertical; }
.submission-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.submission-turnstile { min-height: 65px; }
.submission-actions { display: flex; gap: 16px; align-items: center; }
.submission-actions p { margin: 0; color: var(--muted); font-size: .72rem; }
.submission-actions .button:disabled { opacity: .5; cursor: not-allowed; }
.submission-status { min-height: 24px; margin: 0; color: var(--pine); font-size: .78rem; }

.methods { background: var(--surface); }
.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line-dark);
  border-left: 1px solid var(--line-dark);
}
.method-grid article {
  padding: 26px;
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}
.method-grid span { color: var(--pine); font-family: var(--mono); font-size: .65rem; }
.method-grid h3 { margin: 18px 0 10px; font-family: var(--serif); font-size: 1.35rem; }
.method-grid p { margin: 0; color: var(--body); font-size: .85rem; }
details {
  border-bottom: 1px solid var(--line-dark);
}
details:first-of-type { margin-top: 36px; border-top: 1px solid var(--line-dark); }
summary {
  padding: 18px 0;
  font-weight: 700;
  cursor: pointer;
}
.details-body { max-width: 850px; padding: 0 0 18px; color: var(--body); }
.method-note { color: var(--muted); font-size: .8rem; }

footer {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(22px, 6vw, 90px);
  background: var(--paper);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .65rem;
}
footer a { color: var(--pine); }

dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  border: 1px solid var(--line-dark);
  padding: clamp(25px, 5vw, 50px);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(10, 20, 16, .68); backdrop-filter: blur(4px); }
.dialog-close {
  position: sticky;
  z-index: 2;
  top: -34px;
  float: right;
  border: 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.7rem;
  cursor: pointer;
}
.dialog-kicker { color: var(--pine); font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; }
#dialog-title { margin: 10px 0; font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.05; }
.dialog-byline { color: var(--body); }
.dialog-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0; }
.dialog-tags span { border: 1px solid var(--line-dark); border-radius: 999px; padding: 4px 8px; font-size: .66rem; }
.dialog-block { padding: 18px 0; border-top: 1px solid var(--line); }
.dialog-block h3 { margin: 0 0 7px; font-family: var(--mono); color: var(--pine); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.dialog-block p { margin: 0; color: var(--body); font-size: .91rem; }
.method-table { display: grid; grid-template-columns: 150px 1fr; gap: 0; border-top: 1px solid var(--line); }
.method-table dt, .method-table dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .78rem; }
.method-table dt { color: var(--muted); font-family: var(--mono); }
.method-table dd { color: var(--body); }
.dialog-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.dialog-links a { border: 1px solid var(--pine); border-radius: 999px; padding: 8px 12px; color: var(--pine); font-size: .72rem; font-weight: 700; text-decoration: none; }

@media (max-width: 1050px) {
  .paper-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .hero, .section-head, .chat-section, .submission-layout { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .signal-panel { max-width: 640px; }
  .chat-intro { position: static; }
  .topbar nav a:nth-child(-n+2) { display: none; }
  .map-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .topbar { padding: 0 18px; }
  .topbar nav { gap: 14px; }
  .topbar nav a { font-size: .74rem; }
  .section, .hero { padding-left: 18px; padding-right: 18px; }
  h1 { font-size: clamp(3rem, 16vw, 5.2rem); }
  .paper-grid, .method-grid, .filters { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .submission-actions { align-items: flex-start; flex-direction: column; }
  .paper-card { min-height: 0; }
  .tension { grid-template-columns: 1fr; }
  .download-links { justify-content: flex-start; }
  .messages { height: 430px; padding: 14px; }
  .message { max-width: 95%; }
  .chat-form { grid-template-columns: 1fr; }
  .chat-form button { min-height: 44px; }
  .method-table { grid-template-columns: 1fr; }
  .method-table dt { padding-bottom: 0; border-bottom: 0; }
  footer { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
