/* Shared styles for the /vs/ and /lms/ SEO page families.
   Matches the site redesign contract (see pricing/styles.css): flat dark
   surfaces, solid #ff4a36 accent, Geist, no gradients or pills.
   Global tokens (card-bg, card-border, text-*, radius-*) come from
   styles.css :root; only page-scoped additions live here. */

body.seo-page {
    --accent: #ff4a36;
    --accent-hover: #ff5e4a;
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -.01em;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.65;
}

.seo-page main {
    display: block;
    padding-top: calc(var(--header-height) + 2.25rem);
}

.seo-page .wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 2rem;
}

.seo-page .wrap-narrow {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---------- breadcrumb ---------- */
.seo-breadcrumb {
    padding: 1.25rem 0 0;
    font-size: .85rem;
    color: var(--text-dim);
}

.seo-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.seo-breadcrumb a:hover { color: var(--text-primary); }
.seo-breadcrumb span[aria-hidden] { margin: 0 .4rem; }

/* ---------- hero ----------
   .seo-hero sits on the same element as .wrap; keep this selector at
   .seo-page level so it outranks `.seo-page .wrap`'s padding reset. */
.seo-page .seo-hero {
    padding: 3rem 2rem 2.5rem;
    text-align: center;
}

.seo-hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.25rem);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -.035em;
    max-width: 800px;
    margin: 0 auto 1rem;
}

.seo-hero .hero-sub {
    max-width: 620px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.seo-hero .hero-updated {
    margin-top: .9rem;
    font-size: .82rem;
    color: var(--text-dim);
}

/* Demo clip under the hero CTAs */
.seo-hero-media {
    max-width: 720px;
    margin: 2.25rem auto 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .85);
}

.seo-hero-media video {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- phone-clip variant of the landing hero (/vs/gauth/) ----------
   The portrait app capture is far narrower than the 620px landscape card, so
   cap it at hand-held width and center the pair instead of letting the copy
   column swallow the leftover space. */
.lms-hero-stack-phone { justify-content: center; }
.lms-hero-stack-phone .lms-hero-copy { max-width: 620px; }

.lms-hero-stack-phone .lms-hero-media {
    flex: 0 1 auto;
    width: 100%;
    max-width: 300px;
    /* The clip is cropped to the phone's bounding box; match the phone's own
       corner radius (123px at the 720px source width): 123 * 300/720 ≈ 52px. */
    border-radius: 52px;
}

/* ---------- App Store badge ----------
   Links to the public TestFlight beta until the App Store release. */
.app-store-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    min-height: 48px;
    padding: 0 1.25rem 0 1.05rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, .2);
    background: #000;
    color: #fff;
    font: inherit;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

.app-store-badge:hover,
.app-store-badge:active {
    border-color: rgba(255, 255, 255, .38);
    background: #0d0d0f;
}

.app-store-badge .asb-logo {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
}

.asb-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.asb-small {
    font-size: .58rem;
    font-weight: 500;
    letter-spacing: .02em;
}

.asb-big {
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: -.015em;
}

.app-store-badge[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + .6rem);
    transform: translate(-50%, 4px);
    padding: .4rem .75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    background: var(--background);
    color: var(--text-primary);
    font-size: .8rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
}

.app-store-badge[data-tooltip]:hover::after,
.app-store-badge[data-tooltip]:focus::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- pause/play toggle on autoplaying clips ----------
   Injected by reduced-motion-video.js: WCAG 2.2.2 requires a visible stop
   control on any auto-playing clip longer than 5s, for every visitor. */
.video-toggle-host { position: relative; }

.video-toggle {
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(0, 0, 0, .55);
    color: #fff;
    cursor: pointer;
    opacity: .65;
    transition: opacity .15s ease;
}

.video-toggle:hover,
.video-toggle:focus-visible { opacity: 1; }

.video-toggle svg {
    width: 14px;
    height: 14px;
    display: block;
}

/* ---------- CTA buttons (match pricing .primary-cta / .secondary-cta) ---------- */
.seo-ctas {
    margin-top: 2.25rem;
    display: flex;
    gap: .75rem;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
}

.seo-cta-primary,
.seo-cta-secondary {
    min-height: 48px;
    padding: 0 1.6rem;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: .98rem;
    font-weight: 600;
    letter-spacing: -.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.seo-cta-primary {
    border: 1px solid transparent;
    color: #fff;
    background: var(--accent);
}

.seo-cta-primary:hover { background: var(--accent-hover); }

.seo-cta-secondary {
    border: 1px solid rgba(255, 255, 255, .16);
    color: var(--text-primary);
    background: transparent;
}

.seo-cta-secondary:hover {
    background: var(--surface-2);
    border-color: rgba(255, 255, 255, .28);
}

/* ---------- LMS landing hero ----------
   A symmetric first screen for the /lms/ family: a balanced top rail, copy and
   demo clip as two equal columns, and a three-up stat row under the CTAs. Flat
   background, no photo backdrop, no decoration beyond the accent.
   Scoped to body.lms-page so the /vs/ pages keep the centered .seo-hero. */
body.lms-page main { padding-top: 0; }

.lms-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Fill the first screen so the demo clip lands above the fold at any
       size; min-height (not height) lets short viewports grow instead of
       clipping the copy. */
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--header-height) + 1.5rem) 1.5rem 3rem;
    background: var(--background);
}

