:root {
  --bg: #f6f6f9; --card: #ffffff; --text: #1c1c24; --muted: #6b6b7b; --line: #e3e3ea;
  --accent: #5b5bd6; --accent-ink: #ffffff;
  --ai: #c2410c; --ai-bg: #fff1e8; --human: #15803d; --human-bg: #eafaf0; --neutral: #57577a; --neutral-bg: #eeeef6;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111117; --card: #1a1a22; --text: #ececf1; --muted: #9a9aab; --line: #2c2c38;
    --accent: #8b8bf0; --accent-ink: #111117;
    --ai: #fb923c; --ai-bg: #2b1a10; --human: #4ade80; --human-bg: #0f2418; --neutral: #b4b4d0; --neutral-bg: #22222e;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 920px; margin: 0 auto; padding: 16px; }
a { color: var(--accent); }
h1 { font-size: 1.6rem; margin: .2em 0 .4em; line-height: 1.2; }
h2 { font-size: 1.15rem; margin: 0 0 .8em; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .right { text-align: right; }
.top { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.brand { display: flex; gap: 8px; align-items: center; font-weight: 700; color: var(--text); text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.top nav a { color: var(--text); text-decoration: none; }
footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 32px 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  margin: 0 0 16px; box-shadow: var(--shadow); }
.narrow { max-width: 420px; margin: 40px auto; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 4px; font-weight: 500; }
input, textarea, select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; width: 100%; }
textarea { resize: vertical; min-height: 180px; }
button { font: inherit; cursor: pointer; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); padding: 8px 14px; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
button.big { width: 100%; padding: 14px; font-size: 1.05rem; margin-top: 12px; }
button.link { background: none; border: none; padding: 0; color: var(--muted); }
button.danger { color: var(--ai); }
button:disabled { opacity: .6; cursor: progress; }
form.inline { display: inline; }
.alert { background: var(--ai-bg); color: var(--ai); border-radius: 10px; padding: 10px 14px; }
.intro .budget { font-weight: 600; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tab { flex: 1; text-align: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; display: block; }
.tab input { position: absolute; opacity: 0; pointer-events: none; }
.tab.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 36px 16px; text-align: center; cursor: pointer; color: var(--muted); }
.drop.over { border-color: var(--accent); background: var(--neutral-bg); }
.drop input { display: none; }
.hint { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.tier { border: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.tier legend { font-weight: 600; margin-bottom: 6px; }
.tier label { display: flex; gap: 8px; align-items: baseline; font-weight: 400; }
.tier input { width: auto; }
.progress { position: relative; height: 28px; margin-top: 10px; background: var(--neutral-bg); border-radius: 8px; overflow: hidden; }
.progress div { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); opacity: .35; transition: width .2s; }
.progress span { position: relative; display: block; text-align: center; line-height: 28px; font-size: .85rem; }
.about ul { margin: 8px 0 0; padding-left: 20px; }
.check-head { display: flex; gap: 20px; align-items: flex-start; }
.thumb { width: 160px; max-width: 35%; border-radius: 10px; object-fit: cover; }
blockquote { margin: 8px 0; padding: 8px 14px; border-left: 3px solid var(--line); color: var(--muted); white-space: pre-wrap; word-break: break-word; }
.verdict { border-radius: 12px; padding: 12px 16px; margin: 8px 0; }
.verdict h1 { margin: 0; }
.verdict p { margin: 4px 0 0; }
.tone-ai { background: var(--ai-bg); color: var(--ai); }
.tone-human { background: var(--human-bg); color: var(--human); }
.tone-neutral { background: var(--neutral-bg); color: var(--neutral); }
.running { display: flex; align-items: center; gap: 10px; padding: 12px 0; font-weight: 500; }
.spinner { width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.findings { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.findings li { border-left: 4px solid var(--line); padding: 4px 0 4px 12px; }
.findings li.points-ai { border-color: var(--ai); }
.findings li.points-human { border-color: var(--human); }
.findings p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; word-break: break-word; }
.badge { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; border-radius: 6px; padding: 1px 6px; margin-right: 6px; background: var(--neutral-bg); color: var(--neutral); }
.badge.s-strong { background: var(--accent); color: var(--accent-ink); }
.badge.s-medium { background: var(--neutral); color: var(--card); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: .9rem; margin: 10px 0 0; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; word-break: break-word; }
details summary { cursor: pointer; color: var(--muted); margin-top: 12px; }
.panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.opinion { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.opinion header { display: grid; margin-bottom: 8px; }
.opinion.failed { opacity: .7; }
.meter { position: relative; height: 26px; border-radius: 8px; background: var(--human-bg); overflow: hidden; }
.meter::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--p) * 1%); background: var(--ai); opacity: .8; }
.meter span { position: relative; display: block; padding: 0 10px; line-height: 26px; font-weight: 600; font-size: .9rem; }
.pill { display: inline-block; border-radius: 999px; padding: 1px 9px; margin: 2px 2px 0 0; font-size: .8rem; background: var(--neutral-bg); color: var(--neutral); }
.v-ai { background: var(--ai-bg); color: var(--ai); } .v-human { background: var(--human-bg); color: var(--human); }
.reasons { margin: 8px 0 0; padding-left: 18px; font-size: .88rem; }
.reasons li { margin-bottom: 3px; }
.history { list-style: none; padding: 0; margin: 0; }
.history .row { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; padding: 12px; margin-bottom: 8px; }
.history img, .kind-icon { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--neutral-bg); font-weight: 700; }
.history .grow { flex: 1; min-width: 0; display: grid; }
.history .grow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-form { display: flex; gap: 8px; flex-wrap: wrap; } .row-form input { flex: 1; min-width: 200px; }
.copy { font-family: ui-monospace, monospace; font-size: .85rem; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
input.num { width: 90px; } td input[type=checkbox] { width: auto; }
@media (max-width: 600px) {
  .check-head { flex-direction: column; } .thumb { max-width: 100%; width: 100%; }
  h1 { font-size: 1.35rem; }
}
