/* SemTravas — Ferramentas para destravar vendas
   Identidade visual v2.0. CSS compartilhado, sem frameworks e sem fontes externas. */

:root {
  --navy: #0b1e3c;
  --navy-deep: #06152a;
  --blue: #0e7bff;
  --blue-dark: #0759b8;
  --blue-soft: #e8f2ff;
  --orange: #ff7a00;
  --orange-dark: #e36a00;
  --orange-soft: #fff1e3;
  --green: #00d46a;
  --green-dark: #00763c;
  --green-soft: #e6f7ee;
  --ink: #0b1e3c;
  --muted: #4a5b72;
  --bg: #f3f6fa;
  --bg-soft: #eaf0f7;
  --surface: #ffffff;
  --border: #d8e1ec;
  --border-strong: #b7c6d8;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --danger-border: #f1c4c0;
  --success: #00763c;
  --success-bg: #e6f7ee;
  --success-border: #a9dfc1;
  --warning-bg: #fff7e8;
  --warning-border: #f0dcb4;
  --warning-ink: #5a4318;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 10px 30px rgba(11, 30, 60, 0.08);
  --shadow-lg: 0 18px 42px rgba(11, 30, 60, 0.14);
  --focus: #0e7bff;
  --font-display: "Montserrat", "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

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

img,
svg {
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--blue-dark);
  text-underline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  letter-spacing: -0.03em;
  line-height: 1.18;
}

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 8px;
}

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

/* Alvo dos links “Topo”: fora do fluxo para não deslocar o cabeçalho sticky. */
.topo-anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
}

.skip-link {
  position: absolute;
  top: -80px;
  left: 1rem;
  z-index: 200;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2rem, 1120px);
  margin-inline: auto;
}

/* ---------- Publicidade ---------- */

.ad {
  width: min(100% - 2rem, 1120px);
  margin: 1.75rem auto;
  color: var(--muted);
}

.ad__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad__slot {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-inline: auto;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  line-height: 0;
}

.ad__slot iframe,
.ad__slot img {
  display: block;
  max-width: 100%;
  margin-inline: auto;
  border: 0;
}

.ad__slot--desktop {
  display: block;
  width: 728px;
  max-width: 100%;
  height: 90px;
}

.ad__slot--mobile {
  display: none;
  width: 320px;
  max-width: 100%;
  height: 50px;
}

.ad--rectangle {
  width: min(100% - 2rem, 300px);
  justify-self: center;
  margin-inline: auto;
}

.ad__slot--rectangle {
  width: 300px;
  max-width: 100%;
  height: 250px;
}

.ad__slot--skyscraper {
  width: 160px;
  height: 600px;
}

/* O link "Ver as ferramentas desta categoria" leva a esta faixa; a folga
 * deixa o anúncio logo abaixo do cabeçalho sticky, sem ficar encoberto. */
#publicidade-categoria {
  scroll-margin-top: 80px;
}

/* Em telas muito estreitas, o retângulo de 300 px pode ocupar a largura toda
 * sem ser cortado; o afastamento de 1 rem do container é compensado. */
@media (max-width: 340px) {
  .ad--rectangle {
    width: 100%;
    margin-inline: 0;
  }

  .ad--rectangle .ad__slot--rectangle {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 779px) {
  .ad__slot--desktop {
    display: none;
  }

  .ad__slot--mobile {
    display: block;
  }
}

.ad--sidebar {
  display: none;
}

@media (min-width: 1100px) {
  main.main--ads {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1120px) 160px;
    column-gap: 1rem;
    justify-content: center;
    align-items: start;
  }

  main.main--ads > :not(.ad--sidebar) {
    grid-column: 1;
  }

  main.main--ads > .container {
    width: 100%;
  }

  main.main--ads > .ad:not(.ad--sidebar):not(.ad--rectangle) {
    width: 100%;
  }

  main.main--ads > .ad--rectangle {
    width: 300px;
    max-width: 100%;
  }

  main.main--ads > .ad--sidebar {
    position: sticky;
    top: 5.5rem;
    grid-column: 2;
    grid-row: 1 / span 5;
    align-self: start;
    display: block;
    width: 160px;
    margin: 1.5rem 0 0;
  }

  main.main--ads > .ad--sidebar .ad__slot--skyscraper {
    width: 160px;
    height: 600px;
  }
}

