/* Super Picker: one stylesheet, colors as tokens with a dark theme. */
:root {
    --bg: #f3f5f7;
    --surface: #ffffff;
    --surface-2: #eef1f4;
    --fg: #16202b;
    --muted: #5a6776;
    --line: #d7dde4;
    --accent: #0f7a5c;
    --accent-fg: #ffffff;
    --amber: #a85f00;
    --amber-bg: #fff4df;
    --good: #0f7a5c;
    --fair: #a85f00;
    --poor: #b3261e;
    --warn: #a84a00;
    --disc-bg: #e6f2ed;
    --disc-line: #9bcbb8;
    --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
    --radius: 10px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1419;
        --surface: #171e26;
        --surface-2: #1e2731;
        --fg: #e6ebf0;
        --muted: #9aa7b5;
        --line: #2c3743;
        --accent: #3cc497;
        --accent-fg: #06261b;
        --amber: #f0b453;
        --amber-bg: #2c2210;
        --good: #3cc497;
        --fair: #f0b453;
        --poor: #ff8a80;
        --warn: #f0a35a;
        --disc-bg: #13291f;
        --disc-line: #2f6b52;
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
    background: var(--bg);
    color: var(--fg);
    font: 16px/1.55 var(--font-body);
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; text-wrap: balance; margin: 0; }
h1:focus { outline: none; }
a { color: var(--accent); }
.muted { color: var(--muted); }

.container {
    max-width: 960px;
    margin: 0 auto;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.page { padding-block: 28px 48px; display: grid; gap: 22px; }

/* Header & footer */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 14px; }
.logo { display: flex; align-items: center; gap: 8px; font: 800 19px var(--font-display); color: var(--fg); text-decoration: none; }
.logo-bolt { fill: var(--accent); }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; font-weight: 500; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--fg); }
.site-foot { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; padding-block: 18px; }
.site-foot p { margin: 4px 0; max-width: 80ch; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--accent); color: var(--accent-fg);
    border: 1.5px solid var(--accent); border-radius: 8px;
    padding: 10px 18px; font: 600 15px var(--font-body);
    text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.secondary, .btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost { border-color: var(--line); color: var(--fg); }
.btn.amber { background: var(--amber); border-color: var(--amber); color: var(--surface); }
.btn.big { padding: 14px 24px; font-size: 17px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.eyebrow { font: 600 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.pill { display: inline-block; font: 600 11px/1 var(--font-body); padding: 3px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); margin-left: 6px; vertical-align: middle; }

/* Home */
.hero { display: grid; gap: 14px; padding-block: 24px 8px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; max-width: 22ch; }
.lead { font-size: 18px; color: var(--muted); max-width: 62ch; margin: 0; }
.hero .btn { width: fit-content; }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.how > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.how h2 { font-size: 17px; margin-bottom: 4px; }
.how p { margin: 0; color: var(--muted); font-size: 15px; }

/* Quiz */
.quiz-head { display: grid; gap: 6px; }
.quiz-head h1 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress span { display: block; height: 100%; background: var(--accent); transition: width .2s; }

.usecases { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.usecase {
    display: grid; gap: 4px; text-align: left; cursor: pointer;
    background: var(--surface); color: var(--fg);
    border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px 18px; font: inherit;
}
.usecase:hover { border-color: var(--accent); }
.usecase-title { font: 700 18px var(--font-display); }
.usecase-blurb { color: var(--muted); font-size: 14.5px; }

.loads { display: grid; gap: 8px; }
.load { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: grid; gap: 8px; }
.load.on { border-color: var(--accent); }
.load-name { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.load-name input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.load-fields { display: flex; flex-wrap: wrap; gap: 12px; padding-left: 28px; }
.load-fields label { display: grid; gap: 2px; font-size: 12.5px; color: var(--muted); }
.load-fields input { width: 100px; }

input[type=number], select {
    font: inherit; color: var(--fg); background: var(--surface);
    border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; max-width: 100%;
}
.toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; width: fit-content; }

.running-total {
    position: sticky; bottom: 0; z-index: 5;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px 14px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .06);
}
.nav-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.nav-buttons.end { justify-content: flex-end; }

.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0; min-width: 0; }
.field > span, .field legend { font-weight: 600; }
/* Long option text (e.g. "Southeast & Gulf (FL, GA, TX, Carolinas)") must not push a select past its card. */
.field select { width: 100%; min-width: 0; text-overflow: ellipsis; }
/* Float the legend so it sits inside the card like the other labels instead of on its top border. */
.field legend { float: left; width: 100%; padding: 0; }
.radio { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.radio input { accent-color: var(--accent); }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14.5px; }

