:root {
    --ink: #20251c;
    --ink-soft: #555d4d;
    --olive-950: #24301c;
    --olive-900: #344126;
    --olive-800: #45542f;
    --olive-600: #778341;
    --olive-500: #929b4d;
    --cream: #f5f0e5;
    --cream-deep: #e9dfcd;
    --paper: #fffdf8;
    --brown: #6b4936;
    --brown-dark: #4a3025;
    --gold: #d2a63f;
    --line: rgba(52, 65, 38, 0.17);
    --shadow: 0 20px 55px rgba(38, 45, 28, 0.13);
    --shadow-small: 0 10px 30px rgba(38, 45, 28, 0.10);
    --radius-sm: 12px;
    --radius: 22px;
    --radius-lg: 36px;
    --container: 1180px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

body.drawer-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.container {
    width: min(calc(100% - 40px), var(--container));
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    transform: translateY(-160%);
    border-radius: 8px;
    background: var(--paper);
    color: var(--olive-950);
    padding: 10px 14px;
    font-weight: 800;
}

.skip-link:focus {
    transform: translateY(0);
}

.page-progress {
    position: fixed;
    z-index: 900;
    inset: 0 0 auto;
    height: 3px;
    pointer-events: none;
}

.page-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--gold);
}

.top-line {
    background: var(--olive-950);
    color: rgba(255, 253, 248, 0.78);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.top-line-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-block: 8px;
}

.site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.94);
    backdrop-filter: blur(14px);
}

.nav-shell {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--olive-950);
    text-decoration: none;
}

.brand-mark {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 253, 248, 0.35);
    border-radius: 50%;
    background: var(--olive-900);
    color: var(--cream);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-copy {
    display: grid;
    line-height: 1.1;
}

.brand-copy strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.04rem;
}

.brand-copy small {
    margin-top: 5px;
    color: var(--olive-600);
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    border-radius: 999px;
    padding: 10px 13px;
    color: var(--ink-soft);
    font-size: 0.88rem;
    font-weight: 750;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease;
}

.nav-link:hover,
.nav-link.ativo {
    background: var(--cream);
    color: var(--olive-950);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    color: var(--olive-950);
    cursor: pointer;
}

.menu-toggle-lines {
    display: grid;
    gap: 4px;
}

.menu-toggle-lines i {
    width: 20px;
    height: 2px;
    border-radius: 99px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines i:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines i:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines i:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 12px 20px;
    background: var(--olive-900);
    color: var(--paper);
    font-weight: 800;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover {
    transform: translateY(-2px);
    background: var(--olive-800);
    box-shadow: var(--shadow-small);
}

.button-small {
    min-height: 42px;
    margin-left: 6px;
    padding: 9px 16px;
    font-size: 0.84rem;
}

.button-accent {
    background: var(--brown);
}

.button-accent:hover {
    background: var(--brown-dark);
}

.button-light {
    border-color: rgba(255, 255, 255, 0.5);
    background: var(--paper);
    color: var(--olive-950);
}

.button-outline {
    border-color: var(--olive-900);
    background: transparent;
    color: var(--olive-900);
}

.button-outline:hover {
    background: var(--cream);
}

.text-link {
    color: var(--olive-800);
    font-weight: 850;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--olive-600);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 22px;
    height: 2px;
    content: "";
    background: currentColor;
}

.section {
    padding-block: 100px;
}

.section-compact {
    padding-block: 68px;
}

.section-cream {
    background: var(--cream);
}

.section-dark {
    background: var(--olive-950);
    color: var(--paper);
}

.section-heading {
    max-width: 710px;
    margin-bottom: 42px;
}

.section-heading h2,
.page-intro h1,
.content-title {
    margin: 12px 0 16px;
    color: var(--olive-950);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.2rem, 5vw, 4.35rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.section-heading h2 {
    font-size: clamp(2rem, 4vw, 3.25rem);
}

.section-heading p,
.page-intro p {
    margin: 0;
    color: var(--ink-soft);
    font-size: clamp(1rem, 1.5vw, 1.16rem);
}

.section-dark .section-heading h2,
.section-dark .section-heading p,
.section-dark .eyebrow {
    color: var(--paper);
}

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 700px;
    display: grid;
    align-items: center;
    background: var(--cream);
}

