/* =========================================================================
   Blog NexB — tema Ghost
   Design system extraido de www.nexb.com.br (design-system.json + print)
   ========================================================================= */

/* -------------------------------------------------------------- 1. Tokens */

:root {
  /* Marca */
  --ink: #113131;           /* verde escuro NexB — fundos e titulos */
  --ink-2: #17423f;
  --ink-3: #1e2925;
  --yellow: #e6e437;        /* amarelo NexB — CTA */
  --yellow-600: #d5d31f;
  --teal: #4ec5c1;          /* turquesa do logotipo oficial */
  --teal-600: #17817f;      /* versao escura: 4.7:1 sobre branco (WCAG AA) */
  --blue: #039be5;

  /* Cor de destaque (trocavel pelo painel do Ghost) */
  --accent: var(--yellow);
  --accent-ink: var(--ink);

  /* Superficies */
  --paper: #ffffff;
  --paper-2: #fafafa;
  --paper-3: #f5f7fa;
  --mist: #e8f0ee;
  --line: #e6eae9;
  --line-strong: #d6dedc;

  /* Texto */
  --text: #2b3230;
  --text-muted: #6b7573;
  --text-onink: rgba(255, 255, 255, .78);

  /* Tipografia */
  --font-fallback: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  /* O painel do Ghost pode sobrescrever as fontes via --gh-font-* */
  --font: var(--gh-font-body, 'Poppins'), var(--font-fallback);
  --font-heading: var(--gh-font-heading, 'Poppins'), var(--font-fallback);
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  /* Medidas */
  --wrap: 1200px;
  --wrap-wide: 1360px;
  --wrap-read: 720px;
  --gutter: clamp(20px, 5vw, 40px);

  /* Raios */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Sombras */
  --sh-sm: 0 2px 8px rgba(17, 49, 49, .05);
  --sh: 0 4px 18px rgba(17, 49, 49, .06);
  --sh-lg: 0 18px 50px rgba(17, 49, 49, .12);
  --sh-xl: 0 30px 70px rgba(17, 49, 49, .16);

  /* Transicoes */
  --t: 180ms cubic-bezier(.4, 0, .2, 1);

  --header-h: 74px;
}

/* Variacoes de destaque escolhidas no painel */
body.accent-verde   { --accent: var(--ink);  --accent-ink: #ffffff; }
body.accent-turquesa { --accent: var(--teal); --accent-ink: var(--ink); }

/* --------------------------------------------------------------- 2. Reset */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  margin: 0 0 .5em;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.02em;
}

p, ul, ol, dl, figure, blockquote, pre, table { margin: 0 0 1.25em; }

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 3px;
  transition: color var(--t), opacity var(--t);
}

img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -80px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-pill);
  font-weight: 600;
  transition: top var(--t);
}
.skip-link:focus { top: 16px; }

/* --------------------------------------------------------------- 3. Layout */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--wide { max-width: var(--wrap-wide); }
.wrap--read { max-width: calc(var(--wrap-read) + var(--gutter) * 2); }

