/* BetterStack Compare — styles for /compare/ pages.
   Reuses the active theme's CSS variables (green/forest/lime/ink/muted/line/
   surface/radius/shadow) with safe fallbacks, so the pages match the site
   even if the theme changes. */

.bsc-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
    color: var(--ink, #14211a);
}

.bsc-page h1 {
    font-size: 2rem;
    line-height: 1.15;
    margin: 0.5rem 0 0.75rem;
}

.bsc-page h2 {
    font-size: 1.35rem;
    margin: 2.25rem 0 0.75rem;
}

.bsc-breadcrumb {
    font-size: 0.9rem;
    color: var(--muted, #62736a);
}

.bsc-breadcrumb a {
    color: var(--green, #0c6b4f);
}

.bsc-intro {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--muted, #62736a);
    max-width: 75ch;
}

.bsc-section-note {
    font-size: 0.9rem;
    color: var(--muted, #62736a);
}

.bsc-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Product cards */
.bsc-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.bsc-card {
    background: var(--surface, #fff);
    border: 1px solid var(--line, #dee4d8);
    border-radius: var(--radius, 16px);
    box-shadow: var(--shadow, 0 1px 2px rgba(16, 40, 28, 0.05));
    padding: 1.25rem;
}

.bsc-card h2 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
}

.bsc-card-category {
    margin: 0 0 0.75rem;
    color: var(--muted, #62736a);
    font-size: 0.9rem;
}

.bsc-card-price {
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
}

.bsc-card-price span {
    display: block;
    font-size: 0.85rem;
    color: var(--muted, #62736a);
}

.bsc-card-trial,
.bsc-card-deal,
.bsc-card-verified {
    font-size: 0.9rem;
    margin: 0.35rem 0;
}

.bsc-card-deal {
    font-weight: 700;
    color: var(--green, #0c6b4f);
}

.bsc-card-verified {
    color: var(--muted, #62736a);
}

.bsc-card-description {
    line-height: 1.55;
}

.bsc-card-links {
    margin: 1rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.bsc-button {
    display: inline-block;
    background: var(--green, #0c6b4f);
    color: #fff;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.bsc-button:hover {
    background: var(--forest, #0a2a21);
    color: #fff;
}

.bsc-button.bsc-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Which one fits */
.bsc-fits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.bsc-fit {
    background: var(--green-soft, #e0f1e4);
    border-radius: var(--radius, 16px);
    padding: 1.1rem 1.25rem;
}

.bsc-fit h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.bsc-fit ul {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.6;
}

.bsc-fit p {
    margin: 0;
    color: var(--muted, #62736a);
}

/* Side-by-side table */
.bsc-table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line, #dee4d8);
    border-radius: var(--radius, 16px);
}

.bsc-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
    background: var(--surface, #fff);
}

.bsc-table th,
.bsc-table td {
    text-align: left;
    vertical-align: top;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--line, #dee4d8);
    line-height: 1.5;
}

.bsc-table thead th {
    background: var(--forest, #0a2a21);
    color: #fff;
    font-size: 1rem;
}

.bsc-table tbody th[scope="row"] {
    font-weight: 600;
    white-space: nowrap;
}

.bsc-group-row th {
    background: var(--green-soft, #e0f1e4);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--forest, #0a2a21);
}

.bsc-note {
    font-size: 0.85rem;
    color: var(--muted, #62736a);
}

.bsc-cell-list {
    margin: 0;
    padding-left: 1.1rem;
}

.bsc-yes {
    color: var(--green, #0c6b4f);
    font-weight: 700;
}

.bsc-no {
    color: var(--red, #c2410c);
    font-weight: 700;
}

.bsc-unknown {
    color: var(--muted, #62736a);
}

/* Bottom line */
.bsc-bottom-line {
    background: var(--surface, #fff);
    border: 1px solid var(--line, #dee4d8);
    border-left: 4px solid var(--lime, #c9f16f);
    border-radius: var(--radius, 16px);
    padding: 1.25rem 1.5rem;
    margin-top: 2rem;
}

.bsc-bottom-line h2 {
    margin-top: 0;
}

.bsc-bottom-line p:last-child {
    margin-bottom: 0;
}

/* Other tools / popular comparisons */
.bsc-others-list,
.bsc-popular-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.6rem;
}

.bsc-others-list li,
.bsc-popular-list li {
    border: 1px solid var(--line, #dee4d8);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background: var(--surface, #fff);
}

.bsc-others-price {
    color: var(--muted, #62736a);
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.bsc-compare-link {
    display: block;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.bsc-honesty {
    margin-top: 2.5rem;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--muted, #62736a);
    border-top: 1px solid var(--line, #dee4d8);
    padding-top: 1rem;
}

/* Builder */
.bsc-builder {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (min-width: 860px) {
    .bsc-builder {
        grid-template-columns: 320px 1fr;
        align-items: start;
    }

    .bsc-shortlist {
        position: sticky;
        top: 100px;
    }
}

.bsc-shortlist {
    background: var(--surface, #fff);
    border: 1px solid var(--line, #dee4d8);
    border-radius: var(--radius, 16px);
    padding: 1.25rem;
}

.bsc-shortlist h2 {
    margin-top: 0;
}

.bsc-shortlist-items {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.bsc-shortlist-items li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line, #dee4d8);
}

.bsc-shortlist-name {
    font-weight: 700;
    flex: 1;
}

.bsc-shortlist-price {
    color: var(--muted, #62736a);
    font-size: 0.9rem;
}

.bsc-remove {
    background: none;
    border: 1px solid var(--line, #dee4d8);
    border-radius: 50%;
    width: 1.75rem;
    height: 1.75rem;
    line-height: 1;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--muted, #62736a);
}

.bsc-shortlist-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin: 0;
}

.bsc-clear {
    background: none;
    border: none;
    color: var(--green, #0c6b4f);
    text-decoration: underline;
    cursor: pointer;
    padding: 0.25rem 0;
}

.bsc-shortlist-note {
    min-height: 1.2em;
    font-size: 0.9rem;
    color: var(--red, #c2410c);
    margin: 0.5rem 0 0;
}

.bsc-picker-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.bsc-picker-controls input[type="search"] {
    flex: 1 1 220px;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line, #dee4d8);
    border-radius: 999px;
    font-size: 1rem;
    background: var(--surface, #fff);
    color: var(--ink, #14211a);
}

.bsc-picker-controls select {
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line, #dee4d8);
    border-radius: 999px;
    font-size: 1rem;
    background: var(--surface, #fff);
    color: var(--ink, #14211a);
}

.bsc-picker-count {
    font-size: 0.9rem;
    color: var(--muted, #62736a);
    margin: 0 0 0.5rem;
}

.bsc-picker-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 640px;
    overflow-y: auto;
    border: 1px solid var(--line, #dee4d8);
    border-radius: var(--radius, 16px);
    background: var(--surface, #fff);
}

.bsc-picker-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--line, #dee4d8);
}

.bsc-picker-list li:last-child {
    border-bottom: none;
}

.bsc-picker-list li.bsc-picked {
    background: var(--green-soft, #e0f1e4);
}

.bsc-picker-info {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    align-items: baseline;
}

.bsc-picker-category,
.bsc-picker-price {
    font-size: 0.9rem;
    color: var(--muted, #62736a);
}

.bsc-add {
    background: var(--green, #0c6b4f);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.bsc-picked .bsc-add {
    background: var(--surface, #fff);
    color: var(--green, #0c6b4f);
    border: 1px solid var(--green, #0c6b4f);
}

@media (max-width: 600px) {
    .bsc-page h1 {
        font-size: 1.6rem;
    }

    .bsc-table {
        min-width: 480px;
    }
}
