/* ferramentas.css — Arte de Designer — Ferramentas Gratuitas
   CSS compartilhado para todas as páginas de ferramenta
   ====================================================== */

/* Elementos filtrados devem continuar ocultos mesmo quando usam display:flex/grid. */
[hidden] { display: none !important; }

/* ===== TOKENS ===== */
:root {
  --yellow:     #F7CC00;
  --yellow-dark:#C4A500;
  --black:      #1A1A1A;
  --charcoal:   #3E3E40;
  --white:      #FFFFFF;
  --surface:    #F8F8F8;
  --border:     #E5E7EB;
  --text-1:     #1A1A1A;
  --text-2:     #6B7280;
  --text-3:     #9CA3AF;
  --font-h:     'Space Grotesk', sans-serif;
  --font-b:     'DM Sans', sans-serif;
  --font-m:     'JetBrains Mono', monospace;
  --r-sm:       6px;
  --r-md:       8px;
  --r-lg:       12px;
  --r-xl:       16px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-b);
  font-size: 16px;
  color: var(--text-1);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER / NAV ===== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 32px;
}
.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { height: 38px; width: auto; display: block; }
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: var(--r-md);
  transition: background 150ms, color 150ms;
}
.nav-link:hover { background: var(--surface); color: var(--text-1); }
.nav-link.active {
  color: var(--black);
  background: var(--surface);
  border-bottom: 2px solid var(--yellow);
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.nav-favorites-link { display: inline-flex; align-items: center; gap: 6px; }
.nav-favorites-link > i { color: #D6AE00; font-size: 15px; }
.nav-favorites-count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px; background: var(--black); color: var(--white);
  font-size: 9px; font-weight: 800; line-height: 1;
}
.nav-favorites-count[hidden] { display: none; }
.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 7px 14px;
  cursor: pointer;
  font-family: var(--font-b);
  font-size: 13px;
  color: var(--text-3);
}
.nav-search:hover { border-color: #D1D5DB; color: var(--text-2); }
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-1);
  font-size: 22px;
}
.nav-category-menu { position: relative; }
.nav-category-trigger { border: 0; font-family: var(--font-b); cursor: pointer; }
.nav-category-trigger i { font-size: 13px; transition: transform 160ms; }
.nav-category-menu.is-open .nav-category-trigger i { transform: rotate(180deg); }
.nav-category-dropdown {
  display: none; position: absolute; top: calc(100% + 13px); left: 50%;
  width: min(760px, calc(100vw - 40px)); padding: 16px;
  border: 1px solid var(--border); border-radius: var(--r-xl);
  background: var(--white); box-shadow: 0 18px 50px rgba(17,24,39,.16);
  transform: translateX(-50%); z-index: 120;
}
.nav-category-menu.is-open .nav-category-dropdown { display: block; }
.nav-category-heading {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; padding: 2px 4px 13px; border-bottom: 1px solid var(--border);
}
.nav-category-heading strong {
  display: block; color: var(--text-1); font-family: var(--font-h);
  font-size: 14px; line-height: 1.35;
}
.nav-category-heading span { display: block; margin-top: 2px; color: var(--text-3); font-size: 11px; }
.nav-category-heading > a { flex-shrink: 0; color: var(--text-2); font-size: 12px; font-weight: 700; }
.nav-category-heading > a:hover { color: var(--black); }
.nav-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding-top: 10px; }
.nav-category-item {
  display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px;
  border: 1px solid transparent; border-radius: var(--r-md); transition: background 150ms, border-color 150ms;
}
.nav-category-item:hover, .nav-category-item.active { border-color: var(--border); background: var(--surface); }
.nav-category-icon {
  display: flex; align-items: center; justify-content: center; flex: 0 0 34px;
  width: 34px; height: 34px; border-radius: var(--r-md); font-size: 16px;
}
.nav-category-item span:last-child { min-width: 0; }
.nav-category-item strong { display: block; overflow: hidden; color: var(--text-1); font-size: 12px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.nav-category-item small { display: block; margin-top: 2px; color: var(--text-3); font-size: 10px; }
.mobile-navigation {
  padding: 0 0 18px; border-top: 1px solid var(--border);
  max-height: calc(100vh - 64px); overflow-y: auto;
}
.mobile-navigation[hidden] { display: none; }
.mobile-nav-search {
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 14px 0;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 99px;
  background: var(--surface); color: var(--text-2); font-family: var(--font-b); font-size: 13px; font-weight: 600; cursor: pointer;
}
.mobile-nav-favorites {
  display: flex; align-items: center; gap: 9px; margin: -4px 0 14px; padding: 9px;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--white);
}
.mobile-nav-favorites:hover, .mobile-nav-favorites.active { border-color: var(--black); background: var(--surface); }
.mobile-nav-favorites-copy { min-width: 0; flex: 1; }
.mobile-nav-favorites-copy strong { display: block; color: var(--text-1); font-size: 12px; line-height: 1.3; }
.mobile-nav-favorites-copy small { display: block; color: var(--text-3); font-size: 10px; }
.mobile-nav-favorites > .ti-chevron-right { color: var(--text-3); font-size: 14px; }
.mobile-nav-label { margin-bottom: 8px; color: var(--text-3); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.mobile-category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.mobile-category-grid > a {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--white);
}
.mobile-category-grid > a.active { border-color: var(--black); background: var(--surface); }
.mobile-category-grid strong { display: block; overflow: hidden; color: var(--text-1); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-category-grid small { display: block; color: var(--text-3); font-size: 9px; }
.mobile-nav-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--border); }
.mobile-nav-links a { color: var(--text-2); font-size: 12px; font-weight: 600; }

