/* Blog (/news/ articles + index), redesign 2026-11-01. Loaded after home.css and
   built on its tokens, so it matches the landing page and follows dark mode.
   home.css is untouched: the running landing test does not see this file. */

/* ---------- Store badges ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stores a { display: block; border-radius: 8px; transition: transform .15s ease; }
.stores a:hover { transform: translateY(-1px); }
.stores img { height: 40px; width: auto; }
.article-cta .stores img { height: 44px; }

/* ---------- Top call to action ---------- */
.try-top {
    display: grid; gap: 14px; margin: 28px 0; padding: 18px 16px;
    background: var(--bg-tint); border: 1px solid var(--line); border-radius: 20px;
}
.article-content .try-top p, .try-top p {
    margin: 0; font-size: 1rem; line-height: 1.5; font-weight: 600; color: var(--text);
}
@media (min-width: 640px) {
    .try-top { grid-template-columns: 1fr auto; align-items: center; padding: 18px 20px; }
}

/* ---------- Article ---------- */
.article { max-width: 960px; margin: 0 auto; padding: 40px 24px 0; }
.article-header, .article-content { max-width: 720px; margin-inline: auto; }
.article-header { margin-bottom: 28px; }
.article-back { display: inline-block; margin-bottom: 18px; font-size: .92rem; font-weight: 600; color: var(--text-3); }
.article-back:hover { color: var(--accent-text); }
.article-header h1 {
    font-size: clamp(2rem, 6vw, 3.1rem); line-height: 1.1; font-weight: 900;
    letter-spacing: -.025em; color: var(--text);
}
.article-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 16px;
    font-size: .875rem; font-weight: 500; color: var(--text-3);
}
.article-topic { font-weight: 700; color: var(--accent-text); }
.article-hero {
    width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
    margin-bottom: 36px; background: var(--surface-2);
    border: 1px solid var(--line); border-radius: 24px;
}

.article-content { font-size: 1.125rem; line-height: 1.75; color: var(--text-2); overflow-wrap: break-word; }
.article-content p { margin-bottom: 1.35em; }
.article-content .article-lead { font-size: 1.25rem; line-height: 1.65; color: var(--text); }
.article-content h2 {
    margin: 2.2em 0 .7em; font-size: clamp(1.45rem, 4vw, 1.8rem); line-height: 1.2;
    font-weight: 700; letter-spacing: -.015em; color: var(--text);
}
.article-content h3 { margin: 1.7em 0 .55em; font-size: 1.25rem; line-height: 1.3; font-weight: 700; color: var(--text); }
.article-content strong { color: var(--text); }
.article-content a:not(.btn):not(.stores a) {
    color: var(--accent-text); text-decoration: underline;
    text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.article-content ul, .article-content ol { margin: 0 0 1.35em; padding-left: 1.4em; }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: .55em; }
.article-content li::marker { color: var(--accent-text); }

.article-content pre {
    overflow-x: auto; margin: 0 0 1.35em; padding: 14px 18px; font-size: .875rem; line-height: 1.6;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
}
.article-content code {
    font-family: 'SF Mono', 'Fira Code', Menlo, monospace; font-size: .9em;
    padding: 2px 6px; background: var(--surface-2); border-radius: 6px; color: var(--text);
}
.article-content pre code { padding: 0; background: none; font-size: inherit; }

.article-figure { margin: 1.5rem 0; text-align: center; }
.article-figure img {
    display: inline-block; max-width: min(100%, 380px); height: auto;
    border: 1px solid var(--line); border-radius: 16px;
}

.article-content .table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: 14px; }
.article-content table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; }
.article-content th, .article-content td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.article-content th { background: var(--bg-tint); font-weight: 700; color: var(--text); }
.article-content tbody td:first-child { font-weight: 700; color: var(--text); }
.article-content tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) { .article-content table { min-width: 520px; font-size: .875rem; } }