.hero::before {
    position: absolute;
    z-index: -1;
    inset: 0 auto 0 0;
    width: 15px;
    content: "";
    opacity: 0.45;
    background:
        linear-gradient(45deg, transparent 42%, var(--olive-600) 43% 57%, transparent 58%) 0 0 / 14px 14px,
        linear-gradient(-45deg, transparent 42%, var(--olive-600) 43% 57%, transparent 58%) 0 7px / 14px 14px;
}

.hero::after {
    position: absolute;
    z-index: -2;
    top: -18%;
    right: -10%;
    width: min(52vw, 760px);
    aspect-ratio: 1;
    border-radius: 50%;
    content: "";
    background: var(--brown);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    align-items: center;
    gap: clamp(36px, 6vw, 86px);
    padding-block: 70px;
}

.hero-copy h1 {
    max-width: 720px;
    margin: 18px 0 22px;
    color: var(--olive-950);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.25rem, 7vw, 6.8rem);
    font-weight: 500;
    letter-spacing: -0.065em;
    line-height: 0.84;
}

.hero-copy h1 span {
    display: block;
    margin-left: clamp(22px, 6vw, 90px);
    color: var(--olive-600);
}

.hero-copy > p {
    max-width: 610px;
    margin: 0;
    color: var(--ink-soft);
    font-size: clamp(1.02rem, 1.7vw, 1.25rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 28px 0 0;
    padding: 0;
    color: var(--olive-800);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    list-style: none;
    text-transform: uppercase;
}

.hero-meta li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.hero-meta li::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    content: "";
    background: var(--gold);
}

.hero-visual {
    position: relative;
    width: min(100%, 440px);
    justify-self: end;
}

.brand-poster {
    position: relative;
    overflow: hidden;
    border: 9px solid rgba(255, 253, 248, 0.72);
    border-radius: 180px 180px var(--radius-lg) var(--radius-lg);
    background: var(--cream);
    box-shadow: 0 28px 80px rgba(34, 27, 20, 0.28);
}

.brand-poster img {
    width: 100%;
    height: min(57vw, 540px);
    object-fit: cover;
    object-position: center;
}

.stat-float {
    position: absolute;
    right: -35px;
    bottom: 38px;
    width: 185px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 24px;
    background: rgba(255, 253, 248, 0.92);
    box-shadow: var(--shadow);
    padding: 18px;
    backdrop-filter: blur(10px);
}

.stat-float strong {
    display: block;
    color: var(--olive-900);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.5rem;
    line-height: 1;
}

.stat-float span {
    display: block;
    margin-top: 6px;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.35;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.info-card {
    position: relative;
    overflow: hidden;
    min-height: 245px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    padding: 26px;
    box-shadow: var(--shadow-small);
}

.info-card .number {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 50%;
    background: var(--cream);
    color: var(--olive-800);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.1rem;
    font-weight: 800;
}

.info-card h3 {
    margin: 35px 0 10px;
    color: var(--olive-950);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.34rem;
    line-height: 1.08;
}

.info-card p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.solution-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.solution-card {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    padding: 22px;
}

.solution-card span {
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.solution-card h3 {
    margin: auto 0 10px;
    color: var(--paper);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.28rem;
    line-height: 1.08;
}

.solution-card p {
    margin: 0;
    color: rgba(255, 253, 248, 0.72);
    font-size: 0.86rem;
}

.split-feature {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: stretch;
    gap: 34px;
}

.feature-image {
    position: relative;
    overflow: hidden;
    min-height: 530px;
    border-radius: var(--radius-lg);
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-image::after {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    content: "";
    background: linear-gradient(transparent, rgba(27, 32, 22, 0.64));
}

.feature-image figcaption {
    position: absolute;
    z-index: 1;
    right: 24px;
    bottom: 22px;
    left: 24px;
    color: var(--paper);
    font-size: 0.83rem;
    font-weight: 700;
}

.feature-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(10px, 3vw, 40px);
}

.feature-copy h2 {
    margin: 14px 0 18px;
    color: var(--olive-950);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.4rem, 5vw, 4.3rem);
    font-weight: 500;
    letter-spacing: -0.05em;
    line-height: 0.98;
}

.feature-copy p {
    color: var(--ink-soft);
    font-size: 1.05rem;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 22px 0 30px;
    padding: 0;
    list-style: none;
}

.feature-list li {
    position: relative;
    padding-left: 22px;
    color: var(--olive-800);
    font-weight: 800;
}

.feature-list li::before {
    position: absolute;
    top: 0.68em;
    left: 0;
    width: 9px;
    height: 9px;
    transform: rotate(45deg);
    content: "";
    background: var(--olive-500);
}

.ods-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.ods-mini-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
}

