/* ============================================================
   Encore — shared design system
   Used by: index.html, privacy.html, terms.html, blog templates
   ============================================================ */

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

:root {
    /* Brand */
    --accent: #E91E63;
    --accent-dark: #C2185B;

    /* Neutrals */
    --bg: #fafaf7;
    --bg-elevated: #ffffff;
    --bg-subtle: #f1f0eb;
    --text-primary: #0a0a0a;
    --text-secondary: #5a5a5a;
    --text-muted: #8a8a8a;
    --border: #e5e3dc;
    --border-strong: #d4d2c9;

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.04);
    --shadow-md: 0 4px 24px rgba(10, 10, 10, 0.06);
    --shadow-lg: 0 24px 60px rgba(10, 10, 10, 0.08);

    /* Layout */
    --max-width: 1200px;
    --max-width-narrow: 800px;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ───────────── Layout primitives ───────────── */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.container--narrow {
    max-width: var(--max-width-narrow);
}

.section {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 72px;
}

.section-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .section { padding: 80px 0; }
    .section-header { margin-bottom: 56px; }
}

/* ───────────── Navigation ───────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 250, 247, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.5px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(10, 10, 10, 0.04);
}

.nav-link.active {
    color: var(--accent);
}

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.nav-back:hover { color: var(--text-primary); }

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--text-primary);
    color: var(--bg-elevated);
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.nav-cta:hover {
    background: #1f1f1f;
    transform: translateY(-1px);
}

/* ───────────── Hero (landing page) ───────────── */
.hero {
    padding: 96px 0 80px;
    text-align: center;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(44px, 8vw, 84px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -3px;
    margin: 0 auto 28px;
    max-width: 900px;
    color: var(--text-primary);
}

.hero h1 em {
    font-style: italic;
    font-weight: 800;
    color: var(--accent);
}

.hero-subtitle {
    font-size: clamp(17px, 2vw, 20px);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 80px;
}

/* App Store badge */
.app-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--text-primary);
    color: var(--bg-elevated);
    padding: 12px 22px;
    border-radius: 12px;
    transition: transform 0.15s ease, background 0.15s ease;
    min-height: 56px;
}

.app-badge:hover {
    background: #1f1f1f;
    transform: translateY(-2px);
}

.app-badge .app-badge-icon {
    width: 26px;
    height: 26px;
}

.app-badge-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.app-badge-text small {
    font-size: 10px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

.app-badge-text strong {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

/* Hero phone screenshots */
.phone-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 24px;
    margin-top: 16px;
    padding: 0 16px;
}

.phone-mockup { transition: transform 0.3s ease; }

.phone-mockup img {
    width: 240px;
    height: auto;
    display: block;
    filter: drop-shadow(0 24px 40px rgba(10, 10, 10, 0.12));
}

.phone-mockup.center img {
    width: 280px;
    filter: drop-shadow(0 30px 50px rgba(10, 10, 10, 0.15));
}

.phone-mockup.side { opacity: 0.92; }
.phone-mockup.side img { width: 220px; }

@media (max-width: 768px) {
    .hero { padding: 64px 0 56px; }
    .phone-container { gap: 12px; margin-top: 8px; }
    .phone-mockup.side { display: none; }
    .phone-mockup.center img { width: 240px; }
}

/* ───────────── Features grid ───────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 56px 48px;
    max-width: 1100px;
    margin: 0 auto;
}

.feature { text-align: left; }

.feature-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    stroke-width: 1.75;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.4px;
    color: var(--text-primary);
}

.feature p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.65;
}

/* ───────────── How It Works ───────────── */
.how-it-works {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 56px;
    max-width: 1000px;
    margin: 0 auto;
}

.step { text-align: left; }

.step-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 2px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.step h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.4px;
}

.step p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.65;
}

/* ───────────── CTA section ───────────── */
.cta-section {
    padding: 140px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -2px;
    margin: 0 auto 20px;
    max-width: 800px;
}

.cta-section p {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 0 auto 40px;
    max-width: 520px;
}

.cta-section .hero-actions {
    margin-bottom: 0;
}

/* ───────────── FAQ ───────────── */
.faq {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
}

.faq-content {
    max-width: 760px;
    margin: 0 auto;
}

.faq-list {
    border-top: 1px solid var(--border);
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-question {
    width: 100%;
    padding: 24px 4px;
    background: none;
    border: none;
    text-align: left;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: color 0.15s ease;
}

.faq-question:hover { color: var(--accent); }

.faq-question::after {
    content: '';
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    background-image:
        linear-gradient(to right, currentColor, currentColor),
        linear-gradient(to bottom, currentColor, currentColor);
    background-size: 100% 1.5px, 1.5px 100%;
    background-position: center, center;
    background-repeat: no-repeat;
    transition: transform 0.25s ease;
    opacity: 0.5;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
    opacity: 1;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer-content {
    padding: 0 4px 24px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
}

.faq-item.active .faq-answer { max-height: 400px; }

/* ───────────── Footer (full, used by landing page) ───────────── */
.footer {
    background: var(--bg-subtle);
    padding: 72px 0 40px;
    border-top: 1px solid var(--border);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 56px;
}

.footer-brand .footer-logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    max-width: 320px;
}

.footer-links h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.15s ease;
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 13px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    border: 1px solid var(--border-strong);
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.footer-social a:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--bg-elevated);
}