/* ===== GLOBAL TOOL SEARCH ===== */
body.tool-search-open { overflow: hidden; }
.tool-search-modal {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: start center;
  overflow-y: auto; padding: clamp(20px, 7vh, 72px) 20px;
}
.tool-search-modal[hidden] { display: none; }
.tool-search-backdrop {
  position: fixed; inset: 0; border: 0; background: rgba(17,17,17,.68);
  backdrop-filter: blur(5px); cursor: default;
}
.tool-search-dialog {
  position: relative; z-index: 1; width: min(780px, 100%); padding: clamp(20px, 4vw, 32px);
  border: 1px solid rgba(255,255,255,.55); border-radius: 22px; background: var(--white);
  box-shadow: 0 28px 90px rgba(0,0,0,.28);
}
.tool-search-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.tool-search-eyebrow { color: var(--text-3); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.tool-search-dialog h2 { margin-top: 2px; color: var(--text-1); font-family: var(--font-h); font-size: clamp(22px, 4vw, 30px); line-height: 1.2; }
.tool-search-close {
  display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px;
  border: 1px solid var(--border); border-radius: 50%; background: var(--surface);
  color: var(--text-2); cursor: pointer; font-size: 18px;
}
.tool-search-close:hover { border-color: var(--black); color: var(--black); }
.tool-search-autocomplete { position: relative; z-index: 5; }
.tool-search-input-wrap {
  display: flex; align-items: center; gap: 11px; min-height: 54px; padding: 0 16px;
  border: 1px solid #D1D5DB; border-radius: var(--r-xl); background: var(--white);
  transition: border-color 150ms, box-shadow 150ms;
}
.tool-search-input-wrap:focus-within { border-color: var(--yellow-dark); box-shadow: 0 0 0 4px rgba(247,204,0,.14); }
.tool-search-input-wrap > i { color: var(--text-3); font-size: 20px; }
.tool-search-input-wrap input {
  min-width: 0; flex: 1; border: 0; outline: 0; background: transparent;
  color: var(--text-1); font-family: var(--font-b); font-size: 16px;
}
.tool-search-input-wrap input::placeholder { color: var(--text-3); }
.tool-search-shortcut { padding: 3px 6px; border: 1px solid var(--border); border-radius: 5px; color: var(--text-3); font-size: 9px; font-weight: 800; }
.tool-search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; overflow-y: auto;
  max-height: min(390px, 48vh); padding: 7px; border: 1px solid var(--border);
  border-radius: var(--r-xl); background: var(--white); box-shadow: 0 18px 48px rgba(17,24,39,.18);
}
.tool-search-results[hidden] { display: none; }
.tool-search-result {
  display: flex; align-items: center; gap: 11px; padding: 9px; border-radius: 10px;
  color: var(--text-1); transition: background 120ms;
}
.tool-search-result:hover, .tool-search-result:focus, .tool-search-result.is-active { outline: 0; background: var(--surface); }
.tool-search-result.is-active { box-shadow: inset 0 0 0 1px var(--border); }
.tool-search-submit {
  display: flex; align-items: center; flex: 0 0 auto; padding: 9px 16px;
  border: 0; border-radius: 99px; background: var(--yellow); color: var(--black);
  cursor: pointer; font-family: var(--font-b); font-size: 13px; font-weight: 700;
  transition: background 150ms;
}
.tool-search-submit:hover { background: var(--yellow-dark, #C4A500); }
.tool-search-submit > i { display: none; font-size: 16px; }
@media (max-width: 520px) {
  .tool-search-submit { padding: 9px 11px; }
  .tool-search-submit > span { display: none; }
  .tool-search-submit > i { display: block; }
}
.tool-search-seeall {
  display: flex; align-items: center; gap: 10px; margin-top: 5px; padding: 11px 9px;
  border-top: 1px solid var(--border); color: var(--text-2);
  font-size: 12px; font-weight: 600; transition: color 120ms;
}
.tool-search-seeall span { flex: 1; }
.tool-search-seeall:hover { color: var(--text-1); }
.tool-search-result .tool-icon { flex: 0 0 38px; width: 38px; height: 38px; font-size: 17px; }
.tool-search-result-copy { min-width: 0; flex: 1; }
.tool-search-result-copy strong { display: block; overflow: hidden; font-family: var(--font-h); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.tool-search-result-copy small { display: block; color: var(--text-3); font-size: 10px; }
.tool-search-result > i { color: var(--text-3); font-size: 15px; }
.tool-search-no-results { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px; color: var(--text-2); font-size: 13px; }
.tool-search-categories-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0 10px; }
.tool-search-categories-head strong { font-family: var(--font-h); font-size: 14px; }
.tool-search-categories-head span { color: var(--text-3); font-size: 11px; }
.tool-search-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.tool-search-category {
  display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--white);
  transition: border-color 150ms, background 150ms;
}
.tool-search-category:hover { border-color: var(--black); background: var(--surface); }
.tool-search-category > span:nth-child(2) { min-width: 0; flex: 1; }
.tool-search-category strong { display: block; overflow: hidden; font-size: 11px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.tool-search-category small { display: block; color: var(--text-3); font-size: 9px; }
.tool-search-category > i { color: var(--text-3); font-size: 13px; }

/* ===== CATEGORY DISCOVERY ===== */
.category-directory { margin: 20px 0 28px; scroll-margin-top: 84px; }
.category-directory-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
}
.category-directory-title {
  display: flex; align-items: center; gap: 8px; color: var(--text-1);
  font-family: var(--font-h); font-size: 19px; font-weight: 700;
}
.category-directory-copy { margin-top: 3px; color: var(--text-2); font-size: 13px; }
.category-directory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.category-card {
  display: flex; align-items: center; gap: 11px; min-width: 0; padding: 13px;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--white);
  transition: border-color 160ms, transform 160ms, box-shadow 160ms;
}
.category-card:hover { border-color: var(--black); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(17,24,39,.07); }
.category-card-body { min-width: 0; flex: 1; }
.category-card-name { color: var(--text-1); font-family: var(--font-h); font-size: 13px; font-weight: 700; line-height: 1.3; }
.category-card-count { margin-top: 2px; color: var(--text-3); font-size: 10px; }
.category-card-arrow { flex-shrink: 0; color: var(--text-3); font-size: 14px; }