.ods-mini-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.ods-mini-card p {
    margin: 0;
    padding: 14px;
    color: var(--ink-soft);
    font-size: 0.79rem;
    font-weight: 700;
    line-height: 1.4;
}

.cta-band {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--brown);
    color: var(--paper);
    padding: clamp(34px, 7vw, 76px);
}

.cta-band::after {
    position: absolute;
    top: -80%;
    right: -9%;
    width: 430px;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    content: "";
}

.cta-band h2 {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 0 16px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 1;
}

.cta-band p {
    position: relative;
    z-index: 1;
    max-width: 650px;
    color: rgba(255, 253, 248, 0.8);
}

.cta-band .hero-actions {
    position: relative;
    z-index: 1;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: var(--cream);
}

.page-hero::after {
    position: absolute;
    top: -160px;
    right: -110px;
    width: 420px;
    aspect-ratio: 1;
    border-radius: 50%;
    content: "";
    background: var(--brown);
    opacity: 0.94;
}

.page-intro {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding-block: 88px;
}

.page-intro h1 {
    max-width: 740px;
}

.page-intro p {
    max-width: 680px;
}

.quick-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.fact-card {
    border-top: 4px solid var(--olive-600);
    border-radius: 0 0 18px 18px;
    background: var(--cream);
    padding: 24px;
}

.fact-card strong {
    display: block;
    color: var(--olive-950);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.7rem;
    line-height: 1.05;
}

.fact-card span {
    display: block;
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 0.86rem;
}

.explore-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.search-field {
    width: min(100%, 430px);
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink);
    padding: 12px 18px;
    box-shadow: var(--shadow-small);
}

.search-result-count {
    color: var(--ink-soft);
    font-size: 0.86rem;
    font-weight: 750;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.explore-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    padding: 26px;
    box-shadow: var(--shadow-small);
}

.explore-card[hidden] {
    display: none;
}

.explore-card .tag,
.content-card .tag {
    align-self: flex-start;
    border-radius: 999px;
    background: var(--cream);
    color: var(--olive-800);
    padding: 6px 10px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.explore-card h2,
.content-card h3 {
    margin: 34px 0 10px;
    color: var(--olive-950);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.7rem;
    line-height: 1.05;
}

.explore-card p,
.content-card p {
    margin: 0;
    color: var(--ink-soft);
}

.explore-card details {
    margin-top: auto;
    padding-top: 20px;
}

.explore-card summary {
    color: var(--olive-800);
    font-weight: 850;
    cursor: pointer;
}

.explore-card details p {
    padding-top: 10px;
    font-size: 0.9rem;
}

.media-banner {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--olive-950);
    color: var(--paper);
}

.media-banner img {
    width: 100%;
    height: 100%;
    min-height: 450px;
    object-fit: cover;
}

.media-banner-copy {
    display: grid;
    align-content: center;
    padding: clamp(30px, 6vw, 70px);
}

.media-banner-copy h2 {
    margin: 14px 0 18px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.3rem, 4.5vw, 4rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 1;
}

.media-banner-copy p {
    color: rgba(255, 253, 248, 0.76);
}

.games-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.game-tabs {
    position: sticky;
    top: 125px;
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--cream);
    padding: 12px;
}

.game-tab {
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--ink-soft);
    padding: 10px 14px;
    text-align: left;
    font-weight: 800;
    cursor: pointer;
}

.game-tab:hover,
.game-tab.active {
    background: var(--olive-900);
    color: var(--paper);
}

.game-panel {
    min-height: 520px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--paper);
    padding: clamp(24px, 5vw, 52px);
    box-shadow: var(--shadow);
}

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

.game-panel h2 {
    margin: 6px 0 10px;
    color: var(--olive-950);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
}

.game-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 28px 0 18px;
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 850;
}

.progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--cream-deep);
}

.progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--olive-600);
    transition: width 220ms ease;
}

.question-text {
    margin: 28px 0 18px;
    color: var(--olive-950);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.22;
}

.answer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.answer-button,
.true-false-button,
.municipality-button,
.memory-card {
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--cream);
    color: var(--ink);
    padding: 15px 16px;
    font-weight: 750;
    cursor: pointer;
    transition: border 150ms ease, background 150ms ease, transform 150ms ease;
}

