.view {
    display: none;
    flex: 1 1 auto;
    height: 100%;
    overflow: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.view.active {
    display: block;
    animation: fade .5s ease both;
}

.view.active::-webkit-scrollbar {
    display: none;
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ctaFloat {
    0% {
        translate: 0 0;
    }

    50% {
        translate: 0 -6px;
    }

    100% {
        translate: 0 0;
    }
}

.landing-header {
    position: absolute;
    top: 24px;
    right: 32px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.landing-header .theme-toggle {
    padding: 10px 18px;
    font-size: 1.2rem;
}

.landing-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1.05fr) minmax(320px, .95fr);
    gap: clamp(36px, 5vw, 96px);
    align-items: center;
    min-height: clamp(560px, calc(100vh - 190px), 860px);
    padding-top: clamp(48px, 6vh, 96px);
    padding-bottom: clamp(20px, 4.5vh, 64px);
    width: min(1540px, 100%);
    margin-inline: auto;
    align-content: center;
}

.landing-copy {
    max-width: 760px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .4rem;
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: clamp(20px, 3vh, 36px);
}

.landing-copy h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 1.1;
    margin-bottom: clamp(20px, 3.2vh, 38px);
}

.hero-line {
    display: block;
}

.lead {
    font-size: clamp(.95rem, 2.2vw, 1.05rem);
    color: var(--muted);
    margin-bottom: clamp(8px, 1.4vh, 14px);
}

.cta-row {
    display: flex;
    gap: clamp(14px, 2vw, 22px);
    flex-wrap: wrap;
    margin-top: clamp(18px, 3vh, 34px);
    width: 100%;
    justify-content: center;
    padding-bottom: 6px;
}

.cta-row::-webkit-scrollbar {
    display: none;
}

.cta-row .primary {
    flex: 1 1 220px;
    min-width: 220px;
    max-width: 320px;
    text-align: center;
    font-size: clamp(.85rem, 2.6vw, 1.05rem);
    white-space: nowrap;
    animation: ctaFloat 6s ease-in-out infinite;
    will-change: transform, translate;
    scroll-snap-align: center;
}

.cta-row .primary:nth-child(2) {
    animation-delay: 1.2s;
}

.landing-copy .cta-row .primary {
    position: relative;
    overflow: visible;
    isolation: isolate;
    animation: ctaFloat 6s ease-in-out infinite;
    box-shadow: none;
    filter: none;
    border: 1px solid rgba(108, 109, 255, .42);
    background-size: 160% 160%;
    background-position: 0% 50%;
    transition: transform .28s cubic-bezier(.22, .68, .22, 1), translate .28s cubic-bezier(.22, .68, .22, 1), filter .26s ease, background-position .32s ease, letter-spacing .28s ease, border-color .24s ease;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform, translate, filter, background-position;
}

.landing-copy .cta-row .primary::after {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: -13px;
    height: 16px;
    border-radius: 999px;
    background: radial-gradient(ellipse at center, rgba(108, 109, 255, .56) 0%, rgba(108, 109, 255, 0) 75%);
    filter: blur(9px);
    opacity: .62;
    z-index: -1;
    pointer-events: none;
    transition: opacity .24s ease, transform .24s ease;
}

.landing-copy .cta-row .primary:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: none;
    filter: none;
    border-color: rgba(108, 109, 255, .78);
    background-position: 100% 50%;
    letter-spacing: .085rem;
}

.landing-copy .cta-row .primary:hover::after {
    opacity: .95;
    transform: translateY(4px) scale(1.15, 1.28);
}

.landing-copy .cta-row .primary:active {
    transform: translateY(-1px) scale(1.04);
    filter: none;
    border-color: rgba(108, 109, 255, .62);
}

.landing-copy .cta-row .primary:active::after {
    opacity: .52;
    transform: translateY(0);
}

body[data-theme="dark"] .landing-copy .cta-row .primary {
    border-color: rgba(171, 174, 255, .34);
}

body[data-theme="dark"] .landing-copy .cta-row .primary:hover {
    border-color: rgba(188, 190, 255, .58);
}

.landing-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width:1400px) {
    .landing-header {
        top: 30px;
        right: 44px;
    }

    .landing-visual .globe-shell {
        width: clamp(360px, 31vw, 560px);
        height: clamp(360px, 31vw, 560px);
    }

    .landing-copy h1 {
        font-size: clamp(3rem, 4.2vw, 5.2rem);
    }
}

.world-layout,
.continent-layout,
.country-layout {
    display: grid;
    gap: 32px;
}

.world-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: auto;
    gap: clamp(14px, 1.8vh, 22px);
    margin-bottom: clamp(16px, 2.2vh, 28px);
}

.world-layout>* {
    width: 100%;
}

.world-main-shell {
    order: 2;
    width: 100%;
    display: grid;
    grid-template-columns: 25% minmax(0, 1fr);
    gap: 20px 28px;
    align-items: start;
}