@media (max-width: 768px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ───────────── Footer (simple, used by legal & blog pages) ───────────── */
.footer-simple {
    background: var(--bg-subtle);
    padding: 40px 0;
    border-top: 1px solid var(--border);
    margin-top: 80px;
}

.footer-simple .footer-inner {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-simple .footer-inner p {
    color: var(--text-muted);
    font-size: 13px;
}

.footer-simple .footer-links-list {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-simple .footer-links-list a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.15s ease;
}

.footer-simple .footer-links-list a:hover { color: var(--accent); }

@media (max-width: 640px) {
    .footer-simple .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ───────────── Legal / long-form content (privacy, terms) ───────────── */
.legal-content {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: 56px 24px 80px;
    line-height: 1.75;
}

.legal-content h1 {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 8px;
}

.legal-content .last-updated {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
}

.legal-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 48px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.3px;
}

.legal-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
    margin: 0 0 20px 24px;
    color: var(--text-secondary);
}

.legal-content li {
    margin-bottom: 10px;
}

.legal-content li strong {
    color: var(--text-primary);
}

.legal-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.15s ease;
}

.legal-content a:hover { color: var(--accent-dark); }

.legal-content .tabs-container {
    display: flex;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.legal-content .tab-link {
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.legal-content .tab-link:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.legal-content .tab-link.active {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--bg-elevated);
}

.legal-content .intro {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    padding: 24px 28px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.legal-content .intro p {
    color: var(--text-secondary);
    margin: 0;
}

.legal-content .contact-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 32px;
    border-radius: 16px;
    margin-top: 60px;
    text-align: center;
}

.legal-content .contact-box h2 {
    border: none;
    margin-top: 0;
    padding-bottom: 0;
}

.legal-content .contact-email {
    font-size: 20px;
    font-weight: 600;
    margin-top: 12px;
}

.legal-content .contact-email a {
    color: var(--accent);
    text-decoration: none;
}

.legal-content .contact-email a:hover {
    text-decoration: underline;
}

/* ───────────── Blog hero ───────────── */
.blog-hero {
    padding: 80px 24px 40px;
    text-align: center;
}

.blog-hero h1 {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 16px;
    line-height: 1.1;
}

.blog-hero h1 em {
    font-style: italic;
    color: var(--accent);
    font-weight: 800;
}

.blog-hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* ───────────── Blog tag filter ───────────── */
.tag-filter {
    max-width: var(--max-width);
    margin: 0 auto 40px;
    padding: 0 24px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.tag-filter a {
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.tag-filter a:hover,
.tag-filter a.active {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: var(--bg-elevated);
}

/* ───────────── Blog post grid ───────────── */
.posts-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px 80px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.post-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.post-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.post-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
    background: var(--bg-subtle);
}

.post-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.post-card-category {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-card-body h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.3;
    letter-spacing: -0.4px;
}

.post-card-body p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

.read-more {
    color: var(--accent);
    font-weight: 600;
    font-size: 13px;
}

/* Featured post card spans two columns */
.post-card.featured {
    grid-column: 1 / -1;
    flex-direction: row;
}

.post-card.featured .post-card-image {
    width: 45%;
    height: auto;
    min-height: 280px;
    border-bottom: none;
    border-right: 1px solid var(--border);
}

.post-card.featured .post-card-body { padding: 32px; }
.post-card.featured h2 { font-size: 28px; letter-spacing: -0.6px; }

@media (max-width: 768px) {
    .posts-grid { grid-template-columns: 1fr; }
    .post-card.featured { flex-direction: column; }
    .post-card.featured .post-card-image {
        width: 100%;
        min-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

/* ───────────── Blog breadcrumb ───────────── */
.breadcrumb {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: 32px 24px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
    transition: color 0.15s ease;
}

.breadcrumb a:hover { color: var(--text-primary); }
.breadcrumb span { margin: 0 8px; }

/* ───────────── Article page ───────────── */
.article-header {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: 24px 24px 0;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.article-category {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    transition: color 0.15s ease;
}

.article-category:hover { color: var(--accent-dark); }

.article-header h1 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 20px;
}

.article-header .description {
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
}

.article-reading-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}

.article-hero {
    max-width: var(--max-width-narrow);
    margin: 40px auto 0;
    padding: 0 24px;
}

.article-hero img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* Table of contents */
.toc {
    max-width: var(--max-width-narrow);
    margin: 40px auto 0;
    padding: 0 24px;
}

.toc-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 28px;
}

.toc-box h2 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.toc-box ul { list-style: none; }
.toc-box li { margin-bottom: 8px; }

.toc-box a {
    color: var(--text-secondary);
    font-size: 15px;
    display: block;
    padding: 4px 0;
    transition: color 0.15s ease;
}

.toc-box a:hover { color: var(--accent); }
.toc-box .toc-h3 {
    padding-left: 20px;
    font-size: 14px;
}

/* Article body content */
.article-content {
    max-width: var(--max-width-narrow);
    margin: 40px auto 0;
    padding: 0 24px;
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 56px 0 16px;
    letter-spacing: -0.6px;
    line-height: 1.2;
}

.article-content h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 40px 0 12px;
    letter-spacing: -0.3px;
}

.article-content p { margin-bottom: 20px; }

.article-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.15s ease;
}

