/* Learn Page Hero Section */
.learn-hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    text-align: center;
}

.learn-hero-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.learn-breadcrumb {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.learn-hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.learn-hero-title .highlight {
    color: #3b82f6;
}

.learn-hero-subtitle {
    font-size: 1.2rem;
    color: #5a6c7d;
    line-height: 1.8;
    max-width: 640px;
    margin: 0 auto;
}

/* Table of Contents */
.learn-toc {
    background: #fff;
    border-bottom: 1px solid #e8ecf1;
    padding: 1.5rem 0;
}

.learn-toc-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.learn-toc-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.learn-toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc;
}

.learn-toc-list li {
    counter-increment: toc;
}

.learn-toc-list li::before {
    content: counter(toc) ".";
    color: #3b82f6;
    font-weight: 600;
    margin-right: 0.35rem;
    font-size: 0.9rem;
}

.learn-toc-list a {
    color: #5a6c7d;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.learn-toc-list a:hover {
    color: #3b82f6;
}

/* Content Section */
.learn-content {
    padding: 60px 0 80px;
    background-color: #fff;
}

.learn-content-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.learn-section {
    margin-bottom: 3.5rem;
}

.learn-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8ecf1;
}

.learn-section h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #34495e;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.learn-section p {
    color: #5a6c7d;
    line-height: 1.8;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.learn-section a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s ease;
}

.learn-section a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.learn-section strong {
    color: #2c3e50;
}

.learn-section code {
    background: #f0f4f8;
    color: #e74c3c;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* Callout Boxes */
.learn-callout {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: #f0f7ff;
    border-left: 4px solid #3b82f6;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
}

.learn-callout-warning {
    background: #fff8f0;
    border-left-color: #f59e0b;
}

.learn-callout-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.learn-callout-content {
    color: #5a6c7d;
    line-height: 1.7;
    font-size: 0.95rem;
}

.learn-callout-content strong {
    color: #2c3e50;
}

/* Card Grid (Why it matters) */
.learn-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.learn-card {
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    transition: border-color 0.2s ease;
}

.learn-card:hover {
    border-color: #3b82f6;
}

.learn-card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.learn-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
}

.learn-card p {
    color: #5a6c7d;
    font-size: 0.93rem;
    line-height: 1.6;
    margin: 0;
}

/* Steps (How it works) */
.learn-steps {
    margin: 1.5rem 0;
}

.learn-step {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.learn-step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #3b82f6;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}

.learn-step-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.05rem;
}

.learn-step-content p {
    margin: 0;
    font-size: 0.95rem;
}

/* Code Block */
.learn-code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1rem 0;
    overflow-x: auto;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.learn-code-block code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

/* Tables */
.learn-table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    border: 1px solid #e8ecf1;
}

.learn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
}

.learn-table thead {
    background: #f8fafc;
}

.learn-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e8ecf1;
    white-space: nowrap;
}

.learn-table td {
    padding: 0.75rem 1rem;
    color: #5a6c7d;
    border-bottom: 1px solid #f0f4f8;
    line-height: 1.6;
}

.learn-table tbody tr:last-child td {
    border-bottom: none;
}

.learn-table tbody tr:hover {
    background: #f8fafc;
}

.learn-table code {
    background: #f0f4f8;
    color: #e74c3c;
    padding: 0.1em 0.35em;
    border-radius: 3px;
    font-size: 0.88em;
}

