/* Presentation for governed SEO surfaces (facet routes + cohort category archives).
   Markup comes from FacetContentRenderer; nothing here changes structure. */

/* Theme gives the content column `padding: 20px 0 0 20px`, so text runs flush
   into the sidebar on the left and into the window edge on the right. */
@media (min-width: 769px) {
    .tb-seo-surface #primary {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

.tb-seo-surface .page-title {
    font-size: clamp(1.375rem, 1.05rem + 1.35vw, 1.75rem);
    line-height: 1.25;
    letter-spacing: -0.015em;
    margin: 0 0 0.5rem;
}

.tb-seo-facet-summary {
    margin: 0 0 1.5rem;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

.tb-seo-facet-summary p {
    margin: 0;
}

.tb-seo-facet-content {
    color: #334155;
    font-size: 1rem;
    line-height: 1.65;
}

.tb-seo-facet-content .tb-seo-facet-section h2,
.tb-seo-facet-content .tb-seo-facet-related h2 {
    font-size: 1.125rem;
    line-height: 1.3;
    /* theme custom.css forces `h2 { font-weight: 400 !important }` site-wide */
    font-weight: 600 !important;
    letter-spacing: -0.01em;
    color: #1e293b;
    margin: 0 0 0.625rem;
}

.tb-seo-facet-content .tb-seo-facet-section h3 {
    font-size: 0.9375rem;
    line-height: 1.4;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem;
}

.tb-seo-facet-content p {
    margin: 0 0 0.625rem;
    max-width: 78ch;
}

.tb-seo-facet-content p:last-child {
    margin-bottom: 0;
}

.tb-seo-facet-content--intro {
    display: grid;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
}

.tb-seo-facet-content--body {
    display: grid;
    gap: 1.75rem;
    margin: 2.5rem 0 0;
    padding: 1.75rem 0 0;
    border-top: 1px solid #e2e8f0;
}

/* Criteria / use-case lists read as compact cards, not bullet stacks. */
.tb-seo-facet-content .tb-seo-facet-section > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.tb-seo-facet-content .tb-seo-facet-section > ul > li {
    margin: 0;
    padding: 1rem 1.125rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
}

.tb-seo-facet-content details {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
}

.tb-seo-facet-content details + details {
    margin-top: 0.5rem;
}

.tb-seo-facet-content summary {
    position: relative;
    cursor: pointer;
    list-style: none;
    padding: 0.875rem 2.75rem 0.875rem 1.125rem;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.45;
    color: #1e293b;
}

.tb-seo-facet-content summary::-webkit-details-marker {
    display: none;
}

.tb-seo-facet-content summary::after {
    content: "";
    position: absolute;
    right: 1.25rem;
    top: 1.15rem;
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}

.tb-seo-facet-content details[open] summary::after {
    top: 1.35rem;
    transform: rotate(-135deg);
}

.tb-seo-facet-content details > p {
    margin: 0;
    padding: 0 1.125rem 1rem;
}

/* Closing CTA back up to the grid. Smooth only where the page opted in, and
   never against a reduced-motion preference. */
:root:has(body.tb-seo-surface) {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    :root:has(body.tb-seo-surface) {
        scroll-behavior: auto;
    }
}

#tb-seo-products {
    scroll-margin-top: 5.5rem;
}

.tb-seo-facet-content .tb-seo-facet-cta {
    margin: 1rem 0 0;
    max-width: none;
}

/* the theme paints every `a:hover, a:focus` in its link blue, which on this
   filled button is blue on blue — pin white across all states */
.tb-seo-facet-cta__link,
.tb-seo-facet-cta__link:visited,
.tb-seo-facet-cta__link:hover,
.tb-seo-facet-cta__link:focus,
.tb-seo-facet-cta__link:focus-visible,
.tb-seo-facet-cta__link:active {
    color: #fff;
}

.tb-seo-facet-cta__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    background: #046bd2;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

/* points up, because the grid it scrolls to sits above this block */
.tb-seo-facet-cta__link::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(-45deg);
    margin-top: 0.15rem;
}

.tb-seo-facet-cta__link:hover,
.tb-seo-facet-cta__link:focus-visible {
    background: #045cb4;
}

.tb-seo-facet-cta__link:focus-visible {
    outline: 2px solid #1e293b;
    outline-offset: 2px;
}

.tb-seo-facet-related ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tb-seo-facet-related li {
    margin: 0;
}

.tb-seo-facet-related a {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #1e293b;
    font-size: 0.875rem;
    line-height: 1.3;
    text-decoration: none;
}

.tb-seo-facet-related a:hover,
.tb-seo-facet-related a:focus {
    border-color: #046bd2;
    background: #fff;
    color: #046bd2;
}

@media (max-width: 768px) {
    .tb-seo-facet-content--body {
        gap: 1.5rem;
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .tb-seo-facet-content .tb-seo-facet-section > ul > li {
        padding: 0.875rem 1rem;
    }
}