.world-side-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    container-type: inline-size;
    max-width: none;
    margin: 0;
    border: 1px solid rgba(15, 20, 40, .08);
    border-radius: 24px;
    background: linear-gradient(165deg, rgba(255, 255, 255, .7), rgba(243, 246, 255, .58));
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 30px rgba(15, 23, 58, .08);
    padding: 14px 14px 16px;
}

/* ─────────────────────────────────────────────
   World page — desktop layout budget (≥901px)
   app-shell = 100vh locked
   main = 3-row grid: header / 1fr content / footer
   world-layout fills the 1fr row
   ───────────────────────────────────────────── */
@media (min-width: 901px) {
    body.page-world {
        overflow: hidden;
    }

    body.page-world .app-shell {
        height: 100vh;
        min-height: 0;
        overflow: hidden;
    }

    body.page-world main {
        height: 100%;
        min-height: 0;
        display: grid;
        grid-template-rows: auto 1fr auto;
        overflow: hidden;
    }

    .page-world .world-layout {
        display: grid;
        grid-template-rows: auto 1fr;
        height: 100%;
        min-height: 0;
        margin-bottom: 0;
        padding-bottom: clamp(14px, 2.2vh, 28px);
        gap: clamp(22px, 3.2vh, 40px);
    }

    .page-world .world-main-shell {
        height: 100%;
        min-height: 0;
        grid-template-columns: clamp(200px, 18vw, 260px) minmax(0, 1fr);
        align-items: stretch;
    }

    .page-world .world-map {
        height: 100%;
        min-height: 0;
    }
}

.world-text h3 {
    font-size: clamp(1.62rem, 2.8vw, 2.26rem);
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 8px;
}

.world-text {
    order: 1;
    width: 100%;
    max-width: 740px;
    line-height: 1.15;
    margin-bottom: 0;
}

.world-text p {
    color: var(--muted);
    width: 100%;
    max-width: 860px;
    font-size: clamp(.9rem, .24vw + .74rem, 1.02rem);
    line-height: 1.28;
}

.world-map {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
}

.world-mobile-hint {
    display: none;
}

@media (min-width: 901px) {
    /* Compact when details are closed, full-height when open */
    .page-world .world-side-panel {
        width: 100%;
        height: auto;
        align-self: start;
        overflow: hidden;
    }

    .page-world .world-side-panel:has([data-details-open="true"]) {
        height: 100%;
        align-self: stretch;
    }

    .page-world .world-legend-overview-title {
        font-size: clamp(.64rem, .12vmin + .56rem, .7rem);
    }

    .page-world .world-legend-pill {
        font-size: clamp(.68rem, .1vmin + .58rem, .75rem);
        padding: clamp(6px, .55vw, 8px) clamp(8px, .7vw, 11px);
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    html[lang="fr"] .page-world .world-legend-pill {
        font-size: clamp(.64rem, .08vmin + .56rem, .71rem);
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .page-world .world-map .map-illustration {
        height: 100%;
        min-height: 0;
        max-height: none;
    }

    .page-world .world-legend-overview-grid {
        grid-template-columns: 1fr;
    }

    .page-world .legend-grid {
        grid-template-columns: 1fr;
    }
}

.world-legend-overview {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-top: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
}

.world-legend-overview-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.world-legend-overview-title {
    font-size: clamp(.66rem, .16vw + .58rem, .74rem);
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--text);
    opacity: .5;
    margin-bottom: 0;
    text-transform: uppercase;
}

.world-mapped-counter {
    font-size: clamp(.6rem, .12vw + .54rem, .68rem);
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
    opacity: .75;
}

.world-legend-overview-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}

.world-legend-pill {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid rgba(15, 20, 40, .09);
    border-radius: 8px;
    background: rgba(15, 20, 40, .028);
    color: var(--text);
    font: inherit;
    font-size: clamp(.7rem, .14vmin + .6rem, .8rem);
    line-height: 1.16;
    font-weight: 500;
    text-align: left;
    padding: clamp(7px, .7vw, 9px) clamp(9px, .85vw, 12px);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}