/* SPF Results Grid */
.learn-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.learn-result {
    padding: 1.25rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.learn-result-label {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.learn-result p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    color: #5a6c7d;
}

.learn-result-pass {
    background: #f0fdf4;
    border-color: #22c55e;
}
.learn-result-pass .learn-result-label { color: #16a34a; }

.learn-result-fail {
    background: #fef2f2;
    border-color: #ef4444;
}
.learn-result-fail .learn-result-label { color: #dc2626; }

.learn-result-softfail {
    background: #fffbeb;
    border-color: #f59e0b;
}
.learn-result-softfail .learn-result-label { color: #d97706; }

.learn-result-neutral {
    background: #f8fafc;
    border-color: #94a3b8;
}
.learn-result-neutral .learn-result-label { color: #64748b; }

.learn-result-none {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.learn-result-none .learn-result-label { color: #64748b; }

.learn-result-error {
    background: #fef2f2;
    border-color: #f87171;
}
.learn-result-error .learn-result-label { color: #dc2626; }

/* Provider Setup */
.learn-provider {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f4f8;
}

.learn-provider:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.learn-provider h3 {
    margin-top: 0;
}

.learn-provider p {
    font-size: 0.93rem;
}

/* Common Mistakes */
.learn-mistake {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fef8f8;
    border: 1px solid #fde2e2;
    border-radius: 8px;
}

.learn-mistake h3 {
    margin-top: 0;
    color: #c0392b;
    font-size: 1.05rem;
}

.learn-mistake p {
    font-size: 0.95rem;
}

.learn-mistake p:last-child {
    margin-bottom: 0;
}

/* Best Practices */
.learn-best-practices-list {
    margin-top: 1rem;
}

.learn-best-practice {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 8px;
}

.learn-best-practice-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.learn-best-practice h3 {
    margin: 0 0 0.35rem 0;
    font-size: 1.02rem;
    color: #2c3e50;
}

.learn-best-practice p {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.6;
}

/* CTA Section */
.learn-cta-section {
    text-align: center;
    padding: 2.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e8ecf1;
}

.learn-cta-section h2 {
    border-bottom: none;
    padding-bottom: 0;
}

.learn-cta-section p {
    margin-bottom: 1.5rem;
}

/* Footer Links */
.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin: 0 0.75rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-sites {
    margin-bottom: 1rem;
}

.footer-sites a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    margin: 0 0.5rem;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.footer-sites a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* === Dark Mode === */
/* Shared dark overrides — used by both media query and manual toggle */

@media (prefers-color-scheme: dark) {
    .learn-hero {
        background: linear-gradient(135deg, #0f1729 0%, #1a2744 100%);
    }
    .learn-hero-title { color: #e2e8f0; }
    .learn-hero-subtitle { color: rgba(226, 232, 240, 0.7); }
    .learn-breadcrumb { color: rgba(226, 232, 240, 0.5); }
    .learn-breadcrumb a { color: rgba(226, 232, 240, 0.5); }
    .learn-breadcrumb a:hover { color: #63b3ed; }

    .learn-toc {
        background: #1a2332;
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }
    .learn-toc-title { color: rgba(226, 232, 240, 0.5); }
    .learn-toc-list a { color: rgba(226, 232, 240, 0.7); }
    .learn-toc-list a:hover { color: #63b3ed; }

    .learn-content { background-color: #0b1120; }

    .learn-section h2 {
        color: #e2e8f0;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    .learn-section h3 { color: rgba(226, 232, 240, 0.85); }
    .learn-section p { color: rgba(226, 232, 240, 0.7); }
    .learn-section a { color: #63b3ed; }
    .learn-section a:hover { color: #90cdf4; }
    .learn-section strong { color: #e2e8f0; }
    .learn-section code {
        background: #1e293b;
        color: #f87171;
    }

    .learn-callout {
        background: rgba(59, 130, 246, 0.1);
        border-left-color: #3b82f6;
    }
    .learn-callout-content { color: rgba(226, 232, 240, 0.7); }
    .learn-callout-content strong { color: #e2e8f0; }
    .learn-callout-warning {
        background: rgba(245, 158, 11, 0.1);
        border-left-color: #f59e0b;
    }

    .learn-card {
        background: #1a2332;
        border-color: rgba(255, 255, 255, 0.08);
    }
    .learn-card:hover { border-color: #3b82f6; }
    .learn-card h3 { color: #e2e8f0; }
    .learn-card p { color: rgba(226, 232, 240, 0.7); }

    .learn-code-block {
        background: #0f1729;
        color: #e2e8f0;
    }

    .learn-table-wrapper { border-color: rgba(255, 255, 255, 0.1); }
    .learn-table thead { background: #1e293b; }
    .learn-table th {
        color: #e2e8f0;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    .learn-table td {
        color: rgba(226, 232, 240, 0.7);
        border-bottom-color: rgba(255, 255, 255, 0.06);
    }
    .learn-table tbody tr:hover { background: rgba(255, 255, 255, 0.04); }
    .learn-table code {
        background: #1e293b;
        color: #f87171;
    }

    .learn-result-pass { background: rgba(34, 197, 94, 0.1); }
    .learn-result-pass .learn-result-label { color: #4ade80; }
    .learn-result-fail { background: rgba(239, 68, 68, 0.1); }
    .learn-result-fail .learn-result-label { color: #f87171; }
    .learn-result-softfail { background: rgba(245, 158, 11, 0.1); }
    .learn-result-softfail .learn-result-label { color: #fbbf24; }
    .learn-result-neutral { background: rgba(148, 163, 184, 0.1); }
    .learn-result-neutral .learn-result-label { color: #94a3b8; }
    .learn-result-none { background: rgba(203, 213, 225, 0.08); }
    .learn-result-none .learn-result-label { color: #94a3b8; }
    .learn-result-error { background: rgba(248, 113, 113, 0.1); }
    .learn-result-error .learn-result-label { color: #f87171; }
    .learn-result p { color: rgba(226, 232, 240, 0.7); }

    .learn-provider { border-bottom-color: rgba(255, 255, 255, 0.06); }
    .learn-provider p { color: rgba(226, 232, 240, 0.7); }

    .learn-mistake {
        background: rgba(239, 68, 68, 0.08);
        border-color: rgba(239, 68, 68, 0.2);
    }
    .learn-mistake h3 { color: #f87171; }
    .learn-mistake p { color: rgba(226, 232, 240, 0.7); }

    .learn-best-practice {
        background: rgba(34, 197, 94, 0.08);
        border-color: rgba(34, 197, 94, 0.2);
    }
    .learn-best-practice h3 { color: #e2e8f0; }
    .learn-best-practice p { color: rgba(226, 232, 240, 0.7); }

    .learn-cta-section {
        background: #1a2332;
        border-color: rgba(255, 255, 255, 0.08);
    }
}

html[data-theme="dark"] {
    .learn-hero {
        background: linear-gradient(135deg, #0f1729 0%, #1a2744 100%);
    }
    .learn-hero-title { color: #e2e8f0; }
    .learn-hero-subtitle { color: rgba(226, 232, 240, 0.7); }
    .learn-breadcrumb { color: rgba(226, 232, 240, 0.5); }
    .learn-breadcrumb a { color: rgba(226, 232, 240, 0.5); }
    .learn-breadcrumb a:hover { color: #63b3ed; }

    .learn-toc {
        background: #1a2332;
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }
    .learn-toc-title { color: rgba(226, 232, 240, 0.5); }
    .learn-toc-list a { color: rgba(226, 232, 240, 0.7); }
    .learn-toc-list a:hover { color: #63b3ed; }

    .learn-content { background-color: #0b1120; }

    .learn-section h2 {
        color: #e2e8f0;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    .learn-section h3 { color: rgba(226, 232, 240, 0.85); }
    .learn-section p { color: rgba(226, 232, 240, 0.7); }
    .learn-section a { color: #63b3ed; }
    .learn-section a:hover { color: #90cdf4; }
    .learn-section strong { color: #e2e8f0; }
    .learn-section code {
        background: #1e293b;
        color: #f87171;
    }

    .learn-callout {
        background: rgba(59, 130, 246, 0.1);
        border-left-color: #3b82f6;
    }
    .learn-callout-content { color: rgba(226, 232, 240, 0.7); }
    .learn-callout-content strong { color: #e2e8f0; }
    .learn-callout-warning {
        background: rgba(245, 158, 11, 0.1);
        border-left-color: #f59e0b;
    }

    .learn-card {
        background: #1a2332;
        border-color: rgba(255, 255, 255, 0.08);
    }
    .learn-card:hover { border-color: #3b82f6; }
    .learn-card h3 { color: #e2e8f0; }
    .learn-card p { color: rgba(226, 232, 240, 0.7); }

    .learn-code-block {
        background: #0f1729;
        color: #e2e8f0;
    }

    .learn-table-wrapper { border-color: rgba(255, 255, 255, 0.1); }
    .learn-table thead { background: #1e293b; }
    .learn-table th {
        color: #e2e8f0;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    .learn-table td {
        color: rgba(226, 232, 240, 0.7);
        border-bottom-color: rgba(255, 255, 255, 0.06);
    }
    .learn-table tbody tr:hover { background: rgba(255, 255, 255, 0.04); }
    .learn-table code {
        background: #1e293b;
        color: #f87171;
    }

    .learn-result-pass { background: rgba(34, 197, 94, 0.1); }
    .learn-result-pass .learn-result-label { color: #4ade80; }
    .learn-result-fail { background: rgba(239, 68, 68, 0.1); }
    .learn-result-fail .learn-result-label { color: #f87171; }
    .learn-result-softfail { background: rgba(245, 158, 11, 0.1); }
    .learn-result-softfail .learn-result-label { color: #fbbf24; }
    .learn-result-neutral { background: rgba(148, 163, 184, 0.1); }
    .learn-result-neutral .learn-result-label { color: #94a3b8; }
    .learn-result-none { background: rgba(203, 213, 225, 0.08); }
    .learn-result-none .learn-result-label { color: #94a3b8; }
    .learn-result-error { background: rgba(248, 113, 113, 0.1); }
    .learn-result-error .learn-result-label { color: #f87171; }
    .learn-result p { color: rgba(226, 232, 240, 0.7); }

    .learn-provider { border-bottom-color: rgba(255, 255, 255, 0.06); }
    .learn-provider p { color: rgba(226, 232, 240, 0.7); }

    .learn-mistake {
        background: rgba(239, 68, 68, 0.08);
        border-color: rgba(239, 68, 68, 0.2);
    }
    .learn-mistake h3 { color: #f87171; }
    .learn-mistake p { color: rgba(226, 232, 240, 0.7); }

    .learn-best-practice {
        background: rgba(34, 197, 94, 0.08);
        border-color: rgba(34, 197, 94, 0.2);
    }
    .learn-best-practice h3 { color: #e2e8f0; }
    .learn-best-practice p { color: rgba(226, 232, 240, 0.7); }

    .learn-cta-section {
        background: #1a2332;
        border-color: rgba(255, 255, 255, 0.08);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .learn-hero-title {
        font-size: 2rem;
    }

    .learn-hero-subtitle {
        font-size: 1rem;
    }

    .learn-section h2 {
        font-size: 1.3rem;
    }

    .learn-card-grid {
        grid-template-columns: 1fr;
    }

    .learn-results-grid {
        grid-template-columns: 1fr;
    }

    .learn-toc-list {
        flex-direction: column;
        gap: 0.35rem;
    }
}

@media (max-width: 480px) {
    .learn-hero {
        padding: 100px 0 40px;
    }

    .learn-hero-title {
        font-size: 1.75rem;
    }

    .learn-content {
        padding: 40px 0 60px;
    }

    .learn-step {
        flex-direction: column;
        gap: 0.75rem;
    }

    .learn-callout {
        flex-direction: column;
        gap: 0.5rem;
    }

    .learn-best-practice {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-sites a {
        display: block;
        margin: 0.25rem 0;
    }
}
