/* Buyer guides (src/guide-pages.njk) and their hub (src/guide-hub.njk), on top of the story layout
   (assets/css/story-page.css). Linked by base.njk on pages with guidePage: true.

   Top to bottom: the hero's long headline, the quick answer and the notice, the ranked picks (a white product
   card with the live price and the buy buttons beside the reasons), the "where the Quantum stands" note, the
   side-by-side table, the "what to look for" list, the long read on the light chapter, the questions, the
   related-guide pills, and the hub's groups of cards. Data: src/_data/guidePages.js. */

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

/* ---------- Hero: guide headlines are whole sentences ---------- */

/* Guide headlines run from 60 to 85 characters, so inside the hero's <h1> they are set at two thirds of the
   story hero's size (.guide-hero-head, written by src/guide-pages.njk) and sit in two or three lines beside
   the pill. The hub's short headline keeps the full size. (The guide pages leave out the hero's scroll hint:
   a headline this long would run under it.) */
#home-banners .guide-hero-head {
    display: block;
    max-width: 36ch;
    font-size: 0.67em;
    line-height: 1.08;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

/* "The question: the short answer". The part after the colon, on its own line and lighter. */
#home-banners .guide-hero-tail {
    display: block;
    margin-top: 0.4em;
    color: #e8e8ed;
    font-size: 0.6em;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

/* Tablets: the pill drops under the headline instead of squeezing it (as on the deal pages). */
@media screen and (min-width: 48em) and (max-width: 64em) {
    #home-banners .sigma-hero-lockup {
        flex-wrap: wrap;
    }

    #home-banners .sigma-hero-copy {
        flex: 1 1 100%;
    }

    #home-banners .guide-hero-head {
        max-width: none;
        font-size: 0.72em;
    }

    #home-banners .sigma-hero-buy {
        margin-left: auto;
    }
}

@media screen and (max-width: 47.937em) {
    #home-banners .guide-hero-head {
        max-width: none;
        font-size: 0.68em;
    }

    #home-banners .guide-hero-tail {
        font-size: 0.68em;
    }
}

/* ---------- The quick answer ---------- */

.guide-lead {
    max-width: 900px;
    margin: 0 auto;
}

.guide-deck {
    margin: 0 0 1.75rem;
    color: var(--sigma-ink);
    font-size: clamp(1.5rem, 2.9vw, 2.35rem);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.025em;
}

