/* Blog pages (index and article). Same look as the legal and about pages. */
:root {
    --bg-dark: #14191F;
    --bg-light: #FFFFFF;
    --bg-soft: #F8FAFC;
    --border: #E5E7EB;
    --border-strong: #D1D5DB;
    --text: #0F1419;
    --body: #334155;
    --muted: #4B5563;
    --subtle: #F3F4F6;
    --accent: #E8590C;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg-light);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

@supports (overflow: clip) {
    body { overflow-x: clip; }
}

a { color: var(--text); text-underline-offset: 3px; }

img { max-width: 100%; height: auto; }

.blog-skip {
    position: absolute;
    left: 16px;
    top: -80px;
    z-index: 200;
    padding: 10px 16px;
    border-radius: 8px;
    background: #FFFFFF;
    color: var(--text);
    font-weight: 700;
    transition: top 0.2s ease;
}

.blog-skip:focus { top: 16px; }

.blog-container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.blog-narrow { max-width: 760px; }

/* Header */
.blog-header { border-bottom: 1px solid var(--border); }

.blog-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 76px;
    flex-wrap: wrap;
}

.blog-brand img { display: block; height: 34px; width: auto; max-width: 170px; }

.blog-nav-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.blog-nav-link { font-size: 0.84rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.blog-nav-link:hover, .blog-nav-link[aria-current="page"] { color: var(--text); }

.blog-langs {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 9999px;
}

.blog-langs a {
    padding: 4px 9px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
}

.blog-langs a[aria-current="true"] { background: var(--bg-dark); color: #FFFFFF; }

/* Breadcrumbs */
.blog-crumbs { margin: 28px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.blog-crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--border-strong); }
.blog-crumbs a { color: var(--muted); font-weight: 600; text-decoration: none; }
.blog-crumbs a:hover { color: var(--text); }

/* Index */
.blog-hero { padding: 40px 0 36px; }

.blog-kicker {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 12px;
    border-radius: 9999px;
    background: var(--subtle);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.blog-hero h1, .post-header h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4.5vw, 2.9rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
    font-weight: 900;
}

.blog-hero p { margin: 0; max-width: 680px; color: var(--muted); font-size: 1.05rem; }

.blog-list { display: grid; gap: 20px; margin: 0 0 72px; padding: 0; list-style: none; }

.blog-card {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: #FFFFFF;
    transition: border-color 0.15s ease;
}

.blog-card:hover { border-color: var(--border-strong); }

.blog-card img { display: block; width: 100%; height: 100%; aspect-ratio: 1200 / 630; object-fit: contain; background: var(--bg-dark); }

.blog-card-body { display: flex; flex-direction: column; gap: 8px; padding: 24px 26px; }
.blog-card time { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.blog-card h2 { margin: 0; font-size: 1.3rem; line-height: 1.3; letter-spacing: -0.02em; font-weight: 800; }
.blog-card h2 a { text-decoration: none; }
.blog-card h2 a::after { content: ''; position: absolute; inset: 0; }
.blog-card { position: relative; }
.blog-card p { margin: 0; color: var(--body); font-size: 0.95rem; }
.blog-card-more { margin-top: auto; padding-top: 6px; font-size: 0.85rem; font-weight: 700; }

/* Article */
.post-header { padding: 28px 0 28px; }

.post-byline { display: flex; align-items: center; gap: 12px; margin-top: 22px; font-size: 0.88rem; color: var(--muted); }
.post-byline img { width: 44px; height: 44px; border-radius: 9999px; object-fit: cover; }
.post-byline a { font-weight: 700; color: var(--text); text-decoration: none; }
.post-byline a:hover { text-decoration: underline; }
.post-byline-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; }

.post-figure { margin: 0 0 32px; }
.post-figure img { display: block; width: 100%; border-radius: 16px; border: 1px solid var(--border); aspect-ratio: 1200 / 630; object-fit: cover; }

.post-answer { margin: 0 0 24px; font-size: 1.12rem; line-height: 1.7; color: var(--text); }

.post-box {
    margin: 0 0 28px;
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-soft);
}

.post-box h2 { margin: 0 0 10px !important; font-size: 0.82rem !important; letter-spacing: 0.06em !important; text-transform: uppercase; color: var(--muted); }
.post-box ul, .post-box ol { margin: 0; padding-left: 20px; }
.post-box li { color: var(--body); font-size: 0.95rem; }
.post-box li + li { margin-top: 6px; }
.post-box a { text-decoration: none; font-weight: 600; }
.post-box a:hover { text-decoration: underline; }