/* ---------- Cabeçalho ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #f4f4f6;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue) 45%, var(--orange) 100%);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  text-decoration: none;
}

.brand__logo {
  display: block;
  width: 232px;
  height: auto;
  transition: opacity 0.18s ease;
}

.brand:hover .brand__logo {
  opacity: 0.82;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.site-nav a {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.site-nav a[aria-current="page"] {
  background: var(--blue-soft);
  color: var(--blue-dark);
  box-shadow: inset 0 -3px 0 var(--orange);
}

.nav-group {
  position: relative;
}

.nav-group > summary {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
}

.nav-group > summary::-webkit-details-marker {
  display: none;
}

.nav-group > summary::after {
  content: "▾";
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  transition: transform 0.18s ease;
}

.nav-group[open] > summary {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.nav-group[open] > summary::after {
  transform: rotate(180deg);
}

.nav-group__panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 30;
  min-width: 250px;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.nav-group[open] .nav-group__panel {
  display: flex;
}

.nav-group__panel a {
  padding: 0.6rem 0.7rem;
  font-size: 0.86rem;
  white-space: normal;
}

/* Seletor de categorias da Home (canto direito do cabeçalho). */
.nav-group--categorias > summary {
  color: var(--blue-dark);
}

/* Evita rolagem horizontal entre o menu compacto e o cabeçalho completo. */
@media (min-width: 1081px) and (max-width: 1400px) {
  .site-nav a,
  .nav-group--categorias > summary {
    padding: 0.5rem 0.3rem;
    font-size: 0.8rem;
  }
}

@media (min-width: 1101px) {
  .nav-group--categorias .nav-group__panel {
    left: auto;
    right: 0;
    width: 272px;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* Aviso exibido quando a entrada direta em uma ferramenta é barrada. */
.nav-notice {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--warning-border);
  border-left: 5px solid var(--orange);
  border-radius: var(--radius-sm);
  background: var(--warning-bg);
  color: var(--warning-ink);
  box-shadow: var(--shadow);
}

.nav-notice strong {
  display: block;
  font-size: 1.02rem;
}

.nav-notice p {
  margin: 0.35rem 0 0.8rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.nav-notice button {
  min-height: 40px;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--blue-dark);
  font-weight: 800;
  cursor: pointer;
}

.nav-notice button:hover {
  background: var(--blue-soft);
}

.header-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--blue-dark);
  border-radius: 12px;
  background: var(--blue-dark);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.header-back:hover {
  border-color: #064a99;
  background: #064a99;
}

.header-back svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.header-back__short {
  display: none;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--blue-dark);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

.menu-toggle .icon-close,
.menu-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

@media (max-width: 1100px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: -1rem;
    right: -1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.7rem 1rem 1rem;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.8rem 0.9rem;
    font-size: 1rem;
  }

  .nav-group > summary {
    padding: 0.8rem 0.9rem;
    font-size: 1rem;
  }

  .nav-group__panel {
    position: static;
    min-width: 0;
    margin: 0 0 0.35rem;
    padding: 0 0 0 0.5rem;
    border: 0;
    border-left: 2px solid var(--blue-soft);
    border-radius: 0;
    box-shadow: none;
  }

  .nav-group__panel a {
    padding: 0.55rem 0.7rem;
    font-size: 0.92rem;
  }

  .brand__logo {
    width: 210px;
  }
}

@media (max-width: 960px) {
  .brand__logo {
    width: 190px;
  }
}

@media (max-width: 420px) {
  .header-inner {
    gap: 0.5rem;
  }

  .brand__logo {
    width: 176px;
  }

  .header-back {
    padding: 0.45rem 0.6rem;
    font-size: 0.82rem;
  }

  .header-back__long {
    display: none;
  }

  .header-back__short {
    display: inline;
  }
}

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.05rem;
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn--compact {
  min-height: 42px;
  padding-inline: 0.45rem;
  font-size: 0.78rem;
}

.btn img {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-primary {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--navy);
}

.btn-primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(255, 122, 0, 0.28);
}

.btn-cta {
  background: #a61c1c;
  border-color: #a61c1c;
  color: #ffd400;
}

.btn-cta:hover {
  background: #7f1414;
  border-color: #7f1414;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(166, 28, 28, 0.32);
}