.section { padding-block: clamp(48px, 7vw, 88px); }
.section--tight { padding-block: clamp(36px, 5vw, 56px); }
.section--dark {
  background: var(--ink);
  color: var(--text-onink);
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--mist { background: var(--paper-2); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.section-head__text { max-width: 44ch; }
.section-head h2 {
  font-size: clamp(1.65rem, 1.1rem + 1.9vw, 2.35rem);
  margin-bottom: .35em;
}
.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: .975rem;
}
.section--dark .section-head p { color: var(--text-onink); }

.grid {
  display: grid;
  gap: clamp(20px, 2.4vw, 30px);
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }

/* ------------------------------------------------------------ 4. Elementos */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
}
.eyebrow--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--t), box-shadow var(--t), background var(--t), color var(--t), border-color var(--t);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(17, 49, 49, .16); }
.btn:active { transform: translateY(0); }
.btn--sm { padding: 10px 20px; font-size: .875rem; }
.btn--lg { padding: 16px 34px; font-size: 1rem; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn--outline:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.btn--onink {
  background: transparent;
  border-color: rgba(255, 255, 255, .34);
  color: #fff;
}
.btn--onink:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--block { width: 100%; }

/* Botao circular com seta — motivo do site NexB */
.arrow-btn {
  --size: 44px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--ink-3);
  color: #fff;
  transition: transform var(--t), background var(--t);
}
.arrow-btn svg { width: 16px; height: 16px; }
.arrow-btn--sm { --size: 36px; }

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
  font-size: .9375rem;
  color: var(--ink);
  text-decoration: none;
}
.read-more span { text-decoration: underline; text-underline-offset: 4px; }
.read-more:hover .arrow-btn { transform: translate(3px, -3px); background: var(--accent); color: var(--accent-ink); }

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--paper);
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: all var(--t);
}
.tag-pill:hover,
.tag-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.tag-pill__count {
  opacity: .55;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: .8125rem;
  font-weight: 500;
}
.meta__sep { opacity: .45; }
.section--dark .meta { color: var(--text-onink); }

/* --------------------------------------------------------------- 5. Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 32px);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand__mark { width: 100px; height: auto; display: block; }
.brand__mark img { width: 100px; }
.brand__tag {
  padding: 4px 10px 5px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 26px);
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1 1 auto;
}
.nav a {
  position: relative;
  display: block;
  padding: 6px 2px;
  font-size: .9375rem;
  font-weight: 500;
  color: #46524f;
  text-decoration: none;
  white-space: nowrap;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after,
.nav li.nav-current a::after { transform: scaleX(1); }
.nav li.nav-current a { color: var(--ink); font-weight: 600; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  transition: all var(--t);
}
.icon-btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.icon-btn svg { width: 18px; height: 18px; }

.header-link {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 4px;
}
.header-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.burger { display: none; }

@media (max-width: 1023px) {
  .nav,
  .header-actions .header-link,
  .header-actions .btn { display: none; }
  .burger { display: inline-grid; }
}

/* Gaveta mobile */
.drawer {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 55;
  background: var(--paper);
  padding: 28px var(--gutter) 48px;
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t), transform var(--t), visibility var(--t);
}
.drawer.is-open { opacity: 1; visibility: visible; transform: none; }
.drawer__nav {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 2px;
}
.drawer__nav a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.drawer__actions { display: grid; gap: 12px; }

/* ----------------------------------------------------------------- 6. Hero */

.hero {
  position: relative;
  background: var(--ink);
  color: var(--text-onink);
  padding-top: clamp(48px, 7vw, 84px);
  padding-bottom: clamp(48px, 7vw, 84px);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(112deg,
      rgba(45, 191, 194, .10) 0 2px,
      transparent 2px 90px);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  right: -140px; top: -180px;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(45, 191, 194, .34), transparent 62%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }

.hero__inner { max-width: 760px; }
.hero h1 {
  margin: 20px 0 0;
  color: #fff;
  font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -.03em;
}
.hero h1 em {
  font-style: normal;
  color: var(--yellow);
}
.hero__lead {
  margin: 20px 0 0;
  max-width: 56ch;
  font-size: clamp(1rem, .95rem + .3vw, 1.15rem);
  color: var(--text-onink);
}

.hero--page { padding-bottom: clamp(56px, 8vw, 96px); }
.hero--overlap { padding-bottom: clamp(120px, 16vw, 190px); }

/* Busca do hero */
.hero-search {
  display: flex;
  gap: 8px;
  margin-top: 30px;
  padding: 7px;
  max-width: 540px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--r-pill);
}
.hero-search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 20px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: .9375rem;
}
.hero-search input::placeholder { color: rgba(255, 255, 255, .55); }
.hero-search input:focus { outline: none; }
.hero-search .btn { padding-inline: 24px; }

