:root {
  /* One dark "tech" palette for the whole site (matches the Three.js landing page). */
  --bg: #05070d;
  --surface: rgba(14, 19, 33, .78);
  --surface-solid: #0e1321;
  --surface-2: rgba(255, 255, 255, .055);
  --text: #e8edf7;
  --muted: #8d99b3;
  --line: rgba(140, 170, 255, .16);
  --accent: #ffb547;
  --accent-ink: #1a1100;
  --accent-soft: rgba(255, 181, 71, .14);
  --link: #7fe3ff;
  --danger: #ff6b8a;
  --ok: #3cf2a0;
  --neon-amber: #ffb547;
  --neon-cyan: #38e1ff;
  --neon-violet: #a47bff;
  --neon-green: #3cf2a0;
  --shadow: 0 10px 40px rgba(0, 0, 0, .35);
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 28px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; margin-top: 1.2em; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.push { margin-left: auto; }
.inline { display: inline; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1680px; }
main.wrap { width: 100%; padding-top: 28px; padding-bottom: 56px; }

/* ---------- header / footer ---------- */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; gap: 20px; height: 56px; }
.brand { font-weight: 700; color: var(--text); font-size: 16px; display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); font-size: 18px; }
.top-nav { display: flex; gap: 16px; }
.top-nav a { color: var(--muted); }
.top-nav a:hover { color: var(--text); text-decoration: none; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; }
.top-right a { color: var(--muted); }
.lang-switch { border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; font-size: 12px; }
.me { display: flex; align-items: center; gap: 6px; color: var(--text) !important; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 20px 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 14px; font-weight: 500;
  padding: 7px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.06); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
button.link:hover { color: var(--text); }