.cta-burst .btn-cta {
  width: 160px;
  height: 44px;
  padding-inline: 0.2rem;
  font-size: 1.12rem;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.cta-burst {
  --bang: polygon(
    50% 0%, 57% 11%, 67% 2%, 71% 15%, 83% 7%, 83% 21%,
    96% 15%, 92% 30%, 100% 38%, 90% 47%, 100% 57%, 90% 64%,
    97% 79%, 83% 77%, 85% 93%, 72% 85%, 68% 100%, 57% 89%,
    50% 100%, 43% 89%, 32% 100%, 28% 85%, 15% 93%, 17% 77%,
    3% 79%, 10% 64%, 0% 57%, 10% 47%, 0% 38%, 8% 30%,
    4% 15%, 17% 21%, 17% 7%, 29% 15%, 33% 2%, 43% 11%
  );
  position: relative;
  display: inline-flex;
  isolation: isolate;
}

.cta-burst::before,
.cta-burst::after {
  content: "";
  position: absolute;
  inset: -12px;
  clip-path: var(--bang);
  pointer-events: none;
  z-index: 0;
}

.cta-burst::before {
  background: var(--navy);
  transform: scale(1.08);
}

.cta-burst::after {
  background: #ffd400;
}

.cta-burst .btn {
  position: relative;
  z-index: 1;
}

.btn-secondary {
  background: #fff;
  border-color: var(--blue-dark);
  color: var(--blue-dark);
}

.btn-secondary:hover {
  background: var(--blue-soft);
}

.btn-quiet {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--ink);
}

.btn-quiet:hover {
  background: #dfe9f5;
}

