/*
 * NextGame.today — design system (portado do DESIGN.md do pacote de design).
 *
 * Conceito: "o ecrã de boot do teu próximo jogo". Fundo azul-espaço, dados do
 * jogador em azul-pulso, recomendação em dourado-troféu — o momento-prémio.
 * REGRA DE OURO: --trophy é EXCLUSIVO do momento de recomendação (reveal card,
 * botão de compartilhar). Nunca em UI comum — a escassez é o que dá o impacto.
 *
 * As fontes são auto-hospedadas em /fonts (ver fonts.css), então a CSP rígida
 * (default-src 'self') continua valendo e nada é carregado de fora.
 */

:root {
  --bg: #0b0e1a;
  --surface: #141930;
  --surface-2: #1c2340;
  --line: #262e52;
  --ink: #e9edfb;
  --ink-dim: #8a93b5;
  --pulse: #3e6dff;
  --pulse-soft: rgba(62, 109, 255, 0.14);
  --trophy: #ffc24b;
  --trophy-glow: rgba(255, 194, 75, 0.18);
  --danger: #ff5d6c;
  --danger-soft: rgba(255, 93, 108, 0.12);
  --radius: 16px;

  --space-xs: 0.375rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Antes de qualquer regra de display, senão telas com [hidden] + flex vazariam. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(1100px 520px at 50% -8%, #182046 0%, transparent 70%),
    var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 'Instrument Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding: 0 var(--space-md) var(--space-xl);
  /* Rede de segurança: nada transborda na horizontal (o que forçava o "zoom out"
     no celular). `clip` não cria contexto de rolagem, então não quebra o
     position:sticky do reveal card. */
  overflow-x: clip;
}

.shell {
  max-width: 940px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Telas de conexão respiram melhor estreitas; o resultado usa a largura toda. */
#view-menu,
#view-form,
#view-nintendo,
#view-loading,
#error {
  width: 100%;
  max-width: 660px;
  margin-inline: auto;
}

a {
  color: var(--pulse);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--pulse);
  outline-offset: 3px;
  border-radius: 4px;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.875rem;
}

.eyebrow {
  color: var(--ink-dim);
}

.muted {
  color: var(--ink-dim);
}

.small {
  font-size: 0.85rem;
}

.center {
  text-align: center;
}

/* Imagem do card na página de resultado compartilhado (/r/:id). */
.share-card-img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--line);
}

code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background: var(--surface-2);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  font-size: 0.85em;
  word-break: break-all;
}

/* ---------- header ---------- */

.header {
  text-align: center;
  padding: var(--space-lg) 0 var(--space-xs);
}

.logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 2.4rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.logo span {
  color: var(--pulse);
}
.logo em {
  font-style: normal;
  color: var(--ink-dim);
  font-weight: 700;
}

.tagline {
  color: var(--ink-dim);
  margin-top: var(--space-sm);
  font-size: 1.1rem;
}

/* ---------- blocos ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-lg);
}

.card > h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}

/* ---------- botões ---------- */

.btn {
  display: block;
  width: 100%;
  border: 0;
  cursor: pointer;
  font: 600 1rem 'Instrument Sans', sans-serif;
  border-radius: 12px;
  padding: 0.9rem 1.4rem;
  text-align: center;
  background: var(--pulse);
  color: #fff;
  transition:
    transform 0.15s ease,
    filter 0.15s ease;
}
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  text-decoration: none;
  filter: brightness(1.08);
}
.btn:disabled {
  opacity: 0.5;
  cursor: progress;
}

a.btn {
  box-sizing: border-box;
}

/* Fantasma: ações secundárias. */
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-dim);
}
.btn-ghost:hover:not(:disabled) {
  filter: none;
  color: var(--ink);
  border-color: var(--ink-dim);
}

/* Troféu: EXCLUSIVO do momento-prémio (compartilhar, ver na loja do recomendado). */
.btn-trophy {
  background: var(--trophy);
  color: #1a1405;
}

/* ---------- menu / plataformas ---------- */

