:root {
  --navy: #12304a;
  --navy-deep: #0a2032;
  --blue: #176b87;
  --blue-soft: #dff3f7;
  --paper: #f7f9fb;
  --white: #ffffff;
  --ink: #14212b;
  --muted: #536674;
  --line: #ced9df;
  --success: #12633f;
  --danger: #a32929;
  --warning: #754d00;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(10, 32, 50, .10);
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 1rem/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--blue); }
button, input, select { font: inherit; }
button, .button { min-height: 44px; }
:focus-visible { outline: 3px solid #f2a900; outline-offset: 3px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--white); padding: .7rem 1rem; }
.skip-link:focus { left: 8px; }
.shell { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.site-header { color: var(--white); background: linear-gradient(135deg, var(--navy-deep), var(--blue)); padding: clamp(2rem, 5vw, 4.5rem) 0; }
.site-header h1 { max-width: 16ch; margin: .2rem 0 .6rem; font-size: clamp(2.1rem, 7vw, 4.25rem); line-height: 1.03; }
.brand-row { display: flex; align-items: center; gap: 1rem; }
.brand-logo { width: 76px; height: 70px; object-fit: contain; padding: .25rem; background: var(--white); border-radius: 12px; }
.brand-copy { min-height: 2rem; display: flex; align-items: center; }
.status-line { display: inline-block; margin: 1.1rem 0 0; padding: .4rem .7rem; color: var(--navy-deep); background: #f7dda0; border-radius: 999px; font-size: .84rem; font-weight: 800; }
.eyebrow { margin: 0; font-size: .78rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.lead { max-width: 58ch; margin: 0; font-size: clamp(1rem, 2vw, 1.25rem); }
.main-content { padding-block: 2.5rem 4rem; }
.project-rationale { margin-bottom: 2.75rem; padding: clamp(1.25rem, 3vw, 2rem); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.project-rationale h2 { max-width: 26ch; margin: .25rem 0 .8rem; line-height: 1.15; }
.project-rationale > div > p:last-child { max-width: 78ch; color: var(--muted); }
.rationale-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.rationale-grid li { display: grid; gap: .35rem; padding: 1rem; background: var(--blue-soft); border-radius: 12px; }
.rationale-grid span { color: var(--muted); }
.evidence-note { margin: 1rem 0 0; padding: .8rem 1rem; color: var(--navy); background: #fff8df; border-left: 5px solid #d49a00; border-radius: 8px; }
.section-heading { display: flex; gap: 1rem; align-items: end; justify-content: space-between; margin-bottom: 1.25rem; }
.section-heading h2, .privacy-note h2 { margin: .2rem 0 0; line-height: 1.15; }
.count { margin: 0; color: var(--muted); }
.filters { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(10rem, .7fr) minmax(18rem, 1.9fr); gap: 1rem; padding: 1rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.filters label { display: grid; gap: .35rem; font-weight: 700; }
.filters input, .filters select { width: 100%; padding: .7rem .8rem; color: var(--ink); background: var(--white); border: 1px solid #8498a5; border-radius: 10px; }
.topic-filter { min-width: 0; margin: 0; border: 0; padding: 0; }
.topic-filter legend { padding: 0; font-weight: 800; }
.topic-filter p { margin: .15rem 0 .55rem; color: var(--muted); font-size: .82rem; }
.topic-options { display: flex; flex-wrap: wrap; gap: .45rem; }
.topic-options label { position: relative; display: inline-flex; align-items: center; min-height: 40px; cursor: pointer; }
.topic-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.topic-options span { display: inline-flex; align-items: center; min-height: 40px; padding: .45rem .7rem; border: 1px solid #8498a5; border-radius: 999px; background: #fff; color: var(--navy); font-size: .88rem; font-weight: 750; }
.topic-options input:checked + span { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.topic-options input:focus-visible + span { outline: 3px solid #f2a900; outline-offset: 3px; }
.clear-topics { margin-top: .65rem; border: 0; padding: .35rem .55rem; background: transparent; color: var(--blue); font-weight: 800; text-decoration: underline; cursor: pointer; }
.catalogue { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.game-card { display: flex; flex-direction: column; padding: 1.25rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.game-card h3 { margin: .35rem 0 .5rem; line-height: 1.2; }
.game-card p { margin: 0 0 1rem; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.meta li { padding: .25rem .55rem; color: var(--navy); background: var(--blue-soft); border-radius: 999px; font-size: .85rem; font-weight: 700; }
.button { display: inline-flex; align-items: center; justify-content: center; margin-top: auto; padding: .7rem 1rem; color: var(--white); background: var(--blue); border: 0; border-radius: 10px; font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--navy); }
.privacy-note { margin-top: 2.5rem; padding: 1.25rem; background: var(--blue-soft); border-radius: var(--radius); }
.privacy-note p { margin-bottom: 0; }
.empty { padding: 1.5rem; text-align: center; color: var(--muted); }
.site-footer { padding: 1.5rem 0; color: var(--white); background: var(--navy-deep); }

/* Jogo */
.game-header { padding: 1rem 0; background: var(--navy-deep); color: var(--white); }
.game-header .shell { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; justify-content: space-between; }
.game-brand { display: flex; align-items: center; gap: .8rem; }
.game-logo { width: 56px; height: 52px; object-fit: contain; padding: .2rem; background: var(--white); border-radius: 9px; }
.school-id { margin: 0; font-size: .88rem; font-weight: 700; }
.back-link { color: var(--white); font-weight: 700; }
.game-main { padding-block: 2rem 4rem; }
.game-intro, .game-panel, .completion { padding: clamp(1rem, 3vw, 1.5rem); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.game-intro h1 { margin: .35rem 0 .75rem; font-size: clamp(1.8rem, 5vw, 3rem); line-height: 1.08; }
.instructions { max-width: 70ch; }
.instructions h2 { margin: 1.25rem 0 .75rem; }
.instruction-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.instruction-steps li { position: relative; display: grid; gap: .35rem; min-height: 8rem; padding: 3.2rem 1rem 1rem; background: var(--blue-soft); border-radius: 12px; counter-increment: step; }
.instruction-steps li::before { content: counter(step); position: absolute; top: .8rem; left: 1rem; display: grid; place-items: center; width: 2rem; height: 2rem; color: var(--white); background: var(--blue); border-radius: 50%; font-weight: 900; }
.instruction-steps span { color: var(--muted); }
.finish-rule { padding: .85rem 1rem; color: var(--success); background: #e8f6ef; border-left: 5px solid var(--success); border-radius: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.25rem; }
.button.secondary { color: var(--navy); background: var(--white); border: 2px solid var(--navy); }
.button.sound-toggle { color: var(--white); background: transparent; border: 2px solid rgba(255,255,255,.7); }
.progress { margin-left: auto; font-weight: 800; }
.questions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1rem; margin-top: 1.25rem; }
.question { display: grid; gap: .8rem; padding: 1rem; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.question p { margin: 0; }
.question label { font-weight: 700; }
.question select { width: 100%; padding: .7rem; color: var(--ink); background: var(--white); border: 1px solid #8498a5; border-radius: 9px; }
.feedback { min-height: 1.5rem; font-weight: 800; }
.feedback.correct { color: var(--success); }
.feedback.incorrect { color: var(--danger); }
.feedback.missing { color: var(--warning); }
.game-guidance { margin: 1.25rem 0 0; padding: 1rem; color: var(--navy); background: var(--blue-soft); border-radius: 12px; font-weight: 750; }
.completion { margin-top: 1.25rem; border-left: 7px solid var(--success); }
.completion h2 { margin-top: 0; }
[hidden] { display: none !important; }

@media (max-width: 700px) {
  .filters { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
  .progress { width: 100%; margin-left: 0; }
  .instruction-steps { grid-template-columns: 1fr; }
  .rationale-grid { grid-template-columns: 1fr; }
  .instruction-steps li { min-height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
