:root {
  --ink: #172026;
  --muted: #60707f;
  --line: #d8e2ea;
  --paper: #ffffff;
  --soft: #f4f8fb;
  --brand: #0f766e;
  --brand-2: #2563eb;
  --accent: #b45309;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.68;
}

a { color: var(--brand); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 5vw;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  color: #fff;
  font-weight: 800;
  background: var(--brand);
}

.brand strong { display: block; font-size: 18px; line-height: 1.15; }
.brand small { display: block; color: var(--muted); font-size: 12px; }

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 14px;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

main {
  width: min(1180px, 90vw);
  margin: 0 auto;
}

.hero {
  min-height: 540px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: 44px;
  align-items: center;
  padding: 54px 0 36px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0;
}

h1, h2, h3 { line-height: 1.25; letter-spacing: 0; }

h1 {
  margin: 0;
  max-width: 760px;
  font-size: 48px;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 7px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.button.secondary {
  color: var(--brand);
  background: #e6f4f1;
}

.gene-visual {
  min-height: 360px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.gene-visual svg {
  width: min(100%, 420px);
  height: auto;
}

.gene-visual .helix {
  fill: none;
  stroke: url(#g1);
  stroke-width: 12;
  stroke-linecap: round;
}

.gene-visual .helix.alt { opacity: .62; }
.gene-visual .rungs line { stroke: #8fb5c9; stroke-width: 8; stroke-linecap: round; }
.gene-visual circle, .gene-visual rect { fill: #e8f3ff; stroke: #89b7df; stroke-width: 3; }
.gene-visual text { fill: var(--muted); font-size: 15px; font-weight: 700; }

.section-strip {
  position: sticky;
  top: 70px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 0;
  background: rgba(244, 248, 251, .96);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 12px rgba(23, 32, 38, .06);
}

.section-strip a {
  min-width: 0;
  min-height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.section-strip span {
  color: var(--brand);
  font-size: 13px;
}

.content-section {
  scroll-margin-top: 160px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

h2 {
  margin: 0;
  font-size: 30px;
}

.article-list {
  display: grid;
  gap: 18px;
}

.article-card, .mini-panel, .tool-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.article-card h3 {
  margin: 10px 0 12px;
  font-size: 24px;
}

.article-card p { margin: 10px 0; }

.takeaway {
  margin: 16px 0;
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  background: #fff8ed;
}

.sources {
  color: var(--muted);
  font-size: 14px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 22px;
  align-items: start;
}

.link-list, .mini-panel ol {
  margin: 0;
  padding-left: 22px;
}

.link-list li, .mini-panel li { margin: 8px 0; }

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

.tool-card {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.tool-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.tool-card span {
  color: var(--muted);
}

.site-footer {
  margin-top: 28px;
  padding: 28px 5vw;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #fff;
}

.site-footer p { margin: 6px 0; }

@media (max-width: 860px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  h1 { font-size: 36px; }
  .section-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .two-col, .tool-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  main { width: min(100% - 28px, 1180px); }
  h1 { font-size: 30px; }
  .section-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .section-strip a { min-height: 58px; padding: 6px 3px; font-size: 12px; line-height: 1.25; }
  .section-strip span { font-size: 11px; }
  .gene-visual { min-height: 280px; }
}


/* Latest article teasers */
.article-subsection-title {
  margin: 12px 0 10px;
  color: var(--ink);
  font-size: 20px;
}
.latest-article-list {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.article-teaser {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.article-teaser:hover {
  border-color: #91c5bc;
  box-shadow: 0 8px 24px rgba(23, 32, 38, .08);
  transform: translateY(-2px);
}
.article-teaser:focus-visible {
  outline: 3px solid #63b6a8;
  outline-offset: 3px;
}
.article-teaser > img {
  display: block;
  width: 100%;
  height: 100px;
  object-fit: cover;
  object-position: center 18%;
  background: #eef4f2;
  border-radius: 7px;
}
.teaser-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}
.teaser-title {
  display: block;
  margin: 8px 0 3px;
  font-size: 21px;
  line-height: 1.35;
}
.teaser-summary {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.teaser-readmore {
  margin-top: 8px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
}

/* Full article pages */
.article-page {
  width: min(900px, 90vw);
  margin: 0 auto;
  padding: 28px 0 64px;
}
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}
.article-breadcrumb a { text-decoration: none; font-weight: 700; }
.full-article {
  padding: clamp(22px, 5vw, 52px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.full-article-header { max-width: 760px; margin: 0 auto; }
.full-article-header h1 {
  max-width: 760px;
  margin: 15px 0 14px;
  font-size: clamp(30px, 4vw, 42px);
}
.article-intro {
  margin: 0;
  color: #425565;
  font-size: 18px;
  line-height: 1.85;
}
.article-graphic {
  max-width: 680px;
  margin: 28px auto 34px;
  padding: 12px;
  text-align: center;
  background: #f5f8f7;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.article-graphic a { display: block; }
.article-graphic img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 880px;
  margin: 0 auto;
  object-fit: contain;
}
.article-graphic figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.article-content { max-width: 760px; margin: 0 auto; }
.article-content h2 {
  margin: 32px 0 12px;
  padding-bottom: 8px;
  font-size: 24px;
  border-bottom: 1px solid var(--line);
}
.article-content p {
  margin: 14px 0;
  font-size: 17px;
  line-height: 1.95;
}
.article-content a { overflow-wrap: anywhere; }
.article-content code {
  padding: 1px 5px;
  background: #f1f5f6;
  border-radius: 4px;
}
.article-endnote {
  max-width: 760px;
  margin: 32px auto 0;
  padding: 14px 16px;
  color: #5d5746;
  background: #fff8ed;
  border-left: 4px solid var(--accent);
  border-radius: 0 7px 7px 0;
}
.article-back { max-width: 760px; margin: 24px auto 0; }

@media (max-width: 600px) {
  .article-teaser { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 10px; }
  .article-teaser > img { height: 84px; }
  .teaser-title { font-size: 17px; }
  .teaser-summary { font-size: 14px; -webkit-line-clamp: 2; }
  .article-meta { gap: 7px; font-size: 12px; }
  .article-page { width: min(100% - 28px, 900px); padding-top: 18px; }
  .full-article { padding: 22px 18px; }
  .article-intro { font-size: 16px; }
  .article-content h2 { font-size: 21px; }
  .article-content p { font-size: 16px; line-height: 1.85; }
  .article-graphic { margin: 22px auto 28px; padding: 8px; }
  .article-graphic img { max-height: 720px; }
}


/* Research title-only homepage links and paginated article archive */
.latest-article-title-only { display: grid; gap: 0; margin: 10px 0 16px; padding: 12px 18px; list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.latest-article-title-only li { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr); gap: 10px 16px; align-items: baseline; padding: 8px 0; }
.latest-article-title-only li + li { border-top: 1px solid var(--line); }
.latest-article-title-only .title-meta { color: var(--muted); font-size: 13px; }
.latest-article-title-only a { color: var(--ink); font-weight: 700; text-decoration: none; }
.latest-article-title-only a:hover { color: var(--brand); }
.archive-link { margin: 12px 0 20px; }
.archive-page { width: min(980px, 90vw); margin: 0 auto; padding: 28px 0 64px; }
.archive-page h1 { margin: 12px 0 8px; font-size: clamp(30px, 4vw, 40px); }
.archive-intro { margin: 0 0 20px; color: var(--muted); }
.archive-list { display: grid; gap: 10px; margin: 20px 0; }
.archive-item[hidden] { display: none !important; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 24px auto; }
.pagination button { min-height: 40px; padding: 8px 14px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-weight: 700; cursor: pointer; }
.pagination button:disabled { opacity: .48; cursor: not-allowed; }
.pagination-status { min-width: 180px; color: var(--muted); text-align: center; font-size: 14px; }
@media (max-width: 600px) { .latest-article-title-only li { grid-template-columns: 1fr; gap: 3px; } .archive-page { width: min(100% - 28px, 980px); padding-top: 18px; } .pagination { gap: 8px; } .pagination-status { min-width: 140px; font-size: 13px; } }