.lms-hero-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Top rail: breadcrumb left, freshness stamp right */
.lms-hero-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.lms-hero-top .seo-breadcrumb {
    padding: 0;
    color: var(--text-secondary);
}

.lms-hero-top .hero-updated {
    margin: 0;
    font-size: .8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.lms-hero-stack {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4rem;
}

/* Two equal columns — neither side dominates. */
.lms-hero-copy,
.lms-hero-media {
    flex: 1 1 0;
    min-width: 0;
}

.lms-hero h1 {
    font-size: clamp(2.3rem, 4.2vw, 3.4rem);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -.045em;
    color: var(--text-primary);
    margin: 0 0 1.1rem;
}

.lms-hero h1 .h1-accent { color: var(--accent); }

.lms-hero .hero-sub {
    color: var(--text-secondary);
    font-size: 1.08rem;
    line-height: 1.6;
    margin: 0;
}

.lms-hero-actions { margin-top: 2rem; }

.lms-hero .seo-ctas {
    margin-top: 0;
    justify-content: flex-start;
}

/* ---------- three-up stat row ----------
   Equal thirds split by hairline rules. Figures are the product's real
   numbers, supplied by the site owner — keep them in sync across the six
   /lms/ pages if they change. */
.lms-hero-stats {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 2.25rem 0 0;
    padding: 0;
}

.lms-hero-stats li {
    position: relative;
    padding: 0 1rem;
    text-align: center;
}

.lms-hero-stats li:first-child { padding-left: 0; }
.lms-hero-stats li:last-child { padding-right: 0; }

.lms-hero-stats li + li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 2.6rem;
    background: var(--card-border);
}

.lms-hero-stats .stat-figure {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.1;
    color: var(--text-primary);
}

.lms-hero-stats .stat-star {
    margin-left: .12em;
    font-size: .72em;
    color: var(--accent);
    vertical-align: .12em;
}

.lms-hero-stats .stat-label {
    display: block;
    margin-top: .3rem;
    font-size: .82rem;
    line-height: 1.35;
    color: var(--text-secondary);
}

/* ---------- demo clip ---------- */
.lms-hero-media {
    max-width: 620px;
    margin: 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--card-border);
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .85);
}

.lms-hero-media video {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- demo carousel (/lms/mcgraw-connect/) ----------
   Two clips in the single hero card: Autopilot first, the one-click answer
   second. hero-carousel.js slides the track, plays only the visible clip and
   advances when it ends; the arrows, dots, keyboard and swipe flip it by hand.
   The card styling (radius, border, shadow) comes from .lms-hero-media. */
.lms-hero-carousel { position: relative; }

.lms-hero-carousel-track {
    display: flex;
    transition: transform .45s cubic-bezier(.4, 0, .2, 1);
}

.lms-hero-slide {
    flex: 0 0 100%;
    min-width: 0;
    margin: 0;
    position: relative;
}

.lms-hero-slide video {
    display: block;
    width: 100%;
    height: auto;
}

.lms-hero-slide figcaption {
    position: absolute;
    left: .75rem;
    top: .75rem;
    /* Top-left keeps clear of the play/pause toggle (bottom-right), the dots
       (bottom-centre) and the floating SnapGPT button the one-click clip
       shows bottom-left. */
    max-width: calc(100% - 1.5rem);
    margin: 0;
    padding: .3rem .65rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, .62);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.3;
    pointer-events: none;
}

.lms-hero-carousel-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 36px;
    height: 36px;
    min-height: 0; /* keep it round under the phone-wide button min-height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transform: translateY(-50%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(0, 0, 0, .55);
    color: #fff;
    cursor: pointer;
    opacity: .65;
    transition: opacity .15s ease;
}

.lms-hero-carousel-prev { left: .75rem; }
.lms-hero-carousel-next { right: .75rem; }

.lms-hero-carousel-arrow:hover,
.lms-hero-carousel-arrow:focus-visible { opacity: 1; }

.lms-hero-carousel-arrow svg {
    width: 16px;
    height: 16px;
    display: block;
}

.lms-hero-carousel-dots {
    position: absolute;
    left: 50%;
    bottom: .75rem;
    z-index: 3;
    display: flex;
    gap: .1rem;
    padding: .2rem .3rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    border: 1px solid rgba(255, 255, 255, .18);
}

/* Each dot is a 24px tap target; the visible dot is the ::before so the
   phone-wide `button { min-height: 44px }` rule in styles.css can't stretch
   it (min-height is reset here for the same reason). */
.lms-hero-carousel-dot {
    width: 24px;
    height: 24px;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.lms-hero-carousel-dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .45);
    transition: width .25s ease, background-color .2s ease;
}

.lms-hero-carousel-dot:hover::before,
.lms-hero-carousel-dot:focus-visible::before { background: rgba(255, 255, 255, .8); }

.lms-hero-carousel-dot[aria-selected="true"]::before {
    width: 22px;
    background: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .lms-hero-carousel-track { transition: none; }
}

