/* Resources hub + articles. Requires body.theme-light.resources-page.
   Mobile-first: base = phone, then min-width 768 / 992. */

body.theme-light.resources-page {
    --resource-surface: var(--color-band);
    --resource-ink: var(--color-ink);
    --resource-muted: var(--color-muted);
    --resource-border: var(--color-border);
    --resource-code-bg: #f1f5f9;
    --resource-shadow: none;
    --resource-accent: var(--color-accent);
    --resource-accent-soft: var(--color-accent-soft);
}

/* --- Hero (hub) --- */
body.theme-light.resources-page .hero-section {
    padding: 6rem 0 var(--section-y-tight);
    background: var(--bg-dark);
}

body.theme-light.resources-page .hero-bg-glow {
    display: none;
}

body.theme-light.resources-page .hero-content h1 {
    font-weight: 600;
    letter-spacing: -0.035em;
    color: var(--text-main);
}

body.theme-light.resources-page .hero-sub {
    color: var(--text-muted);
}

/* --- Section rhythm --- */
body.theme-light.resources-page .resources-featured-section,
body.theme-light.resources-page .newsletter-section {
    padding: var(--section-y) 0;
}

body.theme-light.resources-page .resources-featured-section--tight {
    padding-top: var(--section-y-tight);
}

body.theme-light.resources-page .hub-lead {
    max-width: 760px;
    margin: 0 auto 1.5rem;
    color: var(--text-muted);
    text-align: center;
}

/* --- Hub surfaces --- */
body.theme-light.resources-page .featured-article-card,
body.theme-light.resources-page .hub-series-card {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: none;
}

body.theme-light.resources-page .featured-article-card.surface--featured,
body.theme-light.resources-page .featured-article-card.is-primary {
    border-color: var(--accent-primary);
    box-shadow: none;
}

body.theme-light.resources-page .featured-text h2 {
    font-family: Inter, system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
}

body.theme-light.resources-page .hub-series-card h3 {
    margin-top: 0;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: Inter, system-ui, sans-serif;
    color: var(--text-main);
}

body.theme-light.resources-page .hub-series-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

body.theme-light.resources-page .resources-hub-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr);
    max-width: 1100px;
    margin: 0 auto;
}

body.theme-light.resources-page .start-here-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

