:root {
  --bg: #f6f5f1; --surface: #ffffff; --ink: #1d2320; --muted: #5d6662; --line: #e2e0d8;
  --accent: #1f6f5c; --accent-ink: #ffffff; --good: #2e7d4f; --mixed: #b7791f; --bad: #b83d2e; --soft: #eef3f0;
  --radius: 10px; --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #151816; --surface: #1e2320; --ink: #e8ebe9; --muted: #9aa49f; --line: #2f3632;
    --accent: #5cc0a3; --accent-ink: #0d1a15; --good: #5cc28a; --mixed: #e0aa4b; --bad: #ec7a6a; --soft: #233029; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); }
a { color: var(--accent); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--ink); }
.logo { color: var(--accent); }
.top nav { display: flex; gap: 16px; flex-wrap: wrap; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }
.banner { background: #fff4d6; color: #5a4300; padding: 8px 16px; font-size: .9rem; text-align: center; }
@media (prefers-color-scheme: dark) { .banner { background: #3a3014; color: #f3dc9b; } }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.15; margin: 0 0 8px; }
h2 { font-size: 1.2rem; margin: 32px 0 12px; }
.lede { color: var(--muted); max-width: 60ch; margin: 0 0 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.searchbar { display: flex; gap: 8px; max-width: 640px; }
.searchbar input { flex: 1; min-width: 0; padding: 12px 14px; font-size: 1rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); color: var(--ink); }
button, .btn { padding: 10px 16px; font: inherit; font-weight: 600; border: 0; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; display: inline-block; }
button.secondary { background: var(--soft); color: var(--ink); }
.hint { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.dev-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.dev-card:hover { border-color: var(--accent); }
.dev-card .meta { color: var(--muted); font-size: .9rem; }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--soft); }
.score { font-weight: 800; font-size: 1.6rem; line-height: 1; min-width: 3.2ch; text-align: center; padding: 8px; border-radius: 8px; color: #fff; }
.score.Good { background: var(--good); } .score.Mixed { background: var(--mixed); } .score.Concerns { background: var(--bad); }
.score.na { background: var(--line); color: var(--muted); font-size: 1rem; }
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } }
#map { height: 320px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; }
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 9.5rem 1fr 2.5rem; gap: 8px; align-items: center; font-size: .9rem; }
.bar .track { height: 10px; background: var(--soft); border-radius: 5px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--accent); }
.bar small { grid-column: 1 / -1; color: var(--muted); margin-top: -6px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 16px 0; }
.fact b { display: block; font-size: 1.15rem; }
.fact span { color: var(--muted); font-size: .85rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }
.epc { display: inline-block; min-width: 1.6em; text-align: center; font-weight: 700; color: #fff; border-radius: 4px; padding: 0 4px; }
.epc-A { background: #008054; } .epc-B { background: #19b459; } .epc-C { background: #8dce46; color: #1d2320; }
.epc-D { background: #ffd500; color: #1d2320; } .epc-E { background: #fcaa65; color: #1d2320; } .epc-F { background: #ef8023; } .epc-G { background: #e9153b; }
.issue { border-left: 4px solid var(--line); padding: 8px 12px; margin-bottom: 10px; background: var(--surface); border-radius: 0 8px 8px 0; }
.issue.sev3 { border-color: var(--bad); } .issue.sev2 { border-color: var(--mixed); } .issue.sev1 { border-color: var(--muted); }
.issue .src { font-size: .8rem; color: var(--muted); }
.review { margin-bottom: 12px; }
.stars { color: #d49a00; letter-spacing: 1px; }
form.review-form { display: grid; gap: 12px; max-width: 640px; }
form label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
form input, form select, form textarea { font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
form .inline { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 520px) { .three { grid-template-columns: 1fr; } }
.msg { padding: 10px 12px; border-radius: 8px; background: var(--soft); }
.msg.err { background: #fde8e5; color: #7a1d12; }
.foot { max-width: 1100px; margin: 0 auto; padding: 16px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }
.muted { color: var(--muted); }
.spark { width: 100%; height: 60px; }