/* ===== CATEGORY PAGE ===== */
.category-hero { overflow: hidden; position: relative; padding: 34px 0 30px; background: var(--black); }
.category-hero::after {
  content: ''; position: absolute; right: -70px; top: -110px; width: 280px; height: 280px;
  border: 60px solid rgba(247,204,0,.08); border-radius: 50%;
}
.category-hero-inner { position: relative; z-index: 1; max-width: 760px; }
.category-hero-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: #9CA3AF; font-size: 12px; }
.category-hero-kicker a:hover { color: var(--yellow); }
.category-hero-title-row { display: flex; align-items: center; gap: 14px; }
.category-hero-title-row .nav-category-icon { width: 48px; height: 48px; flex-basis: 48px; font-size: 23px; }
.category-hero h1 { color: var(--white); font-family: var(--font-h); font-size: clamp(25px, 4vw, 38px); line-height: 1.18; }
.category-hero p { max-width: 680px; margin-top: 10px; color: #9CA3AF; font-size: 15px; line-height: 1.65; }
.category-hero-meta { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 5px 10px; border: 1px solid rgba(255,255,255,.13); border-radius: 99px; color: #D1D5DB; font-size: 11px; font-weight: 700; }
.category-page { padding: 26px 0 64px; }
.category-accordion { margin-bottom: 24px; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--white); }
.category-accordion-summary {
  display: flex; align-items: center; gap: 12px; padding: 15px 17px; cursor: pointer; list-style: none;
}
.category-accordion-summary::-webkit-details-marker { display: none; }
.category-accordion-summary > .nav-category-icon { flex-basis: 38px; width: 38px; height: 38px; }
.category-accordion-summary-copy { min-width: 0; flex: 1; }
.category-accordion-summary-copy strong { display: block; font-family: var(--font-h); font-size: 14px; }
.category-accordion-summary-copy small { display: block; margin-top: 1px; color: var(--text-3); font-size: 11px; }
.category-accordion-count { color: var(--text-3); font-size: 11px; white-space: nowrap; }
.category-accordion-chevron { color: var(--text-2); font-size: 16px; transition: transform 160ms; }
.category-accordion[open] .category-accordion-chevron { transform: rotate(180deg); }
.category-accordion-body { padding: 0 16px 16px; border-top: 1px solid var(--border); }
.category-accordion-body .category-directory-grid { padding-top: 16px; }
.category-card.active { border-color: var(--black); background: var(--surface); box-shadow: inset 3px 0 0 var(--yellow); }
.category-content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.category-tools-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.category-tools-head h2 { color: var(--text-1); font-family: var(--font-h); font-size: 20px; }
.category-tools-head span { color: var(--text-3); font-size: 12px; }
.category-tool-card .tool-desc {
  display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
}
.category-empty { padding: 32px; border: 1px dashed var(--border); border-radius: var(--r-lg); background: var(--surface); text-align: center; color: var(--text-2); }

/* ===== MINHAS FERRAMENTAS ===== */
.favorites-fab-group {
  position: fixed; right: clamp(16px, 2vw, 28px); bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 96; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.favorites-fab {
  position: relative; display: grid; place-items: center; width: 52px; height: 52px;
  border: 1px solid rgba(17,17,17,.12); border-radius: 50%; cursor: pointer;
  box-shadow: 0 9px 28px rgba(17,24,39,.2); font-size: 21px;
  transition: transform 150ms, box-shadow 150ms, background 150ms, color 150ms;
}
.favorites-fab:hover, .favorites-fab:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(17,24,39,.28); outline: none; }
.favorites-fab-library { background: var(--white); color: var(--black); }
.favorites-fab-add { background: var(--yellow); color: var(--black); font-family: var(--font-b); }
.favorites-fab-add.is-saved { background: var(--black); color: var(--yellow); }
.favorites-fab-count {
  position: absolute; top: -4px; right: -4px; display: grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 5px; border: 2px solid var(--white);
  border-radius: 99px; background: var(--black); color: var(--white);
  font-family: var(--font-b); font-size: 9px; font-weight: 800; line-height: 1;
}
.favorites-fab-count[hidden] { display: none; }
.favorites-toast-fallback {
  position: fixed; top: 82px; right: 20px; z-index: 1100; display: flex; align-items: center; gap: 9px;
  max-width: min(390px, calc(100vw - 32px)); padding: 13px 16px; border: 1px solid #BBF7D0;
  border-radius: var(--r-lg); background: #F0FDF4; color: #166534; box-shadow: 0 15px 42px rgba(17,24,39,.18);
  font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none;
  transform: translateY(-12px); transition: opacity 180ms, transform 180ms;
}
.favorites-toast-fallback i { font-size: 18px; }
.favorites-toast-fallback.is-visible { opacity: 1; transform: translateY(0); }
.favorites-hero { overflow: hidden; position: relative; padding: 42px 0 38px; background: var(--black); }
.favorites-hero::after {
  content: ''; position: absolute; top: -100px; right: -60px; width: 280px; height: 280px;
  border: 60px solid rgba(247,204,0,.08); border-radius: 50%; pointer-events: none;
}
.favorites-hero .container { position: relative; z-index: 1; }
.favorites-hero-title { display: flex; align-items: center; gap: 15px; }
.favorites-hero-icon {
  display: grid; place-items: center; flex: 0 0 52px; width: 52px; height: 52px;
  border-radius: var(--r-lg); background: var(--yellow); color: var(--black); font-size: 25px;
}
.favorites-hero h1 { color: var(--white); font-family: var(--font-h); font-size: clamp(27px, 4vw, 40px); line-height: 1.15; }
.favorites-hero p { margin-top: 5px; color: #9CA3AF; font-size: 14px; }
.favorites-page { min-height: 430px; padding-top: 28px; padding-bottom: 70px; }
.favorites-local-note {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 28px; padding: 15px 17px;
  border: 1px solid #F1D975; border-radius: var(--r-lg); background: #FFFBEA;
}
.favorites-local-note > i { flex-shrink: 0; margin-top: 1px; color: #806900; font-size: 21px; }
.favorites-local-note strong { display: block; color: var(--text-1); font-size: 13px; }
.favorites-local-note p { margin-top: 2px; color: var(--text-2); font-size: 12px; line-height: 1.55; }
.favorites-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.favorites-page-head h2 { color: var(--text-1); font-family: var(--font-h); font-size: 21px; }
.favorites-page-head span { display: block; margin-top: 2px; color: var(--text-3); font-size: 12px; }
.favorites-clear { display: inline-flex; align-items: center; gap: 6px; }
.favorites-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.favorites-grid[hidden] { display: none; }
.favorite-tool-card {
  position: relative; min-width: 0; border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--white); transition: border-color 160ms, transform 160ms, box-shadow 160ms;
}
.favorite-tool-card:hover { border-color: var(--black); transform: translateY(-2px); box-shadow: 0 9px 25px rgba(17,24,39,.07); }
.favorite-tool-link { display: flex; align-items: flex-start; gap: 12px; min-height: 154px; padding: 16px 48px 16px 15px; }
.favorite-tool-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.favorite-tool-category { color: var(--text-3); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.favorite-tool-copy strong { margin-top: 2px; color: var(--text-1); font-family: var(--font-h); font-size: 14px; line-height: 1.35; }
.favorite-tool-description {
  display: -webkit-box; overflow: hidden; margin-top: 6px; color: var(--text-2); font-size: 11px;
  line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
}
.favorite-tool-open { position: absolute; right: 16px; bottom: 16px; color: var(--text-3); font-size: 15px; }
.favorite-tool-remove {
  position: absolute; top: 11px; right: 11px; display: grid; place-items: center; width: 30px; height: 30px;
  border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--text-3);
  cursor: pointer; font-size: 15px; transition: border-color 150ms, background 150ms, color 150ms;
}
.favorite-tool-remove:hover, .favorite-tool-remove:focus-visible { border-color: #FECACA; outline: none; background: #FEF2F2; color: #DC2626; }
.favorites-empty {
  padding: 52px 24px; border: 1px dashed var(--border); border-radius: var(--r-xl);
  background: var(--surface); text-align: center;
}
.favorites-empty[hidden] { display: none; }
.favorites-empty-icon {
  display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 14px;
  border-radius: 50%; background: var(--white); color: var(--text-2); box-shadow: 0 5px 18px rgba(17,24,39,.08); font-size: 26px;
}
.favorites-empty h2 { color: var(--text-1); font-family: var(--font-h); font-size: 20px; }
.favorites-empty p { max-width: 490px; margin: 6px auto 18px; color: var(--text-2); font-size: 14px; }
.favorites-empty .btn-primary { display: inline-flex; align-items: center; gap: 7px; }

/* ===== AD SLOT ===== */
.ad-slot {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
}
.ad-slot-banner { height: 90px; width: 100%; }
.ad-slot-rect   { height: 250px; width: 300px; }
.ad-top { margin: 16px 0; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-3);
  padding: 12px 0 0;
}
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--text-1); }
.breadcrumb i { font-size: 12px; }

