:root {
    --page-bg: #f7f8fa;
    --surface: #ffffff;
    --surface-hover: #f2f4f7;
    --ink: #15191f;
    --muted: #6f7782;
    --line: #e4e7eb;
    --accent: #49789b;
    --accent-soft: #e8f0f5;
    --header-bg: rgba(247, 248, 250, .88);
}

[data-bs-theme="dark"] {
    --page-bg: #111418;
    --surface: #191d22;
    --surface-hover: #20252b;
    --ink: #eef1f4;
    --muted: #929ba5;
    --line: #2a3037;
    --accent: #85b3d1;
    --accent-soft: #203442;
    --header-bg: rgba(17, 20, 24, .88);
}

* { box-sizing: border-box; }

html { background: var(--page-bg); }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    letter-spacing: -.015em;
}

a { color: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.app-bar {
    min-height: 62px;
    padding-left: 24px;
    padding-right: 24px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

.app-brand {
    width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
}

.brand-mark {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--ink);
    color: var(--page-bg);
    font-size: 13px;
    font-weight: 800;
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-nav a {
    padding: 7px 11px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.app-nav a:hover,
.app-nav a.active {
    background: var(--surface);
    color: var(--ink);
}

.theme-toggle {
    justify-self: end;
    width: 35px;
    height: 35px;
    position: relative;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    color: var(--ink);
}

.theme-toggle:hover { background: var(--surface-hover); }

.theme-toggle span {
    position: absolute;
    font-size: 16px;
    line-height: 1;
}

.dark-icon { display: none; }
[data-bs-theme="dark"] .light-icon { display: none; }
[data-bs-theme="dark"] .dark-icon { display: block; }

.app-main { padding: 0 24px; }

.page-wrap {
    max-width: 980px;
    padding: 64px 0 80px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 52px;
}

.section-label {
    margin: 0 0 7px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.page-heading h1 {
    margin: 0;
    font-size: clamp(2.25rem, 5vw, 3.4rem);
    line-height: 1;
    letter-spacing: -.055em;
    font-weight: 730;
}

.page-description {
    margin: 13px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.section-bar {
    min-height: 36px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.section-bar h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.item-count {
    min-width: 23px;
    height: 23px;
    padding: 0 7px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
}

.provider-list {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.provider-row {
    width: 100%;
    min-height: 82px;
    padding: 14px 17px;
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 15px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    text-align: left;
}

.provider-row:last-child { border-bottom: 0; }
.provider-row:disabled { opacity: 1; }

.selection-row {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 68px;
    color: var(--ink);
    text-decoration: none;
}

.selection-row:hover {
    background: var(--surface-hover);
}

.selection-row .provider-copy strong {
    margin-bottom: 0;
}

.selection-row .provider-meta {
    justify-self: end;
}

.provider-badge {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
}

.provider-copy {
    min-width: 0;
    display: block;
}

.provider-copy strong {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
    font-weight: 700;
}

.provider-copy small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.provider-meta {
    display: flex;
    align-items: center;
    gap: 13px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.row-arrow {
    color: var(--ink);
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
}

.status-note {
    margin: 12px 2px 0;
    color: var(--muted);
    font-size: 11.5px;
}

@media (max-width: 640px) {
    .app-bar {
        min-height: 58px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .app-nav { display: none; }
    .app-bar { grid-template-columns: 1fr auto; }
    .app-main { padding: 0 14px; }
    .page-wrap { padding: 44px 0 60px; }
    .page-heading { margin-bottom: 38px; }

    .provider-row {
        grid-template-columns: 42px minmax(0, 1fr) auto;
        gap: 12px;
        padding-left: 13px;
        padding-right: 13px;
    }

    .selection-row {
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 64px;
        gap: 10px;
    }

    .selection-row .provider-meta {
        gap: 9px;
        font-size: 11.5px;
    }
}