.article-content a:hover { color: var(--accent-dark); }

.article-content ul,
.article-content ol {
    margin: 0 0 20px 24px;
}

.article-content li { margin-bottom: 8px; }

.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--bg-elevated);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text-primary);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px 0;
    border: 1px solid var(--border);
}

.article-content code {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--text-primary);
}

.article-content pre {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 20px 24px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 24px 0;
}

.article-content pre code {
    background: none;
    border: none;
    padding: 0;
}

.article-content strong { color: var(--text-primary); }

/* Mid-article CTA (generated by build-blog.js) */
.mid-cta {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    margin: 48px 0;
    text-align: center;
}

.mid-cta h3 {
    font-size: 22px !important;
    font-weight: 700;
    color: var(--text-primary) !important;
    margin: 0 0 8px !important;
    letter-spacing: -0.4px;
}

.mid-cta p {
    color: var(--text-secondary);
    margin-bottom: 20px !important;
    font-size: 16px;
}

.mid-cta a.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--text-primary);
    color: var(--bg-elevated);
    padding: 12px 24px;
    border-radius: 999px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 15px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.mid-cta a.cta-btn:hover {
    background: #1f1f1f;
    transform: translateY(-2px);
}

/* Article tags */
.article-tags {
    max-width: var(--max-width-narrow);
    margin: 48px auto 0;
    padding: 0 24px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.article-tags a {
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.article-tags a:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* Share section */
.share-section {
    max-width: var(--max-width-narrow);
    margin: 40px auto 0;
    padding: 0 24px;
}

.share-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.share-box span {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
}

.share-links {
    display: flex;
    gap: 10px;
}

.share-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.share-links a:hover {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--bg-elevated);
}

/* Related posts */
.related-posts {
    max-width: var(--max-width-narrow);
    margin: 72px auto 0;
    padding: 0 24px;
}

.related-posts h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.related-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: block;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.related-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.related-card-body { padding: 20px; }

.related-card-body h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
    letter-spacing: -0.2px;
}

.related-card-body p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Bottom CTA on article pages */
.bottom-cta {
    max-width: var(--max-width-narrow);
    margin: 72px auto 0;
    padding: 0 24px;
}

.bottom-cta-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 56px 32px;
    text-align: center;
}

.bottom-cta-box h2 {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.8px;
    line-height: 1.15;
}

.bottom-cta-box p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 auto 24px;
    max-width: 480px;
}

.bottom-cta-box a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--text-primary);
    color: var(--bg-elevated);
    padding: 12px 28px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.bottom-cta-box a:hover {
    background: #1f1f1f;
    transform: translateY(-2px);
}

/* ───────────── Scroll-in animations ───────────── */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─────────────────────────────────────────────────────────────
   Small-phone refinements (iPhone SE class, ≤ 480px)
   Tightens spacing, shrinks oversized headlines, and guarantees
   ≥ 44px tap targets per Apple HIG / WCAG 2.5.5.
   ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .nav-content { padding: 12px 16px; }

    .section { padding: 56px 0; }
    .section-header { margin-bottom: 40px; }
    .section-header p { font-size: 16px; }

    .hero { padding: 48px 0 40px; }
    .hero h1 {
        font-size: clamp(36px, 10vw, 56px);
        letter-spacing: -1.5px;
        margin-bottom: 20px;
    }
    .hero-subtitle { font-size: 16px; }

    .nav-cta { padding: 11px 18px; font-size: 14px; }
    .nav-link { padding: 10px 12px; }

    .legal-content { padding: 48px 16px; }
    .legal-content h1 { font-size: 32px; }
    .legal-content h2 { font-size: 22px; }

    .post-card-content { padding: 20px; }
    .post-card-title { font-size: 20px; }

    .article-header { padding: 48px 0 32px; }
    .article-content { padding: 0 0 64px; }
    .article-content p,
    .article-content li { font-size: 17px; }
}