html[lang="fr"] .page-world .world-legend-pill {
    font-size: clamp(.67rem, .12vmin + .58rem, .75rem);
    line-height: 1.14;
    padding-inline: clamp(8px, .68vw, 11px);
    letter-spacing: -.006em;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.world-legend-pill:hover {
    background: rgba(15, 20, 40, .06);
    border-color: rgba(15, 20, 40, .16);
}

.world-legend-pill:focus-visible {
    outline: 2px solid rgba(107, 109, 255, .5);
    outline-offset: 2px;
}

.world-legend-pill[data-world-criterion-target="c1"]:hover,
.world-legend-pill[data-world-criterion-target="c1"]:focus-visible {
    border-color: rgba(165, 21, 46, .36);
    background: rgba(165, 21, 46, .06);
}

.world-legend-pill[data-world-criterion-target="c2"]:hover,
.world-legend-pill[data-world-criterion-target="c2"]:focus-visible {
    border-color: rgba(83, 35, 142, .34);
    background: rgba(83, 35, 142, .06);
}

.world-legend-pill[data-active="true"][data-world-criterion-target="c1"] {
    border-color: rgba(165, 21, 46, .42);
    background: rgba(165, 21, 46, .07);
    box-shadow: none;
}

.world-legend-pill[data-active="true"][data-world-criterion-target="c2"] {
    border-color: rgba(83, 35, 142, .4);
    background: rgba(83, 35, 142, .07);
    box-shadow: none;
}

.world-map-controls {
    display: none;
}

.world-control-btn {
    --btn-border: rgba(15, 20, 40, .14);
    --btn-shadow: 0 10px 24px rgba(15, 23, 58, .08);
    --btn-bg: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(242, 245, 255, .86));
    min-width: 0;
    min-height: 42px;
    position: relative;
    isolation: isolate;
    border-radius: 12px;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--text);
    font-size: clamp(.84rem, 1vw, .92rem);
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    padding: 8px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--btn-shadow);
    letter-spacing: .01em;
    width: auto;
    min-width: 190px;
    max-width: 270px;
    align-self: center;
    transition: transform .16s ease, box-shadow .24s ease, border-color .24s ease, background .24s ease;
}

.world-control-btn::before {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(15, 20, 40, .14);
    background: linear-gradient(145deg, rgba(255, 255, 255, .95), rgba(236, 239, 255, .75));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .74rem;
    font-weight: 500;
    flex: 0 0 20px;
}

.world-control-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, rgba(107, 109, 255, .1), transparent 70%);
    opacity: 0;
    transition: opacity .25s ease;
    z-index: -1;
}

.world-control-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(107, 109, 255, .4);
    box-shadow: 0 12px 24px rgba(15, 23, 58, .12);
}

.world-control-btn:hover::after {
    opacity: 1;
}

.world-control-btn:focus-visible {
    outline: 2px solid rgba(107, 109, 255, .45);
    outline-offset: 2px;
}

.world-details-btn {
    border: none;
    border-top: 1px solid rgba(15, 20, 40, .09);
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: .67rem;
    font-weight: 500;
    letter-spacing: .05em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 0 2px;
    cursor: pointer;
    align-self: stretch;
    border-radius: 0;
    opacity: .7;
    transition: opacity .18s ease, border-color .18s ease;
}

.world-details-btn::before {
    content: '▾';
    font-size: .8rem;
    line-height: 1;
}

.world-details-btn[data-state="open"] {
    opacity: .85;
    border-top-color: rgba(15, 20, 40, .14);
}

.world-details-btn[data-state="open"]::before {
    content: '▴';
}

.world-details-btn:hover {
    opacity: 1;
    border-top-color: rgba(15, 20, 40, .18);
}

.world-details-btn:focus-visible {
    outline: 2px solid rgba(107, 109, 255, .45);
    outline-offset: 4px;
    border-radius: 2px;
}

.world-details-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.world-criterion-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    border: 0;
    border-top: 1px solid rgba(15, 20, 40, .08);
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    padding: 12px 2px 0;
}

.world-criterion-panel[hidden] {
    display: none;
}

.world-criterion-panel h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(.9rem, .22vmin + .74rem, 1rem);
    line-height: 1.2;
    margin-bottom: 10px;
}

.world-criterion-panel p {
    margin-bottom: 8px;
    font-size: clamp(.76rem, .18vmin + .66rem, .9rem);
    color: var(--text);
    line-height: 1.42;
}

.world-criterion-label {
    font-size: clamp(.77rem, .16vmin + .66rem, .89rem);
    font-weight: 600;
    margin-top: 10px;
}

.world-criterion-list {
    margin: 0;
    padding-left: clamp(15px, 1.2vw, 18px);
}

.world-criterion-list li {
    font-size: clamp(.75rem, .16vmin + .65rem, .88rem);
    margin-bottom: 6px;
    line-height: 1.4;
}

.world-criterion-legend {
    margin-top: 0;
    border-top: 0;
    padding-top: 0;
}

.world-criterion-details {
    margin-top: 2px;
    border-top: 1px solid rgba(15, 20, 40, .08);
    padding-top: 10px;
    opacity: 0.6;
}

.world-criterion-details[hidden] {
    display: none;
}