/* Results */
.disclosure {
    background: var(--disc-bg); border: 1px solid var(--disc-line); border-radius: 8px;
    padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--fg);
}
.disclosure svg { flex: none; margin-top: 2px; color: var(--accent); }

.profile h1 { font-size: clamp(24px, 4vw, 30px); font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { font-size: 13px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.needs { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.need { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.need .k { font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.need .v { font: 700 21px var(--font-display); font-variant-numeric: tabular-nums; }

.results { display: grid; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 14px; }
.card.top { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.card-head { display: flex; justify-content: space-between; gap: 16px; }
.card-title { min-width: 0; }
.rank { font: 600 12px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card h3 { font-size: 20px; margin-top: 3px; }
.spec { color: var(--muted); font-size: 14px; margin-top: 3px; }
.score { text-align: right; flex: none; }
.score .pct { font: 800 30px var(--font-display); font-variant-numeric: tabular-nums; line-height: 1; }
.score .pct.good { color: var(--good); }
.score .pct.fair { color: var(--fair); }
.score .pct.poor { color: var(--poor); }
.score .lbl { font-size: 12px; color: var(--muted); }

.runtime { display: grid; gap: 6px; }
.runtime .row { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; }
.runtime .row.small { font-size: 13px; color: var(--muted); }
.runtime b { font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bar span.low { background: var(--warn); }

.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 14.5px; }
.points li { display: flex; gap: 8px; }
.points .ok { color: var(--good); font-weight: 700; flex: none; width: 1em; }
.points .wa { color: var(--warn); font-weight: 700; flex: none; width: 1em; text-align: center; }

.buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 12px; }
.price { font: 700 22px var(--font-display); font-variant-numeric: tabular-nums; }
.price s { font: 500 14px var(--font-body); color: var(--muted); margin-left: 6px; }
.btnwrap { display: grid; justify-items: end; gap: 4px; }
.tag { font-size: 12px; color: var(--muted); }
.empty { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.empty.error { border-color: var(--poor); color: var(--poor); margin-top: 16px; }

.pdf { background: var(--amber-bg); border: 1px solid var(--amber); border-radius: var(--radius); padding: 16px 18px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pdf > div { flex: 1; min-width: 220px; }
.pdf h2 { font-size: 18px; }
.pdf p { margin: 4px 0 0; font-size: 14.5px; color: var(--muted); }

/* Price note on a result that costs more than a lower-scoring one below it */
.pill.pricey { background: var(--amber-bg); border-color: var(--amber); color: var(--amber); }
.points .price-note { font-weight: 500; }

/* Whole-home notice */
.pill.big { background: var(--amber-bg); border-color: var(--amber); color: var(--amber); }
.wholehome {
    background: var(--surface); border: 1px solid var(--amber); border-left-width: 4px;
    border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 12px;
}
.wholehome h2 { font-size: 21px; }
.wholehome p { margin: 0; }
.wholehome-reasons { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.table-wrap { overflow-x: auto; }
.options { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 14.5px; }
.options th, .options td { text-align: left; vertical-align: top; padding: 10px 12px; border-top: 1px solid var(--line); }
.options thead th { font: 600 12px var(--font-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-top: 0; }
.options tbody th { font-weight: 700; }
.options .sub { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.options .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fine { font-size: 13px; color: var(--muted); }
.wholehome-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 12px; }
.closest h2 { font-size: 19px; }
.closest p { margin: 4px 0 0; }

/* Guide (search) pages */
.seo { display: grid; gap: 16px; max-width: 820px; }
.seo h1 { font-size: clamp(26px, 4.4vw, 36px); font-weight: 800; }
.seo h2 { font-size: 20px; margin-top: 8px; }
.seo h3 { font-size: 16px; margin-top: 4px; }
.seo .lead { margin: 0; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.small { font-size: 13px; }
.verdict { border-radius: var(--radius); padding: 16px 18px; border: 1px solid var(--line); border-left-width: 5px; background: var(--surface); }
.verdict p { margin: 0; font-size: 17px; }
.verdict-word { font: 800 26px var(--font-display); margin-bottom: 4px; }
.verdict.v-yes { border-left-color: var(--good); }
.verdict.v-yes .verdict-word { color: var(--good); }
.verdict.v-maybe { border-left-color: var(--fair); }
.verdict.v-maybe .verdict-word { color: var(--fair); }
.verdict.v-no { border-left-color: var(--poor); }
.verdict.v-no .verdict-word { color: var(--poor); }
.verdict.v-info { border-left-color: var(--accent); }
.needs-list { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 4px; }
table.data { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table.data th, table.data td { text-align: left; padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
table.data tbody tr:first-child th, table.data tbody tr:first-child td { border-top: 0; }
table.data tbody th { font-weight: 600; }
table.data thead th { font: 600 12px var(--font-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-top: 0; border-bottom: 1px solid var(--line); }
table.data .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.compare { min-width: 560px; }
.vpill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.vpill.v-yes { color: var(--good); }
.vpill.v-maybe { color: var(--fair); }
.vpill.v-no { color: var(--poor); }
.buybox { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; }
.buybox-text { display: grid; gap: 2px; min-width: 0; }
.buybox-name { font-weight: 700; }
.note-box { background: var(--amber-bg); border: 1px solid var(--amber); border-radius: var(--radius); padding: 12px 14px; margin: 0; }
.alt-list, .related { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.alt-list .muted { display: block; font-size: 13.5px; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: var(--disc-bg); border: 1px solid var(--disc-line); border-radius: var(--radius); padding: 16px 18px; }
.cta > div { flex: 1; min-width: 220px; }
.cta h2 { margin: 0; font-size: 18px; }
.cta p { margin: 4px 0 0; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.pick { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 6px; align-content: start; }
.pick-name { font-weight: 700; }
.pick .btnwrap { justify-items: start; }
.pick .btn { font-size: 14px; padding: 8px 12px; }
.spec-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.spec-chips li { font-size: 13.5px; padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.link-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 16px; }

/* Comparison pages */
.pick-grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.pick-title { font-size: 17px; margin: 0; }
.pick .points { font-size: 14.5px; }
.pick-buy { display: grid; gap: 4px; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: auto; }
.pick-grid.two .pick { display: flex; flex-direction: column; }
table.vs td.win { font-weight: 700; color: var(--good); }
table.vs thead th { text-transform: none; letter-spacing: 0; font: 700 14px var(--font-body); color: var(--fg); }
.link-grid.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* "Price checked" date under prices */
.price-checked { font-size: 12.5px; color: var(--muted); }
.price-checked.stale { color: var(--warn); font-weight: 600; }

/* Contact */
.contact-form { display: grid; gap: 14px; }
.contact-form .field { background: none; border: 0; padding: 0; }
.contact-form input, .contact-form select, .contact-form textarea {
    font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%;
}
.contact-form button { width: fit-content; }
.validation-message { color: var(--poor); font-size: 13.5px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.selectable { user-select: all; }

/* Admin */
.admin-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.admin-nav a { font-weight: 600; color: var(--muted); text-decoration: none; }
.admin-nav a.on { color: var(--fg); border-bottom: 2px solid var(--accent); }
.admin-nav form { margin-left: auto; }
.small-btn { padding: 6px 10px; font-size: 13px; }
.messages { display: grid; gap: 10px; }
.message { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 12px 14px; }
.message.read { border-left-color: var(--line); opacity: .8; }
.message header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.message-actions { display: flex; gap: 6px; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0 0; }
.admin { display: grid; gap: 14px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.admin-head h1 { font-size: 26px; }
.admin-head p { margin: 4px 0 0; max-width: 70ch; }
.admin-filter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-filter label { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.admin-table { min-width: 980px; font-size: 14px; }
.admin-table tr.stale th { box-shadow: inset 3px 0 0 var(--amber); }
.admin-table .num-in { width: 100px; }
.admin-table .url-in { width: 260px; font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--fg); }
.admin-save { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--bg); padding-block: 10px; }
.admin-login { max-width: 440px; display: grid; gap: 12px; }
.admin-login form { display: grid; gap: 12px; }
.admin-login input[type=password] { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--fg); }
.form-error { background: var(--amber-bg); border: 1px solid var(--amber); border-radius: 8px; padding: 10px 12px; }
.form-ok { background: var(--disc-bg); border: 1px solid var(--disc-line); border-radius: 8px; padding: 10px 12px; }

/* Text pages */
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; max-width: 75ch; }
.prose h1 { font-size: 28px; margin-bottom: 10px; }
.prose h2 { font-size: 19px; margin: 20px 0 6px; }
.prose ul { padding-left: 20px; display: grid; gap: 4px; }

@media (max-width: 560px) {
    .card-head { flex-direction: column; gap: 6px; }
    .score { text-align: left; display: flex; align-items: baseline; gap: 6px; }
    .btnwrap { justify-items: start; }
    .load-fields { padding-left: 0; }
    .load-fields input { width: 90px; }
}

@media (prefers-reduced-motion: reduce) {
    .progress span { transition: none; }
}

/* Blazor error UI (from the template) */
.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "An error has occurred."; }
