/* blog-1 (23 Oct): the blog pages on top of site.css. Phone first; motion is transform and opacity only, none with
   reduced motion. Every page reads complete without /site/blog.js (the answers then sit in «Ver as respostas»). */
.blog-post .eyebrow { margin-top:6px; }
.blog-post h1 { font-size:clamp(1.9rem,6.5vw,3rem); }
.blog-post .lead { font-size:1.12rem; }
.blog-post section { padding-block:24px; }
.blog-post h2 { font-size:clamp(1.4rem,4.6vw,1.9rem); }
.blog-post ol, .blog-post ul { padding-left:1.3em; }
.blog-post li { margin:.3em 0; }
.blog-meta { margin:0 0 .6em; color:var(--muted); font-size:.92rem; }
.blog-tip { margin:14px 0; padding:14px 16px; border-radius:18px; background:var(--sun); border:1px solid #f3dc9c; }
.blog-tip p { margin:.2em 0; }
.blog-tip strong:first-child { font-family:"Fredoka","Lexend",system-ui,sans-serif; }

/* The video: vertical, at most a phone's height, never wider than the text. */
.blog-video { margin:14px 0 6px; }
.blog-video video { display:block; width:100%; max-width:320px; height:auto; aspect-ratio:9 / 16; margin:0 auto;
  border-radius:24px; background:#1d1530; box-shadow:var(--shadow); }
.blog-video figcaption, .blog-figure figcaption { margin-top:10px; text-align:center; color:var(--muted); font-size:.92rem; }
.blog-video details { max-width:520px; margin:8px auto 0; }
.blog-video summary, .quiz-key summary { cursor:pointer; min-height:44px; display:flex; align-items:center; gap:8px;
  color:var(--primary); font-weight:600; }
.blog-figure { margin:16px 0; }
.blog-figure img { display:block; width:100%; height:auto; max-width:420px; margin:0 auto; border-radius:18px;
  background:var(--card); border:1px solid var(--line); }

/* 7 Nov, parent articles: plain tables, the invitation box, «Ler também» and the sources box. site.css turns every
   table into cards on phones; a blog table stays a real table (its header cells keep their meaning) and scrolls
   inside its own box when it is wider than the screen, never the page. */
.blog-table { margin:18px 0; max-width:100%; overflow-x:auto; background:var(--card); border:1px solid var(--line);
  border-radius:18px; }
.blog-table:focus-visible { outline:3px solid var(--primary); outline-offset:2px; }
.blog-table table { display:table; width:100%; margin:0; border-collapse:collapse; font-size:.95rem; }
.blog-table caption { padding:12px 14px 8px; text-align:left; font-family:"Fredoka","Lexend",system-ui,sans-serif;
  font-weight:600; }
.blog-table thead { position:static; display:table-header-group; width:auto; height:auto; overflow:visible;
  clip-path:none; white-space:normal; }
.blog-table tbody { display:table-row-group; }
.blog-table tr { display:table-row; padding:0; border:0; border-radius:0; background:transparent; }
.blog-table th, .blog-table td { display:table-cell; padding:10px 12px; border:0; border-top:1px solid var(--line);
  text-align:left; vertical-align:top; background:transparent; overflow-wrap:break-word; }
.blog-table th + td, .blog-table td + td { border-left:1px solid var(--line); }
.blog-table th[scope="row"] { min-width:6em; white-space:normal; font-weight:600; }
.blog-table thead th { background:var(--soft); }
.blog-table td::before { content:none; display:none; }
.blog-cta { margin:20px 0 6px; padding:18px 16px; text-align:center; background:var(--card); border:2px solid var(--line);
  border-radius:24px; box-shadow:var(--shadow); }
.blog-cta p { margin:0 auto 12px; }
.blog-cta-links { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; }
.blog-links { margin:16px 0; }
.blog-links-title { margin:0; font-weight:600; }
.blog-post .blog-links ul { list-style:none; margin:0; padding:0; }
.blog-post .blog-links li { margin:0; }
.blog-links a { display:inline-flex; align-items:center; min-height:44px; font-weight:600; }
.blog-sources { margin:14px 0; padding:14px 16px; background:var(--card); border:1px solid var(--line); border-radius:18px;
  font-size:.92rem; }
.blog-checked { margin:0 0 6px; font-weight:600; color:var(--mint-ink); }
.blog-sources a { overflow-wrap:anywhere; }

/* The mini exercise. */
.quiz { scroll-margin-top:80px; }
.quiz-list { list-style:none; padding:0; margin:0; display:grid; gap:14px; counter-reset:q; }
.quiz-q { counter-increment:q; padding:16px; background:var(--card); border:1px solid var(--line); border-radius:22px;
  box-shadow:var(--shadow); }
.quiz-ask { margin:0 0 10px; font-weight:600; }
.quiz-ask::before { content:counter(q) ". "; color:var(--primary); }
.quiz-opts { display:grid; gap:8px; }
.quiz-opt { display:flex; align-items:center; gap:10px; width:100%; min-height:48px; padding:10px 14px; text-align:left;
  font:inherit; color:var(--ink); background:var(--bg); border:2px solid var(--line); border-radius:16px; cursor:pointer;
  transition:transform .12s ease; }
.quiz-opt:not([aria-disabled="true"]):hover { border-color:#cfb8f2; }
.quiz-opt:not([aria-disabled="true"]):active { transform:scale(.98); }
.quiz-opt:focus-visible { outline:3px solid var(--primary); outline-offset:2px; }
.quiz-opt[disabled], .quiz-opt[aria-disabled="true"] { cursor:default; }
.quiz-opt.right { background:var(--mint); border-color:#7fd3b2; color:var(--mint-ink); font-weight:600; }
.quiz-opt.right::after { content:"✓"; margin-left:auto; font-weight:700; }
.quiz-opt.picked:not(.right) { background:var(--pink); border-color:#f3a9cd; }
.quiz-said { margin:10px 0 0; font-weight:600; }
.quiz-why { margin:4px 0 0; color:var(--muted); }
.quiz-key { margin-top:12px; }
.js .quiz-key { display:none; }
.quiz-done { position:relative; margin-top:16px; padding:18px 16px; text-align:center; background:var(--card);
  border:2px solid var(--line); border-radius:24px; box-shadow:var(--shadow); overflow:hidden; }
.quiz-done img { display:block; width:120px; height:120px; margin:0 auto 4px; }
.quiz-done .score { margin:.2em 0; font-family:"Fredoka","Lexend",system-ui,sans-serif; font-size:1.6rem; font-weight:650; }
.quiz-done.show img { animation:popin .55s cubic-bezier(.2,1.4,.4,1) both; }
.quiz-again { margin-top:6px; }
.confetti { position:absolute; inset:0; pointer-events:none; }
.confetti i { position:absolute; top:-12px; width:9px; height:14px; border-radius:3px; opacity:0;
  animation:fall 1.8s ease-in forwards; }
.confetti i:nth-child(4n) { background:#ffb5d8; } .confetti i:nth-child(4n+1) { background:#ceb6f4; }
.confetti i:nth-child(4n+2) { background:#ade9d7; } .confetti i:nth-child(4n+3) { background:#ffe08a; }
@keyframes fall { 0% { opacity:1; transform:translateY(0) rotate(0); } 100% { opacity:0; transform:translateY(260px) rotate(540deg); } }

/* The code after the exercise. */
.blog-code { text-align:center; }
.js .blog-code.locked .code-reveal { display:none; }
.blog-code .code-tease { display:none; }
.js .blog-code.locked .code-tease { display:block; color:var(--muted); }
.code-big { display:inline-block; margin:6px 0 4px; padding:10px 22px; border:2px dashed var(--primary); border-radius:18px;
  background:var(--soft); color:var(--primary); font-family:"Fredoka","Lexend",system-ui,sans-serif; font-size:1.7rem;
  font-weight:650; letter-spacing:.06em; }
.blog-code .button { margin-top:10px; }
.blog-code.open .code-reveal { animation:popin .5s cubic-bezier(.2,1.4,.4,1) both; }

/* The index. */
.blog-list, .blog-post .blog-list { list-style:none; padding:0; margin:0; display:grid; gap:14px; }
@media (min-width:640px) { .blog-list { grid-template-columns:repeat(2,1fr); } }
.blog-card { display:grid; grid-template-columns:88px 1fr; gap:12px; align-items:center; padding:12px; min-height:112px;
  background:var(--card); border:1px solid var(--line); border-radius:22px; text-decoration:none; color:var(--ink);
  box-shadow:var(--shadow); transition:transform .15s ease; }
.blog-card:hover { transform:translateY(-2px); }
.blog-card img { width:88px; height:88px; object-fit:cover; border-radius:16px; background:var(--soft); }
.blog-card h2, .blog-card h3 { margin:0 0 4px; font-size:1.12rem; line-height:1.25; }
.blog-card p { margin:0; color:var(--muted); font-size:.9rem; }
.blog-more h2 { font-size:1.3rem; }

@media (prefers-reduced-motion:reduce) {
  .quiz-opt, .blog-card { transition:none; }
  .quiz-opt:not([aria-disabled="true"]):active, .blog-card:hover { transform:none; }
  .confetti { display:none; }
  .quiz-done.show img, .blog-code.open .code-reveal { animation:none; }
}
