/* cssbuy spreadsheet — folha de estilos partilhada das páginas de artigo */
:root {
  --blue: #015dfa;
  --blue-dark: #0149c4;
  --navy: #0b1029;
  --muted: #64739e;
  --body: #3b476b;
  --white: #ffffff;
  --tint: #f5f7fc;
  --line: #e6eaf2;
  --accent: #35c8ff;
  --radius: 10px;
  --nav-h: 64px;
  --font-heading: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--white);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--white);
  color: var(--navy);
  padding: 10px 16px;
  z-index: 200;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- navegação ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  background: rgba(11, 16, 41, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 100;
}
.nav-in {
  max-width: 1180px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
  flex: 0 0 auto;
}
.brand span.mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
}
.brand em {
  font-style: normal;
  display: block;
  font-family: var(--font-body);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #9aa6c8;
  font-weight: 700;
}
.nav-links { display: none; gap: 2px; margin-left: 8px; }
.nav-links a {
  color: rgba(240, 244, 255, 0.9);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.nav-links a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.nav-links a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.14); }
.nav-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--blue-dark); }

/* ---------- estrutura ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
main.page { padding-top: calc(var(--nav-h) + 26px); padding-bottom: 48px; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 14px;
}
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--blue); }
.crumbs .sep { color: #c3cade; }
.crumbs .now { color: var(--navy); font-weight: 700; }

.article { max-width: 820px; }
.article h1 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 4.2vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--navy);
  margin: 0 0 12px;
  font-weight: 900;
}
.lead {
  font-size: 16.5px;
  line-height: 1.65;
  color: #46527a;
  margin: 0 0 16px;
}
.meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 18px;
}
.meta-line .chip {
  background: #eef3ff;
  color: var(--blue-dark);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 10.5px;
}

figure.shot { margin: 0 0 22px; }
figure.shot img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--tint);
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  object-position: center top;
}
figure.shot figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.toc {
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 0 0 24px;
}
.toc p {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
}
.toc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.toc a { font-size: 13px; color: #3f4d75; text-decoration: none; }
.toc a:hover { color: var(--blue); text-decoration: underline; }

.article h2 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.6vw, 24px);
  line-height: 1.25;
  color: var(--navy);
  margin: 34px 0 10px;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.article h3 {
  font-family: var(--font-heading);
  font-size: 16.5px;
  color: var(--navy);
  margin: 22px 0 8px;
  font-weight: 700;
}
.article p { margin: 0 0 14px; }
.article strong { color: var(--navy); font-weight: 700; }
.article ul, .article ol { margin: 0 0 16px; padding-left: 20px; }
.article li { margin-bottom: 7px; }
.article li::marker { color: var(--blue); }

.table-scroll {
  overflow-x: auto;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 420px;
}
caption {
  caption-side: top;
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
th, td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--tint); color: var(--navy); font-weight: 700; font-size: 12.5px; }
tbody tr:last-child td { border-bottom: 0; }

.note {
  background: var(--tint);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 16px;
  margin: 0 0 20px;
  font-size: 14px;
  color: #3f4d75;
}
.note strong { color: var(--navy); }

.cta-box {
  background: var(--navy);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 26px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cta-box p { margin: 0; color: #dfe6f8; font-size: 14px; max-width: 460px; }
.cta-box .btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 999px;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }

.pn {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 26px;
}
.pn a {
  display: block;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy);
  background: var(--white);
  line-height: 1.4;
}
.pn a:hover { border-color: #b9c9ea; background: var(--tint); }
.pn a span {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 3px;
}
.pn .next { text-align: right; }

.related {
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 22px 0 0;
}
.related h2 { margin: 0 0 8px; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; }
.related ul { margin: 0; padding: 0; list-style: none; }
.related li { margin-bottom: 6px; font-size: 14px; }
.related a { text-decoration: none; color: #2c3a63; font-weight: 600; }
.related a:hover { color: var(--blue); text-decoration: underline; }

.back { margin: 20px 0 0; font-size: 13.5px; font-weight: 700; }
.back a { text-decoration: none; }
.back a:hover { text-decoration: underline; }

/* ---------- rodapé ---------- */
.foot {
  background: var(--navy);
  color: #9aa6c8;
  padding: 26px 0 30px;
  font-size: 12.5px;
}
.foot-in { display: flex; flex-direction: column; gap: 12px; }
.foot-brand {
  font-family: var(--font-heading);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  margin: 0;
}
.foot-note { margin: 0; max-width: 520px; line-height: 1.6; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot-links a { color: #cfd8ef; text-decoration: none; font-weight: 600; }
.foot-links a:hover { color: #fff; text-decoration: underline; }

/* ---------- barra inferior (mobile) ---------- */
.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 90;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(11, 16, 41, 0.96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  color: #a8b4d4;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 9px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.tabbar a i { font-size: 17px; line-height: 1; }
.tabbar a.active { color: #fff; }

@media (min-width: 640px) {
  .pn { grid-template-columns: 1fr 1fr; }
  .nav-cta { display: inline-flex; }
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .foot-in { flex-direction: row; align-items: center; justify-content: space-between; }
  .foot-note { max-width: 420px; }
  .article h1 { margin-bottom: 14px; }
  main.page { padding-top: calc(var(--nav-h) + 32px); padding-bottom: 60px; }
}

@media (max-width: 899px) {
  body { padding-bottom: 64px; }
  .nav-cta { padding: 8px 12px; font-size: 12px; }
  .brand { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}