/*
 * Layout do Manual de Ideias (B10), sobre os tokens do design system (tokens.css, B09).
 * Referência: docs/referencia-layout-B10.zip. Nada de cor, fonte, raio ou sombra fora dos tokens.
 * Mobile first; a coluna de conteúdo tem no máximo 640 px, como nos wireframes.
 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-text); font-size: 16px; line-height: 24px; }
a { color: var(--coral); }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
[x-cloak] { display: none !important; }
.icon { flex-shrink: 0; }

/* Estilos de texto (tokens) aplicados aos elementos */
h1, .display { font-family: var(--font-display); font-size: 40px; line-height: 44px; font-weight: 800; letter-spacing: -0.02em; }
.section-title { font-family: var(--font-display); font-size: 28px; line-height: 32px; font-weight: 700; letter-spacing: -0.01em; }
h2, h3, .heading { font-family: var(--font-display); font-size: 20px; line-height: 26px; font-weight: 700; }
.lead { font-size: 18px; line-height: 28px; }
.small, .muted { font-size: 14px; line-height: 20px; font-weight: 500; }
.muted { color: var(--ink-muted); }
@media (max-width: 359px) { h1, .display { font-size: 32px; line-height: 36px; } }

.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 var(--space-2); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--space-2); top: var(--space-2); z-index: 60; padding: var(--space-1); background: var(--surface); }

/* Cabeçalho: logo e menu (botão de 44 px) */
.site-header { border-bottom: 1px solid var(--line); }
.site-header__inner { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.menu { position: relative; }
.menu > summary { list-style: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__nav { position: absolute; right: 0; top: 52px; z-index: 40; min-width: 240px; display: flex; flex-direction: column; padding: var(--space-1); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sticker); }
.menu__nav a { min-height: 44px; display: flex; align-items: center; padding: 0 12px; border-radius: var(--radius-sm); color: var(--ink); font-weight: 600; text-decoration: none; }
.menu__nav a:hover { background: var(--paper); }

/* Conteúdo: blocos empilhados com 40 px entre si */
.main { display: flex; flex-direction: column; gap: var(--space-4); padding-top: var(--space-2); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack--16 { gap: var(--space-2); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; }
.breadcrumbs a { color: var(--ink-muted); }

/* Botões */
.btn { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); padding: 0 20px; border-radius: var(--radius-pill); border: 0; font-family: var(--font-text); font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn--primary { background: var(--coral); color: var(--on-coral); }
.btn--primary:hover { background: var(--ink); color: var(--on-coral); }
.btn--secondary { min-height: 48px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.btn--secondary:hover { color: var(--coral); border-color: var(--coral); }
.btn--small { min-height: 48px; padding: 0 12px; font-size: 14px; }
.btn--large { min-height: 56px; font-size: 18px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link-again { align-self: center; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink); font-weight: 600; text-decoration: underline; cursor: pointer; }
.link-btn { padding: 0; border: 0; background: none; color: var(--ink); text-decoration: underline; cursor: pointer; }

/* Cartões (sticker) */
.sticker { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sticker); }
.tag { align-self: flex-start; padding: 2px 10px; border-radius: var(--radius-sm); border: 1px solid currentColor; font-size: 14px; line-height: 20px; font-weight: 500; }
.tag--testes { color: var(--cat-testes); }
.tag--geradores { color: var(--cat-geradores); }
.tag--jogos { color: var(--cat-jogos); }
.tag--ideias { color: var(--cat-ideias); }
.cat-chips { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-1); }
.cat-chip { min-height: 44px; display: flex; align-items: center; padding: 0 14px; border-radius: var(--radius-sm); border: 1.5px solid currentColor; background: var(--surface); font-weight: 600; text-decoration: none; }
.cards { display: flex; flex-direction: column; gap: 12px; }
.card { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-2); color: var(--ink); text-decoration: none; }
.card:hover { color: var(--ink); border-color: var(--line-strong); }
.card__title { font-family: var(--font-display); font-size: 20px; line-height: 26px; font-weight: 700; }
.card--row { flex-direction: row; align-items: center; gap: 12px; }
.card--row .card__body { flex-grow: 1; display: flex; flex-direction: column; gap: 4px; }
.row-link { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--space-2); color: var(--ink); font-weight: 600; text-decoration: none; }
.row-link:hover { color: var(--ink); border-color: var(--line-strong); }
.chevron--testes { color: var(--cat-testes); }
.chevron--geradores { color: var(--cat-geradores); }
.chevron--jogos { color: var(--cat-jogos); }
.chevron--ideias { color: var(--cat-ideias); }
.panel-box { display: flex; flex-direction: column; gap: 12px; padding: var(--space-3) var(--space-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.empty { color: var(--ink-muted); }

/* Área da ferramenta */
.stage { display: flex; flex-direction: column; gap: 20px; margin-top: var(--space-1); padding: var(--space-2); }
.stage__meta { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-muted); }
.stage__screen { display: flex; flex-direction: column; gap: 20px; }

/* Filtros (gerador): seleção com borda, texto coral e check, nunca só cor */
.filter { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.filter legend { padding: 0; margin-bottom: var(--space-1); font-weight: 600; line-height: 20px; }
.filter__options { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.chip { min-height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font-family: var(--font-text); font-size: 16px; font-weight: 600; cursor: pointer; }
.chip .icon--check { display: none; }
.chip[aria-pressed="true"] { border-color: var(--coral); color: var(--coral); }
.chip[aria-pressed="true"] .icon--check { display: block; }

/* Lista do gerador: grade de duas colunas; tocar no item copia */
.results { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-1); }
.results--long { grid-template-columns: minmax(0, 1fr); }
.results-block { display: flex; flex-direction: column; gap: var(--space-1); }
.results-block > .results { min-height: 384px; align-content: start; }
.result-item { display: flex; align-items: stretch; border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--paper); }
.result-item__copy { flex: 1; min-width: 0; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-1); padding: 8px 12px; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.result-item__text { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 24px; overflow-wrap: break-word; min-width: 0; }
.results--long .result-item__text { font-family: var(--font-text); font-weight: 600; font-size: 16px; }
.result-item__copy .icon { color: var(--ink-muted); }
.results:not(.results--long) .result-item__copy .icon { display: none; }
.results:not(.results--long) .result-item__copy { padding-right: 0; }
.result-item__copied { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--coral); }
.icon-btn { flex: 0 0 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--ink-muted); cursor: pointer; }
.icon-btn:hover, .icon-btn[aria-pressed="true"] { color: var(--coral); }
.icon-btn[aria-pressed="true"] .icon--star { fill: currentColor; }
.results__empty { grid-column: 1 / -1; color: var(--ink-muted); }