/* The nav pill is fixed, so anchor jumps need to clear it. */
.seo-page [id] { scroll-margin-top: calc(var(--header-height) + 1.5rem); }

/* ---------- TL;DR ("the short answer") card ---------- */
.tldr-card {
    margin: 1.5rem 0 2.5rem;
    border: 1px solid rgba(255, 74, 54, .45);
    border-radius: var(--radius-lg);
    background: rgba(255, 74, 54, .05);
    padding: 1.6rem 1.75rem;
    text-align: left;
}

.tldr-card .tldr-kicker {
    color: var(--accent);
    font-size: .85rem;
    font-weight: 700;
    margin: 0 0 .5rem;
}

.tldr-card .tldr-lead {
    margin: 0 0 .9rem;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.tldr-card ul {
    list-style: none;
    display: grid;
    gap: .55rem;
    margin: 0;
    padding: 0;
}

.tldr-card li {
    position: relative;
    padding-left: 1.7rem;
    color: var(--text-secondary);
    font-size: .95rem;
    line-height: 1.5;
}

.tldr-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-weight: 700;
}

/* ---------- section scaffolding ---------- */
.seo-section { padding: 4rem 0; }

.seo-section.alt {
    background: var(--surface-1);
    border-top: 1px solid rgba(255, 255, 255, .05);
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.seo-section-head {
    text-align: center;
    max-width: 730px;
    margin: 0 auto 2.5rem;
    padding: 0 2rem;
}

.seo-section-head h2 {
    font-size: clamp(1.6rem, 3.2vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.15;
    margin: 0 0 .6rem;
}

.seo-section-head p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1rem;
}

/* ---------- benefit cards (match pricing .benefit-grid) ---------- */
.benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.benefit-grid article {
    padding: 1.75rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
}

.benefit-grid h3 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 .5rem;
}

.benefit-grid p {
    margin: 0;
    color: var(--text-secondary);
    font-size: .92rem;
    line-height: 1.55;
}

/* ---------- comparison table ---------- */
.compare-table-scroll { overflow-x: auto; }

.compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-width: 560px;
}

.compare-table th,
.compare-table td {
    padding: .95rem 1.2rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    vertical-align: top;
}

.compare-table tr:last-child th,
.compare-table tr:last-child td { border-bottom: none; }

.compare-table thead th {
    background: var(--surface-2);
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.compare-table thead th.snapgpt-col {
    background: rgba(255, 74, 54, .12);
    color: var(--text-primary);
}

.compare-table .feature-name {
    font-weight: 600;
    font-size: .95rem;
    color: var(--text-primary);
}

.compare-table .feature-desc {
    display: block;
    font-weight: 400;
    color: var(--text-dim);
    font-size: .82rem;
    line-height: 1.45;
    margin-top: .15rem;
}

.compare-table td {
    color: var(--text-secondary);
    font-size: .95rem;
}

.compare-table td.yes {
    color: var(--text-primary);
    font-weight: 600;
}

.compare-table td.yes::before {
    content: '✓ ';
    color: var(--accent);
    font-weight: 700;
}

.compare-table td.no { color: var(--text-dim); }
.compare-table td.hl { color: var(--text-primary); font-weight: 600; }

/* ---------- checklist table (LMS question types) ---------- */
.check-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.check-table th,
.check-table td {
    padding: .85rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    text-align: left;
}

.check-table tr:last-child th,
.check-table tr:last-child td { border-bottom: none; }

.check-table thead th {
    background: var(--surface-2);
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.check-table td:last-child {
    text-align: right;
    color: var(--accent);
    font-weight: 700;
}

.check-table .qualifier {
    color: var(--text-dim);
    font-size: .83rem;
    display: block;
    font-weight: 400;
}

/* ---------- prose sections ---------- */
.seo-prose h2 {
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.15;
    margin: 0 0 1rem;
}

.seo-prose h3 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 1.9rem 0 .6rem;
}

.seo-prose p {
    color: var(--text-secondary);
    margin: 0 0 1rem;
    line-height: 1.7;
}

.seo-prose a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }
.seo-prose a:hover { color: var(--accent); }
.seo-prose strong { color: var(--text-primary); }

/* ---------- how-to steps ---------- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.steps-grid article {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}

.steps-grid .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: .8rem;
}

.steps-grid h3 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 .45rem;
}

.steps-grid p {
    margin: 0;
    color: var(--text-secondary);
    font-size: .92rem;
    line-height: 1.55;
}

/* ---------- choose columns (match pricing plan cards) ---------- */
.choose-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.choose-grid article {
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
}

.choose-grid article.snapgpt-side {
    border-color: rgba(255, 74, 54, .45);
    background: rgba(255, 74, 54, .05);
}

.choose-grid h3 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 .9rem;
}

.choose-grid ul {
    list-style: none;
    display: grid;
    gap: .6rem;
    margin: 0;
    padding: 0;
}

.choose-grid li {
    position: relative;
    padding-left: 1.7rem;
    color: var(--text-secondary);
    font-size: .93rem;
    line-height: 1.5;
}

