/* Blog público do Comet. Um só HTML; os templates (data-tema) trocam fontes, cores, cantos e o desenho dos cards.
   --cor = cor principal do blog (vem das configurações). */

:root,
[data-tema="classico"] {
  --bg: #fff; --ink: #111827; --muted: #6b7280; --line: #e5e7eb; --soft: #f5f6f8;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --f-head: var(--f-body);
  --head-w: 700; --head-track: -.02em; --r: 14px; --r-img: 12px; --btn-r: 999px;
  --texto: 17.5px; --wrap: 1180px; --wrap-texto: 720px;
}
[data-tema="editorial"] {
  --bg: #faf8f4; --ink: #1a1714; --muted: #7a7166; --line: #e8e2d8; --soft: #f1ece3;
  --f-body: 'Inter', system-ui, sans-serif; --f-head: 'Cormorant Garamond', Georgia, serif;
  --head-w: 500; --head-track: -.005em; --r: 0; --r-img: 0; --btn-r: 0;
  --texto: 17px; --wrap: 1240px; --wrap-texto: 700px;
}
[data-tema="kids"] {
  --bg: #fffaf2; --ink: #2b2140; --muted: #6f6384; --line: #ffe1b3; --soft: #fff1d9;
  --f-body: 'Nunito', system-ui, sans-serif; --f-head: 'Baloo 2', 'Nunito', sans-serif;
  --head-w: 800; --head-track: 0; --r: 26px; --r-img: 20px; --btn-r: 999px;
  --texto: 18px; --wrap: 1180px; --wrap-texto: 740px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--f-body); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-head); font-weight: var(--head-w); letter-spacing: var(--head-track); line-height: 1.15; margin: 0; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.wrap--texto { width: min(var(--wrap-texto), 100% - 32px); }

