:root {
  --bg: #f6f7f5;
  --surface: #ffffff;
  --ink: #1d2320;
  --muted: #5b6560;
  --line: #d9ddd9;
  --accent: #2f5d46;
  --accent-ink: #ffffff;
  --accent-soft: #e4eee8;
  --pass: #1f7a46;
  --pass-soft: #e2f3e8;
  --fail: #a3322a;
  --fail-soft: #f8e5e3;
  --warn-soft: #fbf3dc;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141816;
    --surface: #1c211f;
    --ink: #e7ebe8;
    --muted: #a3ada8;
    --line: #333b37;
    --accent: #7fb79a;
    --accent-ink: #0f1311;
    --accent-soft: #23332b;
    --pass: #7fd3a1;
    --pass-soft: #1d3326;
    --fail: #f0948b;
    --fail-soft: #3a2220;
    --warn-soft: #3a3320;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font);
}
a { color: var(--accent); }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

header.site { background: var(--surface); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--accent); }
nav.main { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.95rem; }
nav.main a { text-decoration: none; color: var(--muted); }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--accent); }

main { padding: 24px 0 40px; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; margin: 32px 0 10px; }
h3 { font-size: 1.05rem; margin: 22px 0 8px; }
.lede { color: var(--muted); margin: 0 0 20px; font-size: 1.05rem; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 16px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.field small { color: var(--muted); font-size: 0.78rem; }
input, select {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; width: 100%; min-width: 0;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.pair { display: flex; gap: 6px; }
.pair input { flex: 1; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 0.92rem; }
.check input { width: auto; margin-top: 4px; }
.section-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 18px 0 8px; font-weight: 700; }

.result { margin-top: 18px; }
.verdict { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--accent-soft); margin-bottom: 12px; }
.verdict .big { font-size: 1.8rem; font-weight: 700; }
.verdict.pass { background: var(--pass-soft); }
.verdict.fail { background: var(--fail-soft); }
.verdict .tag { font-weight: 700; }
.verdict.pass .tag { color: var(--pass); }
.verdict.fail .tag { color: var(--fail); }
.verdict .note { color: var(--muted); font-size: 0.9rem; flex-basis: 100%; }
.empty { color: var(--muted); font-size: 0.95rem; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 0.8rem; color: var(--muted); font-weight: 700; background: var(--bg); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .ok { color: var(--pass); font-weight: 600; }
td .no { color: var(--fail); font-weight: 600; }
table.chart td, table.chart th { text-align: center; }

.notice { background: var(--warn-soft); border-radius: var(--radius); padding: 12px 14px; font-size: 0.92rem; margin: 16px 0; }
.source { font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 28px; padding-top: 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
.tile { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--accent); }
.tile strong { display: block; color: var(--accent); margin-bottom: 2px; }
.tile span { font-size: 0.9rem; color: var(--muted); }
details { margin: 8px 0; }
summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.faq h3 { margin-top: 18px; }
.hide { display: none !important; }

footer.site { border-top: 1px solid var(--line); background: var(--surface); font-size: 0.85rem; color: var(--muted); }
footer.site .wrap { padding-top: 18px; padding-bottom: 24px; }
footer.site a { color: var(--muted); margin-right: 14px; }
footer.site p { margin: 6px 0; }

@media (max-width: 520px) {
  h1 { font-size: 1.45rem; }
  .card { padding: 14px; }
  .verdict .big { font-size: 1.5rem; }
  th, td { padding: 6px 8px; }
}
.result td:first-child { white-space: normal; min-width: 7em; }
