/* Piadas Duvidosas — design "Opção A · Tabloide" */

:root {
  --ink: #161412;
  --paper: #F4F1EA;
  --accent: #B00D27;
  --accent-dark: #8E0A1F;
  --muted: #4A4640;
  --white: #FFFFFF;
  --serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
a { color: var(--ink); text-underline-offset: 0.15em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { text-wrap: balance; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 10px 16px; background: var(--ink); color: var(--paper); }
.skip:focus { left: 8px; }

/* ── texto miúdo ── */
.kicker { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.kicker-accent { color: var(--accent); }
.eyebrow { margin: 0 0 16px; font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.lede { margin: 16px 0 0; font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 62ch; }
.fine { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

/* ── faixa do topo, cabeçalho e menu ── */
.strip { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 14px 0; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; border-bottom: 1px solid var(--ink); }
.masthead { text-align: center; padding: 36px 0 20px; border-bottom: 6px double var(--ink); }
.masthead h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 9vw, 120px); line-height: 0.95; letter-spacing: -0.02em; }
.tagline { margin: 14px 0 0; font-family: var(--serif); font-style: italic; font-size: 22px; }

.nav-main { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px; padding: 14px 0; border-bottom: 1px solid var(--ink); font-weight: 600; font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; }
.nav-main a, .topbar-nav a { display: inline-block; padding: 10px 0; text-decoration: none; }
.nav-main a[aria-current="page"], .topbar-nav a[aria-current="page"] { color: var(--accent); }

.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 20px 0; border-bottom: 6px double var(--ink); }
.wordmark { font-family: var(--serif); font-size: 40px; line-height: 1; text-decoration: none; }
.topbar-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; }

.crumbs { padding: 18px 0; font-size: 14px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "›"; margin-right: 8px; }
.crumbs a { color: var(--ink); }

/* ── botões ── */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border: 0; background: var(--ink); color: var(--paper); font: 600 17px var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: #000; color: var(--paper); }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--accent-dark); color: var(--white); }
.btn-paper { min-height: 48px; padding: 0 20px; background: var(--paper); color: var(--ink); font-size: 16px; }
.btn-paper:hover { background: var(--white); color: var(--ink); }

.btn-line { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 2px solid var(--ink); background: transparent; color: var(--ink); font: 600 15px var(--sans); text-decoration: none; cursor: pointer; }
.btn-line:hover, .btn-line.is-ink { background: var(--ink); color: var(--paper); }
.btn-line.is-ink:hover { background: #000; }

/* ── revelar a resposta ── */
details.reveal > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 32px; list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details.reveal > summary:focus-visible { outline: none; }
details.reveal > summary:focus-visible .btn { outline: 3px solid var(--accent); outline-offset: 3px; }
details.reveal[open] > summary { display: none; }
.reveal-hint { font-size: 15px; color: var(--muted); }
.reveal-body { margin-top: 28px; padding-top: 24px; border-top: 2px solid var(--ink); }
.answer { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(30px, 4vw, 48px); line-height: 1.1; color: var(--accent); }
.answer-lg { font-size: clamp(36px, 5vw, 60px); line-height: 1.05; }
.next { margin-top: 24px; }

.react-title { margin: 28px 0 12px; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.react-row { display: flex; flex-wrap: wrap; gap: 10px; }
.react-btn { min-height: 48px; padding: 0 20px; font-size: 16px; }
.react-btn:hover { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.react-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.react-thanks { margin: 14px 0 0; font-size: 15px; color: var(--muted); }
.react-thanks:empty { display: none; }

/* ── barra de compartilhar ── */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; padding: 18px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.col-main > .share { margin-top: 36px; }
.share-label { margin-right: 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.share-open { margin-left: auto; padding: 12px 0; font-weight: 600; font-size: 15px; }
.share-status { flex-basis: 100%; margin: 0; font-size: 14px; color: var(--muted); }
.share-status:empty { display: none; }

/* ── manchete da capa ── */
.manchete { display: flex; flex-wrap: wrap; gap: 40px; padding: 48px 0; border-bottom: 1px solid var(--ink); }
.manchete-main { flex: 999 1 560px; min-width: 0; }
.manchete-q { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5vw, 64px); line-height: 1.05; }

/* ── caixas laterais ── */
.side { flex: 1 1 280px; display: flex; flex-direction: column; gap: 24px; }
.box { border: 2px solid var(--ink); padding: 22px; }
.box-dark { background: var(--ink); color: var(--paper); }
.box-dark a:not(.btn) { color: var(--paper); }
.box-serif { margin: 0; font-family: var(--serif); font-size: 24px; line-height: 1.25; }
.box-dark .box-serif { margin-bottom: 16px; }
.box-body { margin: 0; font-size: 17px; line-height: 1.5; }
.more-link { display: inline-block; margin-top: 16px; padding: 10px 0; font-weight: 600; font-size: 15px; }
.related ul { display: flex; flex-direction: column; gap: 14px; margin: 14px 0 0; padding: 0; list-style: none; }
.related li a { font-family: var(--serif); font-size: 21px; line-height: 1.25; text-decoration: none; }
.related li a:hover { text-decoration: underline; }
.link-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.link-list a { font-family: var(--serif); font-size: 21px; line-height: 1.25; text-decoration: none; }
.link-list a:hover { text-decoration: underline; }
.count { font-size: 13px; font-weight: 700; color: var(--accent); }

/* ── seções da capa ── */
.section { padding: 48px 0; border-bottom: 1px solid var(--ink); }
.section-last { border-bottom: 0; }
.section-title { margin: 0 0 8px; font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1.05; }
.section-lede { margin: 0 0 28px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.more { margin: 20px 0 0; font-weight: 600; }

.grid-ads { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.ad { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.ad-tag { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.ad-text { margin: 0; font-size: 17px; line-height: 1.5; }
.ad-text a { text-decoration: none; }
.ad-text a:hover { text-decoration: underline; }
.ad-answer { margin: 6px 0 0; font-size: 15px; font-style: italic; color: var(--muted); transform: rotate(180deg); text-align: right; }
.caderno-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.1; }
.caderno-title a { text-decoration: none; }
.caderno-list { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.4; }
.caderno-list a { text-decoration: none; }
.caderno-list a:hover { text-decoration: underline; }

.tio { display: flex; flex-wrap: wrap; gap: 40px; }
.tio-head { flex: 1 1 300px; }
.tio-head .section-lede { margin-bottom: 0; }
.tio-list { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.tio-q { margin: 0; font-weight: 700; font-size: 17px; }
.tio-a { margin: 6px 0 0; font-family: var(--serif); font-size: 24px; line-height: 1.3; }

.redacao { display: flex; flex-wrap: wrap; gap: 32px; padding: 32px; border: 3px solid var(--ink); }
.redacao-head { flex: 1 1 280px; }
.redacao-head .section-title { font-size: 40px; }
.redacao-head .section-lede { margin: 12px 0 0; }
.redacao-form { flex: 999 1 420px; display: flex; flex-direction: column; gap: 16px; }
.redacao-form label { font-weight: 600; font-size: 15px; }
.redacao-form input, .redacao-form textarea { margin-top: -8px; border: 2px solid var(--ink); border-radius: 0; background: var(--white); color: var(--ink); font: 16px var(--sans); }
.redacao-form input { min-height: 48px; padding: 0 14px; }
.redacao-form textarea { padding: 12px 14px; resize: vertical; }
.redacao-form .btn { align-self: flex-start; }
.form-status { margin: 0; font-size: 15px; color: var(--muted); }
.form-status:empty { display: none; }

/* ── página da piada e cadernos ── */
.cols { display: flex; flex-wrap: wrap; gap: 48px; padding: 16px 0 56px; border-bottom: 1px solid var(--ink); }
.col-main { flex: 999 1 600px; min-width: 0; }
.joke-q { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6vw, 76px); line-height: 1.02; }

.prose { margin-top: 40px; }
.prose h2 { margin: 0 0 12px; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; }
.prose p { margin: 0; font-size: 18px; line-height: 1.65; max-width: 62ch; }
.prose p + p, .prose p + h2, .prose dl + h2 { margin-top: 20px; }
.prose h2:not(:first-child) { margin-top: 36px; }

.spoiler { position: relative; }
.spoiler-cover { display: none; }
.js .spoiler:not(.is-open) .spoiler-body { filter: blur(7px); user-select: none; }
.js .spoiler:not(.is-open) .spoiler-cover { display: inline-flex; position: absolute; left: 50%; top: calc(50% + 22px); transform: translate(-50%, -50%); background: var(--paper); white-space: nowrap; }
.js .spoiler:not(.is-open) .spoiler-cover:hover { background: var(--ink); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.tags a { padding: 10px 14px; border: 1px solid var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.tags a:hover { background: var(--ink); color: var(--paper); }

.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 28px 0; }
.pager a { display: flex; flex-direction: column; gap: 4px; max-width: 420px; text-decoration: none; }
.pager .pager-next { margin-left: auto; text-align: right; }
.pager small { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.pager span { font-family: var(--serif); font-size: 22px; line-height: 1.25; }
.pager a:hover span { text-decoration: underline; }

.list-head { padding-bottom: 8px; }
.list-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6vw, 76px); line-height: 1.02; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.jump a { padding: 8px 12px; border: 1px solid var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.jump a:hover { background: var(--ink); color: var(--paper); }
.no-print { margin: 24px 0 0; }

.group-title { margin: 48px 0 16px; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; scroll-margin-top: 16px; }
.lista { margin: 32px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.group-title + .lista { margin-top: 0; }
.item { display: grid; grid-template-columns: 52px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--ink); }
.num { font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--accent); }
.q { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.25; }
.q a { text-decoration: none; }
.q a:hover { text-decoration: underline; }
.item-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 20px; margin-top: 6px; }
.item-actions summary { display: inline-flex; align-items: center; min-height: 40px; font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer; list-style: none; }
.item-actions summary:hover { color: var(--accent); }
.item-actions details[open] summary { color: var(--muted); }
.resposta { margin: 2px 0 6px; font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.2; color: var(--accent); }
.wa-link { display: inline-flex; align-items: center; min-height: 40px; font-weight: 600; font-size: 15px; }

.coluna { margin-top: 16px; }
.coluna .lede { margin: 0 0 24px; }
.faq { margin-top: 16px; }
.faq h3 { margin: 24px 0 6px; font-size: 18px; line-height: 1.35; }
.faq p { margin: 0; font-size: 17px; line-height: 1.6; max-width: 62ch; }

/* ── páginas fixas ── */
.page { max-width: 760px; padding: 16px 0 56px; }
.page .prose:first-of-type { margin-top: 28px; }
.expediente { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; font-size: 17px; }
.expediente dt { font-weight: 700; }
.expediente dd { margin: 0; }
.grade { margin: 32px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.grade li { display: grid; grid-template-columns: 80px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--ink); }
.grade-hora { font-family: var(--serif); font-size: 26px; color: var(--accent); }
.grade-titulo { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; }
.grade p { margin: 4px 0 0; color: var(--muted); }

/* ── rodapé ── */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 24px 0 40px; border-top: 6px double var(--ink); font-size: 14px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ── aviso de lotação (gate) ── */
#gate-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(244, 241, 234, 0.97); }
.gate-card { max-width: 440px; padding: 32px; border: 3px solid var(--ink); background: var(--paper); text-align: center; }
.gate-card h2 { margin: 0 0 12px; font-family: var(--serif); font-weight: 400; font-size: 36px; }
.gate-card p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--muted); }

/* ── celular ── */
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .masthead { padding-top: 28px; }
  .tagline { font-size: 19px; }
  .nav-main { gap: 0 18px; font-size: 13px; }
  .topbar { padding: 16px 0; }
  .wordmark { font-size: 34px; }
  .topbar-nav { gap: 0 16px; font-size: 13px; }
  .manchete, .section { padding: 36px 0; }
  .section-title { font-size: 36px; }
  .redacao { padding: 22px; }
  .redacao-head .section-title { font-size: 34px; }
  .share-open { margin-left: 0; }
  .item { grid-template-columns: 36px 1fr; gap: 10px; }
  .num { font-size: 24px; }
  .q { font-size: 21px; }
  .js .spoiler:not(.is-open) .spoiler-cover { white-space: normal; width: max-content; max-width: 90%; text-align: center; }
  .expediente { grid-template-columns: 1fr; gap: 2px; }
  .expediente dd { margin-bottom: 10px; }
}

/* ── impressão (charadas para a sala de aula) ── */
@media print {
  body { background: #fff; }
  .strip, .topbar-nav, .nav-main, .crumbs, .share, .side, .footer, .pager, .no-print, .jump, .faq, .item-share, .skip { display: none !important; }
  .topbar { padding: 0 0 8px; }
  .cols { display: block; border: 0; padding: 0; }
  .item { break-inside: avoid; padding: 12px 0; }
  .item-actions summary { display: none; }
  .resposta { transform: rotate(180deg); text-align: right; font-size: 16px; color: #555; }
  a { text-decoration: none; }
}
