:root {
  color-scheme: dark;
  --bg: #050914;
  --panel: rgba(12, 20, 36, .82);
  --panel-solid: #0c1424;
  --line: #23324d;
  --text: #edf3ff;
  --muted: #9eabc2;
  --blue: #5ea2ff;
  --blue-strong: #2f76f6;
  --cyan: #5eead4;
  --yellow: #facc15;
  --danger: #fb7185;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 78% 5%, rgba(37, 99, 235, .20), transparent 30%), radial-gradient(circle at 10% 20%, rgba(8, 145, 178, .12), transparent 28%), var(--bg); color: var(--text); }
button, input, select { font: inherit; }
a { color: inherit; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 10px 14px; background: white; color: black; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 max(16px, calc((100vw - 1160px)/2)); border-bottom: 1px solid rgba(35, 50, 77, .8); background: rgba(5, 9, 20, .78); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--blue-strong), #7c3aed); font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.topbar nav { display: flex; gap: 22px; }
.topbar nav a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.topbar nav a:hover { color: white; }
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); gap: 54px; align-items: center; padding-top: 94px; padding-bottom: 80px; }
.eyebrow { margin: 0 0 14px; color: #93c5fd; font-size: .76rem; font-weight: 900; letter-spacing: .15em; }
h1 { margin: 0; max-width: 820px; font-size: clamp(2.7rem, 6.5vw, 5.65rem); line-height: .98; letter-spacing: -.055em; }
h1 span { background: linear-gradient(90deg, #60a5fa, #5eead4); -webkit-background-clip: text; color: transparent; }
.hero-text { max-width: 760px; margin: 26px 0 0; color: #b8c5da; font-size: 1.15rem; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 19px; border: 1px solid transparent; border-radius: 12px; font-weight: 850; cursor: pointer; text-decoration: none; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: linear-gradient(135deg, var(--blue-strong), #4f46e5); color: white; box-shadow: 0 10px 30px rgba(47, 118, 246, .25); }
.button.secondary { border-color: var(--line); background: rgba(15, 24, 43, .65); color: #d9e5f8; }
.hero-card { padding: 10px 24px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(180deg, rgba(16, 27, 49, .95), rgba(8, 14, 27, .95)); box-shadow: 0 30px 85px rgba(0,0,0,.32); }
.hero-card div { display: flex; justify-content: space-between; gap: 18px; padding: 19px 0; border-bottom: 1px solid var(--line); }
.hero-card div:last-child { border-bottom: 0; }
.hero-card span { color: var(--muted); }
.hero-card strong { text-align: right; }
.search-section { padding: 48px 0 72px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.035em; }
.status-badge { flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .78rem; font-weight: 850; }
.status-badge.loading { color: #fde68a; background: rgba(113, 63, 18, .28); border-color: rgba(250, 204, 21, .35); }
.status-badge.semantic { color: #99f6e4; background: rgba(6, 78, 59, .3); border-color: rgba(94, 234, 212, .35); }
.status-badge.fallback { color: #fecdd3; background: rgba(136, 19, 55, .28); border-color: rgba(251, 113, 133, .35); }
.search-card { padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: 0 22px 70px rgba(0,0,0,.23); }
.search-card > label { display: block; margin-bottom: 10px; font-weight: 800; }
.query-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
input, select { width: 100%; border: 1px solid #30415f; border-radius: 11px; background: #08101e; color: var(--text); outline: none; }
input { min-height: 52px; padding: 0 16px; }
select { min-height: 43px; padding: 0 12px; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(94, 162, 255, .14); }
.sample-queries { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sample-queries button { padding: 8px 11px; border: 1px solid #2b3b57; border-radius: 999px; background: #0b1527; color: #bac8de; cursor: pointer; }
.sample-queries button:hover { border-color: var(--blue); color: white; }
.controls-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.controls-grid label { color: var(--muted); font-size: .84rem; }
.controls-grid select { margin-top: 7px; }
.model-progress { margin-top: 20px; }
.progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #17233a; }
.progress-track span { display: block; width: 4%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width .2s ease; }
.model-progress p { margin: 8px 0 0; color: var(--muted); font-size: .82rem; }
.search-summary { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; padding: 13px 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(12, 20, 36, .65); color: var(--muted); font-size: .86rem; }
.search-summary strong { color: white; }
.results { display: grid; gap: 13px; }
.result-card { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 17px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(9, 16, 30, .88); }
.result-rank { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #13213a; color: #93c5fd; font-weight: 900; }
.result-topline { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.result-card h3 { margin: 0; font-size: 1.12rem; }
.result-section { margin-top: 4px; color: #93a4c0; font-size: .86rem; }
.score { flex: 0 0 auto; min-width: 88px; padding: 7px 10px; border-radius: 999px; background: rgba(37, 99, 235, .18); color: #bfdbfe; text-align: center; font-weight: 900; font-variant-numeric: tabular-nums; }
.result-text { margin: 14px 0; color: #c0ccdf; line-height: 1.68; }
.result-text mark { padding: 0 2px; border-radius: 3px; background: rgba(250, 204, 21, .25); color: #fef3c7; }
.result-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.result-meta span, .result-meta a { padding: 5px 8px; border: 1px solid #273752; border-radius: 7px; color: #9eb0ca; font-size: .76rem; text-decoration: none; }
.empty-state { padding: 44px; border: 1px dashed #31415e; border-radius: 18px; color: var(--muted); text-align: center; }
.metrics-section { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-bottom: 84px; }
.metrics-section article { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(11, 18, 33, .72); }
.metrics-section span, .metrics-section strong { display: block; }
.metrics-section span { color: var(--muted); font-size: .83rem; }
.metrics-section strong { margin-top: 10px; font-size: 1.35rem; }
.content-section { padding: 76px 0; border-top: 1px solid rgba(35, 50, 77, .7); }
.content-section > p:not(.eyebrow), .content-section > div > p { color: #aebbd0; line-height: 1.75; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 15px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: rgba(11, 18, 33, .7); }
.steps li > span { color: #60a5fa; font-weight: 900; }
.steps p { margin: 4px 0 0; color: var(--muted); }
.evaluation-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 26px; }
.evaluation-grid article { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(11, 18, 33, .72); }
.evaluation-grid h3 { margin-top: 0; }
.evaluation-grid p { min-height: 92px; color: var(--muted); line-height: 1.55; }
.evaluation-grid strong { color: #93c5fd; font-size: .82rem; }
.evaluation-note { margin: 8px 0 0; color: #9fb0c9; }
.evaluation-note code { color: #bfdbfe; }
.evaluation-grid .metric-value { display: block; color: #bfdbfe; font-size: 1.05rem; line-height: 1.45; font-variant-numeric: tabular-nums; }
.evaluation-grid .metric-detail { display: block; margin-top: 8px; color: #8294af; font-size: .78rem; line-height: 1.5; }
.notice { margin-top: 22px; padding: 28px; border: 1px solid rgba(250, 204, 21, .28); border-radius: 18px; background: rgba(113, 63, 18, .13); }
.notice h2 { font-size: 1.45rem; }
.notice p { margin-bottom: 0; color: #d6cdb4; line-height: 1.7; }
.footer { display: flex; justify-content: space-between; gap: 20px; padding: 60px 0 40px; color: var(--muted); }
.footer div { display: flex; gap: 18px; }
.footer a { text-decoration: none; }
@media (max-width: 900px) {
  .topbar nav { display: none; }
  .hero, .two-column { grid-template-columns: 1fr; }
  .hero { padding-top: 64px; }
  .hero-card { max-width: 620px; }
  .evaluation-grid, .metrics-section { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .shell { width: min(100% - 22px, 1160px); }
  .query-row { grid-template-columns: 1fr; }
  .controls-grid, .evaluation-grid, .metrics-section { grid-template-columns: 1fr; }
  .section-heading, .footer { align-items: start; flex-direction: column; }
  .result-card { grid-template-columns: 1fr; }
  .result-topline { flex-direction: column; }
  .hero { padding-bottom: 50px; }
  .search-card { padding: 18px; }
}
