:root {
    --bg: #e6eef1;
    --paper: #fbfcfd;
    --ink: #17232c;
    --muted: #5d6e7a;
    --line: #d2dee5;
    --brand: #0e4d62;
    --brand-dark: #0a3646;
    --accent: #8f3d22;
    --chip: #e5f1f5;
    --warn: #7a4b12;
    --shadow: 0 12px 30px rgba(18, 42, 54, 0.06);
    --serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
    --sans: "Segoe UI", Candara, "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background:
        radial-gradient(1200px 400px at 10% -10%, #f7fbfc 0%, transparent 55%),
        var(--bg);
    color: var(--ink);
    font: 16px/1.5 var(--sans);
}
a { color: var(--brand); }
a:hover { color: var(--accent); }
h1, h2, .brand strong, .product-title {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.02em;
}
h1 { font-size: 2.1rem; line-height: 1.15; margin: 0 0 0.4rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.8rem; }
.lead { max-width: 42rem; color: var(--muted); font-size: 1.05rem; }
.eyebrow {
    margin: 0 0 0.3rem;
    color: var(--accent);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.skip {
    position: absolute;
    left: -999px;
}
.skip:focus { left: 1rem; top: 1rem; background: white; padding: 0.4rem 0.6rem; z-index: 5; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.site-header {
    background: var(--brand-dark);
    color: white;
}
.header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0.9rem 1.2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
}
.brand {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    color: white;
    text-decoration: none;
}
.brand:hover { color: white; }
.brand strong { display: block; font-size: 1.2rem; line-height: 1; }
.brand small { color: #c5dbe3; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.68rem; }
.brand-mark {
    width: 2.1rem;
    height: 2.1rem;
    border: 1.5px solid #d7ebe3;
    border-radius: 40% 60% 55% 45%;
    background:
        linear-gradient(#f2d3c4, #f2d3c4) center/60% 2px no-repeat,
        linear-gradient(#d7ebe3, #d7ebe3) center/2px 60% no-repeat,
        #14586c;
}
.header-search { display: flex; }
.header-search input, .filters input, .filters select, .stack input, .stack select {
    font: inherit;
    color: var(--ink);
    background: white;
    border: 1px solid #b7c9d2;
    border-radius: 4px;
    padding: 0.45rem 0.6rem;
}
.header-search input { width: 100%; border-radius: 4px 0 0 4px; border-right: 0; }
.header-search button, .btn {
    font: inherit;
    background: var(--accent);
    color: white;
    border: 0;
    border-radius: 4px;
    padding: 0.5rem 0.85rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.header-search button { border-radius: 0 4px 4px 0; background: #c46a45; }
.btn:hover, .header-search button:hover { background: #743216; color: white; }
.btn-small { padding: 0.25rem 0.55rem; font-size: 0.85rem; }
.btn-quiet { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.btn-quiet:hover { background: white; color: var(--accent); }
.header-nav { display: flex; gap: 0.9rem; }
.header-nav a { color: #e7f3f6; text-decoration: none; }
.header-nav a:hover { color: white; }

main { max-width: 1120px; margin: 0 auto; padding: 1.6rem 1.2rem 3rem; }
.intro { margin-bottom: 1.4rem; }
.flash {
    background: #fff6e8;
    border: 1px solid #efd3a4;
    color: var(--warn);
    padding: 0.7rem 0.9rem;
    border-radius: 6px;
}
.category-grid, .maker-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.7rem;
}
.category-grid a, .maker-list a, .product-list li {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 0.85rem 0.95rem;
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: baseline;
    text-decoration: none;
    color: var(--ink);
}
.category-grid a strong, .maker-list a strong {
    font-variant-numeric: tabular-nums;
    color: var(--brand);
}
.product-list { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.product-list li { display: grid; grid-template-columns: 11rem 1fr auto; align-items: center; }
.product-list span { color: var(--muted); }

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 0.8rem;
    align-items: end;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.9rem;
    margin: 1rem 0;
}
.filters label, .stack label { display: grid; gap: 0.25rem; font-size: 0.85rem; color: var(--muted); }
.filters fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.35rem;
    align-items: center;
}
.filters legend { font-size: 0.85rem; color: var(--muted); padding: 0; width: 100%; }
.filters fieldset input { width: 5.2rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: white; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: #f3f7f9; }
table.data tr:last-child td { border-bottom: 0; }
td.action { width: 1%; white-space: nowrap; }
.in-compare { color: var(--muted); font-size: 0.85rem; }
.count { color: var(--muted); }
.empty { color: var(--muted); }
.missing { color: var(--muted); font-size: 0.95rem; }
.breadcrumb { color: var(--muted); margin-bottom: 0.8rem; }
.product-title { margin: 0; font-size: 1.4rem; }
.detail-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
table.specs { width: min(680px, 100%); border-collapse: collapse; }
table.specs th, table.specs td { text-align: left; padding: 0.45rem 0.2rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.specs th { width: 46%; color: var(--muted); font-weight: 600; }
.sources { padding-left: 1.1rem; }
.sources span { display: block; color: var(--muted); }
.siblings { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.4rem; }
.siblings li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.35rem 0.5rem; background: white; border: 1px solid var(--line); border-radius: 6px; }
.siblings .is-current { outline: 2px solid var(--brand); }
.siblings span { color: var(--muted); }
.compare-table th span { display: block; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 0.85rem; }
.compare-table th:first-child, .compare-table td:first-child { position: sticky; left: 0; background: #f7fbfc; }
.stack { display: grid; gap: 0.7rem; max-width: 28rem; margin-top: 1rem; }
.downloads, .inline-actions, .inline-end { display: flex; gap: 0.8rem; align-items: center; }
.inline-end { justify-content: flex-end; }
.text-link { align-self: center; }
.compare-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--brand-dark);
    color: white;
    z-index: 4;
}
.compare-bar-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0.6rem 1.2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}
.compare-bar ul { list-style: none; display: flex; gap: 0.5rem; padding: 0; margin: 0; flex: 1; flex-wrap: wrap; }
.compare-bar li { display: flex; gap: 0.3rem; align-items: center; background: #14586c; border-radius: 99px; padding: 0.15rem 0.45rem 0.15rem 0.7rem; }
.compare-bar a { color: white; }
.compare-bar button { background: transparent; color: white; border: 0; cursor: pointer; font-size: 1rem; }
body.has-compare { padding-bottom: 4.5rem; }
.site-footer { max-width: 1120px; margin: 0 auto; padding: 0 1.2rem 2rem; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 860px) {
    .header-inner { grid-template-columns: 1fr; }
    .product-list li { grid-template-columns: 1fr; }
    h1 { font-size: 1.7rem; }
}
