:root {
  --bg: #f7f6f2; --card: #ffffff; --ink: #1c1d1f; --muted: #6a6c70; --line: #e3e1da;
  --accent: #1f4fd1; --accent-ink: #fff;
  --high: #b3261e; --high-bg: #fbeceb; --med: #9a6100; --med-bg: #fdf3df; --low: #1d7a46; --low-bg: #e6f4ec;
  --notice: #fff7d6;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141518; --card: #1d1f23; --ink: #ececea; --muted: #9a9ca1; --line: #2e3036;
    --accent: #7ea2ff; --accent-ink: #0d1222;
    --high: #ff8a80; --high-bg: #3a1d1b; --med: #f0bd5c; --med-bg: #362a14; --low: #6fd49b; --low-bg: #16301f; --notice: #2e2a16; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5; }
a { color: var(--accent); }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }
.notice { background: var(--notice); border-bottom: 1px solid var(--line); padding: 8px 16px; font-size: 13px; text-align: center; }
.masthead { display: flex; align-items: baseline; gap: 12px; padding-top: 20px; padding-bottom: 8px; }
.brand { font-weight: 750; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.tag { color: var(--muted); font-size: 13px; }
.hero h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -0.02em; line-height: 1.1; margin: 28px 0 10px; }
.lede { color: var(--muted); max-width: 640px; margin: 0 0 22px; }
.search { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 10px; align-items: end; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
input, select { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); min-width: 0; width: 100%; }
button { font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 8px; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
@media (max-width: 680px) { .search { grid-template-columns: 1fr; } }
.status { margin: 18px 0; }
.loading { color: var(--muted); }
.error { color: var(--high); background: var(--high-bg); padding: 10px 14px; border-radius: 8px; }
.verdict { display: flex; gap: 16px; align-items: center; border-radius: 12px; padding: 18px 20px; margin-top: 28px; }
.verdict h2 { margin: 0; font-size: 26px; letter-spacing: -0.01em; }
.eyebrow { margin: 0 0 2px; font-size: 13px; opacity: .8; }
.risk-label { margin: 4px 0 0; font-size: 14px; }
.meter { display: flex; flex-direction: column-reverse; gap: 3px; }
.meter span { width: 28px; height: 10px; border-radius: 3px; background: currentColor; opacity: .18; }
.risk-high { background: var(--high-bg); color: var(--high); } .risk-high .meter span { opacity: 1; }
.risk-medium { background: var(--med-bg); color: var(--med); } .risk-medium .meter span:nth-child(-n+2) { opacity: 1; }
.risk-low { background: var(--low-bg); color: var(--low); } .risk-low .meter span:first-child { opacity: 1; }
.verdict h2, .verdict .eyebrow, .verdict .risk-label { color: var(--ink); }
.reasons { padding-left: 20px; } .reasons li { margin: 6px 0; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.list-head h3 { margin: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: var(--card); color: var(--ink); border: 1px solid var(--line); padding: 5px 12px; font-weight: 500; font-size: 13px; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.matches { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.match { display: grid; grid-template-columns: 1fr 230px; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.match.dead { opacity: .72; }
.m-name { font-weight: 700; font-size: 17px; }
.pseudo { font-weight: 400; color: var(--muted); font-size: 13px; }
.m-goods { font-size: 13px; margin-top: 4px; }
.m-side { display: grid; gap: 3px; justify-items: start; align-content: start; font-size: 13px; }
.pill { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.pill-live { background: var(--high-bg); color: var(--high); } .pill-dead { background: var(--line); color: var(--muted); }
.m-classes { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.m-classes span { border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-size: 12px; }
.m-classes em { font-style: normal; color: var(--muted); font-size: 12px; margin-left: 4px; }
@media (max-width: 680px) { .match { grid-template-columns: 1fr; } }
.upsell { margin-top: 26px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.upsell h2 { margin: 0 0 4px; font-size: 20px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 8px; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan h4 { margin: 0; } .price { font-size: 26px; font-weight: 750; margin: 2px 0; }
.buy { display: grid; gap: 6px; margin-top: auto; } .buy input { font-size: 14px; padding: 8px 10px; }
.ok { color: var(--low); }
.foot { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 16px; padding-bottom: 40px; font-size: 13px; color: var(--muted); }

.field-goods { grid-column: 1 / 3; }
@media (max-width: 680px) { .field-goods { grid-column: auto; } }
/* AI factor check (lib/ai). Always labeled; absent when AI is off, failed or rejected. */
.ai-strip { grid-column: 1 / -1; border-top: 1px dashed var(--line); padding-top: 8px; font-size: 13px; }
.ai-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-right: 6px; color: var(--muted); }
.ai-factors { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; }
.ai-f b { font-weight: 700; }
.ai-f.r-high b { color: var(--high); } .ai-f.r-medium b { color: var(--med); } .ai-f.r-low b { color: var(--low); } .ai-f.r-unsure b { color: var(--muted); }
.ai-strip details { margin-top: 4px; } .ai-strip summary { cursor: pointer; color: var(--accent); }
.ai-strip ul { margin: 6px 0; padding-left: 18px; } .ai-strip li { margin: 2px 0; }
.ai-note { color: var(--muted); margin: 4px 0 0; }
.linkish { background: none; color: var(--accent); padding: 0; font-weight: 500; font-size: 13px; text-decoration: underline; }
.ai-verdict { font-size: 14px; }
.ai-verdict .ai-tag { margin-right: 4px; }
.ai-status { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