.platform-grid {
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.platform {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: var(--space-md);
  cursor: pointer;
  color: var(--ink);
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}
.platform:hover {
  border-color: var(--pulse);
  transform: translateY(-1px);
}
.platform-icon {
  font-size: 1.6rem;
}
.platform-name {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
}
.platform-note {
  color: var(--ink-dim);
  font-size: 0.88rem;
}

/* ---------- cabeçalho de tela / voltar ---------- */

.back {
  background: none;
  border: 0;
  color: var(--ink-dim);
  cursor: pointer;
  font: 500 0.9rem 'Instrument Sans', sans-serif;
  padding: 0;
  margin-bottom: var(--space-md);
}
.back:hover {
  color: var(--ink);
}

.screen-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
}
.screen-head h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
}

.link-button {
  background: none;
  border: 0;
  color: var(--pulse);
  cursor: pointer;
  font: 500 0.9rem 'Instrument Sans', sans-serif;
  white-space: nowrap;
}
.link-button:hover {
  text-decoration: underline;
}

/* ---------- passos ---------- */

.steps {
  list-style: none;
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.step {
  border-top: 1px solid var(--line);
  padding-top: var(--space-md);
}
.step-head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.step-number {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  flex: none;
  border-radius: 50%;
  background: var(--pulse-soft);
  color: var(--pulse);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 0.95rem;
}
.step-title {
  font-weight: 600;
}
.step-body {
  margin-top: var(--space-sm);
}
.step-body .btn {
  display: inline-block;
  width: auto;
}

/* ---------- formulário ---------- */

.field {
  display: block;
  margin-bottom: var(--space-sm);
}
.field-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ink-dim);
  font-size: 0.85rem;
  font-weight: 600;
}

input[type='password'],
input[type='text'],
textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.9rem;
  padding: 0.85rem 1rem;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--pulse);
  box-shadow: 0 0 0 3px var(--pulse-soft);
}
textarea {
  resize: vertical;
  word-break: break-all;
  line-height: 1.4;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-md);
  color: var(--ink-dim);
  font-size: 0.88rem;
  cursor: pointer;
}

.paste-or {
  margin: var(--space-sm) 0;
}

/* ---------- instruções (details) ---------- */

.howto {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: var(--space-sm) var(--space-md);
  margin-top: var(--space-md);
}
.howto summary {
  cursor: pointer;
  font-weight: 600;
}
.howto p {
  margin-top: var(--space-sm);
}

.notice {
  border-left: 3px solid var(--trophy);
  padding-left: var(--space-sm);
}

/* ---------- tutorial (modal) ---------- */

.intro {
  width: min(560px, calc(100vw - 2rem));
  max-height: min(85vh, 900px);
  margin: auto;
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.intro::backdrop {
  background: rgba(5, 7, 14, 0.74);
}
.intro-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}
.intro-lead {
  margin-bottom: var(--space-md);
  font-size: 0.98rem;
}
.intro-heading {
  margin: var(--space-md) 0 var(--space-xs);
  color: var(--pulse);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.intro-steps,
.intro-list {
  padding-left: 1.25rem;
  font-size: 0.92rem;
}
.intro-steps li + li,
.intro-list li + li {
  margin-top: var(--space-xs);
}
.intro-note {
  margin-top: var(--space-xs);
}
.intro-warning {
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 194, 75, 0.1);
  border: 1px solid rgba(255, 194, 75, 0.32);
  border-left: 3px solid var(--trophy);
  border-radius: 10px;
  font-size: 0.9rem;
}
.intro-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* ---------- alerta de erro ---------- */

.alert {
  background: var(--danger-soft);
  border: 1px solid rgba(255, 93, 108, 0.4);
  border-left: 3px solid var(--danger);
  border-radius: 12px;
  padding: var(--space-md);
}
.alert-message {
  font-weight: 600;
}
.alert-hint {
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

/* ---------- loading ---------- */

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto var(--space-md);
  border: 3px solid var(--line);
  border-top-color: var(--pulse);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- resultado ---------- */

#view-result {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: var(--space-xl);
  align-items: start;
}