@media (min-width:901px) {
    .page-world .world-side-panel {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .page-world .world-criterion-panel {
        display: grid;
        grid-template-rows: auto auto minmax(0, 1fr);
        align-content: start;
        min-height: 0;
        overflow: hidden;
        padding-top: 8px;
        padding-bottom: 10px;
    }

    .page-world .world-criterion-panel[data-details-open="true"] .world-criterion-legend {
        max-height: clamp(126px, 19vh, 220px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-right: 4px;
        scrollbar-width: thin;
        scrollbar-color: rgba(20, 26, 44, .22) transparent;
    }

    .page-world .world-criterion-panel[data-details-open="true"] .world-criterion-legend::-webkit-scrollbar {
        width: 5px;
    }

    .page-world .world-criterion-panel[data-details-open="true"] .world-criterion-legend::-webkit-scrollbar-track {
        background: transparent;
    }

    .page-world .world-criterion-panel[data-details-open="true"] .world-criterion-legend::-webkit-scrollbar-thumb {
        background: rgba(20, 26, 44, .2);
        border-radius: 999px;
    }

    .page-world .world-criterion-panel h4 {
        font-size: clamp(.84rem, .12vmin + .74rem, .92rem);
        margin-bottom: 8px;
    }

    .page-world .world-criterion-panel p {
        font-size: clamp(.72rem, .1vmin + .64rem, .8rem);
        line-height: 1.32;
        margin-bottom: 6px;
    }

    .page-world .world-criterion-label {
        font-size: clamp(.72rem, .1vmin + .64rem, .8rem);
        margin-top: 7px;
    }

    .page-world .world-criterion-list li {
        font-size: clamp(.7rem, .1vmin + .62rem, .78rem);
        line-height: 1.28;
        margin-bottom: 4px;
    }

    .page-world .legend-item {
        font-size: clamp(.7rem, .1vmin + .62rem, .78rem);
    }

    .page-world .world-criterion-details {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-right: 4px;
        padding-bottom: 8px;
        margin-bottom: 2px;
        scrollbar-width: thin;
        scrollbar-color: rgba(20, 26, 44, .26) transparent;
    }

    .page-world .world-criterion-panel[data-details-open="true"] .world-criterion-details {
        min-height: clamp(120px, 16vh, 220px);
    }

    .page-world .world-criterion-details::-webkit-scrollbar {
        width: 5px;
    }

    .page-world .world-criterion-details::-webkit-scrollbar-track {
        background: transparent;
    }

    .page-world .world-criterion-details::-webkit-scrollbar-thumb {
        background: rgba(20, 26, 44, .24);
        border-radius: 999px;
    }

    .page-world .world-criterion-details h4 {
        font-size: clamp(.82rem, .1vmin + .73rem, .9rem);
        margin-bottom: 8px;
        line-height: 1.2;
    }

    .page-world .world-criterion-details p {
        font-size: clamp(.7rem, .1vmin + .63rem, .79rem);
        line-height: 1.34;
        margin-bottom: 6px;
    }

    .page-world .world-criterion-details .world-criterion-label {
        font-size: clamp(.72rem, .1vmin + .64rem, .81rem);
        margin-top: 8px;
    }

    .page-world .world-criterion-details .world-criterion-list {
        padding-left: clamp(14px, 1vw, 16px);
    }

    .page-world .world-criterion-details .world-criterion-list li {
        font-size: clamp(.69rem, .1vmin + .61rem, .78rem);
        line-height: 1.3;
        margin-bottom: 4px;
    }
}

.legend-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px 12px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(.74rem, .14vmin + .65rem, .84rem);
}

.legend-swatch {
    width: clamp(10px, .6vw, 12px);
    height: clamp(10px, .6vw, 12px);
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .15);
    flex: 0 0 clamp(10px, .6vw, 12px);
}

@container (max-width: 360px) {
    .world-legend-overview-title {
        font-size: .72rem;
        margin-bottom: 6px;
    }

    .world-legend-overview-grid {
        gap: 8px;
    }

    .world-legend-pill {
        font-size: .72rem;
        line-height: 1.16;
        padding: 7px 9px;
        border-radius: 10px;
    }

    .world-criterion-panel {
        padding-top: 10px;
    }

    .world-criterion-panel h4 {
        font-size: .86rem;
        margin-bottom: 8px;
    }

    .world-criterion-panel p {
        font-size: .74rem;
        margin-bottom: 6px;
        line-height: 1.32;
    }

    .world-criterion-label {
        font-size: .74rem;
        margin-top: 8px;
    }

    .world-criterion-list {
        padding-left: 14px;
    }

    .world-criterion-list li {
        font-size: .72rem;
        margin-bottom: 5px;
        line-height: 1.3;
    }

    .legend-grid {
        gap: 6px 8px;
    }

    .legend-item {
        font-size: .72rem;
        gap: 6px;
    }

    .legend-swatch {
        width: 10px;
        height: 10px;
        flex-basis: 10px;
    }
}

@media (max-width:900px) {
    .world-control-btn {
        width: 100%;
        max-width: none;
        min-width: 0;
        justify-content: center;
        text-align: center;
    }
}

.world-map,
.continent-map,
.country-map-panel {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    width: 100%;
}

.map-illustration,
.continent-illustration {
    position: relative;
    background: transparent;
    border-radius: 24px;
    height: 600px;
    overflow: hidden;
    border: none;
    box-shadow: none;
}

.world-map .map-illustration {
    height: 100%;
    min-height: 0;
}

.country-map {
    position: relative;
    min-height: 280px;
    height: 100%;
    max-height: none;
    border-radius: 24px;
    overflow: hidden;
}

.map-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.map-svg.draggable {
    touch-action: none;
    cursor: grab;
}

.map-svg.map-interaction-locked {
    touch-action: pan-y;
    cursor: pointer;
}

