@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --ink: #f1f5f4;
  --muted: #b5c1bf;
  --muted-soft: #93a2a0;
  --green: #13312f;
  --green-2: #65ddc8;
  --mint: #1a302d;
  --paper: #090c0e;
  --white: #12191c;
  --panel: #111719;
  --panel-raised: #151e21;
  --line: #2a3538;
  --gold: #edc46f;
  --coral: #f0927c;
  --shadow: 0 18px 52px rgba(0, 0, 0, .38);
  --sans: 'DM Sans', system-ui, sans-serif;
  --display: 'Manrope', 'DM Sans', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: #46575a #0b1012; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 50% -22rem, #172423 0, transparent 55%), var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
}
button, input { font: inherit; }
button { color: inherit; }
::selection { color: #071211; background: #79e4d2; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.site-shell { max-width: 1240px; margin: 0 auto; padding: 0 46px; }
.skip-link {
  position: absolute; left: -9999px; top: 10px; z-index: 10;
  background: var(--green-2); color: #071412; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 12px; }
.topbar {
  height: 88px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 28px; height: 28px; display: flex; align-items: flex-end; gap: 3px; padding: 4px 5px;
  border: 1px solid var(--green-2); border-radius: 4px 4px 8px 4px; transform: skewY(-3deg);
}
.brand-mark span { display: block; flex: 1; background: var(--green-2); border-radius: 3px 3px 1px 1px; }
.brand-mark span:nth-child(1) { height: 57%; }
.brand-mark span:nth-child(2) { height: 90%; }
.brand-mark span:nth-child(3) { height: 70%; }
.brand-name { font: 800 16px var(--display); letter-spacing: -.5px; }
.brand-name span { color: var(--green-2); font-weight: 600; }
.topbar-note { font-size: 12px; color: var(--muted); letter-spacing: .03em; display: flex; align-items: center; gap: 9px; }
.status-dot, .badge-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #8bd5a5; display: inline-block;
  box-shadow: 0 0 0 3px rgba(139, 213, 165, .16);
}
.hero {
  position: relative; min-height: 388px; margin: 34px 0 70px; padding: 51px 60px 45px;
  background: linear-gradient(115deg, #102120 0%, #142724 56%, #10201f 100%);
  border: 1px solid #29413d; border-radius: 20px; overflow: hidden; color: #f5f8f6;
  display: flex; align-items: center; isolation: isolate;
}
.hero:before {
  content: ""; position: absolute; width: 470px; height: 470px; border: 1px solid rgba(195, 232, 218, .13);
  border-radius: 50%; right: -89px; top: -158px; z-index: -1;
}
.hero-copy { position: relative; z-index: 1; width: min(620px, 70%); }
.eyebrow { margin: 0 0 18px; font-size: 10px; line-height: 1.4; letter-spacing: .18em; font-weight: 700; color: #a9d1c5; }
.eyebrow-line { display: inline-block; width: 24px; height: 1px; background: var(--gold); vertical-align: middle; margin-right: 8px; }
.hero h1 { margin: 0; font: 800 clamp(34px, 4.5vw, 54px)/1.12 var(--display); letter-spacing: -2.2px; }
.hero h1 em { font-style: normal; color: #bde8da; }
.hero-description { max-width: 545px; margin: 21px 0 22px; color: #d1e1db; font-size: 14px; line-height: 1.72; }
.hero-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.meta-pill { font-size: 11px; color: #e5f1ec; border: 1px solid rgba(217, 243, 231, .24); border-radius: 30px; padding: 6px 11px; }
.meta-icon { color: var(--gold); margin-right: 5px; }
.hero-art { position: absolute; right: 8%; top: 49%; width: 230px; height: 230px; transform: translateY(-50%); opacity: .95; }
.orbit { position: absolute; border: 1px solid rgba(219, 239, 226, .2); border-radius: 50%; transform: rotate(-22deg); }
.orbit-one { inset: 19px -22px; }
.orbit-two { inset: 0 2px; transform: rotate(42deg); }
.book-shape { position: absolute; left: 54px; top: 67px; width: 129px; height: 96px; filter: drop-shadow(0 17px 14px rgba(0, 0, 0, .35)); transform: rotate(-8deg); }
.book-page { position: absolute; top: 0; width: 61px; height: 87px; background: #e9e2cb; border: 1px solid rgba(22, 59, 57, .45); }
.page-left { left: 0; border-radius: 8px 2px 3px 4px; transform: skewY(6deg); }
.page-right { right: 0; border-radius: 2px 8px 4px 3px; transform: skewY(-6deg); background: #d8cfb7; }
.book-spine { position: absolute; left: 63px; top: 3px; width: 4px; height: 88px; background: #b98942; border-radius: 50%; }
.art-star { position: absolute; color: var(--gold); font-size: 18px; }
.star-one { top: 30px; right: 13px; }
.star-two { left: 26px; bottom: 32px; font-size: 12px; }
.art-caption { position: absolute; bottom: 0; right: 5px; font-size: 9px; letter-spacing: .17em; text-transform: uppercase; color: #afd0c3; }
.library-section { padding: 0 7px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; }
.eyebrow-dark { color: #aabbb7; margin-bottom: 8px; }
.section-heading h2 { margin: 0; font: 700 clamp(23px, 3vw, 31px)/1.25 var(--display); letter-spacing: -1px; color: var(--ink); }
.dataset-badge {
  font-size: 9px; letter-spacing: .14em; font-weight: 700; color: #c4d0ce;
  border: 1px solid #3b494b; border-radius: 30px; padding: 7px 10px; white-space: nowrap; background: #111719;
}
.badge-dot { width: 6px; height: 6px; margin-right: 5px; background: var(--gold); box-shadow: none; vertical-align: 1px; }
.search-panel { display: flex; gap: 10px; margin-bottom: 18px; }
.search-box {
  display: flex; align-items: center; gap: 14px; flex: 1; min-height: 58px; padding: 0 17px;
  background: #111719; border: 1px solid #344144; border-radius: 11px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .16); transition: border-color .18s, box-shadow .18s;
}
.search-box:hover { border-color: #536467; }
.search-box:focus-within { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(101, 221, 200, .16); }
.search-icon { font-size: 26px; line-height: 1; color: #9ab3ad; transform: rotate(-20deg); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.search-box input::placeholder { color: #9aa8a6; opacity: 1; }
.search-hint { font: 600 12px var(--sans); color: #bec9c7; border: 1px solid #3b484a; border-radius: 4px; padding: 0 6px; background: #1a2225; }
.clear-search {
  border: 1px solid #435351; background: #111719; padding: 0 15px; border-radius: 9px;
  cursor: pointer; color: #9be9d9; font-weight: 600; transition: background .15s, border-color .15s;
}
.clear-search:hover { background: #1a302d; border-color: #5ba99a; }
.filter-row { display: flex; align-items: flex-start; gap: 18px; padding: 15px 0 19px; border-bottom: 1px solid var(--line); }
.filter-label { font-size: 12px; color: #b2bfbc; font-weight: 600; min-width: 66px; padding-top: 7px; }
.filter-list { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip {
  background: transparent; border: 1px solid transparent; border-radius: 30px; color: #c0cbc9;
  font-size: 12px; padding: 5px 11px; cursor: pointer; transition: color .15s, background .15s, border-color .15s;
}
.filter-chip:hover { border-color: #55736d; background: #14211f; color: #ddf8ef; }
.filter-chip.is-active { background: #1b403a; color: #c7fff0; border-color: #39766a; }
.filter-chip.is-active:hover { background: #22534b; }
.filter-count { margin-left: 3px; opacity: .88; font-size: 10px; }
.results-bar { display: flex; justify-content: space-between; align-items: center; margin: 19px 0 15px; }
.result-count { margin: 0; font-size: 12px; color: #c1cdca; font-weight: 600; }
.sort-note { font-size: 11px; color: #a4b1af; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.study-card {
  background: linear-gradient(145deg, #151e21, #12191c); border: 1px solid #2b383b; border-radius: 13px;
  padding: 20px 21px 19px; min-width: 0; transition: transform .18s, border-color .18s, box-shadow .18s;
}
.study-card:hover { transform: translateY(-2px); border-color: #536d68; box-shadow: var(--shadow); }
.card-topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 13px; }
.category-label { display: inline-flex; align-items: center; width: max-content; color: #a9f0dc; background: #1d3833; border: 1px solid #2a4a43; border-radius: 4px; padding: 4px 8px; font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.status-label { font-size: 9px; letter-spacing: .035em; font-weight: 600; color: #c0cbc8; text-align: right; }
.study-card h3 { font: 700 18px/1.32 var(--display); letter-spacing: -.45px; margin: 0 0 6px; color: #f0f5f3; }
.card-subtitle { font-size: 12px; color: #b5c1be; margin: 0 0 14px; }
.card-claim { margin: 0; padding: 12px 13px; border-left: 2px solid var(--gold); border-radius: 0 7px 7px 0; background: #1d211c; color: #e0ddd1; font-size: 12px; line-height: 1.6; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 8px; }
.keyword-row { display: flex; gap: 5px; overflow: hidden; max-width: 75%; }
.keyword-chip { background: #222d2f; border: 1px solid #303d3f; border-radius: 30px; padding: 4px 7px; color: #c0ccca; font-size: 9px; white-space: nowrap; }
.open-card { border: 0; border-radius: 5px; background: transparent; color: #88ead7; font-size: 11px; font-weight: 700; cursor: pointer; padding: 5px 0 5px 8px; white-space: nowrap; }
.open-card:hover { color: #c0fff0; text-decoration: underline; text-underline-offset: 3px; }
.open-card span { display: inline-block; margin-left: 5px; transition: transform .15s; }
.open-card:hover span { transform: translateX(3px); }
.empty-state { text-align: center; background: #111719; border: 1px dashed #48575a; border-radius: 14px; padding: 48px 20px; margin-top: 12px; }
.empty-mark { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%; background: #1c302d; color: #afeadd; font-size: 27px; }
.empty-state h3 { margin: 0 0 5px; font: 700 18px var(--display); }
.empty-state p { margin: 0 auto 15px; max-width: 370px; color: #b7c3c0; font-size: 12px; }
.button-secondary { border: 1px solid #55736b; border-radius: 8px; background: #172320; color: #b9f2e4; font-weight: 600; font-size: 12px; padding: 9px 13px; cursor: pointer; transition: background .15s, border-color .15s; }
.button-secondary:hover { background: #203a34; border-color: #75b4a5; }
.load-error { margin-top: 20px; border: 1px solid #8b5549; border-radius: 12px; padding: 18px 20px; background: #291b19; color: #ffd2c8; }
.load-error h3 { margin: 0 0 4px; font-size: 15px; }
.load-error p { margin: 0; font-size: 12px; }
.method-note { display: flex; gap: 14px; align-items: flex-start; margin: 36px 7px 31px; padding: 17px 19px; background: #121b1d; border: 1px solid #2c3b3c; border-radius: 10px; color: #bdc9c6; }
.note-mark { display: grid; place-items: center; min-width: 20px; height: 20px; border: 1px solid #6b8c81; border-radius: 50%; font-size: 12px; font-weight: 700; color: #a8e5d5; }
.method-note p { margin: 0; font-size: 11px; line-height: 1.7; }
.method-note strong { color: #e4efeb; }
.footer { display: flex; justify-content: space-between; gap: 12px; padding: 18px 7px 27px; border-top: 1px solid var(--line); color: #a8b4b1; font-size: 9px; letter-spacing: .04em; }
.footer span:first-child { font-weight: 700; letter-spacing: .12em; }
.footer-divider { color: var(--gold); padding: 0 4px; }
.detail-dialog {
  width: min(760px, calc(100vw - 30px)); max-width: none; max-height: min(90vh, 900px);
  border: 1px solid #3b4a4c; border-radius: 18px; background: #111719; color: var(--ink);
  padding: 0; box-shadow: 0 32px 100px rgba(0, 0, 0, .72); overflow: hidden;
}
.detail-dialog::backdrop { background: rgba(2, 7, 8, .78); backdrop-filter: blur(4px); }
.dialog-topline { display: flex; justify-content: space-between; align-items: center; padding: 21px 27px 0; }
.icon-button { border: 1px solid #435153; background: #1b2528; border-radius: 50%; width: 36px; height: 36px; line-height: 1; font-size: 22px; color: #d2dfdc; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.icon-button:hover { background: #293a3b; border-color: #77958c; color: white; }
.dialog-scroll { padding: 8px 38px 36px; overflow: auto; max-height: calc(90vh - 57px); overscroll-behavior: contain; }
.dialog-scroll > h2 { font: 800 clamp(23px, 4vw, 32px)/1.2 var(--display); letter-spacing: -1.1px; margin: 6px 0; color: #f3f7f5; }
.detail-subtitle { margin: 0 0 14px; color: #b8c5c2; font-size: 13px; }
.detail-status { display: flex; margin: 0 0 23px; }
.detail-status .status-label { padding: 6px 9px; border: 1px solid #4e4a35; border-radius: 5px; background: #28251b; color: #f0d99d; text-align: left; }
.detail-section { padding: 17px 0 18px; border-top: 1px solid #2a3638; }
.detail-section h3 { margin: 0 0 8px; font: 700 14px var(--display); letter-spacing: -.1px; color: #e8efec; }
.detail-section p { margin: 0; color: #d0dbd8; font-size: 13px; line-height: 1.75; white-space: pre-line; }
.citation-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.citation-link { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; color: #aaf3e1; background: #19302c; border: 1px solid #2b4a43; border-radius: 5px; padding: 4px 7px; font-size: 10px; line-height: 1.3; }
.citation-link:hover { background: #24443c; border-color: #4e8174; color: #d5fff5; }
.citation-link::after { content: "↗"; font-size: 9px; color: #acd6c9; }
.text-reference { padding: 13px 14px; margin-top: 10px; border: 1px solid #303d3f; border-radius: 9px; background: #171f21; }
.text-reference:first-of-type { margin-top: 0; }
.text-reference h4 { font-size: 11px; line-height: 1.4; margin: 0 0 6px; color: #c2f0e2; }
.text-reference p { margin: 0; color: #c8d4d1; font-size: 12px; line-height: 1.65; }
.source-section { border-top: 1px solid #334143; margin-top: 19px; padding-top: 20px; }
.source-heading-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 13px; }
.source-heading-row .eyebrow { margin-bottom: 4px; }
.source-heading-row h3 { font: 700 18px var(--display); margin: 0; letter-spacing: -.4px; color: #eff5f2; }
.source-count { font-size: 10px; color: #b2bfbc; }
.source-list { display: grid; gap: 8px; }
.source-card { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 10px 12px; border: 1px solid #303d3f; border-radius: 8px; text-decoration: none; color: inherit; background: #151d1f; transition: border-color .15s, background .15s; }
.source-card:hover { border-color: #628d80; background: #1b2b28; }
.source-title { font-size: 11px; font-weight: 700; color: #b4efdf; }
.source-type { grid-column: 1; color: #b0bdb9; font-size: 9px; }
.source-open { grid-column: 2; grid-row: 1/3; align-self: center; color: #b5e4d6; font-size: 16px; }
.source-note { grid-column: 1/-1; color: #becac7; font-size: 10px; margin-top: 2px; }
.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; }

@media (max-width: 900px) {
  .site-shell { padding: 0 28px; }
  .hero { padding-left: 42px; padding-right: 40px; }
  .hero-art { right: 5%; opacity: .75; }
  .hero-copy { width: 74%; }
}
@media (max-width: 680px) {
  body { font-size: 14px; }
  .site-shell { padding: 0 17px; }
  .topbar { height: 67px; }
  .topbar-note { font-size: 10px; }
  .brand-name { font-size: 15px; }
  .hero { min-height: 0; margin: 22px 0 47px; padding: 32px 25px 29px; border-radius: 15px; }
  .hero-copy { width: 100%; }
  .hero h1 { font-size: 37px; letter-spacing: -1.7px; }
  .hero-description { max-width: 95%; font-size: 12px; margin: 16px 0 17px; }
  .hero-art { width: 160px; height: 160px; right: -22px; top: 24px; transform: none; opacity: .16; }
  .book-shape { transform: scale(.72) rotate(-8deg); transform-origin: top left; left: 43px; top: 48px; }
  .art-caption { display: none; }
  .orbit-one { inset: 10px -12px; }
  .orbit-two { inset: 0 0; }
  .section-heading { align-items: flex-start; gap: 10px; margin-bottom: 17px; }
  .section-heading h2 { font-size: 24px; max-width: 255px; }
  .dataset-badge { font-size: 8px; padding: 6px 8px; margin-top: 7px; }
  .library-section { padding: 0 1px; }
  .search-box { min-height: 53px; padding: 0 12px; gap: 10px; }
  .search-box input { font-size: 12px; }
  .search-box input::placeholder { font-size: 11px; }
  .search-hint { display: none; }
  .clear-search { font-size: 11px; padding: 0 9px; }
  .filter-row { display: block; padding: 12px 0 15px; }
  .filter-label { min-width: 0; padding: 0 0 9px; font-size: 11px; }
  .filter-list { gap: 5px; }
  .filter-chip { padding: 5px 9px; font-size: 10px; }
  .results-bar { margin: 15px 0 11px; }
  .sort-note { font-size: 10px; }
  .result-count { font-size: 11px; }
  .card-grid { grid-template-columns: 1fr; gap: 10px; }
  .study-card { padding: 16px 16px 14px; }
  .study-card h3 { font-size: 16px; }
  .card-claim { font-size: 11px; }
  .method-note { margin: 26px 1px 22px; padding: 14px; }
  .method-note p { font-size: 10px; }
  .footer { padding: 15px 1px 21px; font-size: 8px; }
  .dialog-scroll { padding: 7px 22px 27px; }
  .dialog-topline { padding: 16px 19px 0; }
  .detail-dialog { border-radius: 14px; width: calc(100vw - 18px); max-height: 92vh; }
  .dialog-scroll { max-height: calc(92vh - 50px); }
  .dialog-scroll > h2 { font-size: 24px; }
  .detail-section p { font-size: 12px; }
  .detail-section { padding: 14px 0; }
  .text-reference { padding: 11px; }
  .source-heading-row h3 { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