.choose-grid li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-weight: 700;
}

.choose-grid article:not(.snapgpt-side) li::before { color: var(--text-dim); }

/* ---------- pricing mini-cards (match pricing plan cards) ---------- */
.price-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.price-cards article {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
}

.price-cards article.plus {
    border-color: rgba(255, 74, 54, .45);
    background: rgba(255, 74, 54, .05);
}

.price-cards .plan-name {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 .2rem;
}

.price-cards .plan-price {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -.04em;
    margin: 0 0 .6rem;
}

.price-cards .plan-price small {
    font-size: .85rem;
    font-weight: 500;
    letter-spacing: -.01em;
    color: var(--text-dim);
}

.price-cards p {
    color: var(--text-secondary);
    font-size: .92rem;
    line-height: 1.55;
    margin: 0;
}

/* ---------- FAQ ---------- */
.seo-faq { max-width: 760px; margin: 0 auto; }

.seo-faq details {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    margin-bottom: .7rem;
    overflow: hidden;
}

.seo-faq summary {
    cursor: pointer;
    list-style: none;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: .98rem;
    position: relative;
    padding-right: 2.6rem;
}

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

.seo-faq summary::after {
    content: '+';
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 1.2rem;
    font-weight: 400;
}

.seo-faq details[open] summary::after { content: '–'; }

.seo-faq details p {
    margin: 0;
    padding: 0 1.25rem 1.1rem;
    color: var(--text-secondary);
    font-size: .94rem;
    line-height: 1.6;
}

.seo-faq details a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }
.seo-faq details a:hover { color: var(--accent); }

/* ---------- cross-link cards ---------- */
.crosslink-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

/* Three up, and a short last row centres instead of hanging left. */
.crosslink-grid > * {
    flex: 0 1 calc((100% - 3rem) / 3);
    min-width: 15rem;
}

.crosslink-grid a {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color .2s ease, background .2s ease;
}

.crosslink-grid a:hover {
    border-color: var(--card-border-hover);
    background: var(--surface-2);
}

.crosslink-grid .cl-title {
    font-weight: 700;
    font-size: .98rem;
    letter-spacing: -.02em;
    margin: 0 0 .3rem;
}

.crosslink-grid .cl-sub {
    color: var(--text-secondary);
    font-size: .86rem;
    line-height: 1.5;
    margin: 0;
}

/* ---------- hub page card list ---------- */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* When the card grid directly follows the hero (/solver/, /vs/), pull it up
   to the same 2rem visual gap the subject pages have between the hero and
   the solver widget (hero 1rem + widget margin 1rem). */
.seo-page .seo-hero:has(+ .seo-section > .wrap > .hub-grid) {
    padding-bottom: 1rem;
}

.seo-hero + .seo-section:has(> .wrap > .hub-grid) {
    padding-top: 1rem;
}

.hub-grid a {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color .2s ease, background .2s ease;
}

.hub-grid a:hover {
    border-color: var(--card-border-hover);
    background: var(--surface-2);
}

/* /lms/ cards sit under a section h2 so they use h3; /vs/index.html has no
   section head and keeps h2. Style both. */
.hub-grid h2,
.hub-grid h3 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 .4rem;
}

.hub-grid p {
    color: var(--text-secondary);
    font-size: .92rem;
    line-height: 1.55;
    margin: 0;
}

/* ---------- final CTA band ---------- */
.seo-cta-band {
    text-align: center;
    padding: 5.5rem 2rem;
}