.map-svg path {
    vector-effect: non-scaling-stroke;
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: fill .25s ease, stroke .25s ease, opacity .25s ease, filter .25s ease;
}

.map-illustration::after,
.continent-illustration::after,
.country-map::after {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    filter: none;
    pointer-events: none;
}

.land {
    fill: #e7e9ff;
    stroke: rgba(10, 10, 16, .9);
    stroke-width: 0.4;
    opacity: .9;
}

.land[data-continent] {
    opacity: .65;
}

.land[data-regulation-level] {
    opacity: .92;
}

.land[data-continent="americas"] {
    fill: rgba(131, 133, 255, .4);
}

.land[data-continent="europe"] {
    fill: rgba(156, 214, 255, .42);
}

.land[data-continent="africa"] {
    fill: rgba(255, 111, 125, .45);
}

.land[data-continent="asia"] {
    fill: rgba(255, 205, 140, .42);
}

.land[data-continent="oceania"] {
    fill: rgba(126, 236, 205, .45);
}

.land[data-continent=""],
.land:not([data-continent]) {
    fill: rgba(255, 255, 255, .12);
}

.land.inactive {
    fill: rgba(200, 200, 220, .45);
    stroke: rgba(150, 150, 180, .35);
    opacity: .7;
}

.land.active {
    fill: rgba(123, 124, 255, .38);
    stroke: #d4d6ff;
    opacity: 1;
}

.land.active:hover {
    fill: var(--map-hover);
    stroke: var(--map-hover);
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, .25));
}

.land.continent-focus {
    opacity: .95 !important;
    stroke: var(--map-hover) !important;
    fill: var(--map-hover) !important;
    filter: drop-shadow(0 0 16px rgba(255, 255, 255, .35));
}

.land.continent-mobile-focus {
    opacity: .95 !important;
    stroke: var(--map-hover) !important;
    fill: var(--map-hover) !important;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, .32));
}

.land.group-hover {
    fill: var(--map-hover) !important;
    stroke: var(--map-hover) !important;
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, .25));
    opacity: 1 !important;
}

body[data-theme="dark"] .land {
    stroke: rgba(5, 5, 10, .9);
    opacity: .95;
}

body[data-theme="dark"] .land[data-continent] {
    opacity: .75;
}

body[data-theme="dark"] .land[data-regulation-level] {
    opacity: .96;
}

body[data-theme="dark"] .land.inactive {
    fill: rgba(100, 100, 130, .25);
    stroke: rgba(80, 80, 110, .2);
    opacity: .55;
}

body[data-theme="dark"] .land.active {
    fill: rgba(124, 127, 255, .65);
    stroke: #d4d6ff;
    opacity: 1;
}

body[data-theme="dark"] .land.active:hover {
    fill: var(--map-hover);
    stroke: var(--map-hover);
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, .45));
}

body[data-theme="dark"] .land.continent-mobile-focus {
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, .4));
}

body[data-theme="dark"] .world-map,
body[data-theme="dark"] .continent-map,
body[data-theme="dark"] .country-map-panel {
    background: transparent;
    border: none;
    box-shadow: none;
}

body[data-theme="dark"] .map-illustration,
body[data-theme="dark"] .continent-illustration,
body[data-theme="dark"] .country-map {
    background: transparent;
    border: none;
    box-shadow: none;
}

body[data-theme="dark"] .map-illustration::after,
body[data-theme="dark"] .continent-illustration::after,
body[data-theme="dark"] .country-map::after {
    background: transparent;
    filter: none;
}

body[data-theme="dark"] .world-criterion-panel {
    border-top-color: rgba(255, 255, 255, .08);
    background: transparent;
}

body[data-theme="dark"] .world-side-panel {
    border-color: rgba(255, 255, 255, .09);
    background: linear-gradient(165deg, rgba(20, 20, 30, .5), rgba(15, 15, 24, .36));
    box-shadow: 0 24px 42px rgba(0, 0, 0, .35);
}

body[data-theme="dark"] .world-legend-overview {
    border-top-color: transparent;
    background: transparent;
}

body[data-theme="dark"] .world-legend-pill {
    border-color: rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
}

body[data-theme="dark"] .world-legend-pill:hover {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .18);
    box-shadow: none;
}

body[data-theme="dark"] .world-legend-pill[data-world-criterion-target="c1"]:hover,
body[data-theme="dark"] .world-legend-pill[data-world-criterion-target="c1"]:focus-visible {
    border-color: rgba(232, 125, 146, .44);
    background: rgba(165, 21, 46, .22);
}

body[data-theme="dark"] .world-legend-pill[data-world-criterion-target="c2"]:hover,
body[data-theme="dark"] .world-legend-pill[data-world-criterion-target="c2"]:focus-visible {
    border-color: rgba(194, 165, 234, .46);
    background: rgba(83, 35, 142, .22);
}

body[data-theme="dark"] .world-legend-pill[data-active="true"][data-world-criterion-target="c1"] {
    border-color: rgba(232, 125, 146, .5);
    background: rgba(165, 21, 46, .28);
    box-shadow: none;
}

