* {
    box-sizing: border-box;
}

body {
    font: 14px/1.45 system-ui, sans-serif;
    margin: 0;
    color: #1a1a1a;
}

.topbar {
    padding: .6rem 1rem;
    background: #11304e;
}

.brand {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

main {
    padding: 1rem;
}

.filterbar {
    border: 1px solid #ddd;
    padding: .75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.filterbar>input[type=search] {
    width: 100%;
    max-width: 360px;
    padding: .4rem;
    margin-bottom: .5rem;
}

.results-col {
    width: 100%;
}

.reset {
    display: inline-block;
    margin-top: .5rem;
}

.facets-row {
    display: flex;
    flex-wrap: nowrap;
    gap: .75rem;
    align-items: flex-start;
    overflow-x: auto;
    padding-bottom: .5rem;
}

.facet-card {
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    padding: .5rem;
    width: 210px;
    max-height: 220px;
    overflow-y: auto;
}

.facet-card legend {
    font-weight: 600;
    padding: 0 .25rem;
}

.facet-card label {
    display: block;
    font-weight: 400;
    white-space: nowrap;
}

.facet-search {
    position: sticky;
    top: 0;
    width: 100%;
    padding: .3rem;
    margin-bottom: .4rem;
    background: #fff;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

table.results {
    width: 100%;
    border-collapse: collapse;
}

table.results th,
table.results td {
    text-align: left;
    padding: .35rem .5rem;
    border-bottom: 1px solid #eee;
}

/* Keep each header's label and its ▲/▼ arrows on one line (the table already
   scrolls horizontally, so wide headers never wrap the triangles below). */
table.results th {
    white-space: nowrap;
}

.results-head {
    margin-bottom: .5rem;
    color: #555;
}

.col-label {
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
    cursor: pointer;
}

.sort-ind {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
    line-height: .5;
    font-size: .65em;
    margin-left: .3rem;
    vertical-align: middle;
}

.sort-ind a {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
    padding: 0 1px;
}

.sort-ind a.active {
    color: #000;
}

.sort-ind a:hover {
    color: #666;
}

.pager {
    margin-top: .75rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.product table.params td {
    padding: .3rem .6rem;
    border-bottom: 1px solid #eee;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.authnav a {
    color: #fff;
    margin-left: .75rem;
    text-decoration: none;
}

.card {
    max-width: 420px;
    margin: 1rem auto;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.card label {
    display: block;
    margin: .5rem 0;
}

.card input {
    width: 100%;
    padding: .4rem;
}

.card button {
    margin-top: .5rem;
    padding: .45rem .8rem;
}

.err {
    color: #b00020;
}

.ok {
    color: #0a7d28;
}

.param-row .flag-cell {
    width: 1.5em;
    opacity: 0;
    transition: opacity .1s;
}

.param-row:hover .flag-cell,
.param-row:focus-within .flag-cell {
    opacity: 1;
}

.flag-icon {
    cursor: pointer;
    text-decoration: none;
}

@media (hover: none) {
    .param-row .flag-cell {
        opacity: 1;
    }
}

.flag-form {
    padding: .5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
}

.flag-confirm {
    padding: .25rem .5rem;
    background: #e8f6ec;
    border-radius: 4px;
}

.queue-product {
    border-top: 1px solid #eee;
    padding: .75rem 0;
}

.queue-row {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
}

.card.wide {
    max-width: 960px;
}