:root {
    --score-header: #2d1942;
    --score-accent: #7c4daa;
    --score-accent-soft: #a382c5;
}

.landing-hero {
    margin: 0 0 2rem;
    padding: 1.5rem 1.6rem;
    border: 1px solid rgba(124, 77, 170, 0.18);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(163, 130, 197, 0.18), transparent 38%),
        linear-gradient(135deg, rgba(45, 25, 66, 0.05), rgba(124, 77, 170, 0.08));
}

.landing-kicker {
    margin: 0 0 0.45rem;
    color: #643899;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.landing-hero h2 {
    margin: 0 0 0.7rem;
    font-size: 2rem;
    line-height: 1.15;
}

.landing-lead {
    margin: 0;
    max-width: 48rem;
    font-size: 1.05rem;
    line-height: 1.65;
}

.landing-grid {
    display: grid;
    gap: 1rem;
    margin: 1rem 0 2rem;
}

.landing-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-card {
    padding: 1.1rem 1.1rem 1rem;
    border: 1px solid rgba(45, 25, 66, 0.12);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(45, 25, 66, 0.04);
}

.landing-card h3 {
    margin-top: 0;
    margin-bottom: 0.55rem;
    color: var(--score-header);
    font-size: 1.05rem;
}

.landing-card p,
.landing-card ul {
    margin-bottom: 0;
}

.landing-card ul {
    padding-left: 1.1rem;
}

.landing-card-compact p {
    line-height: 1.5;
}

.landing-quick-links {
    margin: 0 0 2rem;
}

.landing-quick-links h2 {
    margin-bottom: 0.3rem;
}

.landing-section-label {
    margin: 1.2rem 0 0.5rem;
    color: var(--score-accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.landing-section-label:first-of-type {
    margin-top: 0;
}

.landing-card-link {
    display: block;
    padding: 0.85rem 1rem 0.75rem;
    border: 1px solid rgba(45, 25, 66, 0.10);
    border-left: 3px solid var(--score-accent);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(45, 25, 66, 0.04);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.landing-card-link:hover,
.landing-card-link:focus-visible {
    border-left-color: #643899;
    box-shadow: 0 6px 20px rgba(45, 25, 66, 0.10);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.landing-card-link:focus-visible {
    outline: 2px solid var(--score-accent);
    outline-offset: 2px;
}

.landing-card-link .landing-link-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 0.2rem;
    color: var(--score-header);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.landing-card-link .landing-link-title::after {
    content: "\2197";
    flex-shrink: 0;
    font-size: 0.8em;
    color: var(--score-accent-soft);
    transition: color 180ms ease;
}

.landing-card-link:hover .landing-link-title::after {
    color: var(--score-accent);
}

.landing-card-link .landing-link-desc {
    margin: 0;
    color: #5f5f5f;
    font-size: 0.82rem;
    line-height: 1.45;
}

.chapter-map-note {
    margin: 0 0 1rem;
    color: #5f5f5f;
}

.chapter-map-note + .mermaid {
    overflow-x: auto;
    overflow-y: auto;
    margin: 1rem 0 2rem;
    padding: 1rem;
    min-height: 34rem;
    border: 1px solid rgba(45, 25, 66, 0.12);
    border-radius: 14px;
    background: linear-gradient(180deg, #fffefb, #f8f6f1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.chapter-map-note + .mermaid {
    width: max-content;
    min-width: 100%;
}

.chapter-map-note + .mermaid svg {
    display: block;
    max-width: none;
}

.chapter-map-note + .mermaid svg .chapter-map-node-chapter :is(.nodeLabel, .label, foreignObject, div, span, p, text, tspan) {
    font-weight: 700 !important;
    fill: #2d1942 !important;
    color: #2d1942 !important;
    letter-spacing: 0.01em !important;
}

.chapter-map-note + .mermaid svg .chapter-map-node-chapter :is(rect, circle, ellipse, polygon, path) {
    stroke: rgba(45, 25, 66, 0.55) !important;
    stroke-width: 3px !important;
    filter: drop-shadow(0 3px 10px rgba(45, 25, 66, 0.16));
}

.chapter-map-note + .mermaid svg .chapter-map-node-section :is(.nodeLabel, .label, foreignObject, div, span, p, text, tspan) {
    font-weight: 500 !important;
    fill: rgba(45, 25, 66, 0.9) !important;
    color: rgba(45, 25, 66, 0.9) !important;
}

.chapter-map-note + .mermaid svg .chapter-map-node-section :is(rect, circle, ellipse, polygon, path) {
    stroke-width: 1.6px;
    filter: drop-shadow(0 1px 3px rgba(45, 25, 66, 0.05));
}

.chapter-map-note + .mermaid svg [data-chapter-map-href] {
    cursor: pointer;
}

.chapter-map-note + .mermaid svg [data-chapter-map-href]:focus {
    outline: none;
}

.chapter-map-note + .mermaid svg [data-chapter-map-href] :is(rect, circle, ellipse, polygon, path) {
    transition: stroke 160ms ease, stroke-width 160ms ease, filter 160ms ease;
}

.chapter-map-note + .mermaid svg [data-chapter-map-href]:is(:hover, :focus-visible) :is(rect, circle, ellipse, polygon, path) {
    stroke: var(--score-accent);
    stroke-width: 2.5px;
    filter: drop-shadow(0 0 6px rgba(124, 77, 170, 0.22));
}

@media screen and (max-width: 900px) {
    .landing-grid-2,
    .landing-grid-3 {
        grid-template-columns: 1fr;
    }

    .landing-hero h2 {
        font-size: 1.6rem;
    }

    .landing-card-link .landing-link-title {
        font-size: 0.88rem;
    }
}