/* --------------------------------------------------------- 7. Card de post */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
  border-color: transparent;
}

.card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--mist);
  overflow: hidden;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms cubic-bezier(.4, 0, .2, 1);
}
.card:hover .card__media img { transform: scale(1.045); }

.card__badge {
  position: absolute;
  left: 14px; top: 14px;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  background: var(--yellow);
  color: var(--ink);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  line-height: 1;
  text-decoration: none;
}

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 12px;
  padding: clamp(20px, 2.4vw, 28px);
}
.card__title {
  margin: 0;
  font-size: clamp(1.1rem, 1rem + .35vw, 1.3rem);
  line-height: 1.3;
  letter-spacing: -.015em;
}
.card__title a { text-decoration: none; }
.card__title a:hover { color: var(--teal-600); }
.card__excerpt {
  margin: 0;
  color: var(--text-muted);
  font-size: .9375rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 6px;
}

/* Card sem imagem — usa o fundo de marca */
.card--noimg .card__media {
  background:
    linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  display: grid;
  place-items: center;
}
.card--noimg .card__media::after {
  content: '';
  width: 56%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 10px solid rgba(45, 191, 194, .3);
  border-top-color: var(--yellow);
}

/* Card em destaque (home) */
.hl {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--paper);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-xl);
  overflow: hidden;
}
.hl--pull { margin-top: clamp(-160px, -12vw, -90px); }
.hl__media {
  position: relative;
  display: block;
  min-height: 340px;
  background: var(--mist);
  overflow: hidden;
}
.hl__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(.4, 0, .2, 1);
}
.hl:hover .hl__media img { transform: scale(1.04); }
.hl__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(28px, 3.6vw, 52px);
}
.hl__body h2 {
  margin: 0;
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.2rem);
  line-height: 1.16;
}
.hl__body h2 a { text-decoration: none; }
.hl__body h2 a:hover { color: var(--teal-600); }
.hl__excerpt {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 860px) {
  .hl { grid-template-columns: 1fr; }
  .hl__media { min-height: 220px; aspect-ratio: 16/9; }
  .hl--pull { margin-top: clamp(-120px, -14vw, -70px); }
}

/* Lista compacta (sidebar / relacionados menores) */
.mini-list { display: grid; gap: 18px; }
.mini {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  align-items: center;
  text-decoration: none;
}
.mini__media {
  aspect-ratio: 1;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--mist);
}
.mini__media img { width: 100%; height: 100%; object-fit: cover; }
.mini__title {
  margin: 0 0 4px;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.mini:hover .mini__title { color: var(--teal-600); }
.mini__meta { font-size: .75rem; color: var(--text-muted); }

/* ------------------------------------------------------- 8. Faixas de CTA */

.cta-band {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
  padding: clamp(32px, 4.5vw, 56px);
  border-radius: var(--r-xl);
  background: var(--ink);
  color: var(--text-onink);
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  right: -80px; bottom: -160px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(230, 228, 55, .28), transparent 60%);
}
.cta-band > * { position: relative; }
.cta-band h2 {
  color: #fff;
  margin: 14px 0 10px;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
}
.cta-band p { margin: 0; max-width: 48ch; }
.cta-band__actions { display: flex; justify-content: flex-end; }

@media (max-width: 760px) {
  .cta-band { grid-template-columns: 1fr; }
  .cta-band__actions { justify-content: flex-start; }
}