/*
 * Sem isto, cada coluna do grid tem min-width:auto (= min-content), e um título
 * ou nome longo empurra a coluna para além da tela — no celular isso força o
 * navegador a diminuir o zoom para caber ("zoom esquisito"). Com min-width:0 a
 * coluna encolhe até a largura real e o texto quebra/reticencia como deve.
 */
.result-lib,
.card-stage {
  min-width: 0;
}

/* --- coluna esquerda: total + top 10 --- */

.total {
  margin-bottom: var(--space-lg);
}
.total-big {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 4rem);
  line-height: 1;
  color: var(--ink);
  margin-top: 0.25rem;
}
.total-big small {
  font-size: 0.35em;
  color: var(--ink-dim);
  letter-spacing: 0.08em;
}
.total-sub {
  margin-top: var(--space-sm);
}
.list-head {
  margin-bottom: var(--space-sm);
}

.game-list {
  list-style: none;
}
.game-item {
  display: grid;
  grid-template-columns: 2.2em 40px 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(8px);
  animation: rise 0.5s ease forwards;
  animation-delay: calc(var(--i, 0) * 55ms);
}
@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}
.game-rank {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--ink-dim);
}
.game-cover {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.game-cover-empty {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--ink-dim);
  font-weight: 700;
  font-size: 1rem;
}
.game-info {
  min-width: 0;
}
.game-name {
  display: block;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--pulse);
  opacity: 0.85;
  margin-top: 6px;
  min-width: 2px;
}
.game-meta {
  display: block;
  margin-top: 3px;
  color: var(--ink-dim);
  font-size: 0.8rem;
}
.game-hours {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--ink-dim);
  white-space: nowrap;
}

/* --- coluna direita: reveal card (o momento-prémio) --- */

.card-stage {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.reveal-card {
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  box-shadow:
    0 0 60px var(--trophy-glow),
    0 24px 48px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: scale(0.96);
  animation: pop 0.6s ease 0.65s forwards;
}
@keyframes pop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.reveal-card .eyebrow {
  color: var(--ink-dim);
}
.rec-match {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 3rem;
  line-height: 1;
  color: var(--trophy);
  margin-top: 0.4rem;
  overflow-wrap: break-word;
}
.rec-game {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-top: 0.3rem;
  overflow-wrap: break-word;
}

/* Capa real (RAWG) dentro do card, quando existe. */
.rec-cover {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
}
.rec-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rec-cover-empty {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--trophy);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
}

.reveal-card .why {
  color: var(--ink-dim);
  font-size: 0.95rem;
}

.metacritic {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.metacritic-value {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  background: var(--score-bg, var(--pulse));
  color: #10131f;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 0.95rem;
}
.metacritic-label {
  color: var(--ink-dim);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rec-store {
  width: 100%;
}

.rec-alternates {
  margin-top: var(--space-xs);
}
.rec-alternates-title {
  margin-bottom: 0.25rem;
}
.rec-alternates-list {
  list-style: none;
}
.rec-alt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
.rec-alt-left {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
  min-width: 0;
}
.rec-alt-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/*
 * O nome agora é um link (Amazon). Como item de flex ele precisa poder encolher
 * e reticenciar — senão o nome longo transborda por cima da nota/ano à direita
 * (era o "visual quebrado" da lista "E também").
 */
.rec-alt a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}
.rec-alt-tag {
  flex: none;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: var(--surface-2);
}
.rec-alt-meta {
  flex: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--ink-dim);
}