/* ===== ICON COLORS ===== */
.ic-green  { background: #EAF3DE; color: #3B6D11; }
.ic-orange { background: #FFF7ED; color: #EA580C; }
.ic-blue   { background: #E6F1FB; color: #185FA5; }
.ic-purple { background: #EEEDFE; color: #534AB7; }
.ic-yellow { background: #FDF8D7; color: #C4A500; }
.ic-red    { background: #FCEBEB; color: #A32D2D; }
.ic-teal   { background: #E1F5EE; color: #0F6E56; }
.ic-gray   { background: var(--surface); color: var(--charcoal); }
.ic-black  { background: var(--black); color: var(--yellow); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-family: var(--font-b);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 150ms;
}
.btn-yellow { background: var(--yellow); color: var(--black); }
.btn-yellow:hover { background: var(--yellow-dark); }
.btn-white { background: var(--white); color: var(--black); }
.btn-white:hover { background: var(--surface); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--black); color: var(--white);
  border: none; padding: 10px 20px; border-radius: var(--r-md);
  font-family: var(--font-b); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background 150ms;
}
.btn-primary:hover { background: var(--charcoal); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); color: var(--text-1);
  border: 1px solid var(--border); padding: 9px 16px; border-radius: var(--r-md);
  font-family: var(--font-b); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 150ms;
}
.btn-secondary:hover { border-color: var(--black); color: var(--black); }

.btn-icon {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
  padding: 8px 12px; border-radius: var(--r-md);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all 150ms; font-family: var(--font-b);
}
.btn-icon:hover { border-color: var(--black); color: var(--black); }

/* ===== HERO TAG ===== */
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--yellow);
  background: rgba(247,204,0,0.12); border: 1px solid rgba(247,204,0,0.3);
  padding: 4px 12px; border-radius: 99px;
  letter-spacing: 0.04em; text-transform: uppercase;
}

/* ===== TOOL PAGE MINI-HERO ===== */
.tool-hero { background: var(--black); padding: 28px 0 24px; }
.tool-hero-inner { display: flex; flex-direction: column; gap: 10px; }
.tool-hero-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 12px; color: #6B7280;
}
.tool-hero-breadcrumb a { color: #9CA3AF; transition: color 150ms; }
.tool-hero-breadcrumb a:hover { color: var(--yellow); }
.tool-hero-breadcrumb i { font-size: 11px; }
.tool-hero-head { display: flex; align-items: center; gap: 14px; }
.tool-hero-icon {
  width: 48px; height: 48px; border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.tool-hero-title {
  font-family: var(--font-h);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700; color: var(--white); line-height: 1.2;
}
.tool-hero-desc { font-size: 14px; color: #9CA3AF; max-width: 580px; }

/* ===== TOOL PAGE LAYOUT ===== */
.tool-page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  padding: 28px 0 64px;
  align-items: start;
}

/* ===== TOOL FORM ELEMENTS ===== */
.tool-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-1); margin-bottom: 6px;
}
.tool-input, .tool-select, .tool-textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 10px 14px; font-family: var(--font-b);
  font-size: 14px; color: var(--text-1); background: var(--white);
  outline: none; transition: border-color 150ms;
}
.tool-input:focus, .tool-select:focus, .tool-textarea:focus { border-color: var(--black); }
.tool-textarea {
  font-family: var(--font-m); font-size: 13px;
  min-height: 160px; resize: vertical; line-height: 1.65;
}
.tool-select { cursor: pointer; }

/* ===== TOOL BOX ===== */
.tool-box {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-xl); overflow: hidden; margin-bottom: 16px;
}
.tool-box-header {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; background: var(--surface);
}
.tool-box-title { font-family: var(--font-h); font-size: 14px; font-weight: 600; color: var(--text-1); }
.tool-box-body { padding: 20px; }
.tool-field { margin-bottom: 16px; }
.tool-field:last-child { margin-bottom: 0; }