/* The answer in one breath: the framed blue card of the deal pages' featured offer. */
.guide-answer {
    margin: 0 0 1.5rem;
    padding: 1.6rem 1.75rem 1.7rem;
    border-radius: var(--sigma-radius);
    background: linear-gradient(160deg, #0a3a78 0%, #001a3d 100%);
    box-shadow: inset 0 0 0 1px rgba(41, 151, 255, 0.5);
}

.guide-answer-label,
.guide-notice-label {
    width: fit-content;
    margin: 0 0 0.9rem;
    padding: 0.3rem 0.75rem;
    border-radius: 980px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.3;
    text-transform: uppercase;
}

.guide-answer-label {
    background: rgba(41, 151, 255, 0.2);
    color: #8fcaff;
}

.guide-answer p:last-child {
    margin: 0;
    color: var(--sigma-ink);
    font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
    line-height: 1.55;
}

/* A limit the page states before anything else (topics no robot fully solves). */
.guide-notice {
    margin: 0 0 1.5rem;
    padding: 1.4rem 1.75rem 1.5rem;
    border: 1px solid rgba(255, 214, 10, 0.45);
    border-radius: var(--sigma-radius);
    background: rgba(255, 214, 10, 0.07);
}

.guide-notice-label {
    background: rgba(255, 214, 10, 0.16);
    color: #ffd60a;
}

.guide-notice p:last-child {
    margin: 0;
    color: var(--sigma-ink);
    font-size: 1.05rem;
    line-height: 1.55;
}

.guide-prose {
    margin: 0 0 1.1em;
    color: #a1a1a6;
    font-size: clamp(1.0625rem, 1.35vw, 1.1875rem);
    line-height: 1.65;
}

.guide-answer + .guide-prose,
.guide-notice + .guide-prose {
    margin-top: 2rem;
}

.guide-lead .sigma-actions {
    margin-top: 1.8rem;
}

/* Links inside the copy on the dark chapters. */
.guide-answer p a,
.guide-notice p a,
.guide-prose a,
.guide-pick-body p a,
.guide-pick-fit a,
.guide-hero-note p a,
.guide-factors p a,
.guide-faq-answer a,
.guide-verdict-text a {
    color: var(--sigma-link);
    text-decoration: underline;
    text-decoration-color: rgba(41, 151, 255, 0.45);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.guide-answer p a {
    color: #8fcaff;
    text-decoration-color: rgba(143, 202, 255, 0.55);
}

.guide-answer strong,
.guide-notice strong,
.guide-prose strong,
.guide-pick-body strong,
.guide-hero-note strong,
.guide-factors strong,
.guide-faq-answer strong,
.guide-verdict-text strong {
    color: var(--sigma-ink);
    font-weight: 700;
}

/* ---------- The picks ---------- */

.guide-picks {
    display: grid;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.guide-pick {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: clamp(1.25rem, 3vw, 2.75rem);
    align-items: start;
    padding: clamp(1rem, 1.8vw, 1.5rem);
    border-radius: var(--sigma-radius);
    background: var(--sigma-tile);
    scroll-margin-top: 120px;
}

.guide-pick--top {
    box-shadow: inset 0 0 0 2px rgba(41, 151, 255, 0.6);
}

/* The product card: the story layout's white card (.sigma-product), with the rank in its corner. */
.guide-pick-card {
    position: relative;
    padding: 1.5rem 1.25rem 1.4rem;
    border-radius: 20px;
}

.guide-pick-rank {
    position: absolute;
    top: 0.9rem;
    left: 0.9rem;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 50%;
    background: #1d1d1f;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
}

.guide-pick--top .guide-pick-rank {
    background: var(--sigma-blue);
}

.guide-pick-card .sigma-product-media {
    width: min(100%, 240px);
    margin-bottom: 0.6rem;
}

.guide-price {
    margin: 0 0 1rem;
}

/* Written with the card in the selector: story-page.css styles every paragraph in a product card as grey
   body copy, which would otherwise win over .sigma-product-price. */
.guide-pick-card .sigma-product-price {
    margin: 0;
    color: #1d1d1f;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.guide-pick-card .sigma-product-price s {
    color: #6e6e73;
    font-size: 0.62em;
    font-weight: 400;
    letter-spacing: 0;
}

.guide-pick-card .guide-price-save {
    margin: 0.3rem 0 0;
    color: #0066cc;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
}

/* shopify-live.js shows the struck list price and the saving while the robot is below its list price. */
.guide-price [hidden],
.guide-oos[hidden] {
    display: none !important;
}

.guide-pick-card .guide-oos {
    margin: -0.5rem 0 1rem;
    color: #b25000;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
}

.guide-pick-card .buy-button-grid {
    margin-top: 0;
}

.guide-pick-body {
    padding: clamp(0.25rem, 1vw, 0.9rem) clamp(0.25rem, 1vw, 0.9rem) clamp(0.25rem, 1vw, 0.9rem) 0;
}

/* Written with the body in the selector, so the paragraph rule below does not turn it into grey body copy. */
.guide-pick-body .guide-pick-award {
    margin: 0 0 0.5rem;
    color: var(--sigma-link);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    line-height: 1.35;
    text-transform: uppercase;
}

.guide-pick-body h3 {
    margin: 0 0 0.85rem;
    color: var(--sigma-ink);
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.guide-pick-body h3 a {
    color: inherit;
    text-decoration: none;
}

.guide-pick-body h3 a:hover,
.guide-pick-body h3 a:focus-visible {
    color: var(--sigma-link);
}

.guide-pick-body > p {
    margin: 0 0 1em;
    color: #a1a1a6;
    font-size: 1.0625rem;
    line-height: 1.65;
}

.guide-pick-fit {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 1.4rem 0 0;
}

.guide-pick-fit > div {
    padding: 1rem 1.15rem 1.05rem;
    border-radius: 16px;
    background: rgba(245, 245, 247, 0.06);
}

.guide-pick-fit dt {
    margin: 0 0 0.35rem;
    color: var(--sigma-ink);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.3;
    text-transform: uppercase;
}

.guide-pick-fit dd {
    margin: 0;
    color: #a1a1a6;
    font-size: 0.98rem;
    line-height: 1.5;
}

/* Where this store's own robot stands for the topic. */
.guide-hero-note {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: clamp(1.5rem, 2.8vw, 2.5rem);
    border: 1px solid rgba(245, 245, 247, 0.18);
    border-radius: var(--sigma-radius);
}

.guide-hero-note .sigma-eyebrow {
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.guide-hero-note h3 {
    margin: 0 0 0.8rem;
    color: var(--sigma-ink);
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.guide-hero-note p {
    max-width: 900px;
    margin: 0 0 1em;
    color: #a1a1a6;
    font-size: 1.0625rem;
    line-height: 1.65;
}

/* ---------- Tables: they scroll inside their own frame, never the page ---------- */

.guide-table-scroll {
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.guide-table-scroll:focus-visible {
    outline: 2px solid var(--sigma-link);
    outline-offset: 4px;
}

/* Fixed layout: the label column keeps its width and the robots share the rest equally. */
.guide-table {
    width: 100%;
    min-width: 660px;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
    color: #d2d2d7;
    font-size: 0.98rem;
    line-height: 1.45;
}

.guide-table thead,
.guide-table tbody,
.guide-table tr {
    border: 0;
    background: none;
}

.guide-table th,
.guide-table td {
    padding: 0.95rem 1rem;
    border: 0;
    border-bottom: 1px solid rgba(245, 245, 247, 0.14);
    background: none;
    text-align: left;
    vertical-align: top;
}

.guide-table thead th {
    border-bottom-color: rgba(245, 245, 247, 0.4);
    color: var(--sigma-ink);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
}

.guide-table thead th a {
    color: var(--sigma-ink);
    text-decoration: none;
}

.guide-table thead th a:hover,
.guide-table thead th a:focus-visible {
    color: var(--sigma-link);
}

.guide-table tbody th {
    width: 9.5rem;
    color: #a1a1a6;
    font-size: 0.85rem;
    font-weight: 600;
}

.guide-table-price td {
    color: var(--sigma-ink);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.guide-table-price td a {
    color: var(--sigma-link);
    font-size: 0.98rem;
    font-weight: 400;
}

/* A table inside the long read (the light chapter): the writer's own columns, sized by their content. */
.guide-table--light {
    min-width: 540px;
    margin: 0.4rem 0 1.6rem;
    color: #424245;
    table-layout: auto;
}

.guide-table--light th,
.guide-table--light td {
    border-bottom-color: rgba(0, 0, 0, 0.12);
}

.guide-table--light thead th {
    border-bottom-color: rgba(0, 0, 0, 0.45);
    color: #1d1d1f;
    font-size: 0.95rem;
}

.guide-table--light tbody th {
    width: auto;
    color: #1d1d1f;
    font-size: 0.98rem;
}

/* ---------- What to look for ---------- */

.guide-factors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.guide-factors li {
    padding: 1.7rem 1.65rem 1.8rem;
    border-radius: 24px;
    background: #000;
}

.guide-factor-n {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    margin: 0 0 1rem;
    border-radius: 12px;
    background: rgba(41, 151, 255, 0.14);
    color: var(--sigma-link);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.guide-factors h3 {
    margin: 0 0 0.6rem;
    color: var(--sigma-ink);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.guide-factors p {
    margin: 0;
    color: #a1a1a6;
    font-size: 1rem;
    line-height: 1.6;
}

/* ---------- The long read (on the light chapter) ---------- */

.guide-article {
    max-width: 820px;
    margin: 0 auto;
    color: #424245;
}

.guide-article h2 {
    margin: 2.4em 0 0.6em;
    color: #1d1d1f;
    font-size: clamp(1.6rem, 2.9vw, 2.3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.guide-article h2:first-child {
    margin-top: 0;
}

.guide-article p,
.guide-article li {
    font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
    line-height: 1.7;
}

.guide-article p {
    margin: 0 0 1.1em;
}

.guide-article ul,
.guide-article ol {
    margin: 0 0 1.3em 1.3em;
    padding: 0;
}

.guide-article li {
    margin-bottom: 0.55em;
}

.guide-article a {
    color: #0066cc;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.guide-article strong {
    color: #1d1d1f;
    font-weight: 700;
}

.guide-article .guide-steps {
    counter-reset: guide-step;
    margin-left: 0;
    list-style: none;
}

.guide-steps li {
    position: relative;
    min-height: 2rem;
    margin-bottom: 0.9em;
    padding-left: 3rem;
    counter-increment: guide-step;
}

.guide-steps li::before {
    content: counter(guide-step);
    position: absolute;
    top: 0.1em;
    left: 0;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #1d1d1f;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
}

/* ---------- Questions: plain disclosure rows, readable without JavaScript ---------- */

.guide-faq {
    max-width: 980px;
    margin: 0 auto;
}

.guide-faq details {
    border-bottom: 1px solid rgba(245, 245, 247, 0.14);
}

.guide-faq details:first-of-type {
    border-top: 1px solid rgba(245, 245, 247, 0.14);
}

.guide-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.35rem 0;
    cursor: pointer;
    list-style: none;
}

.guide-faq summary::-webkit-details-marker {
    display: none;
}

.guide-faq summary h3 {
    margin: 0;
    color: var(--sigma-ink);
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
}

.guide-faq summary::after {
    content: "+";
    flex: 0 0 auto;
    color: var(--sigma-link);
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1;
}

.guide-faq details[open] summary::after {
    content: "\2212";
}

.guide-faq summary:focus-visible {
    outline: 2px solid var(--sigma-link);
    outline-offset: 4px;
}

.guide-faq-answer {
    padding: 0 0 1.5rem;
    text-align: left;
}

.guide-faq-answer p {
    max-width: 860px;
    margin: 0;
    color: #a1a1a6;
    font-size: 1.05rem;
    line-height: 1.65;
}

/* ---------- The bottom line ---------- */

.guide-verdict-text {
    color: #a1a1a6;
}

/* ---------- Related guides ---------- */

.guide-more,
.guide-hub-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.guide-more-all {
    border-color: rgba(41, 151, 255, 0.6);
    color: var(--sigma-link);
}

/* ---------- The hub ---------- */

.guide-hub-nav {
    margin-top: 2rem;
}

.guide-hub-group {
    max-width: 1280px;
    margin: 0 auto clamp(3rem, 6vw, 5rem);
    scroll-margin-top: 120px;
}

.guide-hub-group h2 {
    margin: 0 0 1.25rem;
    color: var(--sigma-ink);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

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

.guide-hub-list a {
    display: block;
    height: 100%;
    padding: 1.2rem 1.3rem 1.3rem;
    border-radius: 20px;
    background: var(--sigma-tile);
    color: inherit;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.guide-hub-list a:hover,
.guide-hub-list a:focus-visible {
    background: #2a2a2d;
}

.guide-hub-list strong {
    display: block;
    color: var(--sigma-ink);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
}

.guide-hub-list span {
    display: block;
    margin-top: 0.4rem;
    color: #a1a1a6;
    font-size: 0.92rem;
    line-height: 1.45;
}

.guide-hub-list em {
    display: block;
    margin-top: 0.65rem;
    color: var(--sigma-link);
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.3;
}

.guide-hub-foot {
    margin-top: 0;
}

/* ---------- Phones ---------- */

@media screen and (max-width: 47.937em) {
    .guide-answer,
    .guide-notice {
        padding: 1.25rem 1.2rem 1.3rem;
        border-radius: 20px;
    }

    .guide-pick {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.1rem;
        padding: 0.75rem 0.75rem 1.25rem;
        border-radius: 22px;
    }

    .guide-pick-card {
        border-radius: 16px;
    }

    .guide-pick-card .sigma-product-media {
        width: min(100%, 200px);
    }

    .guide-pick-body {
        padding: 0 0.5rem;
    }

    .guide-pick-fit {
        grid-template-columns: minmax(0, 1fr);
    }

    .guide-hero-note {
        border-radius: 22px;
    }

    .guide-table tbody th {
        width: 6.5rem;
    }

    .guide-table th,
    .guide-table td {
        padding: 0.8rem 0.75rem;
    }

    .guide-more,
    .guide-hub-nav {
        justify-content: flex-start;
    }

    .guide-hub-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
}
