:root {
  --paper: #f5f4f0;
  --ink: #222421;
  --muted: #686c65;
  --line: #d7d8d1;
  --panel: #fffef9;
  --green: #1f5b4d;
  --amber: #b9662d;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }

body { margin: 0; background: var(--paper); line-height: 1.75; }

a { color: var(--green); text-underline-offset: 3px; }

.site-header {
  min-height: 72px;
  padding: 14px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(245, 244, 240, 0.96);
}

.site-brand { color: var(--ink); text-decoration: none; display: grid; line-height: 1.25; }
.site-brand strong { font-size: 16px; letter-spacing: 0.02em; }
.site-brand span { color: var(--muted); font-size: 12px; }
.site-header nav { display: flex; gap: 20px; font-size: 14px; }
.site-header nav a { color: var(--ink); text-decoration: none; }

main { width: min(900px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0 96px; }
.research-header { padding-bottom: 38px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 10px; color: var(--amber); font-size: 12px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; }
h1 { max-width: 820px; margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(34px, 6vw, 62px); line-height: 1.12; letter-spacing: -0.025em; }
.title-en { max-width: 720px; margin: 18px 0 0; color: var(--green); font-size: clamp(18px, 2.5vw, 24px); line-height: 1.4; }
.updated { margin: 20px 0 0; color: var(--muted); font-size: 14px; }

.quick-answer, .reading-versions, .method-note {
  margin: 48px 0;
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

h2 { margin: 0 0 16px; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(25px, 3.5vw, 34px); line-height: 1.25; }
.quick-answer > p:last-child, .lede { margin: 0; font-size: 18px; line-height: 1.85; }
.evidence-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 28px 0 64px; }
.evidence-metrics div { min-height: 116px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 254, 249, 0.58); }
.evidence-metrics dt { color: var(--muted); font-size: 12px; }
.evidence-metrics dd { margin: 10px 0 0; font-size: 19px; font-weight: 750; line-height: 1.35; }

.article-content, .paper-references, .related { margin: 72px 0; }
.markdown-body { font-family: Georgia, "Noto Serif SC", serif; font-size: 17px; }
.markdown-body h2 { margin: 52px 0 16px; padding-top: 6px; font-size: 29px; }
.markdown-body h3 { margin: 36px 0 12px; font-size: 21px; }
.markdown-body p, .markdown-body li { max-width: 76ch; }
.markdown-body blockquote { margin: 24px 0; padding: 2px 20px; border-left: 4px solid var(--green); color: #454942; }
.markdown-body code { padding: 2px 6px; border-radius: 5px; background: #e9e9e3; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; }
.markdown-body pre { overflow: auto; padding: 20px; border-radius: 10px; background: #20231f; color: #f4f3ec; }
.markdown-body pre code { padding: 0; background: transparent; color: inherit; }
.table-scroll { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 14px; }
th, td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #eae9e3; }
img { max-width: 100%; height: auto; }

.paper-references ol { padding-left: 24px; }
.paper-references li { margin: 0 0 16px; padding-left: 8px; }
.paper-references li a { display: block; font-weight: 700; }
.paper-references li span { display: block; color: var(--muted); font-size: 13px; }
.evidence-appendix { margin: 72px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.evidence-appendix summary { cursor: pointer; padding: 24px 0; font-size: 18px; font-weight: 750; }
.evidence-appendix > div { padding: 0 0 36px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button-row a { padding: 10px 16px; border: 1px solid var(--green); border-radius: 999px; text-decoration: none; font-weight: 700; }
.button-row a.ai-entry { color: white; background: var(--green); }
.related ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0; list-style: none; }
.related li a { height: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 12px; display: grid; color: var(--ink); text-decoration: none; background: var(--panel); }
.related li span { margin-top: 8px; color: var(--muted); font-size: 13px; }

.directory-page { width: min(1160px, calc(100% - 40px)); }
.directory-page > h1 { margin-bottom: 18px; }
.directory-page > .lede { max-width: 760px; color: var(--muted); }
.research-directory { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.research-card { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.research-card > p { margin: 0 0 10px; color: var(--amber); font-size: 12px; }
.research-card h2 { margin: 0; font-family: inherit; font-size: 18px; line-height: 1.45; }
.research-card h2 a { color: var(--ink); text-decoration: none; }
.research-card > span, .research-card > small { display: block; margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.45; }

footer { padding: 28px 20px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 13px; }

@media (max-width: 800px) {
  .site-header { align-items: flex-start; }
  .site-header nav { flex-wrap: wrap; justify-content: flex-end; gap: 10px 16px; }
  main { padding-top: 48px; }
  .evidence-metrics, .research-directory { grid-template-columns: repeat(2, 1fr); }
  .related ul { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .site-header { display: grid; }
  .site-header nav { justify-content: flex-start; }
  .evidence-metrics, .research-directory { grid-template-columns: 1fr; }
  .quick-answer, .reading-versions, .method-note { padding: 22px; }
}