.seo-cta-band h2 {
    font-size: clamp(1.7rem, 3.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.15;
    margin: 0 0 .7rem;
}

.seo-cta-band p {
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
}

/* ---------- heading gradient (the one sanctioned gradient: a subtle
   white -> soft-coral fade that ties headings to the accent) ---------- */
.seo-hero h1,
.seo-section-head h2,
.seo-prose h2,
.seo-cta-band h2 {
    display: inline-block;
    background: linear-gradient(90deg, #ffffff 30%, #ffb3a6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .benefit-grid { grid-template-columns: repeat(2, 1fr); }
    .crosslink-grid > * { flex-basis: calc((100% - 1.5rem) / 2); }

    /* Stack the hero as headline -> demo clip -> CTAs, so the clip is still
       inside the first screen on a phone instead of being pushed under the
       buttons. `display: contents` promotes the two copy blocks to flex items
       of .lms-hero-stack so they can be ordered around the <figure>. */
    .lms-hero {
        min-height: 0;
        padding: calc(var(--header-height) + 1rem) 1.25rem 2.5rem;
    }

    .lms-hero-stack {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .lms-hero-copy { display: contents; }
    .lms-hero-lede { order: 1; }
    /* flex-basis is the *height* now the stack is a column — reset it so the
       figure keeps its intrinsic aspect instead of absorbing free space. */
    .lms-hero-media { order: 2; flex: 0 0 auto; max-width: 640px; width: 100%; }
    .lms-hero-actions { order: 3; margin-top: 0; }

    .lms-hero-lede,
    .lms-hero-actions { text-align: center; }

    .lms-hero h1 { max-width: 18ch; margin-left: auto; margin-right: auto; }
    .lms-hero .hero-sub { max-width: 40rem; margin-left: auto; margin-right: auto; }
    .lms-hero .seo-ctas { justify-content: center; }
    .lms-hero-stats { max-width: 32rem; margin-left: auto; margin-right: auto; }
}

@media (max-width: 640px) {
    .lms-hero { padding: calc(var(--header-height) + .75rem) 1rem 2.25rem; }
    .lms-hero-top { margin-bottom: 1.5rem; }
    .lms-hero-top .hero-updated { display: none; }
    .lms-hero h1 { font-size: clamp(1.95rem, 8.5vw, 2.5rem); }
    .lms-hero .hero-sub { font-size: 1rem; }
    .lms-hero-actions { width: 100%; }
    .lms-hero .seo-ctas { width: 100%; flex-direction: column; }
    .lms-hero .seo-ctas > a { width: 100%; }
    .lms-hero-stats li { padding: 0 .5rem; }
    .lms-hero-stats .stat-figure { font-size: 1.5rem; }
    .lms-hero-stats .stat-label { font-size: .76rem; }
}

/* ---------- Phone CTAs ----------
   The extension is desktop-only, so a phone visitor has nothing to do with
   "Add to Chrome". Pages opt in by pairing a .seo-ctas-desktop block with a
   .seo-ctas-phone block (iPhone app on TestFlight, web app, one-line pointer
   back to the extension). Pages without the phone block are unchanged. The
   platform classes come from each page's inline <head> sniff: html.is-ios /
   html.is-android. The 768px switch matches the homepage's iOS-first hero. */
.seo-ctas-phone { display: none; }

.seo-ctas-phone .seo-cta-ios,
.seo-ctas-phone .seo-cta-web { gap: .55rem; }

.seo-ctas-phone .seo-cta-ios svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.seo-ctas-phone .seo-cta-tag {
    padding: .14rem .5rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .18);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.seo-ctas-phone-note {
    width: 100%;
    margin: .35rem 0 0;
    font-size: .86rem;
    line-height: 1.5;
    color: var(--text-dim);
    text-align: center;
}

.seo-ctas-phone-note a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.seo-ctas-phone-note a:hover { color: var(--text-primary); }

/* The swap keys off the detected platform first (iPads in portrait and phones
   in landscape are wider than 768px but still cannot install the extension),
   and off viewport width as the no-JS / unknown-UA fallback. */
html.is-ios .seo-ctas-desktop,
html.is-android .seo-ctas-desktop { display: none; }

html.is-ios .seo-ctas-phone,
html.is-android .seo-ctas-phone { display: flex; }

/* TestFlight is iPhone-only: Android devices lead with the web app. */
html.is-android .seo-ctas-phone .seo-cta-ios { display: none; }

html.is-android .seo-ctas-phone .seo-cta-web {
    border-color: transparent;
    color: #fff;
    background: var(--accent);
}

html.is-android .seo-ctas-phone .seo-cta-web:hover { background: var(--accent-hover); }

@media (max-width: 768px) {
    .seo-ctas-desktop { display: none; }

    .seo-ctas-phone {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 26rem;
        margin-left: auto;
        margin-right: auto;
    }

    .seo-ctas-phone > a { width: 100%; }
}

@media (max-width: 640px) {
    .benefit-grid,
    .steps-grid,
    .choose-grid,
    .price-cards,
    .hub-grid { grid-template-columns: 1fr; }

    .crosslink-grid > * { flex-basis: 100%; }

    .seo-page .wrap,
    .seo-page .wrap-narrow { padding: 0 1rem; }

    .seo-section { padding: 3rem 0; }
    .seo-page .seo-hero { padding: 2rem 1rem 1.75rem; }
    .seo-hero h1 { font-size: 2rem; }
    .seo-hero .hero-sub { font-size: 1rem; }
    .seo-hero-media { margin-top: 1.75rem; }
    .seo-cta-band { padding: 3.5rem 1rem; }
    .tldr-card { padding: 1.25rem 1.25rem; margin: 1rem 0 2rem; }
}

@media (prefers-reduced-motion: reduce) {
    .seo-page *,
    .seo-page *::before,
    .seo-page *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* ---------- /solver/ family: interactive solver widget ----------
   Photo upload is the primary input; typed text is secondary. Same
   contract as the rest of this file: flat dark surfaces, solid #ff4a36
   accent, no gradients, no uppercase. */
.solver-widget {
    position: relative; /* anchors the floating New-question button */
    max-width: 880px;
    margin: 1rem auto 0;
    padding: 0 2rem;
}

/* Install CTA under the solver hero (same buttons as the /lms/ hero). Kept
   compact so the widget still starts near the top of the screen. */
.seo-hero .seo-ctas.seo-ctas-solver {
    margin-top: 1.25rem;
}

.seo-hero .hero-cta-note {
    margin: .75rem auto 0;
    max-width: 620px;
    font-size: .85rem;
    color: var(--text-secondary);
}

/* The tool should sit right under the headline, not a screen away from it.
   :has() tightens the hero itself; without it the smaller widget margin
   above still closes most of the gap. */
.seo-page .seo-hero:has(+ .solver-widget) {
    padding-bottom: 1rem;
}

.solver-form {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.solver-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

/* --- photo dropzone (primary input) --- */
.solver-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 190px;
    padding: 1.25rem 1rem;
    text-align: center;
    background: var(--background);
    border: 1px dashed var(--card-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.solver-dropzone:hover,
.solver-dropzone.dragging {
    border-color: var(--accent);
    border-style: solid;
}

.solver-dropzone .dz-icon {
    width: 30px;
    height: 30px;
    color: var(--accent);
    margin-bottom: .15rem;
}

.solver-dropzone .dz-title {
    font-size: .97rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
}

.solver-dropzone .dz-sub {
    font-size: .82rem;
    color: var(--text-dim);
    line-height: 1.4;
}

.solver-dropzone.has-image .dz-icon,
.solver-dropzone.has-image .dz-title,
.solver-dropzone.has-image .dz-sub { display: none; }

/* [hidden] must win over the block display below. */
.dz-preview[hidden] { display: none; }

/* The uploaded image fills the whole dropzone; only the X in the corner
   sits on top of it. Clicking the covered dropzone (a <label>) still
   reopens the picker to swap the photo. */
.dz-preview {
    display: block;
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    animation: solver-pop .3s cubic-bezier(.34, 1.4, .64, 1) both;
}

.dz-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dz-remove {
    position: absolute;
    top: .5rem;
    right: .5rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(0, 0, 0, .6);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background .15s, transform .15s;
}

.dz-remove:hover { background: var(--accent); transform: scale(1.1); }
.dz-remove:active { transform: scale(.95); }

.dz-remove svg {
    width: 14px;
    height: 14px;
}

/* --- typed question (secondary input) --- */
.solver-text-side { display: flex; }

.solver-widget textarea {
    width: 100%;
    min-height: 190px;
    resize: vertical;
    background: var(--background);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font: inherit;
    font-size: .98rem;
    line-height: 1.55;
    padding: .85rem 1rem;
}

.solver-widget textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.solver-submit {
    display: block;
    width: 100%;
    margin-top: .85rem;
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: var(--radius-sm);
    font: inherit;
    font-weight: 600;
    font-size: 1rem;
    padding: .85rem 1.5rem;
    cursor: pointer;
    transition: background .15s, transform .15s;
}

.solver-submit:hover { background: var(--accent-hover); transform: translateY(-1px); }
.solver-submit:active { transform: scale(.99); }
.solver-submit:disabled { opacity: .6; cursor: default; transform: none; }

.solver-widget-note {
    font-size: .8rem;
    color: var(--text-dim);
    margin: .7rem 0 0;
    text-align: center;
}

/* --- example problems that prefill the box --- */
.solver-examples {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-top: .9rem;
}

.solver-example-card {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    text-align: left;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: .9rem 1rem;
    font: inherit;
    cursor: pointer;
    transition: border-color .15s, transform .15s;
}

.solver-example-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.solver-example-card:active { transform: translateY(0) scale(.99); }

.solver-example-card .ex-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.solver-example-card .ex-label span { color: var(--text-dim); font-weight: 400; }

.solver-example-card .ex-problem {
    font-size: .82rem;
    color: var(--text-secondary);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- state-change motion: things pop in, they don't just appear ---
   solver-pop gives containers a springy entrance (slight overshoot);
   solver-rise fades content blocks up with a small stagger. JS re-adds
   .is-pop on every result change so the pop replays between states. */
@keyframes solver-pop {
    0%   { opacity: 0; transform: translateY(10px) scale(.97); }
    65%  { opacity: 1; transform: translateY(-2px) scale(1.005); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes solver-rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Loading state: the extension's ScreenSnap mark doing its ScreenSnap
   loading dance — the viewfinder frame winds around the fixed red dot
   while the dot pulses (timings and easing lifted verbatim from
   extensions/chrome/css/button.css; keep them in sync). Two staggered
   accent rings ping outward sonar-style, and a shimmer sweeps across the
   status text. The text gradient is the one exception to the no-gradients
   rule: it's the shimmer mechanism (background-clip: text), not surface
   decoration, and it reads as solid secondary text when reduced-motion
   freezes it. */
@keyframes solver-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

@keyframes solver-frame-wind {
    to { transform: rotate(360deg); }
}

@keyframes solver-dot-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(.6); opacity: .55; }
}

@keyframes solver-ping {
    0%       { transform: scale(.45); opacity: .7; }
    85%, 100% { transform: scale(1.5); opacity: 0; }
}

/* Exit: the reverse of solver-pop, played via .is-out before JS hides
   the element (duration must match CLEAR_MS in js/solver-widget.js). */
@keyframes solver-pop-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(8px) scale(.96); }
}

.solver-result.is-out,
.solver-new-question.is-out {
    animation: solver-pop-out .24s ease-in both;
}

/* The result sits above the form now — answer first, inputs second. */
.solver-result {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1rem;
}

.solver-result.is-pop {
    animation: solver-pop .4s cubic-bezier(.34, 1.4, .64, 1) both;
}

.solver-result.is-pop > * {
    animation: solver-rise .45s ease-out both;
}

.solver-result.is-pop > *:nth-child(2) { animation-delay: .07s; }
.solver-result.is-pop > *:nth-child(3) { animation-delay: .14s; }
.solver-result.is-pop > *:nth-child(4) { animation-delay: .21s; }
.solver-result.is-pop > *:nth-child(n+5) { animation-delay: .28s; }

/* Floats on the result card's top-right edge, straddling the border like
   a tab — out of the reading flow and costing no vertical space. The
   solid page background masks the card border behind it. Positioned with
   top (not transform): the pop animations own the transform property. */
.solver-new-question {
    position: absolute;
    top: -16px;
    right: 3rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin: 0;
    background: var(--background);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    color: var(--text-secondary);
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1;
    padding: .5rem 1rem;
    cursor: pointer;
    transition: border-color .15s, color .15s, transform .15s;
    animation: solver-pop .35s cubic-bezier(.34, 1.4, .64, 1) both;
}

.solver-new-question svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.solver-new-question:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.solver-new-question:active { transform: scale(.97); }
.solver-new-question[hidden] { display: none; }

.solver-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .8rem;
    color: var(--text-secondary);
    text-align: center;
    padding: .75rem 0;
}

.solver-loading-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
}

.solver-loading-mark svg {
    width: 36px;
    height: 36px;
    color: var(--text-primary);
}

.solver-loading-mark .snap-frame {
    transform-box: view-box;
    transform-origin: 50% 50%;
    animation: solver-frame-wind 1.2s cubic-bezier(.6, .15, .4, .85) infinite;
}

.solver-loading-mark .snap-dot {
    fill: var(--accent);
    transform-box: view-box;
    transform-origin: 50% 50%;
    animation: solver-dot-pulse 1.2s ease-in-out infinite;
}

/* The two rings ping on alternate half-beats of the frame's wind, so
   something is always in motion. Base opacity 0 keeps them invisible
   when reduced-motion strips the animation. */
.solver-loading-mark::before,
.solver-loading-mark::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: solver-ping 1.2s cubic-bezier(0, 0, .2, 1) infinite;
}

.solver-loading-mark::after { animation-delay: .6s; }

.solver-loading-text {
    background: linear-gradient(90deg,
        var(--text-secondary) 40%, var(--text-primary) 50%, var(--text-secondary) 60%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: solver-shimmer 1.8s linear infinite;
}

.solver-answer {
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.solver-answer-label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: .35rem;
}

.solver-answer-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.solver-options {
    list-style: none;
    padding: 0;
    margin: 0 0 1.1rem;
    display: grid;
    gap: .4rem;
}

.solver-options li {
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: .5rem .8rem;
    font-size: .92rem;
    color: var(--text-secondary);
}

.solver-options li.correct {
    border-color: var(--accent);
    color: var(--text-primary);
}

.solver-options .opt-label { font-weight: 600; margin-right: .35rem; }

.solver-steps {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: .9rem;
}

/* Direct child only: the step title. Bold text nested in the markdown
   detail must stay inline. */
.solver-steps > li > strong { display: block; color: var(--text-primary); margin-bottom: .15rem; }
.solver-steps li .step-detail { color: var(--text-secondary); font-size: .93rem; }

.solver-explanation { color: var(--text-secondary); font-size: .95rem; }

/* Markdown blocks emitted by js/solver-widget.js md() */
.solver-result .md-p { margin: 0 0 .55rem; }
.solver-result .md-p:last-child { margin-bottom: 0; }

.solver-result .md-h {
    margin: .8rem 0 .35rem;
    font-weight: 700;
    color: var(--text-primary);
}

.solver-result .md-h:first-child { margin-top: 0; }

.solver-result .md-list {
    margin: 0 0 .55rem;
    padding-left: 1.25rem;
    display: grid;
    gap: .3rem;
}

/* KaTeX output: long display equations scroll instead of overflowing */
.solver-result .katex-display {
    margin: .5rem 0;
    padding: .15rem 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.solver-divider {
    border: 0;
    border-top: 1px solid var(--card-border);
    margin: 1.25rem 0;
}

.solver-result-note {
    margin: 1.5rem 0 0;
    padding-top: 1.1rem;
    border-top: 1px solid var(--card-border);
    font-size: .83rem;
    color: var(--text-dim);
}

.solver-result-note a { color: var(--text-secondary); }

.solver-error { color: var(--text-secondary); text-align: center; padding: .25rem 0; }

/* --- upsell panel: title / body / buttons / fine print, evenly spaced.
   The child rules carry two class names so the generic `> p` margins
   can't silently win on specificity (they used to zero the note's
   top margin, gluing it to the buttons). --- */
.solver-upsell { text-align: center; padding: 1rem 0 .75rem; }

/* Every child of the panel that carries a max-width must center itself
   with auto side margins — the generic `> p` cap below also applies to
   the title and note, and a 0 left margin pins the capped box left of
   center (the text inside then centers off-axis). */
.solver-upsell .solver-upsell-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 auto .55rem;
}

.solver-upsell > p {
    color: var(--text-secondary);
    max-width: 52ch;
    margin: 0 auto;
}

.solver-upsell .seo-ctas { margin-top: 1.5rem; }

.solver-result .seo-cta-primary,
.solver-result .seo-cta-secondary {
    transition: background .2s ease, border-color .2s ease, transform .15s;
}

.solver-result .seo-cta-primary:hover,
.solver-result .seo-cta-secondary:hover { transform: translateY(-1px); }

.solver-upsell .solver-upsell-note {
    font-size: .8rem;
    color: var(--text-dim);
    margin: 1.4rem auto 0;
}

.solver-upsell .solver-upsell-note a { color: var(--text-secondary); }

/* Worked methods section */
.worked-examples-grid {
    display: grid;
    gap: 1rem;
}

@media (max-width: 720px) {
    .solver-input-row { grid-template-columns: 1fr; }
    .solver-dropzone { min-height: 150px; }
    .solver-widget textarea { min-height: 110px; }
    .solver-examples { grid-template-columns: 1fr; }
    .solver-example-card .ex-problem { -webkit-line-clamp: 2; }
}

@media (max-width: 640px) {
    .solver-widget { padding: 0 1rem; }
    .solver-result { padding: 1.25rem; }
    .solver-new-question { right: 1.9rem; }
    /* Stack the gate's buttons at one width; a long label otherwise fills
       the row edge to edge while the short one sits inset. */
    .solver-upsell .seo-ctas { flex-direction: column; }
    .solver-upsell .seo-ctas > a { width: 100%; padding: .7rem 1.25rem; }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.solver-intro {
    padding: 2.25rem 0 0;
}

.solver-intro p {
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.7;
    text-align: center;
    margin: 0;
}

.worked-method {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.worked-method h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 .5rem;
    color: var(--text-primary);
}

.worked-method > p {
    color: var(--text-secondary);
    font-size: .93rem;
    margin: 0 0 .9rem;
}

.we-lines {
    background: var(--background);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: .9rem 1.1rem;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: .88rem;
    line-height: 1.8;
    color: var(--text-primary);
    overflow-x: auto;
}

.we-check {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-secondary);
    font-size: .93rem;
    display: grid;
    gap: .4rem;
}

/* ---------- "how it works" demo clip (Oct 2026 college batch) ----------
   One of the extension's own clips under the steps grid, lazy-loaded by
   js/reduced-motion-video.js (video[data-lazy-autoplay]); see
   tools/seo-pages/build.py demo_figure(). The clip gets the hero's card
   styling; the caption sits below it, clear of the pause/play toggle. */
.lms-demo {
    max-width: 760px;
    margin: 2.5rem auto 0;
}

.lms-demo-media {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--card-border);
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .85);
    background: var(--surface-1);
}

.lms-demo video {
    display: block;
    width: 100%;
    height: auto;
}

.lms-demo figcaption {
    margin: .85rem auto 0;
    max-width: 44rem;
    text-align: center;
    font-size: .9rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* ---------- calculus hub + spokes (Nov 2026) ----------
   The topic block sits right under the widget: plain crawlable links whose
   anchor text is the phrase the target ranks for, the one-line description
   outside the link, and a stretched ::after so the whole card is the click
   target. Same flat card surface as the example cards above it. */
.solver-topics {
    margin-top: 2rem;
}

.solver-topics h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 .75rem;
    color: var(--text-primary);
    text-align: center;
}

.solver-topics ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.solver-topics li {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: .85rem 1rem;
    transition: border-color .15s;
}

.solver-topics li:hover { border-color: var(--accent); }

.solver-topics a {
    font-size: .92rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.solver-topics a::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.solver-topics a:focus-visible { outline: none; }
.solver-topics li:has(a:focus-visible) { border-color: var(--accent); }

.solver-topics span {
    font-size: .82rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

/* The phone CTA block in the solver hero: as compact as the desktop pair it
   replaces, so the widget still starts near the top of a phone screen. */
.seo-hero .seo-ctas.seo-ctas-phone { margin-top: 1.25rem; }

/* The phone hero's "solve it free below" button jumps to #solve-it; keep the
   widget clear of the fixed site header when it lands. */
.solver-widget { scroll-margin-top: 5.5rem; }

/* Seven example cards (the calculus hub): the last one takes the full row
   instead of sitting alone in the first column. */
.solver-examples > .solver-example-card:last-child:nth-child(3n+1) { grid-column: 1 / -1; }

/* Reference tables (derivative rules, integration techniques, limit forms). */
.ref-table {
    width: 100%;
    min-width: 34rem;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-size: .92rem;
}

.ref-table th,
.ref-table td {
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    text-align: left;
    vertical-align: top;
    line-height: 1.5;
}

.ref-table tr:last-child th,
.ref-table tr:last-child td { border-bottom: none; }

.ref-table thead th {
    background: var(--surface-2);
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.ref-table tbody th {
    font-weight: 600;
    color: var(--text-primary);
}

.ref-table td { color: var(--text-secondary); }

.ref-table .ref-mono {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: .86rem;
    color: var(--text-primary);
}

@media (max-width: 720px) {
    .solver-topics ul { grid-template-columns: 1fr; }
}