body[data-theme="dark"] .world-legend-pill[data-active="true"][data-world-criterion-target="c2"] {
    border-color: rgba(194, 165, 234, .54);
    background: rgba(83, 35, 142, .28);
    box-shadow: none;
}

body[data-theme="dark"] .world-control-btn {
    --btn-border: rgba(255, 255, 255, .16);
    --btn-bg: linear-gradient(135deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04));
    --btn-shadow: 0 18px 34px rgba(0, 0, 0, .36);
}

body[data-theme="dark"] .world-control-btn::before {
    border-color: rgba(255, 255, 255, .24);
    background: linear-gradient(145deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .06));
}

body[data-theme="dark"] .world-control-btn::after {
    background: linear-gradient(120deg, rgba(146, 148, 255, .2), transparent 70%);
}

body[data-theme="dark"] .world-control-btn:hover {
    --btn-border: rgba(146, 148, 255, .55);
    box-shadow: 0 22px 40px rgba(0, 0, 0, .44);
}

body[data-theme="dark"] .world-details-btn {
    border-top-color: rgba(255, 255, 255, .1);
    border-color: transparent;
    background: none;
}

body[data-theme="dark"] .world-details-btn:hover,
body[data-theme="dark"] .world-details-btn[data-state="open"] {
    border-top-color: rgba(255, 255, 255, .18);
    background: none;
}

body[data-theme="dark"] .world-criterion-legend {
    border-top-color: rgba(255, 255, 255, .08);
}

body[data-theme="dark"] .world-criterion-details {
    border-top-color: rgba(255, 255, 255, .08);
}

@media (min-width:901px) {
    body[data-theme="dark"] .page-world .world-criterion-details {
        scrollbar-color: rgba(255, 255, 255, .24) transparent;
    }

    body[data-theme="dark"] .page-world .world-criterion-details::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, .22);
    }
}

body[data-theme="dark"] .legend-swatch {
    border-color: rgba(255, 255, 255, .28);
}

body[data-theme="dark"] .legend-item--unrated .legend-swatch {
    background: #9aa4b9 !important;
    border-color: rgba(255, 255, 255, .22);
}

#continentView .continent-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    align-items: stretch;
    justify-content: stretch;
    gap: clamp(22px, 3vw, 46px);
    min-height: clamp(560px, 68vh, 760px);
    padding-bottom: clamp(22px, 3vh, 42px);
}

.continent-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    align-items: stretch;
    gap: clamp(22px, 3vw, 46px);
    width: 100%;
    min-height: clamp(560px, 68vh, 760px);
}

.continent-map {
    position: relative;
    min-height: clamp(320px, 60vh, 620px);
}

#continentView .continent-map,
#continentView .continent-info {
    height: 100%;
}

.continent-illustration {
    height: 100%;
    min-height: inherit;
}

#continentView .continent-illustration {
    height: 100%;
    width: 100%;
    max-width: none;
    margin: 0;
}

.continent-info {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2vw, 28px);
    justify-content: flex-start;
    background: linear-gradient(145deg, #ffffff, #f0f2ff);
    border-radius: 32px;
    padding: clamp(24px, 2.8vw, 40px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 20px 60px rgba(148, 156, 190, .15),
        0 4px 12px rgba(131, 133, 255, 0.05);
    height: 100%;
    max-width: none;
    width: 100%;
    margin: 0;
    backdrop-filter: blur(10px);
}

.continent-info.empty {
    justify-content: flex-start;
}

.continent-info.empty .availability,
.continent-info.empty .progress-panel {
    display: none;
}

body[data-theme="dark"] .continent-info {
    background: linear-gradient(145deg, rgba(30, 30, 40, .98), rgba(20, 20, 28, .96));
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
}

#continentView .continent-info {
    justify-content: flex-start;
}

#continentView .continent-info>*:last-child {
    margin-top: 0;
}

.continent-heading {
    border-bottom: 2px solid rgba(131, 133, 255, 0.1);
    padding-bottom: clamp(14px, 1.5vw, 22px);
    margin-bottom: clamp(2px, .6vh, 10px);
}

.continent-heading h3 {
    font-size: clamp(1.95rem, 3vw, 2.55rem);
    font-family: 'Space Grotesk', sans-serif;
    background: linear-gradient(120deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-bottom: 12px;
}

.continent-info .subtitle {
    font-size: clamp(.9rem, 1.05vw, .98rem);
    color: var(--muted);
    margin-top: 4px;
    font-weight: 400;
}

.continent-info .description {
    font-size: clamp(.92rem, 1vw, 1rem);
    line-height: 1.5;
    color: var(--text);
    margin-top: clamp(8px, 1.2vh, 14px);
    font-weight: 400;
    max-width: 100%;
}

.availability {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.2vh, 14px);
}

.accent-word {
    color: var(--accent-2);
    font-weight: 600;
}

.label {
    text-transform: uppercase;
    letter-spacing: .2rem;
    font-size: .76rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.label::after {
    content: '';
    display: block;
    height: 1px;
    flex: 1;
    background: rgba(131, 133, 255, 0.2);
}

#countryList {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#countryList li {
    padding: 0;
    border-radius: 999px;
    background: transparent;
}