/* Topo */
.topo { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20; }
.topo__in { display: flex; align-items: center; gap: 22px; min-height: 68px; flex-wrap: wrap; padding: 8px 0; }
.marca { text-decoration: none; display: flex; align-items: center; }
.marca img { max-height: 40px; width: auto; }
.marca span { font-family: var(--f-head); font-weight: var(--head-w); font-size: 22px; letter-spacing: var(--head-track); }
.topo__nav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; font-size: 15px; }
.topo__nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.topo__nav a:hover { color: var(--ink); }
.topo__site { margin-left: auto; color: var(--cor) !important; }
.topo__busca input { border: 1px solid var(--line); background: var(--bg); border-radius: var(--btn-r); padding: 8px 14px; font: inherit; font-size: 14px; width: 170px; color: var(--ink); }
.topo__busca input:focus { outline: 2px solid var(--cor); outline-offset: 1px; }
[data-tema="editorial"] .topo { position: static; background: var(--bg); }
[data-tema="editorial"] .topo__in { flex-direction: column; gap: 10px; padding: 26px 0 14px; }
[data-tema="editorial"] .marca img { max-height: 54px; }
[data-tema="editorial"] .marca span { font-size: 40px; }
[data-tema="editorial"] .topo__nav { justify-content: center; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; flex: none; }
[data-tema="editorial"] .topo__site { margin-left: 0; color: var(--ink) !important; }
[data-tema="editorial"] .topo__busca { display: none; }
[data-tema="kids"] .topo { background: var(--cor); border: 0; color: #fff; }
[data-tema="kids"] .topo__nav a { color: rgba(255,255,255,.85); font-weight: 700; }
[data-tema="kids"] .topo__nav a:hover { color: #fff; }
[data-tema="kids"] .topo__site { color: #fff !important; }
[data-tema="kids"] .topo__busca input { border: 0; }

/* Cabeçalho da lista */
.hero { padding: 54px 0 26px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); }
.hero p { color: var(--muted); font-size: 18px; max-width: 640px; margin: 12px 0 0; }
.hero__sobre { display: block; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--cor); font-weight: 700; margin-bottom: 8px; }
[data-tema="editorial"] .hero { text-align: center; padding: 40px 0 34px; }
[data-tema="editorial"] .hero h1 { font-size: clamp(40px, 6vw, 72px); font-style: italic; }
[data-tema="editorial"] .hero p { margin-inline: auto; }
[data-tema="editorial"] .hero__sobre { color: var(--muted); }
[data-tema="kids"] .hero h1 { color: var(--cor); }

/* Destaque */
.destaque { display: grid; grid-template-columns: 1.35fr 1fr; gap: 34px; align-items: center; margin-bottom: 40px; }
.destaque__img { display: block; border-radius: var(--r-img); overflow: hidden; background: var(--soft); aspect-ratio: 16 / 10; }
.destaque__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform .5s; }
.destaque:hover .destaque__img img { transform: scale(1.03); }
.destaque h2 { font-size: clamp(26px, 3.2vw, 40px); margin: 8px 0 12px; }
.destaque h2 a { text-decoration: none; }
.destaque p { color: var(--muted); margin: 0 0 12px; font-size: 17px; }
.destaque small { color: var(--muted); display: block; }
.sobre { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: var(--cor) !important; }
.destaque .btn { margin-top: 18px; }
.destaque--sem { grid-template-columns: 1fr; max-width: 820px; }
[data-tema="editorial"] .destaque { grid-template-columns: 1fr; text-align: center; gap: 22px; }
[data-tema="editorial"] .destaque__img { aspect-ratio: 21 / 9; }
[data-tema="editorial"] .destaque__txt { max-width: 720px; margin: 0 auto; }
[data-tema="editorial"] .destaque h2 { font-size: clamp(34px, 4.6vw, 58px); }
[data-tema="editorial"] .sobre { color: var(--muted) !important; }
[data-tema="kids"] .destaque { background: #fff; border: 3px solid var(--line); border-radius: var(--r); padding: 18px; }
@media (max-width: 860px) { .destaque { grid-template-columns: 1fr; gap: 18px; } }

/* Chips de categoria */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.chips a { text-decoration: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--muted); }
.chips a.is-on, .chips a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
[data-tema="editorial"] .chips { justify-content: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; }
[data-tema="editorial"] .chips a { border: 0; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; border-radius: 0; }
[data-tema="kids"] .chips a { background: #fff; border: 2px solid var(--c, var(--line)); color: var(--ink); }
[data-tema="kids"] .chips a.is-on, [data-tema="kids"] .chips a:hover { background: var(--c, var(--cor)); color: #fff; border-color: var(--c, var(--cor)); }

/* Cards */
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 34px 26px; }
.card { display: flex; flex-direction: column; gap: 14px; }
.card__img { text-decoration: none; display: block; border-radius: var(--r-img); overflow: hidden; aspect-ratio: 16 / 10; background: var(--soft); }
.card__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform .5s; }
.card:hover .card__img img { transform: scale(1.04); }
.card__sem { text-decoration: none; display: grid; place-items: center; height: 100%; font-family: var(--f-head); font-size: 64px; color: color-mix(in srgb, var(--cor) 45%, var(--bg)); background: color-mix(in srgb, var(--cor) 10%, var(--bg)); }
.card h3 { font-size: 21px; margin: 4px 0 8px; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { color: var(--cor); }
.card p { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.card small { color: var(--muted); font-size: 13px; }
.cat { display: inline-block; text-decoration: none; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--c, var(--cor)); }
[data-tema="editorial"] .grade { gap: 54px 34px; }
[data-tema="editorial"] .card { text-align: center; }
[data-tema="editorial"] .card__img { aspect-ratio: 4 / 5; }
[data-tema="editorial"] .card h3 { font-size: 27px; }
[data-tema="editorial"] .card h3 a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
[data-tema="editorial"] .cat { color: var(--muted); font-weight: 600; letter-spacing: .16em; font-size: 11px; }
[data-tema="kids"] .card { background: #fff; border: 3px solid var(--line); border-radius: var(--r); padding: 12px; gap: 10px; transition: transform .2s; }
[data-tema="kids"] .card:hover { transform: translateY(-4px) rotate(-.5deg); }
[data-tema="kids"] .card__txt { padding: 0 6px 6px; }
[data-tema="kids"] .cat { background: var(--c, var(--cor)); color: #fff; padding: 3px 10px; border-radius: 999px; text-transform: none; letter-spacing: 0; }

/* Botões e tags */
.btn { display: inline-block; text-decoration: none; background: var(--cor); color: #fff; padding: 11px 22px; border-radius: var(--btn-r); font-weight: 700; font-size: 15px; transition: filter .2s; }
.btn:hover { filter: brightness(1.1); }
.btn--grande { padding: 15px 30px; font-size: 17px; }
[data-tema="editorial"] .btn { background: var(--ink); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 600; padding: 14px 28px; }
[data-tema="kids"] .btn { box-shadow: 0 4px 0 color-mix(in srgb, var(--cor) 60%, #000); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tags a { text-decoration: none; font-size: 14px; color: var(--muted); background: var(--soft); padding: 5px 12px; border-radius: 999px; }
.tags a:hover { color: var(--ink); }
[data-tema="editorial"] .tags a { border-radius: 0; background: transparent; border: 1px solid var(--line); }
.tags-pop { margin: 60px auto; }
.tags-pop h2 { font-size: 22px; margin-bottom: 14px; }

.paginas { display: flex; gap: 18px; justify-content: center; align-items: center; margin: 46px 0 10px; }
.paginas a { text-decoration: none; font-weight: 600; color: var(--cor); }
.paginas span { color: var(--muted); font-size: 14px; }
.vazio { text-align: center; padding: 60px 0; color: var(--muted); }

/* Post */
.previa { background: #fde68a; color: #713f12; text-align: center; font-size: 14px; font-weight: 600; padding: 8px; }
.post__topo { padding: 50px 0 28px; }
.post__topo h1 { font-size: clamp(32px, 5vw, 52px); margin: 10px 0 0; }
.post__resumo { font-size: 20px; color: var(--muted); margin: 16px 0 0; line-height: 1.5; }
.post__meta { display: flex; gap: 8px 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin: 20px 0 0; }
.post__meta span + span::before { content: '·'; margin-right: 18px; }
.post__capa { margin: 0 auto 40px; width: min(1100px, 100% - 32px); }
.post__capa img { width: auto; max-width: 100%; max-height: 78vh; margin-inline: auto; border-radius: var(--r-img); }
[data-tema="editorial"] .post__topo { text-align: center; padding-top: 30px; }
[data-tema="editorial"] .post__topo h1 { font-size: clamp(40px, 6vw, 70px); }
[data-tema="editorial"] .post__resumo { font-family: var(--f-head); font-style: italic; font-size: 24px; }
[data-tema="editorial"] .post__meta { justify-content: center; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; }
[data-tema="editorial"] .post__capa { width: min(1240px, 100% - 32px); }

.post__corpo { font-size: var(--texto); line-height: 1.75; overflow-wrap: break-word; }
.post__corpo > * + * { margin-top: 1.1em; }
.post__corpo p { margin: 0; }
.post__corpo p:empty, .post__corpo p:has(> br:only-child) { margin-top: .4em; }
.post__corpo h2 { font-size: 1.65em; margin-top: 1.8em; }
.post__corpo h3 { font-size: 1.3em; margin-top: 1.5em; }
.post__corpo h4 { font-size: 1.1em; margin-top: 1.4em; }
.post__corpo a { color: var(--cor); text-underline-offset: 3px; }
[data-tema="editorial"] .post__corpo a { color: var(--ink); }
.post__corpo img { border-radius: var(--r-img); margin-inline: auto; }
.post__corpo figure { margin: 1.2em .5em 0 0; display: inline-block; vertical-align: top; max-width: 100%; }
.post__corpo figure img { margin: 0; }
.post__corpo figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 8px; }
.post__corpo blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--cor); font-size: 1.1em; color: var(--ink); font-style: italic; }
[data-tema="editorial"] .post__corpo blockquote { border: 0; text-align: center; font-family: var(--f-head); font-size: 1.6em; padding: 0 20px; }
.post__corpo ul, .post__corpo ol { padding-left: 1.4em; }
.post__corpo li + li { margin-top: .35em; }
.post__corpo hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.post__corpo pre { background: var(--soft); padding: 14px; border-radius: 8px; overflow-x: auto; font-size: 14px; }
.post__corpo .ql-video { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: var(--r-img); }
.post__corpo .ql-align-center { text-align: center; }
.post__corpo .ql-align-right { text-align: right; }
.post__corpo .ql-align-justify { text-align: justify; }
.post__corpo .ql-indent-1 { padding-left: 3em; }
.post__corpo .ql-indent-2 { padding-left: 6em; }
[data-tema="editorial"] .post__corpo > p:first-child::first-letter { float: left; font-family: var(--f-head); font-size: 4.2em; line-height: .85; margin: .06em .1em 0 0; }

.post__fim { padding: 30px 0 10px; display: grid; gap: 26px; }
.post__cta { text-align: center; margin: 10px 0; }
.compartilhar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 14px; border-top: 1px solid var(--line); padding-top: 22px; }
.compartilhar span { color: var(--muted); margin-right: 4px; }
.compartilhar a, .compartilhar button { text-decoration: none; border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 6px 13px; border-radius: var(--btn-r); font: inherit; cursor: pointer; }
.compartilhar a:hover, .compartilhar button:hover { border-color: var(--ink); }
.vizinhos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vizinhos a { text-decoration: none; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; font-weight: 600; display: grid; gap: 2px; }
.vizinhos a:hover { border-color: var(--cor); }
.vizinhos small { color: var(--muted); font-weight: 500; }
.vizinhos .prox { text-align: right; grid-column: 2; }
.relacionados { margin-top: 60px; margin-bottom: 30px; padding-top: 40px; border-top: 1px solid var(--line); }
.relacionados h2 { font-size: 28px; margin-bottom: 24px; }
[data-tema="editorial"] .relacionados h2 { text-align: center; font-style: italic; font-size: 36px; }

/* Rodapé */
.rodape { margin-top: 80px; border-top: 1px solid var(--line); padding: 40px 0 26px; font-size: 14px; color: var(--muted); }
.rodape__in { display: flex; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.rodape b { color: var(--ink); font-family: var(--f-head); font-size: 20px; }
.rodape p { margin: 6px 0 0; max-width: 460px; }
.rodape nav { display: flex; gap: 18px; flex-wrap: wrap; }
.rodape a { text-decoration: none; }
.rodape a:hover { color: var(--ink); }
.rodape__fim { margin-top: 26px; font-size: 13px; }
[data-tema="editorial"] .rodape { background: var(--ink); color: #b8b0a3; border: 0; }
[data-tema="editorial"] .rodape b { color: var(--bg); }
[data-tema="editorial"] .rodape a:hover { color: var(--bg); }
[data-tema="kids"] .rodape { background: color-mix(in srgb, var(--cor) 12%, var(--bg)); border: 0; }

@media (max-width: 640px) {
  .topo__busca { width: 100%; }
  .topo__busca input { width: 100%; }
  .grade { grid-template-columns: 1fr; }
  .vizinhos { grid-template-columns: 1fr; }
  .vizinhos .prox { grid-column: auto; }
}
