/* best-guides.css — the /best buyer-guide tree (hub + five ranked roundups).
 *
 * Loaded as a RAW <link> from block extrahead in each /best template, so it
 * MUST carry ?v=YYYY-MM-DD on every reference (app.js blanket-sets
 * `Cache-Control: immutable, max-age=31536000` on everything under app/public,
 * and an unversioned raw asset therefore pins the old bytes in a returning
 * visitor's browser for a year with no revalidation and no way for a
 * CloudFront invalidation to reach it). Bump the token to this file's git
 * last-change date whenever it changes; `node scripts/seo/audit-raw-asset-cache.js`
 * fails the build if the token is missing or older than the file.
 *
 * TOKEN CONTRACT — same one uc-pages.css follows (Soft Studio, 2026-08-08):
 *   type        var(--t-text) / --t-text-secondary / --t-text-muted
 *   surfaces    var(--t-bg) paper, var(--t-bg-card) white
 *   hairlines   var(--t-border)
 *   accent      pink FIELD (--ss-pink / -2 / -3) with INK text on it.
 *               Never pink text, never white on pink.
 *   action      ink fill, white label (--ss-ink)
 *   elevation   var(--ss-shadow). Neutral only — colour in a shadow is a glow
 *               and glows are banned project-wide, as are gradients.
 * Every literal carries a token fallback so the page still renders readable if
 * soft-studio.css is somehow missed.
 *
 * Buttons follow the project standard: border-radius 10px, compact padding,
 * never a pill, never half-round.
 */

/* Screen-reader-only text. Defined here rather than assumed: the codebase has
   no global .visually-hidden, only one page-scoped .sr-only in
   character-wizard.css. The ranked list needs it so a screen reader hears
   "Rank 3: Pebblely" where a sighted reader sees a large "03". */
.bst-answer .visually-hidden,
.bst-list .visually-hidden,
.bst-table .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   Disclosure — who wrote this
   ============================================ */
.bst-disclosure {
    padding: 0 0 8px;
}