.tool-output {
  font-family: var(--font-m); font-size: 15px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 16px;
  word-break: break-all; min-height: 56px; line-height: 1.7;
}
.tool-output.large { min-height: 140px; white-space: pre-wrap; }

.tool-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tool-divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ===== OPTION TOGGLES ===== */
.tool-options { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tool-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--r-md);
  cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-2);
  background: var(--white); transition: all 150ms; user-select: none;
  font-family: var(--font-b);
}
.tool-toggle.active { border-color: var(--black); color: var(--black); background: var(--surface); }
.tool-toggle i { font-size: 15px; }

/* ===== STATS ROW ===== */
.tool-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.stat-chip {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 10px 14px;
  text-align: center; flex: 1; min-width: 80px;
}
.stat-num {
  font-family: var(--font-h); font-size: 22px;
  font-weight: 700; color: var(--text-1); line-height: 1.2;
}
.stat-label { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--black); color: var(--white);
  padding: 10px 20px; border-radius: 99px;
  font-size: 14px; font-weight: 500;
  opacity: 0; transition: opacity 200ms, transform 200ms;
  pointer-events: none; z-index: 1000;
  white-space: nowrap; display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== TOOLS GRID (ferramentas relacionadas) ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.tool-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px 14px;
  cursor: pointer; transition: border-color 180ms, transform 180ms;
  display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; color: inherit;
}
.tool-card:hover { border-color: var(--black); transform: translateY(-2px); }
.tool-card:hover .tool-card-arrow { opacity: 1; }
.tool-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.tool-icon {
  width: 40px; height: 40px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.tool-card-arrow { opacity: 0; color: var(--text-3); font-size: 14px; transition: opacity 180ms; }
.tool-name { font-family: var(--font-h); font-size: 13px; font-weight: 600; color: var(--text-1); line-height: 1.35; }
.tool-desc { font-size: 12px; color: var(--text-2); line-height: 1.45; }
.tool-badge {
  display: inline-flex; align-items: center; font-size: 10px;
  font-weight: 600; padding: 2px 7px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-hot { background: var(--black); color: var(--yellow); }
.badge-new { background: #EAF3DE; color: #27500A; }
.badge-api { background: #E6F1FB; color: #0C447C; }

/* ===== SECTION HEADING ===== */
.section-title {
  font-family: var(--font-h); font-size: 16px; font-weight: 600;
  color: var(--text-1); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.section-title i { color: var(--yellow-dark); }

/* ===== SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-sticky { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 20px; }
.sidebar-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.sidebar-card-header {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-family: var(--font-h); font-size: 13px; font-weight: 600;
  color: var(--text-1); display: flex; align-items: center; gap: 8px;
}
.sidebar-card-body { padding: 14px; }
.popular-list { display: flex; flex-direction: column; gap: 6px; }
.popular-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-md);
  text-decoration: none; color: inherit; transition: background 150ms;
}
.popular-item:hover { background: var(--surface); }
.pop-rank { font-family: var(--font-h); font-size: 13px; font-weight: 700; color: var(--text-3); width: 18px; text-align: center; flex-shrink: 0; }
.pop-rank.top { color: var(--yellow-dark); }
.pop-icon { width: 30px; height: 30px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.pop-name { font-size: 13px; font-weight: 500; color: var(--text-1); }
.pop-cat { font-size: 11px; color: var(--text-3); }

/* ===== CTA SECTION ===== */
.cta-section { background: var(--black); padding: 64px 0; margin: 64px 0 0; }
.cta-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.cta-inner h2 { font-family: var(--font-h); font-size: clamp(22px,4vw,36px); font-weight: 700; color: var(--white); max-width: 560px; line-height: 1.25; }
.cta-inner h2 span { color: var(--yellow); }
.cta-inner p { font-size: 16px; color: #6B7280; max-width: 440px; }

/* ===== FOOTER ===== */
.site-footer { background: var(--black); padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-h); font-size: 16px; font-weight: 700; color: var(--white); margin-bottom: 12px; }
.footer-desc { font-size: 14px; color: #6B7280; line-height: 1.65; max-width: 280px; margin-bottom: 16px; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 34px; height: 34px; border-radius: var(--r-md); background: rgba(255,255,255,0.07); display: flex; align-items: center; justify-content: center; color: #9CA3AF; font-size: 16px; transition: background 150ms, color 150ms; }
.footer-social a:hover { background: var(--yellow); color: var(--black); }
.footer-col h4 { font-family: var(--font-h); font-size: 13px; font-weight: 600; color: var(--white); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 13px; color: #6B7280; transition: color 150ms; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 20px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #4B5563; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) and (min-width: 769px) {
  .nav-inner { gap: 14px; }
  .nav-link { padding-right: 8px; padding-left: 8px; font-size: 13px; }
  .nav-search { width: 38px; height: 38px; justify-content: center; padding: 0; }
  .nav-search span { display: none; }
}
@media (max-width: 1024px) {
  .tool-page-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .category-directory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .category-content-layout { grid-template-columns: 1fr; }
  .favorites-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-search { display: none; }
  .nav-hamburger { display: flex; margin-left: auto; }
  .ad-slot-banner { height: 60px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }
  .category-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-search-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .tool-stats { gap: 8px; }
  .stat-chip { min-width: 60px; padding: 8px 10px; }
  .tool-actions { flex-direction: column; }
  .tool-actions > * { width: 100%; justify-content: center; }
  .category-directory-grid { grid-template-columns: 1fr; }
  .category-card { padding: 11px 12px; }
  .category-hero { padding: 28px 0 25px; }
  .category-hero-title-row { align-items: flex-start; }
  .mobile-category-grid { grid-template-columns: 1fr 1fr; }
  .tool-search-modal { padding: 12px; }
  .tool-search-dialog { padding: 18px 16px; border-radius: 18px; }
  .tool-search-shortcut, .category-accordion-count { display: none; }
  .tool-search-category-grid { grid-template-columns: 1fr; }
  .category-accordion-summary { padding: 13px; }
  .category-accordion-body { padding: 0 12px 12px; }
  .favorites-fab-group { right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); gap: 8px; }
  .favorites-fab { width: 48px; height: 48px; font-size: 19px; }
  .favorites-toast-fallback { top: 76px; right: 12px; }
  .favorites-hero { padding: 32px 0 29px; }
  .favorites-hero-title { align-items: flex-start; }
  .favorites-hero-icon { flex-basis: 46px; width: 46px; height: 46px; font-size: 22px; }
  .favorites-page { padding-top: 20px; }
  .favorites-page-head { align-items: flex-start; flex-direction: column; }
  .favorites-grid { grid-template-columns: 1fr; }
  .favorite-tool-link { min-height: 138px; }
  .favorites-clear { width: 100%; justify-content: center; }
}

/* ===== SEO SECTION ===== */
.seo-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 40px;
}
.seo-inner { max-width: 860px; margin: 0 auto; }
.seo-h2 {
  font-size: clamp(18px,2.5vw,24px);
  font-weight: 700;
  font-family: var(--font-h);
  color: var(--text-1);
  margin-bottom: 10px;
}
.seo-intro {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 20px;
  max-width: 720px;
}
.seo-details {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--white);
  overflow: hidden;
}
.seo-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-1);
  list-style: none;
  user-select: none;
}
.seo-summary::-webkit-details-marker { display: none; }
.seo-summary:hover { background: var(--surface); }
.seo-chevron { transition: transform .2s; flex-shrink: 0; }
.seo-details[open] .seo-chevron { transform: rotate(180deg); }
.seo-body {
  padding: 20px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 24px;
}
.seo-block h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  margin-bottom: 10px;
  font-family: var(--font-h);
}
.seo-block ul, .seo-block ol {
  margin: 0 0 0 18px;
}
.seo-block li {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 6px;
}
.seo-faq { display: flex; flex-direction: column; gap: 6px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.faq-item summary {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--surface); }
.faq-item[open] summary { background: var(--surface); border-bottom: 1px solid var(--border); }
.faq-item p {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  margin: 0;
}