body.theme-light.resources-page .step-label {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

body.theme-light.resources-page .secondary-link:hover {
    color: var(--accent-primary-hover);
}

/* --- Article header --- */
body.theme-light.resources-page .article-header-section {
    padding: calc(var(--section-y) + 2.5rem) 0 var(--section-y-tight);
}

body.theme-light.resources-page .article-breadcrumb a,
body.theme-light.resources-page .article-header .article-meta {
    color: var(--text-muted);
}

body.theme-light.resources-page .article-header .meta-divider,
body.theme-light.resources-page .meta-divider {
    color: var(--border-strong);
}

body.theme-light.resources-page .article-header h1 {
    font-size: clamp(1.75rem, 7vw, 2.25rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

body.theme-light.resources-page .article-header .subtitle {
    font-family: Inter, system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0 0 1.25rem;
    max-width: 40rem;
}

body.theme-light.resources-page .article-content-section {
    padding: 0 0 var(--section-y);
}

/* No outer mega-card: prose on canvas; X inset from .container */
body.theme-light.resources-page .article-content {
    padding: var(--section-y-tight) 0;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

/* --- Article body type --- */
body.theme-light.resources-page .article-body {
    font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-main);
}

body.theme-light.resources-page .article-body p,
body.theme-light.resources-page .article-body ul li,
body.theme-light.resources-page .article-body ol li {
    font-size: 1rem;
    line-height: 1.65;
}

body.theme-light.resources-page .article-body h2,
body.theme-light.resources-page .article-body h3,
body.theme-light.resources-page .cta-card h3,
body.theme-light.resources-page .newsletter-card h3,
body.theme-light.resources-page .featured-text h2 {
    font-family: Inter, system-ui, sans-serif;
}

body.theme-light.resources-page .article-body h2 {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin-top: var(--section-y-tight);
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    color: var(--text-main);
}

body.theme-light.resources-page .article-body h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

body.theme-light.resources-page .article-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    color: var(--text-main);
}

/* Indigo links (match CTAs), not legacy blue */
body.theme-light.resources-page .article-body a:not(.btn) {
    color: var(--accent-primary);
    text-decoration-color: var(--color-accent-border);
}

body.theme-light.resources-page .article-body a:not(.btn):hover {
    color: var(--accent-primary-hover);
    text-decoration-color: var(--border-strong);
}

/* --- Surfaces / glass alias on resources --- */
body.theme-light.resources-page .glass-panel,
body.theme-light.resources-page .surface {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
    box-shadow: none;
    border-radius: var(--radius-lg);
}

/* --- Semantic left-rule callouts (not cards) --- */
body.theme-light.resources-page .resource-card-summary,
body.theme-light.resources-page .resource-card-danger {
    background: transparent;
    border: none;
    border-left: 2px solid var(--accent-primary);
    border-radius: 0;
    padding: 0.75rem 0 0.75rem 1.15rem;
    margin: 1.25rem 0;
}

body.theme-light.resources-page .resource-card-danger {
    border-left-color: var(--accent-risk);
}

body.theme-light.resources-page .cta-card {
    background: transparent;
    border: none;
    border-left: 2px solid var(--accent-primary);
    border-radius: 0;
    box-shadow: none;
    padding: 1.25rem 0 1.25rem 1.25rem;
    margin-top: var(--section-y-tight);
}

body.theme-light.resources-page .callout-quote {
    border-left: 2px solid var(--border-strong);
    border-radius: 0;
    padding: 0.25rem 0 0.25rem 1.15rem;
    background: transparent;
}

body.theme-light.resources-page .callout-pro-tip {
    border-left: 2px solid var(--accent-primary);
    border-radius: 0;
    padding: 0.25rem 0 0.25rem 1.15rem;
    background: transparent;
}

/* Mid-article product CTA: flat surface, not gradient card */
body.theme-light.resources-page .article-inline-cta,
body.theme-light.resources-page .surface--article-cta {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: none;
    padding: 1.25rem;
    margin: 1.5rem 0;
    text-align: left;
}

body.theme-light.resources-page .article-inline-cta h3,
body.theme-light.resources-page .surface--article-cta h3 {
    font-family: Inter, system-ui, sans-serif;
    font-weight: 600;
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
    color: var(--text-main);
}

body.theme-light.resources-page .article-cta {
    margin-top: var(--section-y-tight);
    padding-top: 1.25rem;
}

/* --- Prompt + table primitives --- */
body.theme-light.resources-page .prompt-block {
    margin: 1rem 0;
    padding: 1rem 1.15rem;
    background: var(--resource-code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    color: var(--text-muted);
}

/* Filled examples / outline snippets (HTML children, not mono) */
body.theme-light.resources-page .sample-block {
    margin: 1rem 0;
    padding: 1rem 1.15rem;
    background: var(--resource-code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-muted);
    font-family: Inter, system-ui, sans-serif;
}

body.theme-light.resources-page .sample-block p {
    margin: 0 0 0.5rem;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

body.theme-light.resources-page .sample-block p:last-child {
    margin-bottom: 0;
}

body.theme-light.resources-page .sample-block .sample-indent {
    padding-left: 1rem;
    margin-bottom: 0.35rem;
}

body.theme-light.resources-page .table-scroll {
    margin: 1rem 0;
    padding: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

body.theme-light.resources-page .table-scroll table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    font-family: Inter, system-ui, sans-serif;
}

body.theme-light.resources-page .table-scroll th,
body.theme-light.resources-page .table-scroll td {
    padding: 0.4rem 0.5rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

body.theme-light.resources-page .table-scroll th {
    font-weight: 600;
    color: var(--text-main);
    border-bottom-color: var(--border-strong);
}

body.theme-light.resources-page .table-scroll tr:last-child td {
    border-bottom: none;
}

body.theme-light.resources-page .search-block {
    background: var(--resource-code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow-wrap: break-word;
}

body.theme-light.resources-page .faq-surface {
    padding: 1.25rem;
    margin-bottom: 1rem;
}

body.theme-light.resources-page .faq-surface h3 {
    margin-top: 0;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: Inter, system-ui, sans-serif;
}

body.theme-light.resources-page .faq-surface p:last-child {
    margin-bottom: 0;
}

body.theme-light.resources-page .checklist {
    margin-top: 0.5rem;
}

body.theme-light.resources-page .checklist li {
    margin-bottom: 0.65rem;
}

body.theme-light.resources-page .checklist li:last-child {
    margin-bottom: 0;
}

body.theme-light.resources-page .showcase-frame {
    margin: 1rem 0 0.5rem;
    border-radius: var(--radius-lg);
    padding: 6px;
}

body.theme-light.resources-page .cta-caption {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0.75rem;
}

/* --- Desktop --- */
@media (min-width: 768px) {
    body.theme-light.resources-page .hero-section {
        padding: 7.5rem 0 3rem;
    }

    body.theme-light.resources-page .article-header h1 {
        font-size: clamp(2rem, 4vw, 2.75rem);
    }

    body.theme-light.resources-page .article-header .subtitle {
        font-size: 1.125rem;
    }

    body.theme-light.resources-page .article-content {
        padding: var(--section-y-tight) 1.5rem;
    }

    body.theme-light.resources-page .article-body,
    body.theme-light.resources-page .article-body p,
    body.theme-light.resources-page .article-body ul li,
    body.theme-light.resources-page .article-body ol li {
        font-size: 1.125rem;
    }

    body.theme-light.resources-page .article-body h2 {
        font-size: 1.75rem;
        margin-top: 3.5rem;
        padding-top: 2rem;
    }

    body.theme-light.resources-page .featured-article-card,
    body.theme-light.resources-page .hub-series-card {
        padding: 2rem;
    }

    body.theme-light.resources-page .resources-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-light.resources-page .article-inline-cta,
    body.theme-light.resources-page .surface--article-cta {
        padding: 1.75rem;
    }

    body.theme-light.resources-page .prompt-block {
        padding: 1rem 1.25rem;
    }
}

@media (min-width: 992px) {
    body.theme-light.resources-page .resources-hub-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.theme-light.resources-page .article-content {
        padding: var(--section-y-tight) 2rem;
    }
}
