:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-3: #eef4ff;
  --text: #07142f;
  --muted: #5c6f91;
  --line: #dbe4f0;
  --primary: #2459ff;
  --primary-2: #173fca;
  --primary-soft: #e7efff;
  --accent: #6d4aff;
  --success: #159447;
  --danger: #dc2626;
  --warning: #f59e0b;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 22px 60px rgba(7, 20, 47, .10);
  --shadow-soft: 0 12px 34px rgba(7, 20, 47, .07);
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(36, 89, 255, .09), transparent 30vw),
    linear-gradient(180deg, #fff 0%, var(--bg) 360px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -.04em;
  font-size: 1.08rem;
  color: var(--text);
}

.logo:hover { color: var(--text); }

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #2459ff, #7c3aed);
  font-size: .82rem;
  letter-spacing: -.02em;
  box-shadow: 0 12px 28px rgba(36, 89, 255, .30);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #3a4b68;
  font-weight: 800;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--primary);
  background: var(--primary-soft);
}

.menu-toggle {
  display: none !important;
}

.menu-toggle-text {
  font-size: 0;
  line-height: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 900;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 14px 30px rgba(36, 89, 255, .24);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.btn:hover {
  color: #fff;
  background: var(--primary-2);
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(36, 89, 255, .30);
}

.btn.secondary,
.btn.ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
}

.btn.secondary:hover,
.btn.ghost:hover {
  color: var(--primary);
  border-color: #b9ccff;
  background: #eff4ff;
}

.btn.small {
  min-height: 38px;
  padding: 9px 13px;
  font-size: .9rem;
}

.btn.danger {
  background: #fff;
  color: var(--danger);
  border-color: #fecaca;
  box-shadow: none;
}

.btn.danger:hover { background: #fef2f2; color: var(--danger); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 82px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr);
  align-items: center;
  gap: 46px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1px solid #b9ccff;
  border-radius: 999px;
  padding: 7px 12px;
  color: #173fca;
  background: #eff4ff;
  font-size: .84rem;
  font-weight: 900;
}

h1, h2, h3 {
  margin: 0 0 14px;
  line-height: 1.08;
  letter-spacing: -.045em;
}

h1 { font-size: clamp(2.35rem, 5vw, 4.7rem); max-width: 920px; }
h2 { font-size: clamp(1.8rem, 3vw, 2.75rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 16px; color: var(--muted); }
.hero p { font-size: 1.13rem; max-width: 720px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-card,
.panel,
.card,
.content-page {
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.hero-card {
  border-radius: 32px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.mock {
  display: grid;
  gap: 14px;
}

.mock-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fff;
}

.mock-number {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #1d4ed8;
  background: #e7efff;
  font-weight: 900;
}

.section { padding: 56px 0; }
.section.alt { background: rgba(255,255,255,.58); border-block: 1px solid rgba(219,228,240,.75); }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
}
.section-head p { max-width: 760px; }

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

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  padding: 22px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #b9ccff;
}

.card p { margin-bottom: 18px; }
.card-link {
  margin-top: auto;
  font-weight: 900;
  color: var(--primary);
}

.tag,
.pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 6px 10px;
  margin-bottom: 14px;
  color: #1e40af;
  background: var(--primary-soft);
  font-size: .78rem;
  font-weight: 900;
}

.panel {
  border-radius: var(--radius);
  padding: 24px;
}
.panel h3 { margin-top: 0; }

.ad-slot {
  min-height: 96px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed #b9c8dc;
  border-radius: var(--radius);
  color: #60708d;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(248,250,252,.92));
  font-size: .92rem;
}

.ad-slot.large { min-height: 250px; }
.ad-slot.banner { min-height: 110px; margin: 22px 0; }

.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr;
  gap: 24px;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }

.breadcrumb {
  margin: 26px 0 0;
  font-size: .92rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--primary); font-weight: 900; }

.tool-hero {
  padding: 52px 0 26px;
}
.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tool-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  padding-bottom: 56px;
}

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