/* ===== REPORT SECTION ===== */
.report-section {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  background: #FAFAFA;
}
.report-inner { max-width: 860px; margin: 0 auto; }
.report-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.report-header > .ti {
  font-size: 24px;
  color: var(--yellow-dark);
  flex-shrink: 0;
  margin-top: 2px;
}
.report-header h3 {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-h);
  color: var(--text-1);
  margin-bottom: 4px;
}
.report-header p { font-size: 14px; color: var(--text-2); }
.report-form { display: flex; flex-direction: column; gap: 14px; }
.report-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.report-field { display: flex; flex-direction: column; gap: 5px; }
.report-field label { font-size: 13px; font-weight: 600; color: var(--text-1); }
.report-field .opt { font-weight: 400; color: var(--text-3); }
.report-field .req { color: #EF4444; }
.report-field input,
.report-field select,
.report-field textarea {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 9px 12px;
  font-size: 14px;
  font-family: var(--font-b);
  color: var(--text-1);
  background: var(--white);
  outline: none;
  transition: border-color .15s;
}
.report-field input:focus,
.report-field select:focus,
.report-field textarea:focus { border-color: var(--yellow-dark); }
.report-field textarea { resize: vertical; min-height: 80px; }
.btn-report {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--r-md);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-b);
  cursor: pointer;
  transition: background .15s;
}
.btn-report:hover { background: #333; }
.btn-report:disabled { opacity: .6; cursor: not-allowed; }
.report-status {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 0;
}
.report-status.ok { color: #16A34A; }
.report-status.err { color: #DC2626; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .report-row { grid-template-columns: 1fr; }
  .seo-body { padding: 16px; }
}