/* Quiz e trivia */
.quiz-top { display: flex; flex-direction: column; gap: var(--space-1); }
.quiz-top__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-1); }
.progress { height: 10px; border-radius: var(--radius-pill); background: var(--line); overflow: hidden; }
.progress__bar { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--yellow); transition: width .25s ease; }
.question { display: flex; flex-direction: column; gap: 12px; }
.question__text { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 30px; margin-bottom: 4px; outline: none; }
.question__image { border-radius: var(--radius-md); }
.answers { display: flex; flex-direction: column; gap: 12px; }
.answer { width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--space-2); text-align: left; border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sticker); font-family: var(--font-text); font-size: 16px; line-height: 24px; font-weight: 600; cursor: pointer; }
.answer:hover { border-color: var(--coral); }
.answer__mark { width: 28px; height: 28px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-pill); border: 2px solid var(--line-strong); color: var(--on-coral); }
.answer__mark .icon { display: none; }
.answer--picked { border: 2px solid var(--coral); color: var(--coral); }
.answer--picked .answer__mark { border-color: var(--coral); background: var(--coral); }
.answer--picked .answer__mark .icon--check { display: block; }
.answer:disabled { cursor: default; }
.option--correct { border: 2px solid var(--cat-geradores); color: var(--cat-geradores); }
.option--correct .answer__mark { border-color: var(--cat-geradores); background: var(--cat-geradores); }
.option--correct .answer__mark .icon--check { display: block; }
.option--wrong { border: 2px solid var(--cat-jogos); color: var(--cat-jogos); }
.option--wrong .answer__mark { border-color: var(--cat-jogos); background: var(--cat-jogos); }
.option--wrong .answer__mark .icon--x { display: block; }
.option--dim { opacity: .6; }
.feedback { display: flex; flex-direction: column; gap: 4px; outline: none; }
.feedback__verdict { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.feedback__verdict--ok { color: var(--cat-geradores); }
.feedback__verdict--miss { color: var(--cat-jogos); }
.quiz-nav { display: flex; gap: 12px; }
.quiz-nav .btn--primary { flex-grow: 1; }
.timer { padding: 2px var(--space-1); border-radius: var(--radius-pill); border: 1px solid var(--line-strong); font-size: 14px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.timer--low { background: var(--coral); border-color: var(--coral); color: var(--on-coral); }

/* Resultado (na ferramenta e em /r/) */
.outcome { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3) 20px; }
.outcome__bar { width: 48px; height: 8px; border-radius: var(--radius-pill); background: var(--yellow); }
.outcome__title { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 36px; letter-spacing: -0.02em; outline: none; }
.outcome__text { font-size: 18px; line-height: 28px; }
.outcome__image, .result-card { border-radius: var(--radius-md); }
.share-block { display: flex; flex-direction: column; gap: 12px; }
.share-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-1); }
.share-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.review { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: var(--space-2); }
.review__item { display: flex; flex-direction: column; gap: 4px; }
.review__q { font-weight: 600; }
.review__mine { display: flex; align-items: center; gap: 6px; }
.review__item--ok .review__mine { color: var(--cat-geradores); }
.review__item--miss .review__mine { color: var(--cat-jogos); }
.review__exp { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-muted); }
.result-pills { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.result-pill { padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; line-height: 20px; font-weight: 600; }
.shared { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3) 20px; }
.shared__tool { font-weight: 600; color: var(--ink-muted); }