/* ---------- avatars, badges, chips ---------- */
.avatar { width: 20px; height: 20px; border-radius: 50%; vertical-align: middle; flex: none; }
.avatar-lg { width: 64px; height: 64px; font-size: 26px; }
.avatar-ph { display: inline-grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 700; }
.badge {
  display: inline-block; font-size: 12px; line-height: 18px; padding: 0 7px; border-radius: 5px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap;
}
.badge-harness { background: rgba(164, 123, 255, .14); color: #cbb6ff; border-color: rgba(164, 123, 255, .32); }
.badge-inter-one_shot, .badge-ok { background: rgba(60, 242, 160, .12); color: #8ff7c8; border-color: rgba(60, 242, 160, .28); }
.badge-inter-multi_turn { background: rgba(255, 207, 74, .12); color: #ffd97a; border-color: rgba(255, 207, 74, .28); }
.badge-inter-human_edited, .badge-hidden, .badge-warn { background: rgba(255, 79, 122, .12); color: #ff9db5; border-color: rgba(255, 79, 122, .3); }
.badge-ver, .badge-lang { font-family: var(--mono); }
.codename { font-family: var(--mono); font-size: 12px; color: var(--accent); border: 1px dashed currentColor; border-radius: 4px; padding: 0 5px; font-weight: 500; }
.tag { font-size: 13px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--link); }
.count { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 9px; vertical-align: middle; }
.count-pill { font-size: 13px; font-weight: 600; }

/* ---------- generic panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.notice.warn { background: rgba(255, 207, 74, .1); color: #ffd97a; border: 1px solid rgba(255, 207, 74, .28); }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-page { text-align: center; padding: 80px 0; }
.empty-page h1 { font-size: 64px; color: var(--muted); margin: 0; }
.list { list-style: none; padding: 0; margin: 0 0 28px; }
.list li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.list li .muted { margin-left: auto; font-size: 13px; }

.page-head { margin-bottom: 24px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- home ---------- */
.hero { padding: 24px 0 32px; }
.hero h1 { font-size: 34px; margin-bottom: 10px; }
.lede { font-size: 17px; color: var(--muted); max-width: 720px; margin: 0 0 20px; }
.steps { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.steps b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--link); font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.search { display: flex; gap: 8px; flex: 1; max-width: 560px; }
.search input[type=search] { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg a { padding: 6px 14px; color: var(--muted); font-size: 14px; }
.seg a + a { border-left: 1px solid var(--line); }
.seg a.on { background: var(--surface-2); color: var(--text); font-weight: 600; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg-sm a { padding: 2px 10px; font-size: 13px; }

.grid { display: grid; gap: 18px; }
.grid.prompts { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.grid.subs { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.prompt-card { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; color: var(--text); transition: border-color .15s, transform .15s; }
.prompt-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.pc-head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.pc-head h2 { margin: 0; font-size: 17px; }
.excerpt { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; margin-top: auto; }

/* ---------- prompt detail ---------- */
.prompt-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 36px; }
.side-panels .panel + .panel { margin-top: 20px; }
.prompt-body, .source {
  margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.65;
  white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text);
}
.collapsible { position: relative; max-height: 360px; overflow: hidden; }
.collapsible.open { max-height: none; }
.collapsible:not(.open)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(transparent, var(--surface)); pointer-events: none;
}
.expand {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); z-index: 1;
  font: inherit; font-size: 13px; padding: 4px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
}
.collapsible.open .expand { position: static; transform: none; display: block; margin: 12px auto 0; }

.wall-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 16px; }
.wall-head h2 { margin: 0; font-size: 22px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.filter { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.filter select { padding: 4px 8px; font-size: 13px; }

.sub { display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
.sub:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.sub.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.sub.is-hidden { opacity: .6; }
.cover { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; image-rendering: auto; }
.cover-ph { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px 16px; color: #fff; }
.cover-ph b { font-size: 20px; line-height: 1.2; text-shadow: 0 1px 8px rgba(0,0,0,.25); }
.cover-ph small { opacity: .85; }
.cover-play {
  position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; color: #fff; background: rgba(0,0,0,.45);
  opacity: 0; transition: opacity .15s;
}
.cover:hover .cover-play { opacity: 1; }
.ph-0 { background: linear-gradient(135deg, #f59e0b, #b45309); }
.ph-1 { background: linear-gradient(135deg, #38bdf8, #1d4ed8); }
.ph-2 { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.ph-3 { background: linear-gradient(135deg, #34d399, #047857); }
.ph-4 { background: linear-gradient(135deg, #fb7185, #be123c); }
.ph-5 { background: linear-gradient(135deg, #94a3b8, #334155); }
.ph-6 { background: linear-gradient(135deg, #f472b6, #9d174d); }
.ph-7 { background: linear-gradient(135deg, #2dd4bf, #0f766e); }
.sub-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sub-prompt { font-size: 13px; color: var(--muted); }
.sub-model a { color: var(--text); font-size: 16px; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; }
.sub-foot { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-top: auto; }
.who { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.cmp { margin-left: auto; display: inline-flex; gap: 5px; align-items: center; cursor: pointer; color: var(--muted); user-select: none; }

.cmp-bar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 18px;
  background: var(--text); color: var(--bg); border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 14px;
}
.cmp-bar .btn-ghost { color: var(--bg); border-color: transparent; }

/* ---------- run & compare ---------- */
.run-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-bottom: 14px; }
.run-bar .crumbs { flex-basis: 100%; }
.run-bar h1 { font-size: 22px; margin: 0; }
.run-bar .actions { margin-left: auto; }
.run-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.frame-wrap { background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.runner { display: block; width: 100%; height: calc(100vh - 190px); min-height: 420px; border: 0; background: #000; }
.run-side { position: sticky; top: 76px; font-size: 14px; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 16px; }
.meta dt { color: var(--muted); white-space: nowrap; }
.meta dd { margin: 0; overflow-wrap: anywhere; }
.wrap-actions { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.hint { font-size: 12px; color: var(--muted); margin: 14px 0 0; }

.compare { display: grid; gap: 14px; }
.compare.n2 { grid-template-columns: 1fr 1fr; }
.compare.n3 { grid-template-columns: 1fr 1fr 1fr; }
.compare.n4 { grid-template-columns: 1fr 1fr; }
.cmp-cell header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 14px; }
.cmp-cell header a { color: var(--text); }
.compare .runner { height: calc(100vh - 210px); min-height: 360px; }
.compare.n4 .runner { height: calc((100vh - 260px) / 2); min-height: 280px; }

/* ---------- forms ---------- */
input, select, textarea {
  font: inherit; font-size: 14px; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; width: 100%; min-width: 0;
}
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 0; border-color: var(--accent); }
textarea { resize: vertical; line-height: 1.55; }
textarea.mono { font-family: var(--mono); font-size: 13px; }
select { width: auto; }
.field select { width: 100%; }
.form { display: flex; flex-direction: column; gap: 18px; max-width: 860px; }
.form.narrow { max-width: 420px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 14px; font-weight: 600; }
.field small { color: var(--muted); font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 14px; border: 0; padding: 0; margin: 0; min-width: 0; }
.row > .field { flex: 1 1 180px; }
.row > .field.grow { flex: 3 1 260px; }
.group { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 16px; margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.group legend { font-weight: 700; padding: 0 6px; }
details.group summary { cursor: pointer; font-weight: 600; color: var(--muted); }
details.group[open] summary { margin-bottom: 4px; }
.reveal { padding: 12px; background: var(--surface-2); border-radius: 8px; }
.radios { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.radio { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio span { display: flex; flex-direction: column; }
.radio small { color: var(--muted); font-size: 12px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 4px; }
.form-error { margin: 0; padding: 10px 12px; border-radius: 8px; background: rgba(255, 79, 122, .12); color: #ff9db5; border: 1px solid rgba(255, 79, 122, .3); flex-basis: 100%; }

/* ---------- tables (admin) ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13px; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.table .reasons { max-width: 360px; white-space: pre-wrap; overflow-wrap: anywhere; }
.merge { display: inline-flex; gap: 4px; }
.merge select { font-size: 13px; padding: 3px 6px; max-width: 200px; }

.profile-head { display: flex; align-items: center; gap: 18px; }
.profile-head h1 { margin: 0; }
.profile-head p { margin: 4px 0 0; }

.source { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; max-height: 80vh; overflow: auto; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .prompt-grid, .run-main { grid-template-columns: 1fr; }
  .run-side { position: static; }
  .compare.n2, .compare.n3, .compare.n4 { grid-template-columns: 1fr; }
  .compare .runner, .compare.n4 .runner { height: 60vh; }
  .runner { height: 70vh; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  h1, .hero h1 { font-size: 24px; }
  .top-nav { display: none; }
  .me > span:last-child { display: none; }
  .grid.prompts { grid-template-columns: 1fr; }
  .filters { margin-left: 0; }
  .table { display: block; overflow-x: auto; }
}

/* =====================================================================
   Site-wide tech skin (shared by every page; the landing page adds the 3D scene)
   ===================================================================== */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 45% at 88% -8%, rgba(56, 225, 255, .11), transparent 62%),
    radial-gradient(45% 40% at -5% 0%, rgba(255, 181, 71, .08), transparent 60%),
    radial-gradient(40% 40% at 50% 110%, rgba(164, 123, 255, .08), transparent 60%),
    linear-gradient(rgba(140, 170, 255, .045) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(140, 170, 255, .045) 1px, transparent 1px) 0 0 / 48px 48px;
}
.top { background: rgba(5, 7, 13, .62); border-bottom-color: rgba(140, 170, 255, .1); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.top-nav a.on { color: var(--text); }
.foot { background: rgba(5, 7, 13, .6); border-top-color: rgba(140, 170, 255, .1); }
h1 { font-size: 30px; letter-spacing: -.02em; }
.crumbs, .crumbs a { font: 500 12px/1.6 var(--mono); letter-spacing: .06em; color: var(--muted); }
.crumbs a:hover { color: var(--neon-cyan); text-decoration: none; }

.panel, .card {
  background: linear-gradient(160deg, rgba(20, 28, 48, .74), rgba(8, 12, 24, .64));
  border-color: var(--line);
  backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.prompt-card:hover, .sub:hover { border-color: rgba(56, 225, 255, .5); box-shadow: 0 14px 44px rgba(56, 225, 255, .12); transform: translateY(-2px); }
.sub { transition: border-color .2s, box-shadow .2s, transform .2s; }
.sub.picked { border-color: var(--neon-cyan); box-shadow: 0 0 0 1px var(--neon-cyan), 0 14px 44px rgba(56, 225, 255, .18); }
.cover { background: #0b1020; }
.chip { background: rgba(56, 225, 255, .1); color: #9feeff; border: 1px solid rgba(56, 225, 255, .22); }
.count { font-family: var(--mono); }

.btn { background: rgba(255, 255, 255, .05); border-color: rgba(140, 170, 255, .24); transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { background: rgba(56, 225, 255, .1); border-color: rgba(56, 225, 255, .5); }
.btn-primary {
  background: linear-gradient(135deg, #ffcf6e, #ff9f2e); border-color: transparent; color: #1a1100; font-weight: 700;
  box-shadow: 0 0 0 1px rgba(255, 181, 71, .35), 0 6px 24px rgba(255, 159, 46, .28);
}
.btn-primary:hover { background: linear-gradient(135deg, #ffd889, #ffab45); filter: none; border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: rgba(255, 107, 138, .6); background: rgba(255, 79, 122, .1); }
.btn-github { gap: 8px; }
.btn-github svg { width: 16px; height: 16px; fill: currentColor; flex: none; }

input, select, textarea { background: rgba(4, 8, 18, .72); border-color: rgba(140, 170, 255, .22); }
input::placeholder, textarea::placeholder { color: #5d6884; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--neon-cyan); box-shadow: 0 0 0 3px rgba(56, 225, 255, .18); }
option, optgroup { background: #0e1321; color: var(--text); }
input[type=file] { padding: 6px; }
input[type=file]::file-selector-button { font: inherit; font-size: 13px; margin-right: 10px; padding: 5px 12px; border-radius: 6px; border: 1px solid rgba(140, 170, 255, .3); background: rgba(56, 225, 255, .1); color: var(--text); cursor: pointer; }
.group { border-color: var(--line); background: rgba(4, 8, 18, .25); }
.group legend { font: 700 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--neon-cyan); }
.radio:has(input:checked) { border-color: var(--neon-cyan); background: rgba(56, 225, 255, .08); }

.seg { background: rgba(255, 255, 255, .04); border-color: var(--line); }
.seg a.on { background: rgba(56, 225, 255, .12); color: var(--text); }
.collapsible:not(.open)::after { background: linear-gradient(rgba(12, 17, 30, 0), rgba(12, 17, 30, .96)); }
.expand { background: var(--surface-solid); border-color: rgba(56, 225, 255, .35); }
.prompt-body { color: #d3dbea; }
.cmp-bar { background: rgba(14, 19, 33, .92); color: var(--text); border: 1px solid rgba(56, 225, 255, .4); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 40px rgba(0, 0, 0, .5), 0 0 30px rgba(56, 225, 255, .12); }
.cmp-bar .btn-ghost { color: var(--text); }
.frame-wrap { border-color: rgba(56, 225, 255, .3); box-shadow: 0 0 0 1px rgba(56, 225, 255, .08), 0 20px 60px rgba(0, 0, 0, .5); }
.source { background: rgba(4, 8, 18, .8); color: #c9d4ea; }
.table th { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.empty-page h1 { font: 800 72px/1 var(--mono); color: transparent; -webkit-text-stroke: 1px rgba(56, 225, 255, .6); }
.list li { border-bottom-color: var(--line); }

/* login page */
.login-card { max-width: 460px; margin: 40px auto; padding: 32px; text-align: center; }
.login-card h1 { margin-bottom: 8px; }
.login-card .lede-sm { color: var(--muted); margin: 0 0 24px; }
.login-card ul { text-align: left; list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; font-size: 14px; }
.login-card li { display: flex; gap: 10px; align-items: flex-start; }
.login-card li b { color: var(--neon-cyan); font-family: var(--mono); }
.login-card .btn-github { width: 100%; padding: 12px 16px; font-size: 15px; }
.login-card .fine { font-size: 12px; color: var(--muted); margin: 16px 0 0; }

/* =====================================================================
   Landing page (body.page-home) — dark "tech" palette over a WebGL scene
   ===================================================================== */
.page-home {
  --bg: #04060c;
  --surface: rgba(12, 17, 30, .72);
  --surface-2: rgba(255, 255, 255, .06);
  --text: #e8edf7;
  --muted: #8d99b3;
  --line: rgba(140, 170, 255, .16);
  --accent: #ffb547;
  --accent-ink: #1a1100;
  --accent-soft: rgba(255, 181, 71, .14);
  --link: #7fe3ff;
  --neon-amber: #ffb547;
  --neon-cyan: #38e1ff;
  --neon-violet: #a47bff;
  --neon-green: #3cf2a0;
  --shadow: 0 10px 40px rgba(0, 0, 0, .35);
  color-scheme: dark;
  background: var(--bg);
}
.page-home .top { background: rgba(4, 6, 12, .55); border-bottom-color: rgba(140, 170, 255, .1); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.page-home .foot { position: relative; z-index: 1; border-top-color: rgba(140, 170, 255, .1); background: rgba(4, 6, 12, .7); }
.page-home .badge { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); color: #b8c3da; }
.page-home .badge-harness { background: rgba(164, 123, 255, .14); color: #cbb6ff; border-color: rgba(164, 123, 255, .3); }
.page-home .badge-inter-one_shot { background: rgba(60, 242, 160, .12); color: #8ff7c8; border-color: rgba(60, 242, 160, .28); }
.page-home .badge-inter-multi_turn { background: rgba(255, 207, 74, .12); color: #ffd97a; border-color: rgba(255, 207, 74, .28); }
.page-home .badge-inter-human_edited { background: rgba(255, 79, 122, .12); color: #ff9db5; border-color: rgba(255, 79, 122, .28); }
.page-home .codename { color: var(--neon-amber); }
main.bare { position: relative; z-index: 1; width: 100%; }

/* --- fixed WebGL layer --- */
.fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.fx canvas { width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s ease; }
.fx.ready canvas { opacity: 1; }
.fx.no-webgl {
  background:
    radial-gradient(60% 50% at 70% 40%, rgba(255, 181, 71, .18), transparent 60%),
    radial-gradient(50% 50% at 80% 70%, rgba(56, 225, 255, .14), transparent 60%),
    radial-gradient(40% 40% at 20% 80%, rgba(164, 123, 255, .14), transparent 60%),
    #04060c;
}
.fx-vignette { position: absolute; inset: 0; background: radial-gradient(120% 90% at 60% 40%, transparent 55%, rgba(2, 3, 8, .75) 100%); }
.fx-labels { position: absolute; inset: 0; }
.fx-label {
  position: absolute; left: 0; top: 0; opacity: 0; white-space: nowrap; will-change: transform, opacity;
  margin: -34px 0 0 0; translate: -50% 0;
  font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 7px; border-radius: 4px; color: #dff7ff;
  background: rgba(4, 10, 22, .62); border: 1px solid rgba(56, 225, 255, .35);
}
.fx-label.l-harness { color: #e6dcff; border-color: rgba(164, 123, 255, .4); }
.fx-label.l-prompt { color: #1a1100; background: var(--neon-amber); border-color: var(--neon-amber); font-size: 12px; margin-top: -58px; letter-spacing: .2em; }

/* --- shared bits --- */
.glass {
  background: linear-gradient(160deg, rgba(20, 28, 48, .72), rgba(8, 12, 24, .6));
  border: 1px solid rgba(140, 170, 255, .16);
  border-radius: 16px;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font: 600 12px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--neon-cyan);
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neon-green); box-shadow: 0 0 0 0 rgba(60, 242, 160, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(60, 242, 160, 0); } 100% { box-shadow: 0 0 0 0 rgba(60, 242, 160, 0); } }
.btn-neon {
  background: linear-gradient(135deg, #ffcf6e, #ff9f2e); border-color: transparent; color: #1a1100; font-weight: 700;
  box-shadow: 0 0 0 1px rgba(255, 181, 71, .4), 0 8px 30px rgba(255, 159, 46, .35);
}
.btn-neon:hover { background: linear-gradient(135deg, #ffd889, #ffab45); }
.btn-glass { background: rgba(255, 255, 255, .05); border-color: rgba(140, 170, 255, .25); color: var(--text); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(56, 225, 255, .1); border-color: rgba(56, 225, 255, .5); }
.page-home .btn { padding: 10px 18px; border-radius: 10px; }
.mono { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* --- hero --- */
.l-hero { min-height: calc(100vh - 56px); min-height: calc(100svh - 56px); display: flex; flex-direction: column; justify-content: center; position: relative; padding: 48px 0 90px; }
.l-hero-in { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: end; }
.l-title { margin: 0 0 22px; font-size: clamp(40px, 6.4vw, 84px); line-height: 1.02; letter-spacing: -.03em; word-spacing: .1em; font-weight: 800; }
.l-title span { display: block; }
.grad { background: linear-gradient(92deg, var(--neon-amber), var(--neon-cyan) 55%, var(--neon-violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.l-lede { font-size: clamp(16px, 1.5vw, 19px); color: #b5c0d6; max-width: 600px; margin: 0 0 30px; }
.l-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.l-stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 12px 36px; margin: 40px 0 0; }
.l-stats div { border-left: 2px solid rgba(56, 225, 255, .5); padding-left: 14px; }
.l-stats dd { margin: 0; font: 700 34px/1.1 var(--mono); color: #fff; font-variant-numeric: tabular-nums; }
.l-stats dt { font-size: 13px; color: var(--muted); }

.term { overflow: hidden; align-self: end; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid rgba(140, 170, 255, .12); font: 12px var(--mono); color: var(--muted); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; margin-right: 8px; }
.term-body { -webkit-mask-image: linear-gradient(transparent, #000 28%); mask-image: linear-gradient(transparent, #000 28%); margin: 0; padding: 14px 16px 18px; height: 220px; overflow: hidden; font: 12.5px/1.75 var(--mono); color: #c9d4ea; white-space: pre-wrap; word-break: break-word; display: flex; flex-direction: column; justify-content: flex-end; }
.t-line { flex: none; min-height: 1.75em; }
.t-dim { color: #66738f; } .t-key { color: #fff; font-weight: 700; } .t-prompt { color: var(--neon-amber); }
.t-model { color: var(--neon-cyan); } .t-harness { color: #c4a8ff; } .t-inter { color: var(--neon-green); } .t-ok { color: var(--neon-green); }
.t-out { color: #8d99b3; margin-bottom: 6px; }
.t-cursor { display: inline-block; width: 8px; height: 1.1em; vertical-align: -2px; margin-left: 2px; background: var(--neon-cyan); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.scroll-hint { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font: 12px var(--mono); letter-spacing: .1em; }
.scroll-hint i { width: 1px; height: 36px; background: linear-gradient(var(--neon-cyan), transparent); animation: drop 1.8s ease-in-out infinite; }
.scroll-hint:hover { text-decoration: none; color: var(--text); }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* --- section heads --- */
.l-sec-head { max-width: 760px; padding: 110px 0 40px; }
.l-sec-head h2 { font-size: clamp(28px, 3.6vw, 46px); line-height: 1.12; letter-spacing: -.025em; margin: 0 0 16px; }
.l-sec-head > p:not(.eyebrow) { color: #b5c0d6; font-size: 17px; margin: 0; }
.row-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; max-width: none; padding-bottom: 24px; }
.row-head h2 { margin: 0; }

/* --- methodology --- */
.formula {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 32px 0 10px; padding: 16px 20px;
  font: 600 clamp(14px, 1.7vw, 20px)/1.4 var(--mono); border-radius: 12px;
  background: rgba(4, 8, 18, .7); border: 1px solid rgba(140, 170, 255, .2);
}
.formula i { color: #fff; font-style: italic; }
.f-op { color: #66738f; }
.f-out { color: #fff; } .f-prompt { color: var(--neon-amber); } .f-model { color: var(--neon-cyan); }
.f-harness { color: #c4a8ff; } .f-inter { color: var(--neon-green); } .f-method { color: #7fe3ff; }
.formula-note { color: var(--muted) !important; font-size: 14px !important; }
.l-steps { list-style: none; margin: 0; padding: 0 0 40px; }
.l-step { min-height: 82vh; display: flex; align-items: center; }
.step-card { max-width: 540px; padding: 30px 32px; transition: border-color .5s, box-shadow .5s, transform .5s; transform: translateY(10px); }
.l-step.active .step-card { border-color: rgba(56, 225, 255, .45); box-shadow: 0 0 0 1px rgba(56, 225, 255, .2), 0 20px 80px rgba(56, 225, 255, .12); transform: none; }
.step-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.step-no { font: 800 44px/1 var(--mono); color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .45); }
.l-step.active .step-no { -webkit-text-stroke: 1px var(--neon-cyan); }
.step-tag { font: 600 12px var(--mono); letter-spacing: .12em; padding: 4px 9px; border-radius: 6px; border: 1px solid currentColor; }
.step-card h3 { font-size: 24px; margin: 0 0 10px; }
.step-card p { color: #b5c0d6; margin: 0 0 16px; }
.step-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.step-points li { position: relative; padding-left: 20px; font-size: 14px; color: #d3dbea; }
.step-points li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border: 1px solid var(--neon-cyan); transform: rotate(45deg); }

/* --- cases --- */
.l-cases { position: relative; background: linear-gradient(rgba(4, 6, 12, 0), rgba(4, 6, 12, .55) 18%, rgba(4, 6, 12, .55) 82%, rgba(4, 6, 12, 0)); padding-bottom: 40px; }
.case { padding: 26px; margin-bottom: 28px; }
.case-head { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; margin-bottom: 22px; }
.case-copy { flex: 1 1 420px; min-width: 0; }
.case-kicker { font: 600 12px var(--mono); letter-spacing: .12em; color: var(--neon-cyan); margin: 0 0 8px; overflow-wrap: anywhere; }
.case h3 { font-size: 26px; margin: 0 0 8px; }
.case h3 a { color: var(--text); }
.case-excerpt { color: var(--muted); margin: 0; font-size: 14px; }
.case-stats { display: flex; gap: 28px; margin: 0; align-self: center; }
.case-stats dd { margin: 0; font: 700 30px/1 var(--mono); color: #fff; }
.case-stats dt { font-size: 12px; color: var(--muted); margin-top: 6px; }
.case-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .03); border: 1px solid rgba(140, 170, 255, .14); color: var(--text); transition: transform .25s, border-color .25s, box-shadow .25s; }
.tile:hover { text-decoration: none; transform: translateY(-3px); border-color: rgba(56, 225, 255, .55); box-shadow: 0 12px 40px rgba(56, 225, 255, .15); }
.tile-img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; display: flex; align-items: flex-end; padding: 12px; background: #0b1020; }
.tile-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-img b { position: relative; color: #fff; font-size: 18px; }
.tile-scan { position: absolute; inset: 0; background: linear-gradient(transparent 0%, rgba(56, 225, 255, .22) 50%, transparent 52%); background-size: 100% 220%; background-position: 0 -120%; opacity: 0; }
.tile:hover .tile-scan { opacity: 1; animation: scan 1.4s linear infinite; }
@keyframes scan { to { background-position: 0 120%; } }
.tile-meta { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; }
.tile-model b { font-size: 15px; }
.case-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.case-empty { padding: 36px; text-align: center; }

/* --- latest + final --- */
.l-latest { padding-bottom: 40px; }
.latest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.latest-card { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; color: var(--text); transition: border-color .25s, transform .25s; }
.latest-card:hover { text-decoration: none; border-color: rgba(56, 225, 255, .5); transform: translateY(-2px); }
.latest-card b { font-size: 16px; }
.latest-card .muted { font-size: 13px; }
.latest-top { display: flex; justify-content: space-between; align-items: center; }
.l-final { padding: 60px 0 110px; }
.final-card { text-align: center; padding: 56px 28px; background: radial-gradient(80% 120% at 50% 0%, rgba(255, 181, 71, .14), transparent 60%), linear-gradient(160deg, rgba(20, 28, 48, .8), rgba(8, 12, 24, .7)); }
.final-card h2 { font-size: clamp(26px, 3.4vw, 42px); letter-spacing: -.02em; margin: 0 0 12px; }
.final-card p { color: #b5c0d6; max-width: 620px; margin: 0 auto 26px; }
.final-card .l-cta { justify-content: center; }

/* --- prompt list header (moved from old home) --- */
.list-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.list-head h1 { margin-bottom: 6px; }
.list-head p { margin: 0; }

@media (max-width: 960px) {
  .l-hero-in { grid-template-columns: 1fr; gap: 32px; }
  .term-body { height: 220px; }
  .l-step { min-height: 70vh; }
}
@media (max-width: 640px) {
  .l-hero { padding-top: 36px; }
  .l-stats { grid-template-columns: repeat(2, auto); gap: 16px 28px; }
  .l-stats dd { font-size: 28px; }
  .l-sec-head { padding-top: 80px; }
  .step-card { padding: 22px 20px; }
  .step-no { font-size: 34px; }
  .case { padding: 18px; }
  .case-stats { gap: 20px; }
  .case-stats dd { font-size: 24px; }
  .case-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile-meta { padding: 10px; }
  .tile-meta .badges > :not(.badge-harness) { display: none; }
  .row-head { flex-direction: column; align-items: flex-start; }
  .fx-label { font-size: 9px; }
  .term-body { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-dot, .t-cursor, .scroll-hint i, .tile:hover .tile-scan { animation: none; }
  .step-card, .tile, .latest-card { transition: none; }
}

/* --- landing interactions --- */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.page-home [id] { scroll-margin-top: 72px; }
.scroll-hint { transition: opacity .4s; }
.scroll-hint.gone { opacity: 0; pointer-events: none; }
.formula a { text-decoration: none; border-bottom: 1px dashed transparent; transition: border-color .2s, text-shadow .2s; }
.formula a:hover { border-bottom-color: currentColor; text-shadow: 0 0 12px currentColor; text-decoration: none; }
.t-link { color: var(--neon-cyan); pointer-events: auto; }
.t-link:hover { text-decoration: underline; }
.tile:focus-visible, .latest-card:focus-visible, .btn:focus-visible { outline: 2px solid var(--neon-cyan); outline-offset: 2px; }

.step-rail {
  position: fixed; right: 22px; top: 50%; z-index: 15; translate: 0 -50%;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.step-rail.visible { opacity: 1; pointer-events: auto; }
.step-rail a {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 4px 0;
  font: 500 11px var(--mono); letter-spacing: .06em; color: var(--muted); text-decoration: none;
}
.step-rail a span { opacity: 0; translate: 6px 0; transition: opacity .2s, translate .2s; white-space: nowrap;
  background: rgba(5, 7, 13, .75); padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); }
.step-rail:hover a span, .step-rail a.on span { opacity: 1; translate: 0 0; }
.step-rail i { order: 2; width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); border: 1px solid rgba(140, 170, 255, .5); transition: all .25s; }
.step-rail a:hover { color: var(--text); text-decoration: none; }
.step-rail a.on { color: var(--text); }
.step-rail a.on i { background: var(--neon-cyan); border-color: var(--neon-cyan); box-shadow: 0 0 12px var(--neon-cyan); }
@media (max-width: 960px) {
  .step-rail { right: 10px; }
  .step-rail a span { display: none; }
}
