:root {
  --bg: #141210;
  --panel: #1d1a16;
  --panel-2: #252119;
  --ink: #f2ede4;
  --ink-dim: #b8b0a1;
  --ink-faint: #7d7668;
  --accent: #e8a04c;
  --accent-soft: #e8a04c33;
  --line: #353027;
  --good: #9fc98a;
  --bad: #d97f6a;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5; min-height: 100vh;
}
.display { font-family: Georgia, "Times New Roman", serif; letter-spacing: -0.01em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 22px 60px; }

/* header */
header.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
h1 { font-size: 34px; font-weight: 600; }
h1 .mark { color: var(--accent); }
.subtitle { color: var(--ink-dim); margin-top: 4px; max-width: 560px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  font-size: 12px; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-dim); background: var(--panel);
  white-space: nowrap;
}
.badge.live { color: var(--good); border-color: #3c4a33; }
.badge.sample { color: var(--accent); border-color: #4d3d22; background: #241d12; }

/* sample banner */
.banner {
  margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; font-size: 13px;
  background: #241d12; border: 1px dashed #6b5426; color: var(--accent);
}
.banner[hidden] { display: none; }

/* layout */
.grid { display: grid; grid-template-columns: 380px 1fr; gap: 22px; margin-top: 22px; }
@media (max-width: 940px) { .grid { grid-template-columns: 1fr; } }

/* group panel */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); font-weight: 600; margin-bottom: 12px; }
.member { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.member .row { display: flex; gap: 8px; }
.member input[type=text] { width: 100%; }
.member .likes { margin-top: 8px; }
.sample-tag { font-size: 10px; color: var(--accent); border: 1px solid #6b5426; border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 2px; }
input[type=text], select {
  background: #171410; border: 1px solid var(--line); color: var(--ink);
  border-radius: 8px; padding: 9px 10px; font-size: 14px; outline: none;
}
input[type=text]:focus, select:focus { border-color: var(--accent); }
.field-label { font-size: 12px; color: var(--ink-faint); margin: 12px 0 6px; display: block; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
button {
  font: inherit; cursor: pointer; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--ink); padding: 8px 13px; font-size: 13.5px;
  transition: border-color .15s, background .15s;
}
button:hover { border-color: var(--accent); }
button.primary {
  width: 100%; margin-top: 14px; padding: 13px; font-size: 15px; font-weight: 600;
  background: var(--accent); border: none; color: #1a1408;
}
button.primary:hover { background: #f0b267; }
button.primary:disabled { opacity: .5; cursor: wait; }
button.ghost { background: transparent; color: var(--ink-dim); }
.link-btn { background: none; border: none; color: var(--accent); font-size: 13px; padding: 0; text-decoration: underline; }

/* trace */
.trace { margin-bottom: 18px; }
.trace-item {
  display: flex; gap: 10px; padding: 7px 4px; font-size: 13.5px; color: var(--ink-dim);
  border-bottom: 1px dashed #2a261e; opacity: 0; animation: fadein .4s forwards;
}
.trace-item .dot { color: var(--accent); }
.trace-item .detail { color: var(--ink-faint); font-size: 12px; }
@keyframes fadein { to { opacity: 1; } }

/* plan cards */
.cards { display: grid; gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card .kind { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.card h3 { font-size: 22px; margin: 6px 0 4px; }
.card .note { color: var(--ink-dim); font-size: 13.5px; }
.card .score-line { margin: 10px 0 4px; font-size: 12.5px; color: var(--ink-faint); }
.why { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 8px; }
.why-row { display: grid; grid-template-columns: 92px 1fr 56px; gap: 10px; align-items: center; font-size: 13px; }
.why-row .who { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.why-row .reason { color: var(--ink-dim); font-size: 12.5px; grid-column: 1 / -1; margin-top: -6px; }
.bar { height: 6px; background: #2b261d; border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.pct { text-align: right; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.strongest .who::after { content: "★"; color: var(--accent); margin-left: 4px; font-size: 11px; }
.card .actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.chip { font-size: 12.5px; padding: 6px 11px; border-radius: 999px; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* states */
.empty { color: var(--ink-faint); text-align: center; padding: 60px 20px; font-size: 14px; }
.error { color: var(--bad); font-size: 13px; margin-top: 10px; }

/* footer */
footer { margin-top: 40px; color: var(--ink-faint); font-size: 12.5px; border-top: 1px solid var(--line); padding-top: 16px; }
footer p { max-width: 720px; margin-bottom: 6px; }

.evidence { font-size: 12px; opacity: .72; margin: 6px 0 2px; }
.why-row .pct { min-width: 52px; text-align: right; }

/* Baseline comparison + consensus closure */
.baseline-line { font-size: 12.5px; opacity: .8; margin-top: 8px; border-top: 1px dashed rgba(255,255,255,.14); padding-top: 8px; }
.baseline-line strong { color: #e8b04b; }
#baselineZone { margin: 14px 0 4px; }
.consensus-box { margin-top: 14px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; }
.consensus-q { font-size: 13px; opacity: .8; margin-bottom: 10px; }
.accept-row { display: flex; gap: 8px; flex-wrap: wrap; }
.accept-chip { border: 1px solid rgba(255,255,255,.25); background: transparent; color: inherit; border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 13px; }
.accept-chip.in { background: #2f7d4f; border-color: #2f7d4f; color: #fff; }
.agreed-banner { margin-top: 16px; padding: 18px 20px; border-radius: 14px; background: linear-gradient(135deg, #1f5136, #123524); border: 1px solid #3f9d68; font-size: 15px; line-height: 1.7; }
.agreed-sub { font-size: 12px; opacity: .75; }

.share-note {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ink-faint, #666);
  border: 1px dashed currentColor;
  border-radius: 8px;
  padding: 8px 10px;
}
