:root {
    --bg: #fbfaf6;
    --surface: #ffffff;
    --text: #1a2233;
    --muted: #5d6677;
    --line: #e4e1d6;
    --brand: #0f2a4a;
    --accent: #f2b600;
    --link: #0b5cad;
    --good: #14683a;
    --good-bg: #e3f4ea;
    --warn: #8a5a00;
    --warn-bg: #fff3d6;
    --bad: #a1261e;
    --bad-bg: #fde7e5;
    --neutral-bg: #eceff4;
    --radius: 12px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e1420;
        --surface: #151d2c;
        --text: #e8ecf3;
        --muted: #9aa5b8;
        --line: #26324a;
        --brand: #f2b600;
        --link: #7db7f2;
        --good: #6fd49a;
        --good-bg: #12301f;
        --warn: #f2c261;
        --warn-bg: #33270a;
        --bad: #ff9a92;
        --bad-bg: #3a1714;
        --neutral-bg: #1f2a40;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.55;
    font-size: 16px;
}

.container { max-width: 760px; margin: 0 auto; padding: 0 16px; }
main.container { padding-top: 24px; padding-bottom: 48px; }

a { color: var(--link); }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 1.2rem; margin: 28px 0 8px; }
h3 { font-size: 1rem; margin: 16px 0 4px; }
.lead { font-size: 1.05rem; color: var(--muted); margin: 0 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 800; font-size: 1.2rem; color: var(--brand); text-decoration: none; letter-spacing: -0.01em; }
.brand-dot { color: var(--accent); }
.nav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.95rem; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover { text-decoration: underline; }

.site-footer { border-top: 1px solid var(--line); padding: 20px 0 32px; color: var(--muted); font-size: 0.85rem; }

.hero { padding: 12px 0 8px; }
.hero h1 { font-size: 2.2rem; }

.cards { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 12px 0 24px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
}
.tool { text-decoration: none; color: var(--text); display: block; }
.tool:hover { border-color: var(--accent); }
.tool h2 { margin: 0 0 6px; font-size: 1.15rem; }
.kicker { margin: 0 0 4px; color: var(--muted); font-size: 0.9rem; }
.cta { color: var(--link); font-weight: 600; }

.section-title { margin-top: 28px; }

.notice {
    background: var(--neutral-bg);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 12px 14px;
    margin: 20px 0;
}
.notice.warn { background: var(--warn-bg); border-left-color: var(--warn); }
.notice.good { background: var(--good-bg); border-left-color: var(--good); }
.notice.bad { background: var(--bad-bg); border-left-color: var(--bad); }
.notice p, .notice ul { margin: 6px 0 0; }
.notice ul { padding-left: 20px; }

.search { display: flex; gap: 8px; align-items: stretch; margin: 12px 0 16px; }
.search input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    font-size: 1rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
}
.prefix { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--neutral-bg); font-weight: 600; }

.btn {
    display: inline-block;
    padding: 12px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: #1a1400;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
}
.btn.secondary { background: var(--neutral-bg); color: var(--text); font-weight: 600; padding: 8px 14px; font-size: 0.9rem; }

.results, .quotes, .alert-full { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 12px; }
.result-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.result-name { font-weight: 700; }
.results p, .quotes p { margin: 6px 0 0; }

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}
.badge.big { font-size: 0.95rem; padding: 4px 14px; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.neutral { background: var(--neutral-bg); color: var(--muted); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.quote.best { border-color: var(--good); }
.received { font-size: 1.6rem; font-weight: 800; margin: 8px 0 0; }
.received .unit { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.cost-bar { width: 100%; height: 8px; margin: 8px 0 4px; accent-color: var(--bad); }

.alert-list { padding-left: 20px; }
.pattern { margin: 10px 0; }
.pattern summary { cursor: pointer; font-weight: 700; }
.pattern ul { padding-left: 20px; margin: 4px 0; }