.post-body { color: var(--body); font-size: 1.02rem; overflow-wrap: anywhere; }
.post-body h2 { margin: 44px 0 12px; color: var(--text); font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.025em; font-weight: 800; }
.post-body h3 { margin: 28px 0 8px; color: var(--text); font-size: 1.15rem; font-weight: 800; }
.post-body p { margin: 0 0 14px; }
.post-body ul, .post-body ol { margin: 0 0 16px; padding-left: 22px; }
.post-body li + li { margin-top: 8px; }
.post-body strong { color: var(--text); }
.post-body a { color: var(--text); }

.post-body blockquote {
    margin: 20px 0;
    padding: 16px 20px;
    border: 1px solid #FED7AA;
    border-radius: 12px;
    background: #FFF7ED;
}

.post-body blockquote p { margin: 0; color: var(--text); }

.post-steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.post-steps li { counter-increment: step; position: relative; padding-left: 44px; }
.post-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    background: var(--bg-dark);
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 28px;
    text-align: center;
}

.post-note { font-size: 0.88rem; color: var(--muted); }

.post-table {
    width: 100%;
    overflow-x: auto;
    margin: 18px 0 22px;
    border: 1px solid var(--border);
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
}

.post-table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.9rem; }
.post-table th, .post-table td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.post-table th { background: var(--bg-soft); color: var(--text); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.post-table tr:last-child td { border-bottom: none; }

.post-faq { margin-top: 44px; }
.post-faq > h2 { margin: 0 0 14px; font-size: 1.5rem; letter-spacing: -0.025em; font-weight: 800; }
.post-faq details { border: 1px solid var(--border); border-radius: 12px; padding: 0 18px; background: #FFFFFF; }
.post-faq details + details { margin-top: 10px; }
.post-faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; list-style-position: outside; }
.post-faq details p { margin: 0 0 16px; color: var(--body); }

.post-conclusion { margin: 36px 0 0; font-size: 1.05rem; color: var(--text); }

.post-cta {
    margin: 32px 0 0;
    padding: 28px;
    border-radius: 16px;
    background: var(--bg-dark);
    color: #FFFFFF;
}

.post-cta h2 { margin: 0 0 8px; font-size: 1.3rem; letter-spacing: -0.02em; font-weight: 800; color: #FFFFFF; }
.post-cta p { margin: 0 0 18px; color: #D1D5DB; }
.post-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.post-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.post-btn-light { background: #FFFFFF; color: var(--text); }
.post-btn-ghost { border: 1px solid #4B5563; color: #FFFFFF; }
.post-btn:hover { opacity: 0.9; }

.post-author {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin: 36px 0 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.post-author img { width: 72px; height: 72px; border-radius: 9999px; object-fit: cover; }
.post-author h2 { margin: 0 0 2px; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.post-author-name { margin: 0; font-weight: 800; }
.post-author-name a { text-decoration: none; }
.post-author p { margin: 2px 0 0; font-size: 0.92rem; color: var(--body); }
.post-author-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 0.85rem; font-weight: 700; }

.post-sources { margin: 36px 0 0; }
.post-sources h2 { margin: 0 0 10px; font-size: 1.1rem; font-weight: 800; }
.post-sources ol { margin: 0; padding-left: 20px; font-size: 0.88rem; color: var(--body); }
.post-sources li + li { margin-top: 4px; }

.post-disclaimer { margin: 28px 0 72px; font-size: 0.8rem; color: var(--muted); }

/* Footer */
.blog-footer { border-top: 1px solid var(--border); color: var(--muted); padding: 34px 0 calc(34px + env(safe-area-inset-bottom)); }
.blog-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.blog-footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }

.blog-footer a, .blog-footer button {
    color: var(--text);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    background: none;
    border: none;
    padding: 4px 0;
    cursor: pointer;
}

.blog-footer a:hover, .blog-footer button:hover { opacity: 0.7; }

@media (max-width: 760px) {
    .blog-nav { min-height: 64px; padding: 10px 0; }
    .blog-brand img { height: 28px; max-width: 136px; }
    .blog-card { grid-template-columns: minmax(0, 1fr); }
    .blog-card img { height: auto; }
    .post-answer { font-size: 1.04rem; }
    .post-body h2 { font-size: 1.3rem; }
    .post-cta { padding: 22px 20px; }
}

@media (max-width: 480px) {
    .blog-container { padding: 0 16px; }
    .blog-nav-right { gap: 12px; }
    .post-author { grid-template-columns: 56px minmax(0, 1fr); padding: 18px 16px; }
    .post-author img { width: 56px; height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .blog-skip { transition: none; }
}