/* ---------- Closing call to action (same in light and dark) ---------- */
.article-cta {
    margin: 48px 0 8px; padding: 36px 24px; text-align: center; color: #fff;
    background: linear-gradient(160deg, #1257C4 0%, #0B2E6B 100%); border-radius: 24px;
}
.article-content .article-cta h3 { margin: 0 auto 10px; max-width: 520px; font-size: clamp(1.4rem, 5vw, 1.8rem); line-height: 1.2; color: #fff; }
.article-content .article-cta p { margin: 0 auto 20px; max-width: 520px; font-size: 1.0625rem; line-height: 1.55; color: #DCE8FB; }
.article-content .article-cta strong { color: #fff; }
.article-cta .stores { justify-content: center; }
.article-cta-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.article-cta .btn { white-space: normal; text-align: center; min-height: 44px; font-size: .9375rem; text-decoration: none !important; }
.article-cta .btn-primary, .article-cta .btn-dark { background: #fff; color: #0B2E6B !important; border-color: transparent; box-shadow: none; }
.article-cta .article-cta-buttons .btn-dark { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, .55); }

/* ---------- Sticky bar on phones: mobile is where the clickers are ---------- */
.article-sticky-cta { display: none; }
@media (max-width: 768px) {
    .article-sticky-cta {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
        gap: 12px; align-items: center; justify-content: space-between;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        font-size: .875rem; font-weight: 500; color: var(--text);
        background: var(--surface); border-top: 1px solid var(--line);
        box-shadow: 0 -6px 20px -10px rgba(11, 21, 48, .3);
    }
    .article-sticky-cta span { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
    .article-sticky-cta .btn {
        flex: 0 0 auto;
        width: auto;
        white-space: nowrap;
        min-height: 42px; padding: .55rem 1rem; font-size: .875rem;
    }
    body:has(.article-sticky-cta) { padding-bottom: 72px; }
}

/* ---------- Related ---------- */
.related { max-width: 1200px; margin: 0 auto; padding: 64px 24px 80px; }
.related h2 { margin-bottom: 28px; text-align: center; font-size: clamp(1.6rem, 5vw, 2.2rem); font-weight: 900; letter-spacing: -.02em; }
.related-grid { display: grid; gap: 20px; }
@media (min-width: 720px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Index ---------- */
.news-page { max-width: 1200px; margin: 0 auto; padding: 48px 24px 88px; }
.news-hero { max-width: 760px; margin-bottom: 36px; }
.news-hero h1 { margin: 14px 0 12px; font-size: clamp(2.3rem, 8vw, 4rem); line-height: 1.05; font-weight: 900; letter-spacing: -.03em; }
.news-hero > p { font-size: 1.125rem; color: var(--text-2); }
.news-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.news-filters[hidden] { display: none; }
.news-filters button {
    min-height: 42px; padding: 8px 16px; font: inherit; font-size: .9rem; font-weight: 700;
    color: var(--text); cursor: pointer; background: var(--surface);
    border: 1px solid var(--line); border-radius: 999px;
}
.news-filters button[aria-pressed="true"] { color: #fff; background: var(--blue-600); border-color: var(--blue-600); }
.news-list { display: grid; gap: 20px; }
@media (min-width: 640px) { .news-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .news-list { grid-template-columns: repeat(3, 1fr); } }
.news-item {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
    box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s ease;
}
.news-item[hidden] { display: none; }
.news-item:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.news-item img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.news-item-content { display: flex; flex: 1; flex-direction: column; padding: 18px 20px 22px; }
.news-item-content .article-meta { margin: 0 0 8px; font-size: .8rem; gap: 2px 10px; }
.news-item-content h2 { margin-bottom: 8px; font-size: 1.15rem; line-height: 1.3; font-weight: 700; }
.news-item-content > p:not(.article-meta) {
    flex: 1; margin-bottom: 14px; font-size: .9375rem; line-height: 1.5; color: var(--text-2);
    display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-read-more { font-size: .875rem; font-weight: 700; color: var(--accent-text); }
@media (min-width: 900px) {
    .news-lead { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
    .news-lead img { flex: 1.35 1 0; width: 0; aspect-ratio: 16 / 9; }
    .news-lead .news-item-content { flex: 1 1 0; justify-content: center; padding: 36px; }
    .news-lead .news-item-content > p:not(.article-meta) { flex: 0 1 auto; font-size: 1.0625rem; }
    .news-lead h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.15; font-weight: 900; letter-spacing: -.02em; }
}

/* Below 1080px the nav links are hidden, so push the actions to the right edge.
   home.css has the same gap on the homepage; left alone during the landing test. */
@media (max-width: 1080px) { .nav-links + .nav-actions { margin-left: auto; } }
