/* ─── Shell ─── */
.map-shell { background: #f0f4ff; }
.map-container { max-width: 1080px; }

/* ─── Hero ─── */
.map-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 45%, #3157D5 100%);
    color: #fff;
    padding: 4.5rem 0 3.5rem;
    position: relative;
    overflow: hidden;
}
.map-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 75% 40%, rgba(99,102,241,0.20) 0%, transparent 60%);
    pointer-events: none;
}
.map-hero .container { position: relative; z-index: 1; }
.map-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 800;
    color: #93c5fd;
    margin-bottom: 1rem;
}
.map-hero h1 {
    font-size: clamp(1.8rem, 3.4vw, 3rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    max-width: 900px;
    margin-bottom: 1.1rem;
}
.map-hero-lead {
    color: rgba(255,255,255,0.88);
    font-size: 1.08rem;
    line-height: 1.6;
    max-width: 760px;
    margin-bottom: 1.4rem;
}
.map-hero-meta { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.map-meta-pill {
    display: inline-flex; align-items: center;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #e0e7ff;
}
.map-hero-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.map-chip {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 700;
}
.map-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.map-btn-primary {
    background: #fff; color: #1d4ed8; border: none; font-weight: 700;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.map-btn-primary:hover { background: #eef2ff; color: #1e40af; }
.map-btn-outline {
    border: 2px solid rgba(255,255,255,0.4); color: #fff; background: transparent; font-weight: 700;
}
.map-btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); color: #fff; }

/* ─── TOC ─── */
.map-toc {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.9rem 0;
    position: sticky;
    top: 0;
    z-index: 90;
}
.map-toc-list {
    display: flex; gap: 0.4rem 1.1rem; flex-wrap: wrap;
    list-style: none; margin: 0; padding: 0;
}
.map-toc-list a {
    color: #475569; font-size: 0.85rem; font-weight: 600; text-decoration: none;
    padding: 0.25rem 0;
}
.map-toc-list a:hover { color: #3157D5; text-decoration: underline; }

/* ─── Sections ─── */
.map-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 2.5rem 2.25rem;
    margin: 2rem 0;
    box-shadow: 0 4px 16px rgba(15,23,42,0.04);
}
.map-section > h2 {
    color: #0f172a;
    font-weight: 800;
    font-size: 1.55rem;
    line-height: 1.25;
    margin-bottom: 1rem;
    scroll-margin-top: 90px;
}
.map-section h2[id], .map-section h3[id] { scroll-margin-top: 90px; }
.map-section p { color: #334155; line-height: 1.7; }
.map-section li { color: #334155; line-height: 1.65; }
.map-section h3.map-principle {
    color: #1e3a8a; font-weight: 800; font-size: 1.12rem; margin: 1.4rem 0 0.6rem;
}
.map-section h3 { color: #0f172a; font-weight: 700; font-size: 1.12rem; margin-top: 1.4rem; }
.map-section h4 { color: #1e3a8a; font-weight: 700; font-size: 1rem; }

/* ─── Legend ─── */
.map-legend-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.95rem;
    margin-top: 1.4rem;
}
.map-legend-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.35rem 1.15rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}
.map-legend-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3.5px;
    opacity: 0.85;
    transition: height 0.2s ease, opacity 0.2s ease;
}
.map-lg-direct::before  { background: #10b981; }
.map-lg-support::before { background: #f59e0b; }
.map-lg-enhance::before { background: #3b82f6; }
.map-lg-none::before    { background: #94a3b8; }
.map-lg-test::before    { background: #8b5cf6; }

.map-legend-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
    border-color: #cbd5e1;
}
.map-legend-card:hover::before {
    height: 4.5px;
    opacity: 1;
}
.map-legend-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}
.map-legend-icon-badge {
    font-size: 1.25rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.map-lg-direct .map-legend-icon-badge  { background: #ecfdf5; border-color: #a7f3d0; }
.map-lg-support .map-legend-icon-badge { background: #fffbeb; border-color: #fde68a; }
.map-lg-enhance .map-legend-icon-badge { background: #eff6ff; border-color: #bfdbfe; }
.map-lg-none .map-legend-icon-badge    { background: #f8fafc; border-color: #e2e8f0; }
.map-lg-test .map-legend-icon-badge    { background: #f5f3ff; border-color: #ddd6fe; }

.map-legend-title {
    font-size: 0.96rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
    line-height: 1.25;
}
.map-legend-desc {
    font-size: 0.84rem;
    line-height: 1.55;
    color: #475569;
    margin: 0;
    flex-grow: 1;
}

@media (max-width: 991px) and (min-width: 576px) {
    .map-legend-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
}
@media (max-width: 575px) {
    .map-legend-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
}

/* ─── Notes ─── */
.map-note { border-radius: 1rem; padding: 1.3rem 1.5rem; margin-top: 1.4rem; }
.map-note h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.map-note p, .map-note li { color: #334155; }
.map-note-info { background: #eef2ff; border: 1px solid #c7d2fe; }
.map-note-warn { background: #fffbeb; border: 1px solid #fde68a; }
.map-note-list {
    display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem;
    list-style: none; padding: 0; margin: 0.5rem 0 0;
}
.map-note-list li::before { content: '✓ '; color: #16a34a; font-weight: 800; }

/* ─── Tables ─── */
.map-table-wrap { overflow-x: auto; margin: 1.2rem 0 0.4rem; }
.map-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 640px;
}
.map-table-sm { min-width: 420px; }
.map-table-master { min-width: 860px; }
.map-table caption {
    caption-side: top;
    text-align: left;
    font-weight: 700;
    color: #1e3a8a;
    font-size: 0.85rem;
    padding: 0 0 0.5rem;
}
.map-table thead th {
    background: #0f172a;
    color: #fff;
    text-align: left;
    font-weight: 700;
    font-size: 0.84rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid #1e293b;
    white-space: nowrap;
}
.map-table tbody td, .map-table tbody th {
    padding: 0.55rem 0.8rem;
    border: 1px solid #e2e8f0;
    vertical-align: top;
    color: #334155;
}
.map-table tbody tr:nth-child(even) { background: #f8fafc; }
.map-table tbody th[scope="row"] { font-weight: 700; color: #0f172a; white-space: nowrap; }
.map-crit { font-weight: 700; color: #1e3a8a; white-space: nowrap; }
.map-status-cell { text-align: center; white-space: nowrap; }
.map-status { font-size: 1rem; white-space: nowrap; }
.map-roadmap { color: #7c3aed; font-weight: 800; cursor: help; }
.map-aria-cell { text-align: center; white-space: nowrap; }

/* visually hidden fallback */
.map-shell .visually-hidden {
    position: absolute !important; width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important; overflow: hidden !important;
    clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}

/* ─── Strong areas ─── */
.map-strong-list { list-style: none; padding: 0; margin: 0.4rem 0 1rem; }
.map-strong-list li {
    display: flex; align-items: baseline; gap: 0.7rem;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px dashed #e2e8f0;
}
.map-strong-crit { font-weight: 800; color: #1e3a8a; min-width: 64px; }
.map-strong-name { color: #334155; }

/* ─── ARIA cards ─── */
.map-two-col {
    display: grid;
    /* 300px min track overflowed the ~298px content box at 360px; 260px fits. */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.map-aria-card {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.2rem 1.3rem;
    background: #f8fafc;
}
.map-aria-card h4 { margin: 0 0 0.5rem; }
.map-aria-card ul { margin: 0; padding-left: 1.2rem; }
.map-aria-card li { font-size: 0.92rem; }
.map-code {
    background: #0f172a; color: #e2e8f0;
    border-radius: 0.6rem;
    padding: 0.9rem 1rem;
    font-size: 0.8rem;
    line-height: 1.5;
    overflow-x: auto;
    margin: 0.6rem 0 0;
}

/* ─── Not covered ─── */
.map-notcovered-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}
.map-notcovered-card {
    border: 1px solid #fee2e2;
    background: #fff7f7;
    border-radius: 1rem;
    padding: 1.1rem 1.2rem;
}
.map-notcovered-card h3 { margin: 0 0 0.4rem; font-size: 0.98rem; color: #7f1d1d; }
.map-notcovered-card p { margin: 0; font-size: 0.88rem; color: #475569; line-height: 1.55; }

/* ─── CTA ─── */
.map-cta { margin: 2rem 0 3.5rem; }
.map-cta-inner {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #3157D5 100%);
    border-radius: 1.5rem;
    padding: 2.5rem 2.5rem;
    color: #fff;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.map-cta-inner h2 { color: #fff; font-weight: 800; margin-bottom: 0.5rem; }
.map-cta-inner p { color: rgba(255,255,255,0.85); margin: 0; max-width: 560px; line-height: 1.6; }
.map-cta-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.map-btn-solid { background: #fff; color: #1d4ed8; font-weight: 700; border: none; }
.map-btn-solid:hover { background: #eef2ff; color: #1e40af; }
.map-btn-ghost { border: 2px solid rgba(255,255,255,0.45); color: #fff; background: transparent; font-weight: 700; }
.map-btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.1); color: #fff; }

/* ─── Footnotes ─── */
.map-footnote { font-size: 0.85rem; color: #64748b; margin-top: 0.8rem; }

@media (max-width: 767px) {
    .map-section { padding: 1.6rem 1.2rem; }
    .map-hero { padding: 3rem 0 2.5rem; }
    .map-cta-inner { padding: 1.8rem 1.4rem; }
}