.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
label {
  font-size: .9rem;
  font-weight: 900;
  color: #334155;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px 13px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
textarea { min-height: 128px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: #9bb6ff;
  box-shadow: 0 0 0 4px rgba(36, 89, 255, .10);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.result {
  display: none;
  margin-top: 22px;
}
.result.active { display: block; }
.result-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.result-box {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 620px;
  padding: 20px;
  border: 1px solid #1c2f52;
  border-radius: 17px;
  background: #07142f;
  color: #e6edf7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .92rem;
  line-height: 1.65;
}

.side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}
.mini-list { margin: 0; padding-left: 18px; color: var(--muted); }
.mini-list li { margin: 7px 0; }
.mini-list a { color: #1d4ed8; font-weight: 800; }

.searchbar {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 12px;
  margin-bottom: 22px;
}

.notice {
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  border-radius: 17px;
  padding: 14px 16px;
}

.content-page {
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 48px);
  margin: 42px auto 56px;
}
.prose {
  max-width: 900px;
}
.prose h1, .prose h2, .prose h3 { margin-top: 28px; }
.prose h1:first-child, .prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { color: var(--muted); }
.prose li { margin: 6px 0; }
.prose a { color: var(--primary); font-weight: 900; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  transform: translateX(-50%) translateY(16px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 16px;
  border-radius: 999px;
  color: #fff;
  background: #07142f;
  box-shadow: var(--shadow);
  font-weight: 900;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  background: #fff;
}

.adsbygoogle { display: block; }

/* =========================================================
   Responsivo — tablets e telas médias
   ========================================================= */
@media (max-width: 980px) {
  .hero-grid,
  .tool-wrap {
    grid-template-columns: 1fr;
  }

  .side {
    position: static;
  }

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


/* =========================================================
   Responsivo — mobile com menu recolhível
   ========================================================= */
@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #e5e7eb;
  }

  .topbar .nav {
    min-height: 64px;
    display: grid;
    grid-template-columns: 1fr 44px;
    grid-template-areas:
      "logo toggle"
      "menu menu";
    align-items: center;
    gap: 10px 12px;
    padding: 10px 0;
  }

  .topbar .logo {
    grid-area: logo;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: 100%;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 900;
  }

  .topbar .logo-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    font-size: 13px;
  }

  .topbar .menu-toggle {
    grid-area: toggle;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #f7f9fd;
    color: #07142f;
    cursor: pointer;
    appearance: none;
    overflow: hidden;
  }

  .topbar .menu-toggle-icon {
    position: relative;
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: background-color 0.2s ease;
  }

  .topbar .menu-toggle-icon::before,
  .topbar .menu-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, top 0.2s ease;
  }

  .topbar .menu-toggle-icon::before { top: -7px; }
  .topbar .menu-toggle-icon::after { top: 7px; }

  .topbar.is-open .menu-toggle-icon { background: transparent; }
  .topbar.is-open .menu-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
  }
  .topbar.is-open .menu-toggle-icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .topbar .nav-links {
    grid-area: menu;
    display: none !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    padding: 10px 0 4px;
    border-top: 1px solid #edf1f7;
    overflow: visible;
    white-space: normal;
  }

  .topbar.is-open .nav-links {
    display: flex !important;
  }

  .topbar .nav-links a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    color: #1f3a5f;
    background: #f3f6fb;
  }

  .topbar .nav-links a:hover,
  .topbar .nav-links a:focus {
    color: #0b5cff;
    background: #eaf1ff;
  }

  .hero {
    padding-top: 48px;
  }

  .tool-hero {
    padding-top: 34px;
  }

  .section-head {
    display: block;
  }

  .grid,
  .grid.four,
  .form-grid,
  .footer-grid,
  .searchbar {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: auto;
  }

  .hero-actions,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .actions .btn {
    width: 100%;
  }

  .result-toolbar {
    align-items: stretch;
  }

  .mock-row {
    grid-template-columns: 34px 1fr;
    padding: 16px;
  }

  .mock-number {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }
}


/* =========================================================
   Responsivo — mobile pequeno
   ========================================================= */
@media (max-width: 420px) {
  .container {
    width: min(100% - 22px, var(--container));
  }

  h1 {
    font-size: clamp(2.05rem, 12vw, 3.2rem);
  }

  .topbar .nav {
    grid-template-columns: 1fr 40px;
    gap: 8px;
  }

  .topbar .logo {
    gap: 8px;
    font-size: 15px;
  }

  .topbar .logo-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 11px;
    font-size: 12px;
  }

  .topbar .menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .topbar .nav-links a {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .panel,
  .hero-card,
  .card {
    padding: 18px;
  }
}

/* =========================================================
   Correção final do menu superior
   ========================================================= */
.menu-toggle {
  display: none !important;
}

.menu-toggle-text {
  font-size: 0 !important;
  line-height: 0 !important;
}

@media (max-width: 760px) {
  .topbar .nav {
    display: grid !important;
    grid-template-columns: 1fr 44px !important;
    grid-template-areas:
      "logo toggle"
      "menu menu" !important;
  }

  .topbar .menu-toggle {
    display: inline-flex !important;
  }

  .topbar .nav-links {
    display: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    overflow: visible !important;
    white-space: normal !important;
  }

  .topbar.is-open .nav-links {
    display: flex !important;
  }
}

@media (min-width: 761px) {
  .topbar .menu-toggle {
    display: none !important;
  }

  .topbar .nav-links {
    display: flex !important;
  }
}

/* Ajuste para aviso abaixo dos botões do formulário */
.form-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .9rem;
}