.answer-button:hover,
.true-false-button:hover,
.municipality-button:hover {
    transform: translateY(-1px);
    border-color: var(--olive-600);
}

.answer-button.correct,
.municipality-button.correct {
    border-color: #4f793b;
    background: #e8f3df;
    color: #284a20;
}

.answer-button.wrong,
.municipality-button.wrong {
    border-color: #a14d3c;
    background: #f8e5df;
    color: #733326;
}

.answer-button:disabled,
.true-false-button:disabled,
.municipality-button:disabled {
    cursor: default;
    opacity: 0.84;
}

.feedback-box {
    min-height: 74px;
    margin-top: 20px;
    border-left: 4px solid var(--olive-600);
    border-radius: 0 12px 12px 0;
    background: var(--cream);
    padding: 14px 17px;
    color: var(--ink-soft);
}

.feedback-box:empty {
    display: none;
}

.true-false-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.true-false-button {
    min-height: 64px;
    font-size: 1.05rem;
}

.municipality-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.municipality-button {
    min-height: 52px;
    padding: 10px;
    font-size: 0.84rem;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
}

.memory-card {
    min-height: 94px;
    display: grid;
    place-items: center;
    background: var(--olive-900);
    color: transparent;
    text-align: center;
    font-size: 0.83rem;
    line-height: 1.25;
}

.memory-card::before {
    content: "RN";
    color: var(--cream);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
}

.memory-card.revealed,
.memory-card.matched {
    background: var(--cream);
    color: var(--olive-950);
}

.memory-card.revealed::before,
.memory-card.matched::before {
    display: none;
}

.memory-card.matched {
    border-color: #4f793b;
    background: #e8f3df;
}

.game-next {
    margin-top: 20px;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.impact-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-small);
}

.impact-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.impact-card div {
    padding: 18px;
}

.impact-card h2 {
    margin: 0 0 8px;
    color: var(--olive-950);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    line-height: 1.08;
}

.impact-card p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.pillar-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.pillar-card {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    padding: 24px;
}

.pillar-card strong {
    display: block;
    margin-bottom: 12px;
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.3rem;
}

.pillar-card p {
    margin: 0;
    color: rgba(255, 253, 248, 0.72);
    font-size: 0.86rem;
}

.metric-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.metric-list li {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--paper);
    padding: 19px 20px 19px 48px;
    color: var(--ink-soft);
    font-weight: 700;
}

.metric-list li::before {
    float: left;
    width: 18px;
    height: 18px;
    margin: 3px 0 0 -30px;
    border: 4px solid var(--cream);
    border-radius: 50%;
    content: "";
    background: var(--olive-600);
}

.research-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.65fr) minmax(0, 1.35fr);
    align-items: center;
    gap: clamp(36px, 7vw, 90px);
}

.donut-wrap {
    position: relative;
    display: grid;
    place-items: center;
}

.donut-chart {
    width: min(100%, 340px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--olive-600) 0 85%, var(--brown) 85% 100%);
    box-shadow: var(--shadow);
}

.donut-chart::before {
    width: 61%;
    aspect-ratio: 1;
    border-radius: 50%;
    content: "";
    background: var(--cream);
}

.donut-center {
    position: absolute;
    display: grid;
    text-align: center;
}

.donut-center strong {
    color: var(--olive-950);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 3.4rem;
    line-height: 1;
}

.donut-center span {
    max-width: 130px;
    margin-top: 6px;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.25;
}

.donut-note {
    margin-top: 18px;
    color: var(--ink-soft);
    font-size: 0.77rem;
    text-align: center;
}

.team-grid,
.business-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.person-card,
.business-card,
.source-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    padding: 22px;
}

.person-card strong,
.business-card strong,
.source-card strong {
    display: block;
    color: var(--olive-950);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.16rem;
    line-height: 1.15;
}

.person-card span,
.business-card p,
.source-card p {
    display: block;
    margin: 8px 0 0;
    color: var(--ink-soft);
    font-size: 0.86rem;
}

.person-card.person-guide {
    border-color: var(--olive-600);
    background: var(--cream);
}

.sources-list {
    display: grid;
    gap: 14px;
}

.source-card {
    display: grid;
    grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr);
    gap: 30px;
}

.source-card a {
    color: var(--olive-800);
    font-weight: 850;
    overflow-wrap: anywhere;
}

.notice-box {
    border-left: 5px solid var(--gold);
    border-radius: 0 16px 16px 0;
    background: var(--cream);
    padding: 20px 24px;
    color: var(--ink-soft);
}

