:root {
  color-scheme: dark;
  --ink: #edf6f6;
  --muted: #9db0bc;
  --line: rgba(155, 203, 206, 0.16);
  --panel: rgba(9, 31, 47, 0.72);
  --navy: #061622;
  --cyan: #66e3d3;
  --cyan-2: #25b9bc;
  --gold: #f5c86c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 48% -20%, rgba(18, 100, 105, .23), transparent 42rem),
    linear-gradient(180deg, #061622 0%, #081c2a 54%, #061521 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .21;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.ambient { position: fixed; border-radius: 50%; filter: blur(80px); pointer-events: none; opacity: .14; }
.ambient-a { width: 360px; height: 360px; background: #35e0c2; left: -180px; top: 28%; }
.ambient-b { width: 320px; height: 320px; background: #226fa0; right: -180px; top: 9%; }

.topbar {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 48px));
  margin: auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand img { width: 42px; height: 42px; }
.brand span { display: grid; line-height: 1.05; }
.brand strong { letter-spacing: .04em; font-size: 15px; }
.brand small { margin-top: 6px; color: var(--muted); font-size: 9px; letter-spacing: .21em; text-transform: uppercase; }
.prototype { padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; color: #b7c7cf; font-size: 12px; background: rgba(255,255,255,.025); }
.prototype i, .grounded i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

main { position: relative; z-index: 1; }
.hero { width: min(980px, calc(100% - 48px)); margin: auto; padding: 88px 0 68px; text-align: center; }
.eyebrow, .method-copy > span, .section-title span { color: var(--cyan); font-weight: 700; font-size: 11px; letter-spacing: .24em; }
h1 { margin: 19px 0 22px; font-family: Georgia, "Songti SC", serif; font-size: clamp(43px, 6.1vw, 74px); font-weight: 500; line-height: 1.14; letter-spacing: -.04em; }
h1 em { color: var(--cyan); font-style: normal; }
.lead { max-width: 720px; margin: auto; color: #adbec7; font-size: 16px; line-height: 1.85; }

.query-box {
  margin: 42px auto 0;
  padding: 9px 10px 10px;
  border: 1px solid rgba(102, 227, 211, .25);
  border-radius: 18px;
  background: rgba(11, 36, 53, .85);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28), inset 0 1px rgba(255,255,255,.025);
  text-align: left;
}
.query-row { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; min-height: 58px; }
.query-row svg { width: 20px; margin-left: 8px; fill: none; stroke: #76939f; stroke-width: 1.6; stroke-linecap: round; }
textarea { resize: none; overflow: hidden; width: 100%; max-height: 120px; border: 0; outline: 0; color: #f0f7f8; background: transparent; font: inherit; font-size: 15px; line-height: 1.5; }
textarea::placeholder { color: #6f8793; }
.query-row > button { min-width: 124px; height: 44px; border: 0; border-radius: 11px; color: #04201f; background: var(--cyan); cursor: pointer; font-weight: 750; font-size: 14px; transition: transform .2s, box-shadow .2s; }
.query-row > button:hover { transform: translateY(-1px); box-shadow: 0 7px 26px rgba(102,227,211,.25); }
.query-row > button b { margin-left: 8px; }
.query-row > button:disabled { opacity: .65; cursor: wait; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 7px 0; border-top: 1px solid rgba(255,255,255,.055); }
.examples span { color: #68808c; font-size: 11px; margin-right: 3px; }
.examples button { border: 1px solid rgba(255,255,255,.08); border-radius: 999px; padding: 6px 10px; color: #9eb1ba; background: rgba(255,255,255,.025); font-size: 11px; cursor: pointer; }
.examples button:hover { color: var(--cyan); border-color: rgba(102,227,211,.3); }

.corpus-stats { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 720px; margin: 42px auto 0; }
.corpus-stats div { padding: 0 18px; border-right: 1px solid var(--line); display: grid; }
.corpus-stats div:last-child { border: 0; }
.corpus-stats strong { font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.corpus-stats span { margin-top: 7px; color: #738a96; font-size: 11px; }

.results { width: min(1060px, calc(100% - 48px)); margin: 0 auto 100px; animation: appear .45s ease; }
.hidden { display: none !important; }
@keyframes appear { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.progress-card { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(7,28,42,.55); }
.progress-step { position: relative; padding: 18px 18px 17px 45px; border-right: 1px solid var(--line); }
.progress-step:last-child { border: 0; }
.progress-step::before { content: "✓"; position: absolute; left: 17px; top: 19px; display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid rgba(102,227,211,.55); border-radius: 50%; color: var(--cyan); font-size: 9px; }
.progress-step b { display: block; color: #d7e4e7; font-size: 12px; }
.progress-step span { display: block; margin-top: 5px; color: #728995; font-size: 10px; line-height: 1.4; }

.answer-card { margin-top: 18px; padding: 28px 30px; border: 1px solid rgba(102,227,211,.21); border-radius: 15px; background: linear-gradient(135deg, rgba(15,48,64,.76), rgba(8,28,43,.7)); }
.card-heading { display: flex; align-items: center; gap: 13px; }
.agent-mark { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 11px; color: #08262b; background: var(--cyan); font-family: Georgia, serif; font-weight: bold; }
.card-heading small { display: block; color: #74909b; font-size: 10px; letter-spacing: .12em; }
.card-heading h2 { margin: 3px 0 0; font-size: 17px; }
.grounded { margin-left: auto; padding: 7px 10px; border: 1px solid rgba(102,227,211,.2); border-radius: 999px; color: #a5c8c5; font-size: 10px; }
.answer-text { margin: 22px 0 0; color: #d5e1e3; font-size: 15px; line-height: 1.95; }
.answer-text .cite { color: var(--cyan); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }

.section-title { margin: 46px 0 19px; display: flex; align-items: end; justify-content: space-between; }
.section-title h2 { margin: 7px 0 0; font-family: Georgia, "Songti SC", serif; font-size: 30px; font-weight: 500; }
.section-title p { margin: 0; color: #6f8792; font-size: 11px; }
.paths { display: grid; gap: 14px; }
.path-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: rgba(8,27,41,.72); }
.path-head { display: flex; gap: 15px; padding: 19px 21px; border-bottom: 1px solid var(--line); }
.rank { color: var(--cyan); font-family: Georgia, serif; font-size: 21px; }
.paper-info { min-width: 0; flex: 1; }
.paper-info h3 { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.5; }
.paper-info p { margin: 6px 0 0; overflow: hidden; color: #718995; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.paper-info a { color: #819ca6; text-decoration: none; }
.paper-info a:hover { color: var(--cyan); }
.complete { align-self: center; padding: 6px 9px; color: var(--cyan); border: 1px solid rgba(102,227,211,.2); border-radius: 6px; font-size: 9px; white-space: nowrap; }
.ms3-path { display: grid; grid-template-columns: repeat(4, 1fr); padding: 22px 21px 23px; }
.node { position: relative; min-width: 0; padding-right: 23px; }
.node:not(:last-child)::after { content: "→"; position: absolute; right: 7px; top: 31px; color: #3e6770; }
.node small { display: block; margin-bottom: 7px; color: var(--cyan); font-size: 9px; font-weight: 750; letter-spacing: .1em; }
.node p { margin: 0; display: -webkit-box; overflow: hidden; color: #c0d0d3; font-size: 11px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.evidence-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; padding: 0 21px 21px; }
.evidence-card { padding: 0; border: 1px solid rgba(255,255,255,.07); border-radius: 10px; color: inherit; background: rgba(255,255,255,.02); text-align: left; cursor: pointer; overflow: hidden; }
.evidence-card summary { list-style: none; display: flex; align-items: center; gap: 9px; padding: 11px 13px; }
.evidence-card summary::-webkit-details-marker { display: none; }
.evidence-card code { color: var(--cyan); font-size: 10px; }
.evidence-card strong { overflow: hidden; flex: 1; color: #9eb2ba; font-size: 10px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.evidence-card summary::after { content: "+"; color: #718995; }
.evidence-card[open] summary::after { content: "−"; }
.evidence-body { padding: 12px 13px 14px; border-top: 1px solid rgba(255,255,255,.06); }
.evidence-body p { margin: 0; color: #a9bcc3; font-size: 10px; line-height: 1.65; }
.evidence-body span { display: block; margin-top: 9px; color: #617d89; font-size: 9px; }
.disclaimer { margin: 17px 0 0; color: #5f7783; font-size: 10px; text-align: center; }

.method { width: min(1060px, calc(100% - 48px)); margin: 30px auto 104px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: center; }
.method-copy h2 { margin: 12px 0 18px; font-family: Georgia, "Songti SC", serif; font-size: 32px; font-weight: 500; line-height: 1.45; }
.method-copy p { color: #859ba5; font-size: 13px; line-height: 1.8; }
.method-flow { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.method-flow div { position: relative; min-height: 150px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.method-flow b { position: absolute; right: 15px; top: 12px; color: rgba(102,227,211,.14); font-family: Georgia, serif; font-size: 30px; }
.method-flow i { display: block; color: var(--cyan); font-size: 9px; font-style: normal; letter-spacing: .13em; text-transform: uppercase; }
.method-flow strong { display: block; margin-top: 14px; font-size: 14px; }
.method-flow p { color: #728a95; font-size: 10px; line-height: 1.6; }

footer { position: relative; z-index: 1; width: min(1180px, calc(100% - 48px)); margin: auto; padding: 28px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: #506a76; font-size: 9px; letter-spacing: .08em; }

@media (max-width: 760px) {
  .topbar, .hero, .results, .method, footer { width: min(100% - 28px, 1060px); }
  .topbar { min-height: 69px; }
  .prototype { font-size: 0; }
  .prototype i { margin: 0; }
  .hero { padding-top: 61px; }
  h1 { font-size: 42px; }
  .lead { font-size: 14px; }
  .query-row { grid-template-columns: 24px 1fr; }
  .query-row > button { grid-column: 1 / -1; width: 100%; }
  .corpus-stats { grid-template-columns: repeat(2, 1fr); gap: 23px 0; }
  .corpus-stats div:nth-child(2) { border: 0; }
  .progress-card { grid-template-columns: 1fr 1fr; }
  .progress-step:nth-child(2) { border-right: 0; }
  .progress-step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grounded { display: none; }
  .answer-card { padding: 22px 19px; }
  .section-title p { display: none; }
  .path-head { padding: 16px; }
  .complete { display: none; }
  .ms3-path { grid-template-columns: 1fr; gap: 16px; padding: 18px 16px; }
  .node { padding: 0 0 15px 18px; border-left: 1px solid rgba(102,227,211,.23); }
  .node:not(:last-child)::after { content: "↓"; left: -5px; right: auto; top: auto; bottom: -8px; }
  .evidence-list { grid-template-columns: 1fr; padding: 0 16px 16px; }
  .method { grid-template-columns: 1fr; gap: 28px; }
  footer { display: grid; gap: 8px; text-align: center; }
}