#countryList li button {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(131, 133, 255, 0.2);
    color: var(--text);
    font: inherit;
    font-weight: 500;
    font-size: .88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

#countryList li button:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 8px 16px rgba(131, 133, 255, 0.15);
}

body[data-theme="dark"] #countryList li button {
    background: rgba(40, 40, 55, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

body[data-theme="dark"] #countryList li button:hover {
    background: rgba(131, 133, 255, 0.15);
    border-color: var(--accent);
}

.progress-panel {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: clamp(4px, .8vh, 12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.progress-panel p {
    font-size: .95rem;
    line-height: 1.35;
}

.continent-info .donut {
    width: 92px;
    height: 92px;
    flex-basis: 92px;
}

.continent-info .donut span {
    width: 68px;
    height: 68px;
    font-size: .92rem;
}

body[data-theme="dark"] .progress-panel {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.country-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0 24px 48px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.country-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 24px;
    grid-auto-rows: 1fr;
}

.country-map-panel {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 200px;
    height: 100%;
}

.country-map {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    max-height: 220px;
    border-radius: 18px;
    overflow: hidden;
}

.country-details,
.country-legal-panel,
#countryMapPanel {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

.country-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: auto;
    height: 100%;
}

.country-legal-panel {
    display: block;
    max-height: none;
    overflow: visible;
    padding: 12px 0 0;
}

#countryMapPanel {
    display: flex;
    flex-direction: column;
}

body[data-theme="dark"] .country-details,
body[data-theme="dark"] .country-legal-panel,
body[data-theme="dark"] #countryMapPanel {
    background: transparent;
    border: none;
    box-shadow: none;
}

.country-text-block {
    font-size: .95rem;
    line-height: 1.6;
    color: var(--muted);
    white-space: normal;
}

body[data-theme="dark"] .country-text-block {
    color: var(--text);
}

.country-details h3 {
    font-size: 1.8rem;
    font-family: 'Space Grotesk', sans-serif;
    margin-top: 0;
}

@media (max-width:1100px) {
    .landing-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        min-height: auto;
        align-content: start;
    }

    .landing-copy {
        max-width: 860px;
        margin-inline: auto;
    }

    .world-layout {
        gap: 24px;
        min-height: 0;
    }

    .world-text,
    .world-text p {
        max-width: 100%;
    }

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

@media (max-width:1024px) {
    .world-layout {
        gap: 14px;
        min-height: 0;
    }

    .world-mobile-hint {
        display: none !important;
    }

    .continent-layout {
        grid-template-columns: 1fr;
        align-items: start;
        min-height: auto;
    }

    .continent-map {
        min-height: clamp(320px, 52vh, 560px);
    }

    .country-layout {
        padding: 0 16px 32px;
    }

    .country-hero {
        grid-template-columns: 1fr;
    }

    .country-map {
        min-height: 180px;
    }

    #continentView .continent-layout {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 24px;
    }

    .continent-info {
        text-align: center;
        align-items: center;
    }

    .continent-info .label,
    .continent-info p,
    .continent-info h3 {
        width: 100%;
        text-align: center;
    }

    .continent-info .progress-panel {
        justify-content: center;
    }

    #countryList {
        justify-content: center;
    }
}

@media (max-width:900px) {
    .landing-grid {
        text-align: center;
        padding-top: 90px;
    }

    .continent-map {
        min-height: clamp(280px, 46vh, 500px);
    }

    /* World page — stack: map first, legend below */
    .page-world .world-main-shell {
        display: flex;
        flex-direction: column;
        gap: 16px;
        height: auto;
    }

    .page-world .world-map {
        order: 1;
        height: clamp(260px, 52vh, 420px);
        min-height: 0;
    }

    /* 1 finger = page scrolls, 2 fingers = pinch-zoom map.
       !important overrides D3's inline touch-action:none */
    .page-world #worldMap,
    #continentMap {
        touch-action: pan-y !important;
    }

    .page-world .world-side-panel {
        order: 2;
        width: 100%;
        height: auto;
        align-self: auto;
        overflow: visible;
    }

    .page-world .world-legend-overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .world-legend-overview {
        display: block;
    }

    .world-text p {
        display: block;
        -webkit-line-clamp: unset;
        line-clamp: unset;
        -webkit-box-orient: initial;
        overflow: visible;
        font-size: .92rem;
        line-height: 1.35;
    }

    .world-control-btn {
        min-height: 38px;
        font-size: .78rem;
        padding: 5px 8px;
    }

    .world-control-btn::before {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
        font-size: .66rem;
    }

    .continent-heading h3 {
        font-size: clamp(2rem, 7.6vw, 2.7rem);
        line-height: 1.08;
        font-weight: 600;
        margin-bottom: 8px;
    }

    .continent-info .subtitle {
        font-size: .84rem;
        line-height: 1.35;
        font-weight: 400;
        opacity: .88;
    }

    .continent-info .description {
        font-size: .9rem;
        line-height: 1.45;
        font-weight: 400;
    }

    .label {
        font-size: .68rem;
        letter-spacing: .14rem;
        font-weight: 500;
        margin-bottom: 8px;
    }

    #countryList li button {
        font-size: .8rem;
        font-weight: 400;
        padding: 6px 12px;
    }

    #continentView .continent-layout {
        height: auto;
        min-height: 0;
    }

    #continentView .continent-info,
    #continentView .continent-illustration {
        height: auto;
    }

    body[data-theme="dark"] .continent-info {
        background: transparent;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
    }

    #countryMapPanel,
    .country-map-panel {
        display: none !important;
    }

    .country-hero {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .country-layout {
        gap: 14px;
    }
}