.notice-box strong {
    color: var(--olive-950);
}

.chat-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.chat-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.chat-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--olive-950);
    color: var(--paper);
    padding: 22px 26px;
}

.chat-card-head h2 {
    margin: 3px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
}

.assistant-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    padding: 7px 10px;
    color: rgba(255, 253, 248, 0.82);
    font-size: 0.72rem;
    font-weight: 800;
}

.assistant-status::before,
.ai-fab-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    content: "";
    background: #a9c56c;
    box-shadow: 0 0 0 4px rgba(169, 197, 108, 0.14);
}

.chat-messages {
    height: 480px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 26px;
    background:
        linear-gradient(rgba(255, 253, 248, 0.88), rgba(255, 253, 248, 0.88)),
        radial-gradient(circle at 2px 2px, rgba(52, 65, 38, 0.14) 1px, transparent 0) 0 0 / 22px 22px;
}

.chat-messages-compact {
    height: 360px;
    padding: 18px;
}

.message {
    max-width: min(85%, 640px);
    border-radius: 18px;
    padding: 13px 16px;
    white-space: pre-wrap;
}

.assistant-message {
    align-self: flex-start;
    border: 1px solid var(--line);
    border-bottom-left-radius: 5px;
    background: var(--cream);
    color: var(--ink);
}

.user-message {
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    background: var(--olive-900);
    color: var(--paper);
}

.typing-message {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.typing-message i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--olive-600);
    animation: typing 900ms infinite alternate;
}

.typing-message i:nth-child(2) {
    animation-delay: 180ms;
}

.typing-message i:nth-child(3) {
    animation-delay: 360ms;
}

@keyframes typing {
    to { opacity: 0.25; transform: translateY(-3px); }
}

.suggestion-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding: 14px 22px 0;
}

.suggestion-row button {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--cream);
    color: var(--olive-800);
    padding: 8px 11px;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
}

.suggestion-row button:hover {
    border-color: var(--olive-600);
}

.suggestion-row-compact {
    max-height: 90px;
    overflow-y: auto;
    padding: 10px 16px;
}

.chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    padding: 16px 22px 22px;
}

.chat-form input {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--cream);
    color: var(--ink);
    padding: 12px 14px;
}

.chat-form button {
    border: 0;
    border-radius: 14px;
    background: var(--brown);
    color: var(--paper);
    padding: 10px 18px;
    font-weight: 850;
    cursor: pointer;
}

.chat-side {
    display: grid;
    gap: 14px;
}

.chat-side-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--cream);
    padding: 22px;
}

.chat-side-card h2 {
    margin: 0 0 10px;
    color: var(--olive-950);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.3rem;
}

.chat-side-card p,
.chat-side-card li {
    color: var(--ink-soft);
    font-size: 0.87rem;
}

.chat-side-card ul {
    margin: 0;
    padding-left: 18px;
}

.ai-fab {
    position: fixed;
    z-index: 180;
    right: 22px;
    bottom: 22px;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: var(--brown);
    color: var(--paper);
    padding: 12px 18px;
    box-shadow: 0 18px 42px rgba(48, 29, 20, 0.3);
    font-weight: 850;
    cursor: pointer;
}

.ai-drawer {
    position: fixed;
    z-index: 220;
    top: 0;
    right: 0;
    width: min(440px, 100%);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    transform: translateX(105%);
    background: var(--paper);
    box-shadow: -25px 0 70px rgba(29, 35, 24, 0.24);
    transition: transform 240ms ease;
}

.ai-drawer.open {
    transform: translateX(0);
}

.ai-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--olive-950);
    color: var(--paper);
    padding: 20px;
}

.ai-drawer-head .eyebrow,
.ai-drawer-head h2 {
    color: var(--paper);
}

.ai-drawer-head h2 {
    margin: 3px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
}