.badge {
  align-self: flex-start;
  padding: 0.2rem 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.share-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* ---------- stats (compacto, dentro da coluna esquerda quando usado) ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: var(--space-md);
  text-align: center;
}
.stat-value {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.6rem;
  color: var(--ink);
}
.stat-label {
  color: var(--ink-dim);
  font-size: 0.8rem;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  color: var(--ink-dim);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- instruções por tipo de apontador ---------- */

.only-touch {
  display: none;
}
@media (pointer: coarse) {
  .only-pointer {
    display: none;
  }
  .only-touch {
    display: block;
  }
}

/* ---------- responsivo ---------- */

@media (max-width: 820px) {
  .result-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .card-stage {
    position: static;
    /* No celular a recomendação vem PRIMEIRO — é o que o usuário veio ver.
       A biblioteca (total + top 10) fica logo abaixo. */
    order: -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-item,
  .reveal-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
  * {
    transition: none !important;
  }
}

/* ---------- páginas de indicação (SEO: /indicacao) ---------- */

/* O logo nas páginas de indicação é um link para a home (lá o h1 é o título
   da página, não a marca). Herda o visual do .logo sem sublinhado. */
.logo-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}
.logo-link:hover {
  text-decoration: none;
}
.logo-link .logo {
  display: block;
}

.seo-breadcrumb {
  padding: 0 var(--space-xs);
}

.seo-h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

.seo-intro {
  color: var(--ink-dim);
  margin-bottom: var(--space-md);
}

.seo-section h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.2rem;
  margin: var(--space-md) 0 var(--space-sm);
}
.seo-section h2:first-child {
  margin-top: 0;
}

.seo-list {
  list-style: none;
}
.seo-item {
  display: grid;
  grid-template-columns: 2.2em 40px 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.seo-item:last-child {
  border-bottom: none;
}
.seo-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}
.seo-year {
  font-weight: 400;
  font-size: 0.85em;
}
.seo-score {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
  color: var(--trophy);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
}

.seo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.seo-tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.85rem;
}
.seo-tag:hover {
  text-decoration: none;
  border-color: var(--pulse);
}
.seo-tag-current {
  border-color: var(--pulse);
  background: var(--pulse-soft);
}

.seo-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-sm);
}
.seo-hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: var(--space-sm);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
}
.seo-hub-card:hover {
  text-decoration: none;
  border-color: var(--pulse);
}
.seo-hub-name {
  font-weight: 600;
}

/* Rodapé da home: links para as páginas de indicação. */
.footer-nav {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1rem;
  margin-top: var(--space-xs);
}

/* ---------- anúncios & consentimento ---------- */

/*
 * Slots de anúncio (ads.js). Nascem com [hidden] no HTML; o JS revela conforme
 * config + consentimento. `min-height` só no estado ativo, para reservar o
 * espaço do anúncio e segurar o layout shift.
 */
.ad-slot {
  width: 100%;
  max-width: 660px;
  margin-inline: auto;
}

.ad-slot-active {
  min-height: 100px;
}

/* slot-landing só existe na tela de menu — anúncio perto do campo de NPSSO é
   proibido, então qualquer outra tela visível o remove do fluxo. */
body:has(#view-menu[hidden]) #slot-landing {
  display: none !important;
}

/* Placeholder de dev (ADS_ENABLED=false ou slot sem id): discreto, tracejado. */
.ad-slot-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-dim);
}
.ad-slot-placeholder .ad-slot-label {
  letter-spacing: 0.3em;
  opacity: 0.6;
}

/* O slot do resultado vive na coluna da biblioteca, acima do rodapé dela. */
#slot-result-mid {
  margin-top: var(--space-md);
}

/*
 * Banner de consentimento (consent.js). Segue o design system: --surface,
 * --line, botão primário --pulse e fantasma. Nada de dourado — o troféu é
 * exclusivo do momento de recomendação.
 */
.consent-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 60;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.35);
  padding: var(--space-md);
}

.consent-inner {
  max-width: 940px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
}

.consent-text {
  flex: 1 1 320px;
  color: var(--ink-dim);
  margin: 0;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

/* Os .btn do site são blocos de largura cheia; no banner viram botões compactos. */
.consent-btn {
  display: inline-block;
  width: auto;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
}

.consent-panel {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--line);
  padding-top: var(--space-sm);
}

/* ---------- páginas de conteúdo (/faq etc.) ---------- */

.faq-item + .faq-item {
  margin-top: var(--space-md);
}

.faq-q {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}