/* Editorial e FAQ */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details { padding: 14px var(--space-2); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin-top: var(--space-1); }

/* Oferta de afiliado e anúncio */
.offer { display: flex; flex-direction: column; gap: 4px; padding: 12px; }
.offer__title { font-weight: 600; }
.offer__link { margin-top: 4px; font-weight: 600; }
.offer__disclosure { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-muted); }
.ad-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 276px; }
.ad-slot__label { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-muted); }
.ad-slot ins { width: 100%; }

/* Páginas de texto (institucionais) */
.prose { display: flex; flex-direction: column; gap: 12px; }
.prose h2 { margin-top: 12px; }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: var(--space-1); }
.prose code { font-size: 14px; }

/* Rodapé */
.site-footer { margin-top: var(--space-4); padding: var(--space-3) 0 32px; border-top: 1px solid var(--line); }
.site-footer__inner { display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer__logo { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-1) 20px; }
.site-footer nav a { color: var(--ink); }

/* Aviso de cookies: faixa compacta no rodapé da tela, sem cobrir a ferramenta */
.consent { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line-strong); box-shadow: var(--shadow-sticker); }
.consent[hidden] { display: none; }
.consent__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) 12px; padding: var(--space-1) var(--space-2); }
.consent__text { flex: 1 1 220px; font-size: 14px; line-height: 20px; font-weight: 500; }
.consent__actions { display: flex; gap: var(--space-1); }
.consent .btn { min-height: 44px; padding: 0 var(--space-2); font-size: 14px; }

/* Painel interno */
.panel__period { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.panel__period .chip { text-decoration: none; }
.panel__scroll { overflow-x: auto; }
.panel__table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.panel__table th, .panel__table td { padding: var(--space-1); border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.panel__table th[scope="row"], .panel__table thead th:first-child { text-align: left; white-space: normal; min-width: 14rem; }
.panel__meta { display: block; font-weight: 400; font-size: 14px; color: var(--ink-muted); }
.panel__channels { display: flex; flex-wrap: wrap; gap: var(--space-3); list-style: none; padding: 0; margin: 0; }
.panel__note { font-size: 14px; color: var(--ink-muted); }
.shared__meta { text-align: center; }