/* Newsletter */
.newsletter {
  text-align: center;
  padding: clamp(36px, 5vw, 64px) clamp(24px, 4vw, 56px);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, var(--paper-2), var(--mist));
  border: 1px solid var(--line);
}
.newsletter h2 {
  margin: 16px auto 10px;
  max-width: 20ch;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
}
.newsletter p {
  margin: 0 auto 26px;
  max-width: 52ch;
  color: var(--text-muted);
}
.subscribe-form {
  display: flex;
  gap: 8px;
  max-width: 520px;
  margin-inline: auto;
  padding: 7px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
}
.subscribe-form input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 20px;
  border: 0;
  background: transparent;
  font-size: .9375rem;
}
.subscribe-form input:focus { outline: none; }
.newsletter__note {
  margin: 16px 0 0;
  font-size: .8125rem;
  color: var(--text-muted);
}
@media (max-width: 520px) {
  .subscribe-form { flex-direction: column; border-radius: var(--r-lg); }
  .subscribe-form .btn { width: 100%; }
}

/* ---------------------------------------------------------- 9. Paginacao */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: clamp(36px, 5vw, 56px);
}
.pagination__page {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.load-more { display: grid; place-items: center; margin-top: clamp(32px, 4vw, 48px); }

/* ------------------------------------------------------ 10. Cabecalho de arquivo */

.archive-head {
  padding-block: clamp(40px, 6vw, 72px) clamp(28px, 3.5vw, 44px);
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: .8125rem;
  color: var(--text-muted);
}
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb svg { width: 12px; height: 12px; opacity: .5; }
.section--dark .breadcrumb,
.hero .breadcrumb { color: rgba(255, 255, 255, .65); }

.archive-head h1 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem);
  margin: 0 0 .3em;
}
.archive-head__desc {
  max-width: 58ch;
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}
.archive-head__count {
  margin-top: 18px;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--teal-600);
}

/* Avatar do autor */
.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ink);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .8125rem;
  font-weight: 600;
  flex: 0 0 auto;
}
.avatar--lg { width: 72px; height: 72px; font-size: 1.35rem; }
/* Sem foto: mostra só a inicial, escondendo o resto do nome */
.avatar--initial { overflow: hidden; text-transform: uppercase; }
.avatar__i {
  display: block;
  width: 1ch;
  overflow: hidden;
  white-space: nowrap;
  word-break: keep-all;
  letter-spacing: 40em;
  line-height: 1;
}

/* --------------------------------------------------------------- 11. Post */

.post-hero {
  padding-block: clamp(32px, 4.5vw, 60px) 0;
}
.post-hero__inner { max-width: 820px; margin-inline: auto; }
.post-hero h1 {
  font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3.15rem);
  line-height: 1.1;
  margin: 18px 0 20px;
}
.post-hero__excerpt {
  font-size: clamp(1.05rem, 1rem + .35vw, 1.2rem);
  color: var(--text-muted);
  margin: 0 0 28px;
}
.post-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.post-hero__meta .meta { gap: 10px; }

.post-feature {
  margin: clamp(32px, 4vw, 52px) 0 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--mist);
  box-shadow: var(--sh);
}
.post-feature img { width: 100%; }
.post-feature figcaption {
  padding: 14px 20px;
  background: var(--paper-2);
  color: var(--text-muted);
  font-size: .8125rem;
  text-align: center;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  padding-block: clamp(36px, 5vw, 64px);
}
@media (min-width: 1100px) {
  .post-layout {
    grid-template-columns: 200px minmax(0, 1fr) 200px;
    max-width: var(--wrap-wide);
  }
}

.post-rail { display: none; }
@media (min-width: 1100px) { .post-rail { display: block; } }
.post-rail__sticky {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}
.post-rail__label {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }

.toc { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.toc a {
  display: block;
  padding-left: 12px;
  border-left: 2px solid var(--line);
  font-size: .8125rem;
  line-height: 1.45;
  color: var(--text-muted);
  text-decoration: none;
}
.toc a:hover, .toc a.is-active { color: var(--ink); border-left-color: var(--accent); }
.toc .toc--h3 a { padding-left: 22px; font-size: .78rem; }

/* Barra de progresso de leitura */
.progress {
  position: fixed;
  left: 0; top: 0;
  height: 3px;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  background: var(--accent);
  z-index: 80;
}

/* ------------------------------------------------- 12. Conteudo do artigo */

.post-content {
  font-size: 1.1rem;
  line-height: 1.78;
  color: #3a423f;
}
.post-content > * { max-width: var(--wrap-read); margin-inline: auto; }

.post-content h2 {
  margin: 2em 0 .6em;
  font-size: clamp(1.45rem, 1.2rem + .9vw, 1.85rem);
}
.post-content h3 {
  margin: 1.8em 0 .5em;
  font-size: clamp(1.2rem, 1.05rem + .6vw, 1.4rem);
}
.post-content h4 { margin: 1.6em 0 .5em; font-size: 1.1rem; }
.post-content p { margin: 0 0 1.35em; }
.post-content a { color: var(--teal-600); font-weight: 500; }
.post-content a:hover { color: var(--ink); }
.post-content strong { color: var(--ink); font-weight: 600; }

.post-content ul, .post-content ol { padding-left: 1.35em; margin-bottom: 1.5em; }
.post-content li { margin-bottom: .5em; }
.post-content li::marker { color: var(--teal); }

.post-content blockquote {
  margin: 2em auto;
  padding: 6px 0 6px 28px;
  border-left: 4px solid var(--accent);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink);
}
.post-content blockquote p:last-child { margin-bottom: 0; }

.post-content img,
.post-content video { border-radius: var(--r-lg); }

.post-content figure { margin: 2.2em auto; }
.post-content figcaption {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: .8125rem;
  text-align: center;
}

.post-content code {
  padding: .18em .42em;
  border-radius: 5px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .875em;
  color: var(--ink);
}
.post-content pre {
  padding: 22px 24px;
  border-radius: var(--r-lg);
  background: var(--ink);
  color: #dfeceb;
  font-family: var(--font-mono);
  font-size: .875rem;
  line-height: 1.6;
  overflow-x: auto;
}
.post-content pre code { padding: 0; background: none; border: 0; color: inherit; }

.post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
.post-content th, .post-content td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.post-content th { color: var(--ink); font-weight: 600; }

/* Cards do editor Koenig */
.post-content .kg-card { margin-bottom: 2em; }
.kg-width-wide { max-width: 1000px !important; }
.kg-width-full { max-width: 100% !important; }

.kg-callout-card {
  display: flex;
  gap: 14px;
  padding: 20px 24px;
  border-radius: var(--r-lg);
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.kg-callout-card-yellow { background: #fdfce2; border-color: #eceb9a; }
.kg-callout-card-green { background: #eaf6f5; border-color: #bfe4e2; }
.kg-callout-card-grey { background: var(--paper-3); }
.kg-callout-emoji { font-size: 1.25rem; line-height: 1.5; }
.kg-callout-text { font-size: 1rem; }

.kg-bookmark-card a.kg-bookmark-container {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  background: var(--paper);
  transition: box-shadow var(--t);
}
.kg-bookmark-card a.kg-bookmark-container:hover { box-shadow: var(--sh); }
.kg-bookmark-content { flex: 1 1 auto; padding: 20px 24px; }
.kg-bookmark-title { font-weight: 600; color: var(--ink); }
.kg-bookmark-description {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: .9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: .8125rem;
  color: var(--text-muted);
}
.kg-bookmark-icon { width: 18px; height: 18px; }
.kg-bookmark-thumbnail { flex: 0 0 200px; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .kg-bookmark-thumbnail { display: none; } }

.kg-button-card .kg-btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.kg-button-card.kg-align-center { display: flex; justify-content: center; }

.kg-toggle-card {
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper-2);
}
.kg-toggle-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}
.kg-toggle-heading-text { margin: 0; font-size: 1.05rem; }
.kg-toggle-card-icon { width: 18px; height: 18px; transition: transform var(--t); }
.kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-card-icon { transform: rotate(45deg); }
.kg-toggle-content { margin-top: 12px; font-size: 1rem; }
.kg-toggle-card[data-kg-toggle-state="close"] .kg-toggle-content { display: none; }

.kg-gallery-container { display: grid; gap: 10px; }
.kg-gallery-row { display: flex; gap: 10px; }
.kg-gallery-image img { border-radius: var(--r); }

/* Rodape do artigo */
.post-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }

.author-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 40px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--r-xl);
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.author-box__name { margin: 0 0 6px; font-size: 1.15rem; }
.author-box__bio { margin: 0; color: var(--text-muted); font-size: .9375rem; }

/* -------------------------------------------------------------- 13. Busca */

.search-page { padding-block: clamp(32px, 4.5vw, 56px) clamp(56px, 8vw, 96px); }

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 22px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  box-shadow: var(--sh);
  max-width: 720px;
}
.search-box svg { width: 20px; height: 20px; color: var(--text-muted); flex: 0 0 auto; }
.search-box input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 0;
  border: 0;
  background: transparent;
  font-size: 1.05rem;
}
.search-box input:focus { outline: none; }

.search-status {
  margin: 28px 0 24px;
  font-size: .9375rem;
  color: var(--text-muted);
}
.search-status strong { color: var(--ink); }

.search-filters { margin: 0 0 32px; }

.search-empty {
  padding: clamp(36px, 6vw, 64px) 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-xl);
  background: var(--paper-2);
}
.search-empty h2 { font-size: 1.35rem; margin-bottom: .4em; }
.search-empty p { margin: 0 auto; max-width: 44ch; color: var(--text-muted); }

.search-skeleton { display: grid; gap: 14px; }
.skeleton-row {
  height: 96px;
  border-radius: var(--r-lg);
  background: linear-gradient(90deg, var(--paper-2) 25%, var(--paper-3) 37%, var(--paper-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

mark.hit {
  background: color-mix(in srgb, var(--yellow) 55%, transparent);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

/* -------------------------------------------------------------- 14. Rodape */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding-block: clamp(48px, 6vw, 72px) 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: clamp(28px, 4vw, 48px);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-about p {
  margin: 18px 0 0;
  max-width: 34ch;
  color: var(--text-muted);
  font-size: .9375rem;
}
.footer-col h3 {
  margin: 0 0 16px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a {
  font-size: .9375rem;
  color: var(--text-muted);
  text-decoration: none;
}
.footer-col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: .8125rem;
  color: var(--text-muted);
}
.social-row { display: flex; gap: 10px; }
.social-row a {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  transition: transform var(--t), background var(--t);
}
.social-row a:hover { transform: translateY(-2px); background: var(--teal-600); }
.social-row svg { width: 17px; height: 17px; }

/* ---------------------------------------------------------------- 15. Erro */

.error-page {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 60vh;
  padding-block: 80px;
}
.error-code {
  font-size: clamp(5rem, 3rem + 12vw, 11rem);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.05em;
  color: var(--ink);
}
.error-code span { color: var(--yellow); }

/* --------------------------------------------------------- 16. Utilitarios */

.stack-sm > * + * { margin-top: 10px; }
.mt-lg { margin-top: clamp(28px, 4vw, 44px); }
.center { text-align: center; }
.muted { color: var(--text-muted); }

@media print {
  .site-header, .site-footer, .post-rail, .newsletter, .cta-band, .progress { display: none !important; }
  body { font-size: 12pt; }
}

/* Corpo de paginas estaticas */
.page-body { padding-block: clamp(36px, 5vw, 64px); }

/* Icones dentro de botoes */
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.read-more--onink { color: #fff; }
.read-more--onink .arrow-btn { background: var(--yellow); color: var(--ink); }
.read-more--onink:hover .arrow-btn { background: #fff; }
.error-page .search-box { margin-inline: auto; }
.error-page .btn + .btn { margin-left: 10px; }

/* [hidden] precisa vencer os display: grid/flex declarados acima */
[hidden] { display: none !important; }

.search-filters { margin: 22px 0 32px; }
