/* Shared styles for articles.html (index) and every /articles/*.html post.
   Centralizing here means a fix (like link-btn color contrast) lands everywhere at once. */

.page-hero {
    max-width: 52rem;
    margin: 0 auto;
    padding: 3.5rem 1.25rem 2.5rem;
    text-align: center;
}
.page-title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ds-ink);
    margin: 0 0 1rem;
    line-height: 1.18;
}
.page-desc {
    max-width: 38rem;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--ds-muted);
}

/* Articles index grid */
.articles-page-container {
    max-width: 56rem;
    margin: 0 auto 5rem;
    padding: 0 1.25rem;
}
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 1.35rem;
}
.article-card {
    background: var(--ds-surface);
    border: 1px solid var(--ds-line);
    border-radius: 1.1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    text-align: start;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.2s ease,
                box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.article-card:hover {
    border-color: var(--ds-primary);
    transform: translateY(-3px);
    box-shadow: 0 14px 30px -10px rgba(15, 23, 42, 0.12);
}
.article-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}
.article-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    white-space: nowrap;
}
.article-read-time {
    font-size: 0.75rem;
    color: var(--ds-muted);
}
.article-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ds-ink);
    margin: 0 0 0.5rem;
    line-height: 1.35;
}
.article-desc {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--ds-muted);
    margin: 0 0 1.25rem;
    flex-grow: 1;
}
.article-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ds-primary);
    margin-top: auto;
    transition: color 0.15s ease, gap 0.15s ease;
}
.article-action svg {
    width: 0.85rem;
    height: 0.85rem;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}
.article-card:hover .article-action { color: #1d4ed8; gap: 0.5rem; }
.article-card:hover .article-action svg { transform: translate(-2px, -2px); }
html[dir="ltr"] .article-card:hover .article-action svg { transform: translate(2px, -2px); }

/* Single article page */
.article-hero {
    max-width: 46rem;
    margin: 0 auto;
    padding: 2.25rem 1.25rem 1.5rem;
}
.article-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    color: var(--ds-muted);
    margin-bottom: 1.5rem;
}
.article-breadcrumb a {
    color: var(--ds-muted);
    text-decoration: none;
    font-weight: 600;
}
.article-breadcrumb a:hover { color: var(--ds-primary); }
.article-h1 {
    font-size: clamp(1.75rem, 4.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ds-ink);
    line-height: 1.25;
    margin: 0 0 0.9rem;
}
.article-meta {
    font-size: 0.85rem;
    color: var(--ds-muted);
}

.article-body {
    max-width: 46rem;
    margin: 0 auto 4rem;
    padding: 0 1.25rem;
}
.article-toc {
    background: var(--ds-surface);
    border: 1px solid var(--ds-line);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}
.article-toc h2 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--ds-ink);
    margin: 0 0 0.6rem;
}
.article-toc ol {
    margin: 0;
    padding-inline-start: 1.2rem;
    display: grid;
    gap: 0.35rem;
}
.article-toc a {
    font-size: 0.875rem;
    color: var(--ds-primary);
    text-decoration: none;
    font-weight: 600;
}
.article-toc a:hover { text-decoration: underline; }

.article-prose h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ds-ink);
    margin: 2.25rem 0 0.9rem;
    letter-spacing: -0.01em;
    scroll-margin-top: 1.5rem;
}
.article-prose h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ds-ink);
    margin: 1.5rem 0 0.6rem;
}
.article-prose p {
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--ds-ink);
    margin: 0 0 1rem;
}
.article-prose ul,
.article-prose ol {
    margin: 0 0 1.1rem;
    padding-inline-start: 1.3rem;
    display: grid;
    gap: 0.5rem;
}
.article-prose li {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--ds-ink);
}
.article-prose a {
    color: var(--ds-primary);
    font-weight: 600;
}
.article-source-note {
    font-size: 0.8rem;
    color: var(--ds-muted);
    margin: -0.5rem 0 1.5rem;
}
.article-disclaimer {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.9rem;
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #78350f;
    margin: 1.75rem 0;
}
.article-callout {
    background: var(--ds-surface);
    border: 1px solid var(--ds-line);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}
.article-callout p:last-child { margin-bottom: 0; }
.article-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.25rem 0 1.75rem;
}
/* Scoped under .article-prose: it beats the higher-specificity ".article-prose a"
   color rule above (class+tag), which otherwise wins over a single-class button rule
   and makes button text invisible on the dark --primary variant. */
.article-prose .article-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.6rem 1.1rem;
    border-radius: 0.7rem;
    text-decoration: none;
    border: 1px solid var(--ds-line);
    color: var(--ds-ink);
    background: var(--ds-surface);
    transition: border-color 0.15s ease, color 0.15s ease;
}
.article-prose .article-link-btn:hover {
    border-color: var(--ds-primary);
    color: var(--ds-primary);
}
.article-prose .article-link-btn--primary {
    background: var(--ds-primary);
    border-color: var(--ds-primary);
    color: #fff;
}
.article-prose .article-link-btn--primary:hover { color: #fff; opacity: 0.92; }

.rates-table-wrap { overflow-x: auto; margin-bottom: 0.5rem; }
.rates-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    min-width: 32rem;
}
.rates-table th,
.rates-table td {
    padding: 0.65rem 0.85rem;
    text-align: start;
    border-bottom: 1px solid var(--ds-line);
}
.rates-table th {
    font-weight: 700;
    color: var(--ds-muted);
    font-size: 0.8rem;
    background: var(--ds-page);
}
.rates-table td { color: var(--ds-ink); font-weight: 600; }
.rates-table tbody tr:last-child td { border-bottom: none; }

/* CTA banner (shared by index + every article) */
.cta-banner {
    max-width: 56rem;
    margin: 0 auto 5rem;
    padding: 2.75rem 2rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, #2d3436 0%, #3f4e5e 100%);
    color: #fff;
    text-align: center;
}
.cta-banner h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}
.cta-banner p {
    font-size: 1rem;
    line-height: 1.6;
    color: #e2e8f0;
    max-width: 32rem;
    margin: 0 auto 1.75rem;
}
.cta-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.85rem 2.25rem;
    border-radius: 999px;
    background: #fff;
    color: #1e293b;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}
.cta-banner-btn:hover { background: #f8fafc; transform: translateY(-1px); }

/* Footer (shared with faq.html/features.html/tools.html/calc.html markup) */
.land-footer { padding: 2.5rem 1.25rem 3rem; text-align: center; }
.land-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 0.6rem;
}
.land-footer-links button,
.land-footer-links a {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ds-muted);
    text-decoration: none;
    cursor: pointer;
}
.land-footer-links button:hover,
.land-footer-links a:hover { color: var(--ds-primary); }
.land-footer-copy { font-size: 0.75rem; color: var(--ds-muted); opacity: 0.7; }

/* Terms/privacy modal body (shared markup with other pages) */
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.legal-body { overflow-y: auto; max-height: 60vh; }
.legal-body h4 { font-size: var(--ds-text-base); font-weight: 800; color: var(--ds-ink); margin: 1.1rem 0 0.4rem; }
.legal-body h4:first-child { margin-top: 0; }
.legal-body p { font-size: var(--ds-text-sm); line-height: 1.65; color: var(--ds-muted); }