.icon-button {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: transparent;
    color: var(--paper);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.drawer-full-link {
    margin: auto 20px 18px;
    color: var(--olive-800);
    font-size: 0.82rem;
    font-weight: 850;
    text-align: center;
}

.drawer-backdrop {
    position: fixed;
    z-index: 200;
    inset: 0;
    background: rgba(27, 32, 22, 0.46);
    backdrop-filter: blur(3px);
}

.site-footer {
    background: var(--olive-950);
    color: rgba(255, 253, 248, 0.76);
    padding: 70px 0 22px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.7fr 1fr;
    gap: clamp(34px, 7vw, 90px);
}

.brand-footer {
    color: var(--paper);
}

.brand-footer .brand-mark {
    background: var(--cream);
    color: var(--olive-950);
}

.brand-footer .brand-copy small {
    color: rgba(255, 253, 248, 0.62);
}

.footer-grid p {
    max-width: 470px;
    font-size: 0.9rem;
}

.footer-grid h2 {
    margin: 0 0 16px;
    color: var(--paper);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
}

.footer-links {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links a,
.site-footer .text-link {
    color: rgba(255, 253, 248, 0.78);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 20px;
    font-size: 0.76rem;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1050px) {
    .main-nav {
        position: absolute;
        top: 100%;
        right: 20px;
        left: 20px;
        display: none;
        align-items: stretch;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: var(--paper);
        box-shadow: var(--shadow);
        padding: 12px;
    }

    .main-nav.open {
        display: grid;
    }

    .nav-link {
        padding: 12px 14px;
    }

    .button-small {
        margin: 5px 0 0;
    }

    .menu-toggle {
        display: grid;
    }

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

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

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

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

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

@media (max-width: 820px) {
    .container {
        width: min(calc(100% - 30px), var(--container));
    }

    .top-line-inner span:last-child {
        display: none;
    }

    .top-line-inner {
        justify-content: center;
    }

    .hero {
        min-height: auto;
    }

    .hero::after {
        top: auto;
        right: -35%;
        bottom: -12%;
        width: 90vw;
    }

    .hero-grid,
    .split-feature,
    .media-banner,
    .research-layout,
    .chat-layout {
        grid-template-columns: 1fr;
    }

    .hero-copy h1 span {
        margin-left: 0;
    }

    .hero-visual {
        width: min(78%, 430px);
        justify-self: center;
    }

    .brand-poster img {
        height: min(95vw, 510px);
    }

    .stat-float {
        right: -24px;
    }

    .feature-image {
        min-height: 420px;
    }

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

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

    .games-shell {
        grid-template-columns: 1fr;
    }

    .game-tabs {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .game-tab {
        text-align: center;
    }

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

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

    .source-card {
        grid-template-columns: 1fr;
        gap: 8px;
    }

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

    .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }

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

@media (max-width: 580px) {
    .section {
        padding-block: 72px;
    }

    .section-compact {
        padding-block: 52px;
    }

    .nav-shell {
        min-height: 66px;
    }

    .brand-copy strong {
        font-size: 0.94rem;
    }

    .brand-copy small {
        font-size: 0.55rem;
    }

    .brand-mark {
        width: 39px;
        height: 39px;
    }

    .hero-grid {
        padding-block: 50px 70px;
    }

    .hero-copy h1 {
        font-size: clamp(3.15rem, 18vw, 5.3rem);
    }

    .hero-actions .button {
        width: 100%;
    }

    .hero-meta {
        display: grid;
        gap: 8px;
    }

    .hero-visual {
        width: 86%;
        justify-self: start;
        margin-left: 10px;
    }

    .stat-float {
        right: -38px;
        bottom: 24px;
        width: 160px;
    }

    .stat-float strong {
        font-size: 2rem;
    }

    .card-grid,
    .solution-grid,
    .explore-grid,
    .team-grid,
    .business-grid,
    .quick-facts,
    .pillar-grid,
    .metric-list,
    .answer-grid,
    .true-false-actions,
    .chat-side {
        grid-template-columns: 1fr;
    }

    .solution-card {
        min-height: 170px;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

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

    .page-intro {
        padding-block: 64px;
    }

    .page-hero::after {
        top: auto;
        right: -150px;
        bottom: -250px;
        width: 360px;
    }

    .explore-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .search-field {
        width: 100%;
    }

    .game-panel {
        min-height: 500px;
        border-radius: var(--radius);
    }

    .game-tabs {
        grid-template-columns: 1fr 1fr;
    }

    .game-tab {
        min-height: 58px;
        padding: 8px;
        font-size: 0.8rem;
    }

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

    .chat-card-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .chat-messages {
        height: 430px;
        padding: 16px;
    }

    .message {
        max-width: 92%;
    }

    .chat-form {
        grid-template-columns: 1fr;
        padding: 14px 16px 18px;
    }

    .chat-form button {
        min-height: 48px;
    }

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

    .footer-grid > div:first-child {
        grid-column: auto;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .ai-fab {
        right: 14px;
        bottom: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
