:root { --ink:#1c1917; --muted:#78716c; --brand:#b45309; --bg:#faf7f2; --card:#fff; --line:#e7e2da; --ok:#15803d; --warn:#b45309; --bad:#b91c1c; }
* { box-sizing: border-box; }
body { margin:0; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background:var(--bg); color:var(--ink); line-height:1.5; }
header { display:flex; justify-content:space-between; align-items:center; padding:14px 18px; border-bottom:1px solid var(--line); background:var(--card); position:sticky; top:0; }
.brand { font-size:22px; font-weight:800; color:var(--brand); }
.brand .tag { font-size:12px; color:var(--muted); font-weight:500; margin-left:8px; }
#whoami { font-size:12px; color:var(--muted); }
main { max-width:760px; margin:0 auto; padding:18px 14px 60px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:18px; margin-bottom:16px; }
h1 { font-size:20px; margin:0 0 8px; } h2 { font-size:16px; margin:0 0 8px; } h3 { font-size:14px; margin:14px 0 4px; }
.muted { color:var(--muted); } .small { font-size:12px; } .error { color:var(--bad); }
.hidden { display:none !important; }
label { display:block; margin:10px 0 4px; font-size:13px; font-weight:600; }
input, select { width:100%; padding:10px; border:1px solid var(--line); border-radius:8px; font-size:15px; background:#fff; }
.row { display:flex; gap:10px; } .row label { flex:1; }
.mode-row { margin:12px 0; } .radio { display:flex; align-items:center; gap:6px; font-weight:500; }
.radio input { width:auto; }
button { background:var(--brand); color:#fff; border:0; padding:11px 18px; border-radius:8px; font-size:15px; font-weight:700; cursor:pointer; margin-top:12px; }
button:disabled { opacity:.6; } button.ghost { background:#e7e2da; color:var(--ink); }
a { color:var(--brand); }
.stages { padding-left:20px; } .stages li { padding:6px 0; color:var(--muted); }
.stages li.done { color:var(--ok); } .stages li.active { color:var(--brand); font-weight:700; }
.badge { display:inline-block; font-size:11px; font-weight:700; padding:2px 8px; border-radius:20px; background:#eee; color:#444; vertical-align:middle; }
.label-verified { background:#dcfce7; color:var(--ok); } .label-corroborated { background:#e0f2fe; color:#0369a1; }
.label-seller-claim { background:#fef3c7; color:var(--warn); } .label-estimate { background:#ede9fe; color:#6d28d9; }
.label-not-found { background:#f3f4f6; color:#6b7280; }
.src-fetched, .src-snippet { background:#dcfce7; color:var(--ok); } .src-blocked { background:#fee2e2; color:var(--bad); } .src-failed { background:#f3f4f6; color:#6b7280; }
.src { padding:6px 0; border-bottom:1px dashed var(--line); font-size:13px; word-break:break-word; }
.report-row { padding:8px 0; border-bottom:1px dashed var(--line); }
.verdict { font-size:16px; font-weight:600; }
.score { font-size:26px; margin:6px 0; } .score b { color:var(--brand); }
.subscores span { display:inline-block; margin:0 12px 4px 0; font-size:13px; color:var(--muted); }
.subscores b { color:var(--ink); }
table.val { width:100%; border-collapse:collapse; margin:8px 0; }
table.val td { padding:6px 4px; border-bottom:1px solid var(--line); font-size:14px; }
table.val td:last-child { text-align:right; font-weight:600; }
footer { text-align:center; padding:16px; color:var(--muted); font-size:12px; border-top:1px solid var(--line); }
ul { padding-left:20px; } li { margin:5px 0; }

textarea{width:100%;box-sizing:border-box;padding:8px;font:inherit;border:1px solid #ccc;border-radius:6px}
.listing-box{border:1px dashed #bbb;border-radius:8px;padding:10px;margin-bottom:14px}
.src-claim{background:#fef3c7;color:var(--warn)}

.chat{max-height:50vh;overflow-y:auto;display:flex;flex-direction:column;gap:8px;margin:12px 0;padding:4px}
.msg{padding:9px 12px;border-radius:12px;max-width:88%;white-space:pre-wrap;line-height:1.4}
.msg.bot{background:#f1ece4;align-self:flex-start}
.msg.user{background:#b45309;color:#fff;align-self:flex-end}
.quick{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.chat-form textarea{margin-bottom:8px}
.confirm{margin-top:12px;padding-top:12px;border-top:1px dashed #ccc}

.guest-banner{background:#fef3c7;color:#92400e;border:1px solid #f59e0b;border-radius:8px;padding:8px 12px;margin-bottom:12px;font-size:14px}

/* ===== ChatGPT-style shell (PropRank's own design, v0.4) ===== */
:root { --side:#f4efe7; --bubble:#ece6dc; }
html, body { height:100%; }
body { background:#fffdfa; }
.app { display:flex; min-height:100dvh; }
.sidebar { width:272px; flex:none; background:var(--side); border-right:1px solid var(--line); display:flex; flex-direction:column; padding:14px 12px; position:sticky; top:0; height:100dvh; transition:transform .22s ease, margin-left .22s ease; z-index:30; }
.side-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.brand { font-size:21px; font-weight:800; color:var(--brand); letter-spacing:-.3px; }
.new-chat { width:100%; margin:0 0 14px; background:#fff; color:var(--ink); border:1px solid var(--line); text-align:left; padding:11px 14px; border-radius:12px; }
.new-chat:hover { background:#fbf8f3; }
.side-label { font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin:4px 6px 6px; }
.reports-list { flex:1; overflow-y:auto; font-size:14px; }
.reports-list .report-row { border:0; padding:9px 10px; border-radius:10px; line-height:1.3; }
.reports-list .report-row:hover { background:#e9e2d6; }
.reports-list .report-row a { color:var(--ink); text-decoration:none; display:block; font-weight:600; }
.reports-list .report-row .muted { font-size:11px; }
.side-foot { border-top:1px solid var(--line); padding-top:10px; font-size:13px; display:flex; flex-direction:column; gap:6px; }
.side-foot a { color:var(--ink); text-decoration:none; padding:6px; border-radius:8px; } .side-foot a:hover { background:#e9e2d6; }
.ver { color:var(--muted); font-size:11px; padding:0 6px; }
.content { flex:1; min-width:0; display:flex; flex-direction:column; }
.topbar { display:none; align-items:center; justify-content:space-between; padding:8px 10px; border-bottom:1px solid var(--line); background:#fffdfa; position:sticky; top:0; z-index:20; }
.icon-btn { background:transparent; color:var(--ink); margin:0; padding:6px 12px; font-size:22px; border-radius:10px; line-height:1; }
.icon-btn:hover { background:var(--side); }
.only-mobile { display:none; }
.scrim { position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:25; }
body.side-collapsed .sidebar { margin-left:-272px; }
body.side-collapsed .topbar { display:flex; }
body.noauth .sidebar, body.noauth .topbar { display:none !important; }
main#main { max-width:none; width:100%; margin:0; padding:0; flex:1; display:flex; flex-direction:column; }
main#main > section:not(.home) { max-width:760px; width:100%; margin:18px auto; padding-left:14px; padding-right:14px; }
main#main > section.card { max-width:560px; margin:8vh auto 0; }
.guest-banner { max-width:720px; width:calc(100% - 28px); margin:10px auto 0; }
.home { flex:1; display:flex; flex-direction:column; min-height:0; }
.thread { width:100%; max-width:720px; margin:0 auto; padding:18px 16px 8px; flex:1; }
.hero { text-align:center; padding:9vh 0 18px; }
.hero-title { font-size:28px; font-weight:800; letter-spacing:-.4px; }
.hero-sub { color:var(--muted); margin:8px auto 18px; max-width:480px; font-size:15px; }
.chips { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }
.hero .chips { justify-content:center; }
.chip, .qbtn { background:#fff; color:var(--ink); border:1px solid var(--line); border-radius:999px; padding:9px 15px; font-size:14px; font-weight:500; margin:0; }
.chip:hover, .qbtn:hover { background:var(--side); }
.chat { display:flex; flex-direction:column; gap:20px; max-height:none; overflow:visible; margin:0; padding:0; }
.msg { max-width:100%; padding:0; border-radius:0; background:none; line-height:1.6; font-size:16px; white-space:normal; word-break:break-word; }
.msg.bot { align-self:stretch; background:none; padding-left:38px; position:relative; }
.msg.bot::before { content:'J'; position:absolute; left:0; top:1px; width:27px; height:27px; border-radius:50%; background:var(--brand); color:#fff; font-weight:800; font-size:14px; display:flex; align-items:center; justify-content:center; }
.msg.user { align-self:flex-end; background:var(--bubble); color:var(--ink); padding:10px 16px; border-radius:20px; max-width:85%; white-space:pre-wrap; }
.msg p { margin:0 0 8px; } .msg ul, .msg ol { margin:4px 0 8px; padding-left:22px; } .msg code { background:#f1ece4; padding:1px 5px; border-radius:5px; font-size:14px; }
.typing { display:inline-flex; gap:4px; padding:8px 0; } .typing i { width:7px; height:7px; border-radius:50%; background:var(--muted); animation:blink 1.2s infinite; } .typing i:nth-child(2){animation-delay:.2s} .typing i:nth-child(3){animation-delay:.4s}
@keyframes blink { 0%,60%,100%{opacity:.25} 30%{opacity:1} }
.quick { padding-left:38px; }
.confirm { border:0; margin:14px 0 0 38px; padding:14px; background:var(--side); border-radius:16px; }
.mode-row { display:flex; flex-direction:column; gap:6px; margin-bottom:6px; }
.composer-wrap { position:sticky; bottom:0; background:linear-gradient(to top,#fffdfa 78%,rgba(255,253,250,0)); padding:10px 14px calc(10px + env(safe-area-inset-bottom)); }
.composer { max-width:720px; margin:0 auto; display:flex; align-items:flex-end; gap:8px; background:#fff; border:1px solid #d9d2c6; border-radius:26px; padding:8px 8px 8px 18px; box-shadow:0 2px 14px rgba(60,40,10,.08); }
.composer textarea { flex:1; border:0; outline:0; resize:none; font:inherit; font-size:16px; padding:8px 0; max-height:160px; background:transparent; }
.composer button { margin:0; width:38px; height:38px; padding:0; border-radius:50%; font-size:20px; flex:none; }
.composer-sub { max-width:720px; margin:4px auto 0; display:flex; justify-content:space-between; font-size:12px; }
.linkbtn { background:none; color:var(--muted); margin:0; padding:2px 6px; font-size:12px; font-weight:500; text-decoration:underline; }
@media (max-width: 800px) {
  .sidebar { position:fixed; left:0; top:0; margin-left:-290px; width:280px; box-shadow:none; }
  body.side-open .sidebar { box-shadow:4px 0 24px rgba(0,0,0,.15); }
  body.side-open .sidebar { margin-left:0; }
  body.side-collapsed .sidebar { margin-left:-290px; }
  body.side-open.side-collapsed .sidebar { margin-left:0; }
  .topbar { display:flex; }
  .only-mobile { display:inline-block; }
  .hero { padding-top:5vh; } .hero-title { font-size:23px; }
  .msg { font-size:15.5px; }
}

.ver-inline { color:var(--muted); font-size:11px; align-self:center; }
.cands { display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.cand { border:1px solid var(--line); border-radius:14px; padding:12px 14px; background:#fff; }
.cand-t { font-weight:700; font-size:16px; }
.cand .pick { margin-top:8px; padding:8px 14px; font-size:14px; }