.bst-disclosure__box {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 20px;
    border: 1px solid var(--t-border, #E6E2DC);
    border-radius: 12px;
    background: var(--ss-pink-3, #FFF4FC);
}

.bst-disclosure__icon {
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 1;
    margin-top: 2px;
    color: var(--t-text, #141414);
}

.bst-disclosure__title {
    margin: 0 0 4px;
    font-family: var(--font-clash, sans-serif);
    font-weight: 600;
    font-size: 15px;
    color: var(--t-text, #141414);
}

.bst-disclosure__body {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--t-text-secondary, #4A4A4A);
}

/* ============================================
   Short answer — the citable block
   ============================================ */
.bst-answer {
    padding: 24px 0 8px;
}

.bst-answer__box {
    padding: 28px 32px;
    border: 1px solid var(--t-border, #E6E2DC);
    border-left: 4px solid var(--ss-pink, #FFD3F6);
    border-radius: 14px;
    background: var(--t-bg-card, #FFFFFF);
    box-shadow: var(--ss-shadow, 0 1px 2px rgba(20, 20, 20, 0.05));
}

.bst-answer__title {
    margin: 0 0 12px;
    font-family: var(--font-clash, sans-serif);
    font-weight: 600;
    font-size: 20px;
    color: var(--t-text, #141414);
}

.bst-answer__body {
    margin: 0 0 12px;
    font-size: 17px;
    line-height: 1.7;
    color: var(--t-text, #141414);
}

.bst-answer__p {
    margin: 0 0 10px;
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--t-text-secondary, #4A4A4A);
}

.bst-answer__p:last-child { margin-bottom: 0; }

/* ============================================
   Summary table
   ============================================ */
.bst-table {
    padding: 56px 0 24px;
}

/* Wide content must scroll inside its own container, never the page body. */
.bst-table__wrap {
    overflow-x: auto;
    border: 1px solid var(--t-border, #E6E2DC);
    border-radius: 14px;
    background: var(--t-bg-card, #FFFFFF);
    -webkit-overflow-scrolling: touch;
}

.bst-table table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 14.5px;
}

.bst-table th,
.bst-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--t-border, #E6E2DC);
    vertical-align: top;
}

.bst-table thead th {
    font-family: var(--font-clash, sans-serif);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--t-text-muted, #6B6B6B);
    background: var(--t-bg, #F4F2EF);
    white-space: nowrap;
}

.bst-table tbody tr:last-child th,
.bst-table tbody tr:last-child td { border-bottom: 0; }

.bst-table__rank {
    width: 48px;
    color: var(--t-text-muted, #6B6B6B);
    font-variant-numeric: tabular-nums;
}

.bst-table td a {
    font-weight: 600;
    color: var(--t-text, #141414);
    text-decoration: none;
    border-bottom: 1px solid var(--t-border, #E6E2DC);
}

.bst-table td a:hover { border-bottom-color: var(--t-text, #141414); }

/* Our own row gets a pink FIELD, not pink text. It marks the row as ours
   without implying it won. */
.bst-table tbody tr.is-db { background: var(--ss-pink-3, #FFF4FC); }

.bst-table__note {
    margin: 14px 0 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--t-text-muted, #6B6B6B);
}

/* ============================================
   Tags
   ============================================ */
.bst-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 9px;
    border-radius: 999px; /* a TAG, not a button — the pill ban covers CTAs only */
    font-family: var(--font-clash, sans-serif);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

.bst-tag--self {
    background: var(--ss-pink, #FFD3F6);
    color: var(--t-text, #141414);
}

.bst-tag--winner {
    background: var(--t-text, #141414);
    color: var(--t-bg-card, #FFFFFF);
}

/* ============================================
   Ranked list
   ============================================ */
.bst-list {
    padding: 40px 0 24px;
}

.bst-entry {
    padding: 28px 0 26px;
    border-top: 1px solid var(--t-border, #E6E2DC);
    scroll-margin-top: 96px; /* the in-page #tool-x jumps clear the sticky nav */
}

.bst-entry:first-of-type { border-top: 0; }

.bst-entry__head {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.bst-entry__rank {
    flex: 0 0 auto;
    font-family: var(--font-clash, sans-serif);
    font-size: 34px;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--t-border, #E6E2DC);
}

.bst-entry.is-db .bst-entry__rank { color: var(--ss-pink, #FFD3F6); }

.bst-entry__id { flex: 1 1 auto; min-width: 0; }

.bst-entry__name {
    margin: 0 0 6px;
    font-family: var(--font-clash, sans-serif);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--t-text, #141414);
}

.bst-entry__tagline {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--t-text-secondary, #4A4A4A);
}

.bst-entry__price {
    flex: 0 0 auto;
    text-align: right;
}

.bst-entry__amount {
    display: block;
    font-family: var(--font-clash, sans-serif);
    font-size: 19px;
    font-weight: 600;
    color: var(--t-text, #141414);
    white-space: nowrap;
}

.bst-entry__pricelabel {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--t-text-muted, #6B6B6B);
}

.bst-entry__cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 16px;
}

.bst-entry__coltitle {
    margin: 0 0 8px;
    font-family: var(--font-clash, sans-serif);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--t-text-muted, #6B6B6B);
}

.bst-entry__ul {
    margin: 0;
    padding: 0 0 0 18px;
    list-style: disc;
}

.bst-entry__ul li {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--t-text-secondary, #4A4A4A);
}

.bst-entry__pricenote {
    margin: 0 0 16px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--t-text-muted, #6B6B6B);
}

.bst-entry__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    margin: 0 0 16px;
    padding: 14px 18px;
    border: 1px solid var(--t-border, #E6E2DC);
    border-radius: 12px;
    background: var(--t-bg, #F4F2EF);
}

.bst-entry__meta dt {
    margin: 0 0 2px;
    font-family: var(--font-clash, sans-serif);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--t-text-muted, #6B6B6B);
}

.bst-entry__meta dd {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--t-text, #141414);
}

.bst-entry__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bst-entry__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid var(--t-border, #E6E2DC);
    border-radius: 10px; /* project button standard */
    background: var(--t-bg-card, #FFFFFF);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--t-text, #141414);
    text-decoration: none;
    transition: border-color 160ms ease-in-out, background-color 160ms ease-in-out;
}

.bst-entry__link .iconify { font-size: 15px; }

.bst-entry__link:hover {
    border-color: var(--t-text, #141414);
    background: var(--t-bg, #F4F2EF);
    color: var(--t-text, #141414);
}

.bst-entry__link:active { transform: scale(0.98); transition-duration: 100ms; }

.bst-entry__link:focus-visible {
    outline: 2px solid var(--t-text, #141414);
    outline-offset: 2px;
}

/* ============================================
   Sources
   ============================================ */
.bst-sources { padding: 48px 0 24px; }

.bst-sources__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px 24px;
}

.bst-sources__list li {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--t-border, #E6E2DC);
    font-size: 14.5px;
}

.bst-sources__list a {
    color: var(--t-text, #141414);
    text-decoration: none;
    border-bottom: 1px solid var(--t-border, #E6E2DC);
}

.bst-sources__list a:hover { border-bottom-color: var(--t-text, #141414); }

.bst-sources__date {
    font-size: 12.5px;
    color: var(--t-text-muted, #6B6B6B);
    font-variant-numeric: tabular-nums;
}

/* ============================================
   Related guides + hub directory
   ============================================ */
.bst-related { padding: 48px 0; }

.bst-related__grid,
.bst-dir__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.bst-related__card,
.bst-dir__card {
    display: block;
    padding: 22px;
    border: 1px solid var(--t-border, #E6E2DC);
    border-radius: 14px;
    background: var(--t-bg-card, #FFFFFF);
    text-decoration: none;
    transition: border-color 180ms ease-in-out, transform 180ms ease-in-out;
}

.bst-related__card:hover,
.bst-dir__card:hover {
    border-color: var(--t-text, #141414);
    transform: translateY(-2px);
}

.bst-related__card:focus-visible,
.bst-dir__card:focus-visible {
    outline: 2px solid var(--t-text, #141414);
    outline-offset: 2px;
}

.bst-related__icon,
.bst-dir__icon {
    display: block;
    font-size: 22px;
    margin-bottom: 12px;
    color: var(--t-text, #141414);
}

.bst-related__name,
.bst-dir__name {
    display: block;
    margin: 0 0 6px;
    font-family: var(--font-clash, sans-serif);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--t-text, #141414);
}

.bst-related__note,
.bst-dir__note {
    display: block;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--t-text-secondary, #4A4A4A);
}

.bst-dir { padding: 8px 0 56px; }

.bst-dir__group { margin-bottom: 48px; }

.bst-dir__group:last-child { margin-bottom: 0; }

.bst-dir__grouptitle {
    margin: 0 0 6px;
    font-family: var(--font-clash, sans-serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--t-text, #141414);
}

.bst-dir__groupnote {
    margin: 0 0 20px;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--t-text-secondary, #4A4A4A);
}

.bst-dir__cta {
    display: inline-block;
    margin-top: 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--t-text, #141414);
    border-bottom: 1px solid var(--ss-pink, #FFD3F6);
    padding-bottom: 1px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 720px) {
    .bst-entry__head {
        flex-wrap: wrap;
        gap: 12px;
    }

    .bst-entry__price {
        flex: 1 0 100%;
        text-align: left;
        order: 3;
    }

    .bst-entry__cols,
    .bst-entry__meta {
        grid-template-columns: 1fr;
    }

    .bst-answer__box { padding: 22px 20px; }

    .bst-entry__rank { font-size: 28px; }
}

/* ============================================
   Reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .bst-related__card,
    .bst-dir__card,
    .bst-entry__link {
        transition: none;
    }

    .bst-related__card:hover,
    .bst-dir__card:hover {
        transform: none;
    }

    .bst-entry__link:active { transform: none; }
}

/* ============================================
   Dark theme pair
   ============================================
   Site default is dark. Every page-scoped block above resolves through --t-*
   tokens, which already flip, so only the two places holding a literal pink
   FIELD need restating: at dark-theme luminance a #FFF4FC field is a white
   slab. Per CLAUDE.md:219 a page-scoped variable block without this pair
   renders dark-on-dark and the text disappears. */
html:not([data-theme="light"]) .bst-disclosure__box,
html:not([data-theme="light"]) .bst-table tbody tr.is-db {
    background: rgba(255, 211, 246, 0.10);
}

html:not([data-theme="light"]) .bst-answer__box,
html:not([data-theme="light"]) .bst-related__card,
html:not([data-theme="light"]) .bst-dir__card,
html:not([data-theme="light"]) .bst-entry__link {
    background: var(--t-bg-card, #111111);
}

html:not([data-theme="light"]) .bst-entry__meta,
html:not([data-theme="light"]) .bst-table thead th {
    background: rgba(255, 255, 255, 0.03);
}