@media (max-width: 640px) {
    .world-text p {
        font-size: .88rem;
        line-height: 1.32;
    }

    .page-world .world-map {
        height: clamp(240px, 48vh, 380px);
    }


    /* Reorder: Info first (Title + Buttons), Map second */
    .continent-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px;
    }

    .continent-info {
        order: 1 !important;
        padding: 16px;
        background: transparent;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        gap: 16px;
        text-align: center;
        align-items: center;
    }

    .continent-map {
        order: 2 !important;
        min-height: clamp(300px, 46vh, 460px);
    }

    .continent-illustration {
        display: block;
        height: 46vh;
        min-height: 260px;
    }

    /* Hide non-essentials */
    .continent-info .subtitle,
    .continent-info .description,
    .continent-info .progress-panel {
        display: none !important;
    }

    .continent-heading {
        border: none;
        margin: 0;
        padding: 0;
    }

    .continent-heading h3 {
        font-size: 2.8rem;
        margin: 0;
    }

    #countryList {
        justify-content: center;
    }

    .cta-row {
        flex-wrap: wrap;
        justify-content: center;
        padding-bottom: 10px;
        overflow: visible;
        scroll-snap-type: none;
    }

    .cta-row .primary {
        flex: 1 1 100%;
        min-width: 0;
        width: 100%;
        scroll-snap-align: none;
    }

    .cta-row .primary+.primary {
        margin-top: 12px;
    }

    .landing-copy .cta-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(132px, 180px));
        justify-content: center;
        gap: 10px;
        max-width: 420px;
        margin-inline: auto;
        padding-bottom: 8px;
    }

    .landing-copy .cta-row .primary {
        flex: 0 1 auto;
        width: 100%;
        min-width: 0;
        max-width: none;
        min-height: 48px;
        padding: 10px 12px;
        font-size: .86rem;
        font-weight: 600;
        letter-spacing: .04rem;
        animation: none;
        box-shadow: none;
        filter: none;
        transition: transform .24s cubic-bezier(.22, .68, .22, 1), filter .24s ease;
    }

    .landing-copy .cta-row .primary+.primary {
        margin-top: 0;
    }

    .landing-copy .cta-row .primary:hover {
        transform: translateY(-1px) scale(1.02);
        box-shadow: none;
        filter: none;
    }

    .landing-copy .cta-row .primary:active {
        transform: translateY(0) scale(.985);
        box-shadow: none;
        filter: none;
    }

    .landing-copy .cta-row .primary:focus-visible {
        outline: 2px solid rgba(107, 109, 255, .55);
        outline-offset: 2px;
    }

    .country-layout {
        padding: 0 12px 24px;
        gap: 20px;
    }

    .country-map {
        min-height: 140px;
    }

    .legend-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width:900px) {
    .cta-row {
        overflow: visible;
        scroll-snap-type: none;
        -webkit-overflow-scrolling: auto;
        padding-bottom: 0;
    }

    .cta-row .primary {
        flex: 1 1 0;
        min-width: 0;
        scroll-snap-align: none;
    }
}

@media (max-width:560px) {
    .landing-grid {
        padding-top: 110px;
    }

    .cta-row {
        padding-bottom: 12px;
    }
}

/* Country Content Global Styles */
.country-content {
    font-family: 'Georgia', 'Times New Roman', serif;
    text-align: justify;
    line-height: 1.4;
    font-size: 1rem;
    color: var(--text);
}

.country-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
    line-height: 1.1;
    text-align: left;
}

.country-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    margin-top: 1.2rem;
    margin-bottom: 0.4rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.2rem;
    text-align: left;
}

.country-content h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: var(--accent-2);
    text-align: left;
}

.country-content p {
    margin-bottom: 0.6rem;
}

.country-content ul {
    padding-left: 1.2rem;
    margin-bottom: 0.6rem;
}

.country-content li {
    margin-bottom: 0.2rem;
}

.country-content strong {
    font-weight: 700;
    color: var(--text);
}

.abstract-box {
    background: rgba(123, 124, 255, 0.08);
    border-left: 4px solid var(--accent);
    padding: 0.8rem 1rem;
    margin-bottom: 1.2rem;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

body[data-theme="dark"] .abstract-box {
    background: rgba(123, 124, 255, 0.15);
}
