:root {
    --specification-border: #e7edf1;
    --primary: #1d626c;
    --primary-dark: #154b53;
    --primary-soft: #e8f3f5;
    --border: #dce6ed;
    --muted: #687c8c;
    font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
    color: #1d2b39;
    background: #f4f7fa;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 1220px; margin: auto; padding: 26px 22px 48px; }
a { color: #256a72; text-decoration: none; }
a:hover { text-decoration: underline; }

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dce4eb;
}
nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.brand { font-size: 21px; font-weight: 750; color: #163d47; }
.brand:hover { text-decoration: none; }

.nav-pill, .nav-auth-btn {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.nav-pill {
    background: #e8f3f5;
    color: #164e56;
    border: 1px solid #bcd9de;
}
.nav-pill:hover { background: #d6eaee; }
.nav-auth-btn {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}
.nav-auth-btn:hover { background: var(--primary-dark); }
.nav-auth-btn.is-logged-in {
    background: #fff;
    color: #1d2b39;
    border: 1px solid #cad7e0;
}
.nav-auth-btn.is-logged-in:hover { background: #eef4f7; }

.intro { padding: 30px 0 18px; }
.eyebrow { text-transform: uppercase; color: #547482; font-size: 13px; letter-spacing: .08em; }
h1 { font-size: clamp(25px, 3.6vw, 35px); line-height: 1.3; margin: 10px 0 14px; }
h2 { font-size: 18.5px; line-height: 1.4; margin: 0; }
.intro > p:last-child, .muted, footer { color: var(--muted); font-size: 14px; line-height: 1.7; }

/* 三层筛选与供应商按钮面板 */
.filters-panel {
    background: #fff;
    border: 1px solid #e0e7ee;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 3px 14px rgba(25, 60, 77, 0.03);
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.filters {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}
label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #425a69;
}
.search { flex: 1.6; min-width: 240px; }
.group-select { flex: 1; min-width: 210px; }

select, input, button {
    font: inherit;
    padding: 9px 12px;
    border: 1px solid #cad7e0;
    border-radius: 8px;
    background: #fff;
    color: inherit;
}
input:focus, select:focus {
    outline: 2px solid #80b5be;
    outline-offset: 1px;
    border-color: var(--primary);
}
button, .buy {
    background: var(--primary);
    color: #fff;
    border: 0;
    cursor: pointer;
}
button:disabled { opacity: .6; cursor: not-allowed; }

.provider-buttons-bar {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-top: 13px;
    border-top: 1px dashed #e3ebf1;
}
.filter-row-label {
    font-size: 12.5px;
    font-weight: 650;
    color: #546b7a;
    white-space: nowrap;
    padding-top: 7px;
}
.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6.5px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 550;
    background: #f4f8fa;
    color: #2c4251;
    border: 1px solid #d7e2ea;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .06s ease, color .06s ease, border-color .06s ease, transform .05s ease, box-shadow .06s ease;
}
.pill-btn:hover:not(:disabled):not(.is-active) {
    background: #e8f1f5;
    border-color: #b4cbd4;
}
.pill-btn:active:not(:disabled) {
    transform: scale(0.96);
    background: #dceaf0;
}
.pill-btn.is-active,
.pill-btn.is-active:hover:not(:disabled),
.pill-btn.is-active:active:not(:disabled) {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 650;
    box-shadow: 0 2px 6px rgba(29, 98, 108, 0.22);
}
.pill-btn.is-active:hover:not(:disabled) {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}
.pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #27935f;
    display: inline-block;
}
.pill-btn.is-active .pill-dot { background: #9bf2c6; }
.pill-count {
    font-size: 11.5px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(29, 98, 108, 0.09);
    color: #466272;
}
.pill-btn.is-active .pill-count {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.filter-bottom-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 18px;
    padding-top: 13px;
    border-top: 1px dashed #e3ebf1;
}
.filter-inline-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.filter-inline-group .filter-row-label { padding-top: 0; }
.filter-right-controls {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: auto;
}
.compact-select { min-width: 140px; }
.compact-select select { padding: 7.5px 10px; font-size: 13.5px; }
.page-size-control {
    display: flex;
    align-items: end;
    gap: 7px;
}
#catalog-custom-page-size {
    width: 82px;
    padding: 7.5px 9px;
    font-size: 13.5px;
}

.sort-note { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 12px 0 4px; }
.provider-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.provider-strip span { font-size: 12px; background: #e5edf2; padding: 6px 10px; border-radius: 6px; }

/* 产品卡片网格 */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
    gap: 18px;
    margin: 18px 0 28px;
    transition: opacity .12s ease;
}
.cards.is-loading {
    opacity: .55;
    pointer-events: none;
}
.card, .detail {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 3px 15px #193c4d05;
}
.card { display: flex; flex-direction: column; gap: 13px; }
.card p { margin: 0; }
.price-box { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card .price { font-size: 20px; font-weight: 680; color: #163d47; }
.price-equivalent {
    font-size: 12.5px;
    font-weight: 550;
    color: #547482;
    background: #f0f5f8;
    padding: 2px 7px;
    border-radius: 5px;
}
.promo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 11px;
    background: #ecf6f7;
    border: 1px dashed #8cc1c9;
    border-radius: 8px;
    font-size: 13px;
    color: #164951;
}
.detail .promo-banner {
    margin-top: 14px;
    padding: 10px 14px;
    font-size: 14px;
}
.promo-banner-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}
.promo-code-chip {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    font-size: 13px;
    background: #fff;
    color: #124047;
    border: 1px solid #b5d8de;
    padding: 2px 8px;
    border-radius: 5px;
    overflow-wrap: anywhere;
}
.promo-note-text {
    color: #36656d;
    font-size: 12.5px;
}
.promo-copy-btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #fff;
    color: #195963;
    border: 1px solid #9dc9d0;
    white-space: nowrap;
}
.promo-copy-btn:hover:not(:disabled):not(.is-copied) {
    background: #dff0f3;
}
.promo-copy-btn.is-copied,
.promo-copy-btn.is-copied:hover:not(:disabled) {
    background: #e3f3e9;
    color: #1d6442;
    border-color: #9ed4b4;
}
.notes-banner {
    padding: 9px 12px;
    background: #fffbeb;
    border: 1px solid #f5dc93;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.6;
    color: #785313;
}
.detail .notes-banner {
    margin-top: 14px;
    padding: 12px 15px;
    font-size: 13.5px;
}
.notes-banner-title {
    font-weight: 650;
    margin-bottom: 3px;
    display: block;
}
.notes-banner ul {
    margin: 2px 0 0;
    padding-left: 18px;
}
.notes-banner li {
    margin: 3px 0;
    overflow-wrap: anywhere;
}
.notes-banner p {
    margin: 0;
    overflow-wrap: anywhere;
}
.card .description { font-size: 13px; max-height: 82px; overflow: hidden; line-height: 1.7; }
.card .actions {
    display: flex;
    gap: 9px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 4px;
}
.buy {
    display: inline-block;
    padding: 9px 13px;
    border-radius: 7px;
    font-size: 13.5px;
    font-weight: 600;
}
.buy:hover { background: var(--primary-dark); text-decoration: none; }

.sub-btn {
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    background: #f4f8fa;
    color: #1d5660;
    border: 1px solid #bfd5dc;
    margin-left: auto;
    transition: all .15s;
}
.sub-btn:hover:not(:disabled) {
    background: #e4f1f4;
    border-color: var(--primary);
}
.sub-btn.is-subscribed {
    background: #e3f3e9;
    color: #1d6442;
    border-color: #9ed4b4;
}
.sub-btn.is-subscribed:hover:not(:disabled) {
    background: #d3ecd9;
}

.badge {
    display: inline-block;
    align-self: start;
    font-size: 13px;
    font-weight: 650;
    padding: 6px 10px;
    border-radius: 6px;
    background: #eef2f5;
}
.badge.in_stock { background: #e3f3e9; color: #226446; }
.badge.out_of_stock { background: #f6e8e8; color: #974b4b; }
.badge.pending { background: #fff3d6; color: #8b6c24; }

/* 标准分页器 */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 13px 18px;
    margin: 0 0 34px;
}
.pagination-summary { font-size: 13.5px; color: #4b6272; }
.pagination-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 11px;
    border-radius: 7px;
    font-size: 13.5px;
    background: #f5f8fa;
    color: #243b4a;
    border: 1px solid #d4e0e8;
    user-select: none;
    transition: background-color .06s ease, color .06s ease, border-color .06s ease, transform .05s ease;
}
.page-btn:hover:not(:disabled):not(.is-current) { background: #e6eff4; }
.page-btn:active:not(:disabled) { transform: scale(0.96); }
.page-btn.is-current,
.page-btn.is-current:hover:not(:disabled) {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 700;
}
.page-ellipsis { color: var(--muted); padding: 0 4px; font-size: 14px; }
.page-jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
    font-size: 13px;
    color: #546b7a;
}
.page-jump input {
    width: 58px;
    height: 36px;
    padding: 4px 8px;
    text-align: center;
    font-size: 13.5px;
}

/* 详情页 */
.detail { margin-top: 24px; }
.detail-metrics { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; row-gap: 12px; }
.detail-price { font-size: 20px; line-height: 1.5; overflow-wrap: anywhere; }
.detail-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.detail-actions .sub-btn { margin-left: 0; padding: 10px 16px; font-size: 14px; }
.description { white-space: pre-line; line-height: 1.85; }
.product-description { margin: 24px 0 22px; padding-top: 20px; border-top: 1px solid var(--specification-border); }
.product-description h2 { font-size: 16px; margin-bottom: 14px; }
.specifications { margin: 0; padding-left: 22px; line-height: 1.75; overflow-wrap: anywhere; }
.specifications li { padding-left: 3px; margin: 9px 0; }
.specifications li::marker { color: #4d8a91; }
.product-description .description { margin: 0; overflow-wrap: anywhere; }
.description-summary { font-size: 13px; color: #425a69; }
.description-summary:empty { display: none; }
.specifications-preview { line-height: 1.65; padding-left: 18px; margin: 0; }
.specifications-preview li { margin: 5px 0; }
.specifications-more { display: inline-block; margin-top: 8px; font-size: 12px; }
.card .description-single {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    max-height: none;
    overflow: hidden;
    white-space: normal;
}
.detail h1, .card h2 { overflow-wrap: anywhere; }
.empty { padding: 48px 20px; text-align: center; grid-column: 1 / -1; color: var(--muted); }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 13px 10px; border-bottom: 1px solid #e8eef3; }
footer { border-top: 1px solid #dce4eb; padding-top: 20px; }
footer span { display: block; }

/* 用户认证与订阅管理模态框 */
.sub-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 32, 43, 0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 1000;
}
.sub-modal {
    background: #fff;
    width: 100%;
    max-width: 490px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 18px 45px rgba(15, 35, 48, 0.2);
}
.sub-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.sub-icon-btn {
    background: #f1f5f8;
    color: #425a69;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 15px;
}
.sub-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: #f1f5f8;
    padding: 5px;
    border-radius: 10px;
    margin-bottom: 18px;
}
.sub-tab {
    background: transparent;
    color: #4a6272;
    padding: 8px 6px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
}
.sub-tab.is-active {
    background: #fff;
    color: #163d47;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}
.sub-form { display: flex; flex-direction: column; gap: 13px; }
.sub-compact-form { margin-top: 10px; gap: 10px; }
.sub-inline-row { display: flex; gap: 8px; }
.sub-inline-row input { flex: 1; min-width: 0; }
.sub-inline-wrap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sub-primary-btn {
    background: var(--primary);
    color: #fff;
    padding: 11px 16px;
    font-weight: 650;
    border-radius: 8px;
}
.sub-primary-btn:hover:not(:disabled) { background: var(--primary-dark); }
.sub-secondary-btn {
    background: #eef3f7;
    color: #254050;
    border: 1px solid #cfdce4;
    white-space: nowrap;
}
.sub-secondary-btn:hover:not(:disabled) { background: #e1ecf2; }
.sub-small-btn { padding: 7px 12px; font-size: 13px; }
.sub-form-links {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
}
.sub-link-btn {
    background: transparent;
    color: #256a72;
    padding: 2px 0;
    font-size: 13px;
    border: 0;
}
.sub-link-btn:hover { text-decoration: underline; }
.sub-tg-pane {
    padding: 10px 4px 6px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.sub-tg-desc { font-size: 14px; line-height: 1.65; color: #364e5d; margin: 0; }
.sub-tg-actions { display: flex; flex-direction: column; gap: 10px; }
.sub-tg-btn {
    background: #2481cc;
    color: #fff;
    padding: 11px 16px;
    border-radius: 8px;
    font-weight: 650;
}
.sub-tg-btn:hover:not(:disabled) { background: #1c6cab; }
.sub-tg-open-btn {
    display: inline-block;
    text-align: center;
    background: #1d8348;
    color: #fff;
    padding: 11px 16px;
    border-radius: 8px;
    font-weight: 650;
}
.sub-tg-open-btn:hover { background: #166939; text-decoration: none; }
.sub-tg-code-box {
    padding: 12px 14px;
    background: #f4f8fb;
    border: 1px dashed #b9d1e0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sub-compact-code-box { margin-top: 8px; padding: 10px 12px; }
.sub-tg-code-head { font-size: 13px; color: #2b4555; }
.sub-tg-code-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.sub-tg-code-digits {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #164e63;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 12px;
}
.sub-compact-code-box .sub-tg-code-digits { font-size: 16px; letter-spacing: 2px; padding: 2px 8px; }
.sub-tg-code-tip { font-size: 12.5px; line-height: 1.5; margin: 0; }
.sub-tg-aux-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12.5px;
    padding-top: 2px;
}
.sub-small-link { font-size: 12.5px; }
.sub-center-note { text-align: center; margin: 0; }
.sub-alert {
    padding: 10px 13px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 14px;
    line-height: 1.5;
}
.sub-alert[data-kind="error"] { background: #fdeaea; color: #992f2f; border: 1px solid #f5c2c2; }
.sub-alert[data-kind="success"] { background: #e4f5eb; color: #1e663f; border: 1px solid #b5e2c7; }
.sub-alert[data-kind="info"] { background: #e9f3f8; color: #1e556e; border: 1px solid #bce0ee; }

.sub-profile-card {
    background: #f7fafc;
    border: 1px solid #dde7ee;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}
.sub-profile-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.sub-profile-row p { margin: 4px 0 0; font-size: 13px; }
.sub-details summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: #256a72; }
.sub-switch-row {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
}
.sub-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.sub-list-header h3 { font-size: 15.5px; margin: 0; }
.sub-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
}
.sub-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e2ebf0;
    border-radius: 8px;
    font-size: 13.5px;
}
.sub-item-meta { min-width: 0; flex: 1; }
.sub-item-meta a { font-weight: 600; display: block; overflow-wrap: anywhere; }
.sub-item-meta span { font-size: 12px; color: var(--muted); }

.footer-version { font-weight: 500; opacity: 0.85; }
.sub-scope-section {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2ebf0;
}
.sub-active-scopes {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}
.sub-scope-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    background: #e6f4f1;
    color: #13534c;
    border: 1px solid #b5dfd7;
}
.sub-scope-tag button {
    border: 0;
    background: transparent;
    color: #13534c;
    padding: 0 2px;
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
}
.sub-scope-picker {
    border: 1px solid #d5e3ec;
    border-radius: 10px;
    background: #fbfdfe;
    overflow: hidden;
}
.sub-scope-picker > summary {
    cursor: pointer;
    padding: 11px 14px;
    font-size: 13.5px;
    font-weight: 650;
    color: #1d4d58;
    background: #f1f7fa;
    user-select: none;
}
.sub-scope-picker-body {
    padding: 13px 14px;
    display: flex;
    flex-direction: column;
    gap: 13px;
}
.sub-scope-site-box {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 8px;
    background: #eef7fa;
    border: 1px solid #c6e0ea;
    cursor: pointer;
}
.sub-scope-site-box input { margin-top: 3px; }
.sub-scope-site-box span { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.sub-scope-site-box small { color: #546d7d; font-weight: 400; font-size: 12px; }
.sub-scope-granular {
    display: flex;
    flex-direction: column;
    gap: 13px;
}
.sub-scope-granular.is-disabled { opacity: 0.52; pointer-events: none; }
.sub-scope-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sub-scope-block-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13.5px;
}
.sub-scope-mini-btns { display: flex; gap: 10px; }
.sub-scope-search {
    max-width: 210px;
    padding: 5px 9px !important;
    font-size: 12.5px !important;
}
.sub-scope-chips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 7px;
    max-height: 168px;
    overflow-y: auto;
    padding: 2px;
}
.sub-scope-check-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid #d7e3eb;
    border-radius: 7px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    margin: 0;
}
.sub-scope-check-card:hover { border-color: #256a72; background: #f6fbfc; }
.sub-scope-check-card input { margin: 0; flex-shrink: 0; }
.sub-scope-check-card span { overflow-wrap: anywhere; line-height: 1.35; }
.sub-scope-groups-tree {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-height: 230px;
    overflow-y: auto;
    padding-right: 2px;
}
.sub-scope-prov-group {
    border: 1px solid #dfe9ef;
    border-radius: 8px;
    background: #fff;
}
.sub-scope-prov-group > summary {
    cursor: pointer;
    padding: 8px 11px;
    font-size: 13px;
    font-weight: 600;
    color: #243b4a;
    background: #f8fbfd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.sub-scope-prov-group-items {
    padding: 8px 11px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid #edf3f7;
}
.sub-scope-group-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    cursor: pointer;
    margin: 0;
}
.sub-scope-group-row.is-child { padding-left: 18px; color: #395364; }
.sub-scope-prov-covered { font-size: 12px; color: #1d8348; font-weight: 500; }

.sub-toast {
    position: fixed;
    bottom: 22px;
    right: 22px;
    max-width: 360px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #163d47;
    color: #fff;
    font-size: 13.5px;
    box-shadow: 0 8px 24px rgba(15, 35, 48, 0.22);
    z-index: 1100;
}
.sub-toast[data-kind="error"] { background: #9c2b2b; }
.sub-toast[data-kind="success"] { background: #1e6b43; }

.taxonomy-buttons-bar {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px dashed #d8e5ec;
}
.taxonomy-row-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    flex-shrink: 0;
}
.region-mode-switch {
    display: inline-flex;
    background: #eaf2f6;
    border: 1px solid #cddde7;
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}
.mode-switch-btn {
    border: 0;
    background: transparent;
    color: #466375;
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1.35;
    user-select: none;
    transition: background-color .06s ease, color .06s ease;
}
.mode-switch-btn:hover:not(.is-active) {
    background: rgba(23, 96, 110, 0.09);
}
.mode-switch-btn.is-active,
.mode-switch-btn.is-active:hover {
    background: #17606e;
    color: #fff;
}
.taxonomy-pills {
    flex: 1;
}
.card-tax-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 2px 0 4px;
}
.detail-tax-row {
    margin: 8px 0 12px;
}
.tax-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    border: 1px solid transparent;
    background: #eef5f8;
    color: #234959;
}
button.tax-chip {
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease;
}
button.tax-chip:hover {
    filter: brightness(0.95);
}
.tax-chip.is-loc {
    background: #eef6fb;
    color: #1c5274;
    border-color: #cbe1f0;
}
.tax-chip.is-loc-more {
    background: #f3f6f8;
    color: #5b7180;
    border-color: #dde6ec;
}
.tax-chip.is-line-opt {
    background: #e6f6f0;
    color: #136145;
    border-color: #b5e2cf;
}
.tax-chip.is-line-std {
    background: #f2f5f7;
    color: #4a606e;
    border-color: #d7e1e8;
}

@media (max-width: 680px) {
    main { padding: 18px 14px 38px; }
    header { align-items: flex-start; flex-direction: column; gap: 12px; }
    .brand { font-size: 18px; }
    nav { gap: 8px; width: 100%; }
    .filters > label { min-width: 100%; width: 100%; }
    .provider-buttons-bar, .taxonomy-buttons-bar { flex-direction: column; gap: 8px; }
    .taxonomy-row-head { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
    .filter-row-label { padding-top: 0; }
    .filter-right-controls { width: 100%; justify-content: space-between; margin-left: 0; }
    .compact-select { flex: 1; min-width: 130px; }
    .cards { grid-template-columns: 1fr; }
    .intro { padding-top: 20px; }
    .detail { padding: 18px; }
    .pagination-bar { flex-direction: column; align-items: stretch; text-align: center; }
    .pagination-controls { justify-content: center; }
    .card .actions .sub-btn { margin-left: 0; }
}