.btn-danger-outline {
  background: #fff;
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger-outline:hover {
  background: var(--danger-bg);
}

.btn-mini {
  min-height: 34px;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.btn-row .btn {
  flex: 0 1 auto;
}

/* ---------- Abas acessíveis ---------- */

.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.tabs__tab {
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 800;
}

.tabs__tab:hover {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.tabs__tab[aria-selected="true"] {
  border-color: var(--border);
  background: var(--blue-soft);
  color: var(--blue-dark);
  box-shadow: inset 0 -3px 0 var(--blue);
}

.tabs__panel {
  min-width: 0;
}

.tabs__panel:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.context-link {
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.85rem;
  border-left: 3px solid var(--orange);
  border-radius: 0 10px 10px 0;
  background: var(--orange-soft);
  font-size: 0.88rem;
}

.target-status {
  min-width: 0;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--success-border);
  border-radius: 12px;
  background: var(--success-bg);
  color: #075c38;
}

.target-status--miss {
  border-color: var(--warning-border);
  background: var(--warning-bg);
  color: var(--warning-ink);
}

.target-status strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
}

.target-status p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

/* ---------- Cartões e formulários ---------- */

.card {
  min-width: 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 3px 16px rgba(11, 30, 60, 0.05);
}

.card + .card {
  margin-top: 1rem;
}

.card:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.card > h2,
.card > h3 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.card h2:not(:first-child) {
  margin-top: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  min-width: 0;
}

.field label,
.field .field-label {
  font-size: 0.9rem;
  font-weight: 700;
}

.field label .required {
  color: var(--danger);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-width: 0;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field textarea {
  resize: vertical;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: #8fb6e6;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(14, 123, 255, 0.18);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fff9f8;
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.field-meta span {
  overflow-wrap: anywhere;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.check-field input {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--blue-dark);
}

.help {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.error {
  min-height: 1.1em;
  margin: 0;
  color: var(--danger);
  font-size: 0.86rem;
  font-weight: 650;
}

.error:empty {
  display: none;
}

.form-block {
  margin-top: 1rem;
}

.actions-block {
  margin-top: 1.1rem;
}

.result__actions {
  margin-top: 0.85rem;
}

.notice {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin: 1rem 0 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--warning-border);
  border-radius: 12px;
  background: var(--warning-bg);
  color: var(--warning-ink);
  font-size: 0.88rem;
}

.notice img {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 0.1rem;
}

@media (max-width: 680px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Resultados ---------- */

.result {
  min-width: 0;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
}

.result[hidden] {
  display: none;
}

.result--success {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.result--error {
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.result__head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.result__head img {
  width: 24px;
  height: 24px;
  flex: none;
  margin-top: 0.1rem;
}

.result__head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.03rem;
}

.result__head p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.result--success .result__head p,
.result--error .result__head p {
  color: inherit;
}

.feedback {
  min-height: 1.3em;
  margin: 0.75rem 0 0;
  color: var(--blue-dark);
  font-size: 0.9rem;
  font-weight: 700;
}

.output {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.9rem;
}

.output input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
}

.output .btn {
  flex: none;
}

@media (max-width: 520px) {
  .output {
    flex-direction: column;
    align-items: stretch;
  }
}

.qr-wrap {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 1rem;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  background: #fff;
}

.qr-wrap canvas,
.qr-wrap img {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.qr-placeholder {
  max-width: 30ch;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.metric {
  min-width: 0;
  padding: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.metric strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  overflow-wrap: anywhere;
}

.metric--highlight {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.metric--highlight strong {
  color: var(--green-dark);
}

.metric__note {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

@media (max-width: 680px) {
  .metrics {
    grid-template-columns: 1fr;
  }
}

/* ---------- Páginas de ferramenta ---------- */

.page-head {
  position: relative;
  margin: 1.2rem 0 1.25rem;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border-radius: 22px;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(6, 21, 42, 0.96) 0%, rgba(11, 30, 60, 0.84) 58%, rgba(14, 123, 255, 0.2) 100%);
  pointer-events: none;
}

.page-head > * {
  position: relative;
  z-index: 1;
}

.page-head__top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.page-head__icon {
  width: 58px;
  height: 58px;
  flex: none;
}

.page-head .badge {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #ffd9a8;
}

.page-head h1 {
  max-width: 24ch;
  margin: 0 0 0.65rem;
  color: #fff;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
}

.page-head p {
  max-width: 72ch;
  margin: 0;
  color: #d6e3f2;
  font-size: 1.02rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid #cfe0f5;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.badge--neutral {
  border-color: var(--border);
  background: var(--bg-soft);
  color: var(--muted);
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 1.25rem;
  align-items: start;
  padding-bottom: 1.5rem;
}

.tool-layout > * {
  min-width: 0;
}

@media (max-width: 920px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
}

.faq {
  max-width: 860px;
  margin: 2rem auto 0;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.faq details + details {
  margin-top: 0.6rem;
}

.faq summary {
  padding: 0.95rem 1rem;
  font-weight: 700;
  cursor: pointer;
  list-style-position: outside;
}

.faq details[open] summary {
  color: var(--blue-dark);
  border-bottom: 1px solid var(--border);
}

.faq details p {
  margin: 0;
  padding: 0.9rem 1rem 1.05rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.section-block {
  padding: 2.5rem 0;
}

.section-heading {
  max-width: 62ch;
  margin: 0 0 1.5rem;
}

.section-heading::before {
  content: "";
  display: block;
  width: 38px;
  height: 4px;
  margin-bottom: 0.7rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--blue));
}

.section-heading h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
}

/* Na Home, o título fica à esquerda e os atalhos na borda direita do container. */
#ferramentas .section-heading,
#descomplice .section-heading,
#como-funciona .section-heading,
#faq .section-heading {
  max-width: none;
}

#ferramentas .section-heading > p,
#descomplice .section-heading > p,
#como-funciona .section-heading > p,
#faq .section-heading > p {
  max-width: 62ch;
}

.section-heading__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

.section-heading__title h2 {
  margin: 0;
}

.section-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-left: auto;
}

.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.35rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(11, 30, 60, 0.16);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.section-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.section-link--topo {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
}

.section-link--agora {
  background: #a61c1c;
  border-color: #a61c1c;
  color: #ffd400;
}

.section-heading h2.titulo-uma-linha {
  font-size: clamp(1rem, 4.5vw, 1.9rem);
  white-space: nowrap;
}

.destaque-agora {
  color: #a61c1c;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Páginas institucionais ---------- */

.legal-doc {
  max-width: 80ch;
  margin: 0 auto 2rem;
}

.legal-doc h2 {
  margin: 1.8rem 0 0.5rem;
  font-size: 1.3rem;
}

.brand-art {
  margin: 0 0 1.5rem;
}

.brand-art img {
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.legal-doc h3 {
  margin: 1.3rem 0 0.35rem;
  font-size: 1.05rem;
}

.legal-doc p,
.legal-doc li {
  color: var(--muted);
}

.legal-doc ul {
  padding-left: 1.2rem;
}

.legal-doc li + li {
  margin-top: 0.35rem;
}

.legal-doc__updated {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: var(--blue-dark);
  font-size: 0.85rem;
  font-weight: 800;
}

/* ---------- Landing ---------- */

.hero {
  position: relative;
  margin-top: 1rem;
  padding: clamp(2rem, 5vw, 3.8rem);
  border-radius: 24px;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(6, 21, 42, 0.22);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(6, 21, 42, 0.97) 0%, rgba(11, 30, 60, 0.87) 55%, rgba(14, 123, 255, 0.2) 100%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -90px;
  right: -80px;
  width: 360px;
  height: 360px;
  background: url("assets/brand/semtravas-simbolo-aprovado-com-fundo.png") center / contain no-repeat;
  opacity: 0.11;
  pointer-events: none;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  align-items: center;
}

.hero__content {
  padding-right: clamp(1rem, 2.5vw, 1.75rem);
}

.eyebrow {
  display: inline-block;
  color: #ffb35c;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 100%;
  margin: 0.5rem 0 0.6rem;
  color: #fff;
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 900;
  line-height: 1.12;
}

.hero__lead {
  max-width: 48ch;
  margin: 0;
  color: #d6e3f2;
  font-size: clamp(0.95rem, 1.6vw, 1.02rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.4rem;
}

.hero .btn-secondary {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero__content > * {
  animation: rise 0.45s ease both;
}

.hero__content > :nth-child(2) {
  animation-delay: 0.05s;
}

.hero__content > :nth-child(3) {
  animation-delay: 0.1s;
}

.hero__content > :nth-child(4) {
  animation-delay: 0.15s;
}

.hero__art {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1774 / 887;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: var(--navy) url("assets/brand/hero-arte-v2.png") center / cover no-repeat;
  box-shadow: 0 22px 50px rgba(4, 16, 34, 0.38);
  animation: rise 0.55s ease 0.1s both;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.hero__art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

/* Dissuasão: imagens locais não podem ser arrastadas nem selecionadas. */
img[src^="assets/"] {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

@media (max-width: 760px) {
  .hero {
    padding: clamp(1.35rem, 5vw, 2rem);
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .hero__content {
    padding-right: 0;
  }

  .hero__art {
    max-width: 460px;
  }

  .hero::after {
    width: 260px;
    height: 260px;
    top: -60px;
    right: -70px;
  }
}

@media (max-width: 420px) {
  .hero__art {
    border-radius: 12px;
  }
}

.tools {
  padding: 2.4rem 0 1rem;
}

/* O cabeçalho é sticky; sem esta folga os títulos ficariam encobertos
 * quando os botões do hero levam às seções correspondentes. */
#ferramentas,
#descomplice,
#como-funciona,
#faq {
  scroll-margin-top: 48px;
}

.tools .section-heading {
  margin-bottom: 1.1rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 3px 14px rgba(11, 30, 60, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  animation: rise 0.45s ease both;
  overflow: hidden;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), rgba(14, 123, 255, 0.12));
}

.tool-card:nth-child(2) {
  animation-delay: 0.05s;
}

.tool-card:nth-child(3) {
  animation-delay: 0.1s;
}

.tool-card:nth-child(4) {
  animation-delay: 0.15s;
}

.tool-card:nth-child(5) {
  animation-delay: 0.2s;
}

.tool-card:nth-child(6) {
  animation-delay: 0.25s;
}

.tool-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.tool-card__num {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.tool-card__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-top: 0.25rem;
  border-radius: 16px;
  background: var(--bg-soft);
  box-shadow: inset 0 0 0 1px var(--border);
}

.tool-card__icon img {
  width: 60px;
  height: 60px;
}

.tool-card h3 {
  margin: 0;
  padding-right: 2rem;
  font-size: 1.03rem;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.tool-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  color: var(--blue-dark);
  font-size: 0.88rem;
  font-weight: 800;
}

.tool-card__cta img {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}

.tool-card:hover .tool-card__cta img {
  transform: translateX(3px);
}

@media (max-width: 1000px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Categorias na Home e páginas agregadoras ---------- */

.category-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-nav__item {
  position: relative;
  min-width: 0;
}

.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  height: 100%;
  padding: 1.1rem 0.75rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 3px 14px rgba(11, 30, 60, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.category-tile:hover,
.category-tile:focus-visible {
  transform: translateY(-5px);
  border-color: var(--blue);
  box-shadow: var(--shadow-lg);
}

.category-tile__icon {
  display: block;
  width: 100%;
  max-width: 170px;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.category-tile__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.category-tile__label {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.category-tile__hint {
  color: var(--muted);
  font-size: 0.8rem;
}

.category-tooltip {
  position: absolute;
  z-index: 6;
  top: calc(100% + 0.5rem);
  left: 50%;
  width: min(260px, 78vw);
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--navy);
  color: #eaf2ff;
  box-shadow: var(--shadow-lg);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: left;
  opacity: 0;
  transform: translate(-50%, -6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}

.category-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: calc(50% - 6px);
  width: 12px;
  height: 12px;
  background: var(--navy);
  transform: rotate(45deg);
}

.category-nav__item:hover .category-tooltip,
.category-nav__item:focus-within .category-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.category-nav__item:first-child .category-tooltip {
  left: 0;
  transform: translate(0, -6px);
}

.category-nav__item:last-child .category-tooltip {
  left: auto;
  right: 0;
  transform: translate(0, -6px);
}

.category-nav__item:first-child .category-tooltip::before {
  left: 25%;
}

.category-nav__item:last-child .category-tooltip::before {
  left: 75%;
}

.category-nav__item:first-child:hover .category-tooltip,
.category-nav__item:first-child:focus-within .category-tooltip,
.category-nav__item:last-child:hover .category-tooltip,
.category-nav__item:last-child:focus-within .category-tooltip {
  transform: translate(0, 0);
}

.category-tooltip strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.category-tooltip ul {
  margin: 0;
  padding-left: 1.1rem;
}

.category-tooltip li + li {
  margin-top: 0.15rem;
}

@media (max-width: 760px) {
  .category-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .category-tooltip {
    position: static;
    width: auto;
    margin: 0.5rem 0.25rem 0;
    padding: 0.7rem 0.8rem;
    background: var(--blue-soft);
    color: var(--ink);
    box-shadow: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .category-tooltip::before {
    display: none;
  }

  .category-tooltip strong {
    color: var(--blue-dark);
  }
}

@media (max-width: 420px) {
  /* Grade 2×2 para que o CTA “Comece por aqui!” mostre título e quatro ícones
   * juntos mesmo em telas estreitas. Os textos continuam no HTML e os balões
   * seguem disponíveis para leitores de tela via aria-describedby. */
  .category-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .category-tile {
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.55rem 0.4rem;
    text-align: center;
  }

  .category-tile__icon {
    width: 72px;
    flex: 0 0 auto;
  }

  .category-tile__label {
    font-size: 0.74rem;
    line-height: 1.15;
  }

  .category-tile__hint,
  .category-tooltip {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}

.category-banner {
  display: grid;
  grid-template-columns: minmax(110px, 180px) minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
  padding: 1.6rem;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--navy-deep), #113b70 58%, var(--blue));
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.category-banner__icon {
  display: block;
  width: 100%;
  max-width: 180px;
  height: auto;
}

.category-banner .badge {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.category-banner h1 {
  margin: 0.6rem 0;
  font-size: clamp(1.45rem, 4vw, 2.15rem);
}

.category-banner p {
  max-width: 62ch;
  margin: 0;
  color: #dbe9fa;
}

.category-banner a {
  display: inline-block;
  margin-top: 1rem;
  color: #fff;
  font-weight: 800;
}

.tools--category {
  padding-top: 1.5rem;
}

.category-back {
  margin: 1.3rem 0 0;
  font-weight: 700;
}

@media (max-width: 620px) {
  .category-banner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.8rem;
    padding: 1.2rem;
    text-align: center;
  }

  .category-banner__icon {
    max-width: 130px;
  }

  .category-banner p {
    text-align: left;
  }
}

.benefit-grid,
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.benefit,
.step {
  min-width: 0;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.benefit__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 0.8rem;
  border-radius: 12px;
  background: var(--blue-soft);
}

.benefit__icon img {
  width: 24px;
  height: 24px;
}

.benefit h3,
.step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.benefit p,
.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.step__number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 0.8rem;
  border-radius: 10px;
  background: var(--blue-dark);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .benefit-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Orçamento ---------- */

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-head h2 {
  margin: 0;
}

.item-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px 132px 122px 42px;
  gap: 0.6rem;
  align-items: end;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
}

.item-row .field-label,
.item-total-field > span {
  font-size: 0.82rem;
  font-weight: 700;
}

.item-total {
  display: block;
  min-height: 43px;
  padding: 0.72rem 0.35rem;
  color: var(--blue-dark);
  font-size: 0.98rem;
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}

.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 43px;
  padding: 0;
  border: 1px solid var(--danger-border);
  border-radius: 11px;
  background: #fff;
  color: var(--danger);
  font-size: 1.5rem;
  line-height: 1;
}

.btn-icon:hover {
  background: var(--danger-bg);
}

.btn-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.totals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.totals div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  min-width: min(100%, 280px);
  color: var(--muted);
  font-size: 0.92rem;
}

.totals strong {
  color: var(--ink);
}

.totals .grand {
  align-items: baseline;
  color: var(--blue-dark);
  font-size: 1.25rem;
  font-weight: 850;
}

.totals .grand strong {
  color: inherit;
  font-size: 1.35rem;
}

@media (min-width: 921px) {
  .preview-panel {
    position: sticky;
    top: 90px;
  }
}

.preview-doc {
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.preview-doc__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 3px solid var(--orange);
}

.preview-doc__top > div {
  min-width: 0;
}

.preview-doc__brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 850;
}

.preview-doc__tag {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.preview-doc__title {
  margin: 0;
  color: var(--blue-dark);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  letter-spacing: 0.02em;
  text-align: right;
  white-space: nowrap;
}

.preview-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1rem;
  margin: 1rem 0;
}

.preview-meta div {
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: var(--bg-soft);
}

.preview-meta small,
.preview-row small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.preview-meta strong,
.preview-row strong {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.preview-section-title {
  margin: 1.2rem 0 0.5rem;
  color: var(--blue-dark);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 104px 104px;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.preview-row--head {
  border-bottom: 2px solid var(--border);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

.preview-row--head small {
  color: inherit;
}

.preview-row > div {
  min-width: 0;
}

.preview-total {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  margin-top: 1rem;
  padding: 0.8rem;
  border-radius: 10px;
  background: var(--success-bg);
  color: var(--green-dark);
  font-size: 1.1rem;
  font-weight: 850;
}

.preview-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.preview-note {
  margin: 1.1rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 860px) {
  .item-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .item-row .field--desc {
    grid-column: 1 / -1;
  }

  .btn-icon {
    justify-self: end;
  }
}

@media (max-width: 540px) {
  .item-row {
    grid-template-columns: 1fr;
  }

  .item-row > * {
    grid-column: 1 / -1;
  }

  .item-total {
    text-align: left;
  }

  .btn-icon {
    justify-self: stretch;
    width: 100%;
  }

  .preview-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-meta {
    grid-template-columns: 1fr;
  }

  .preview-doc__top {
    flex-direction: column;
  }

  .preview-doc__title {
    text-align: left;
  }
}

/* ---------- Componentes das ferramentas 07 a 16 ---------- */

.tool-category + .tool-category {
  margin-top: 2.2rem;
}

.category-heading {
  max-width: 70ch;
  margin: 0 0 1rem;
}

.category-heading h2 {
  margin: 0 0 0.3rem;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.category-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.subheading {
  margin: 1.4rem 0 0.7rem;
  color: var(--blue-dark);
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 850;
}

.inline-note {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.dynamic-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.dynamic-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.7rem;
  align-items: end;
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
}

.dynamic-row .field {
  min-width: 0;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.row-actions .btn {
  min-height: 38px;
}

.result-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.result-line {
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.result-line span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.result-line strong {
  display: block;
  margin-top: 0.2rem;
  color: var(--blue-dark);
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  overflow-wrap: anywhere;
}

.result-line--highlight {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.result-line--highlight strong {
  color: var(--green-dark);
}

.result-line--warn {
  border-color: var(--warning-border);
  background: var(--warning-bg);
}

.result-line--warn strong {
  color: var(--warning-ink);
}

.memo {
  margin-top: 1rem;
  padding: 0.85rem 0.95rem;
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
  background: var(--bg-soft);
  font-size: 0.86rem;
}

.memo h3 {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
}

.memo p {
  margin: 0.2rem 0;
  overflow-wrap: anywhere;
}

.file-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.file-field input[type="file"] {
  width: 100%;
  min-width: 0;
  font-size: 0.86rem;
}

.image-thumb {
  display: block;
  width: 72px;
  height: 72px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  object-fit: cover;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.chip--ok {
  border-color: var(--success-border);
  background: var(--success-bg);
  color: var(--green-dark);
}

.preview-sheet {
  min-width: 0;
  max-width: 100%;
  padding: clamp(0.7rem, 2vw, 1.1rem);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
}

.preview-sheet__paper {
  min-width: 0;
  padding: clamp(0.8rem, 2vw, 1.2rem);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview-sheet__grid,
.label-sheet__grid {
  display: grid;
  min-width: 0;
}

.preview-card {
  min-width: 0;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.preview-card img {
  display: block;
  width: 100%;
  max-height: 130px;
  border-radius: 6px;
  object-fit: cover;
}

.preview-card strong,
.preview-card p {
  display: block;
  overflow-wrap: anywhere;
}

.preview-card strong {
  margin-top: 0.4rem;
  font-size: 0.88rem;
}

.preview-card p {
  margin: 0.2rem 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.label-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 58px;
  padding: 0.4rem;
  border: 1px dashed var(--border-strong);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

.label-cell strong,
.label-cell span,
.label-cell p {
  overflow-wrap: anywhere;
}

.label-cell strong {
  font-size: 0.82rem;
}

.label-cell .label-price {
  margin-top: 0.2rem;
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 850;
}

.label-cell img {
  display: block;
  width: 38px;
  height: 38px;
  margin-top: 0.25rem;
  image-rendering: pixelated;
}

.canvas-stage {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
}

.canvas-stage canvas {
  display: block;
  width: 100%;
  height: auto;
  max-width: 540px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.canvas-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.swatches button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--border-strong);
}

.swatches button[aria-pressed="true"] {
  box-shadow: 0 0 0 3px var(--blue);
}

.output--url {
  align-items: stretch;
}

.output--url input {
  font-size: 0.82rem;
}

@media (max-width: 680px) {
  .split-grid,
  .result-table,
  .canvas-controls {
    grid-template-columns: 1fr;
  }

  .dynamic-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Rodapé ---------- */

.site-footer {
  position: relative;
  margin-top: 2rem;
  background: var(--navy);
  color: #d6e3f2;
  font-size: 0.9rem;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--orange));
}

.footer-categories {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.5rem;
}

.footer-categories a {
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #bfe3ff;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-categories a:hover {
  border-color: #fff;
  color: #fff;
}

.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1.5rem;
  padding: 2.2rem 0 1.2rem;
}

.footer-grid--compact {
  grid-template-columns: 1.5fr 1fr;
}

.footer-grid--wide {
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.2rem;
}

.footer-grid--wide .brand__logo {
  width: 220px;
}

.footer-grid h2 {
  margin: 0 0 0.7rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-grid p {
  max-width: 48ch;
  margin: 1rem 0 0;
  color: #c7d7ea;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li + li {
  margin-top: 0.45rem;
}

.footer-grid a {
  color: #bfe3ff;
  font-weight: 650;
}

.footer-grid a:hover {
  color: #fff;
}

.brand--footer .brand__logo {
  width: 258px;
}

@media (max-width: 960px) {
  .brand--footer .brand__logo {
    width: 230px;
  }
}

@media (max-width: 420px) {
  .brand--footer .brand__logo {
    width: 200px;
  }
}

.privacy-note {
  position: relative;
  padding: 1.2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #c7d7ea;
  font-size: 0.86rem;
}

.privacy-note a {
  color: #bfe3ff;
}

.privacy-note a:hover {
  color: #fff;
}

.privacy-note h2 {
  margin: 0 0 0.35rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
}

.privacy-note p {
  max-width: 90ch;
  margin: 0;
}

.footer-bottom {
  position: relative;
  padding: 0 0 1.5rem;
  color: #9fb4cc;
  font-size: 0.8rem;
}

@media (max-width: 1100px) {
  .footer-grid--wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid--wide > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding-top: 1.8rem;
  }

  .footer-grid--wide > div:first-child {
    grid-column: auto;
  }
}

/* ---------- Animações ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
