/* ==========================================================================
   Ferramentas — mesmas regras do site (sem raio, sem sombra, sem gradiente).
   Carrega depois de /styles.css e só acrescenta os blocos das ferramentas.
   ========================================================================== */

/* ------------------------------------------------------------- cabeçalho */

.tool-hero { border-bottom: 1px solid var(--rule-dark); }
.tool-hero__in { padding-top: 56px; padding-bottom: 40px; }
.crumbs {
  margin: 0 0 22px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-mute);
}
.crumbs a:hover { color: var(--accent); }
.crumbs span { padding: 0 8px; }
.tool-hero h1 {
  margin: 0; max-width: 22ch;
  font-size: clamp(34px, 5.6vw, 72px); line-height: 0.95;
  font-weight: 700; letter-spacing: -0.04em;
}
.tool-hero h1 .dim { color: var(--on-dark-mute); }
.tool-hero__lede {
  margin: 22px 0 0; max-width: 60ch;
  font-size: 17px; line-height: 1.55; color: var(--on-dark-mute);
}
.tool-hero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--on-dark-mute); border: 1px solid var(--rule-dark); padding: 6px 10px;
}
.tag--accent { color: var(--accent); border-color: var(--accent); }

/* ------------------------------------------------------------ área da ferramenta */

.tool { padding: 40px 0 64px; border-bottom: 1px solid var(--rule-dark); }
.tool__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; }
.tool__grid--wide { grid-template-columns: 1fr; }

.panel { border: 1px solid var(--rule-dark); background: var(--ink-2); }
.panel__head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--rule-dark);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--on-dark-mute);
}
.panel__head b { color: var(--accent); font-weight: 500; }
.panel__body { padding: 6px 18px 18px; }

/* Campos no mesmo desenho do formulário do site */
.tool .field { padding: 12px 0; }
.tool .field select { cursor: pointer; }
.field__hint { margin-top: 6px; font-size: 12px; line-height: 1.45; color: var(--on-dark-mute); }
.field--row { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.field--row label { margin: 0; }

.range { display: flex; align-items: center; gap: 14px; }
.range input[type=range] { flex: 1; accent-color: var(--accent); padding: 0; }
.range output { font-family: var(--mono); font-size: 13px; min-width: 4ch; text-align: right; }

.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--rule-dark); font-size: 14px; cursor: pointer; }
.check:last-child { border-bottom: 0; }
.check input { accent-color: var(--accent); margin: 3px 0 0; width: 15px; height: 15px; flex: none; }
.check small { display: block; color: var(--on-dark-mute); font-size: 12px; margin-top: 2px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn[disabled] { opacity: 0.4; pointer-events: none; }
.btn--small { padding: 8px 12px; font-size: 10px; }

/* Área de soltar arquivo */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 180px; padding: 28px 18px; text-align: center; cursor: pointer;
  border: 1px dashed var(--drop-border); background: var(--ink);
  transition: border-color 120ms linear, background-color 120ms linear;
}
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--drop-hover); }
.drop strong { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.drop span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--on-dark-mute); }
.drop input { display: none; }

.status { margin: 14px 0 0; min-height: 1.4em; font-family: var(--mono); font-size: 12px; color: var(--on-dark-mute); }
.status.is-error { color: var(--accent); }

.privacy {
  display: flex; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule-dark);
  font-size: 12.5px; line-height: 1.5; color: var(--on-dark-mute);
}
.privacy::before { content: '■'; color: var(--accent); font-size: 9px; padding-top: 3px; }

/* ---------------------------------------------------------------- números */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border-top: 1px solid var(--rule-dark); border-left: 1px solid var(--rule-dark); }
.kpi { padding: 18px; border-right: 1px solid var(--rule-dark); border-bottom: 1px solid var(--rule-dark); }
.kpi__k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-mute); }
.kpi__v { margin-top: 8px; font-size: clamp(22px, 2.6vw, 32px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi__s { margin-top: 6px; font-size: 12px; color: var(--on-dark-mute); }
.kpi--hot .kpi__v { color: var(--accent); }

.big {
  padding: 26px 0 22px; border-bottom: 1px solid var(--rule-dark);
}
.big__k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-mute); }
.big__v { margin-top: 10px; font-size: clamp(44px, 7vw, 92px); font-weight: 700; letter-spacing: -0.05em; line-height: 0.9; color: var(--accent); font-variant-numeric: tabular-nums; }
.big__s { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--on-dark-mute); max-width: 52ch; }

/* ----------------------------------------------------------------- tabelas */

.table-wrap { overflow: auto; max-height: 420px; border: 1px solid var(--rule-dark); }
.data { width: 100%; border-collapse: collapse; font-size: 13px; }
.data th, .data td { padding: 8px 12px; border-bottom: 1px solid var(--rule-dark); text-align: left; white-space: nowrap; }
.data thead th {
  position: sticky; top: 0; background: var(--ink-3);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 500; color: var(--on-dark-mute);
}
.data td.num { font-family: var(--mono); text-align: right; }
.data tr.is-bad td { color: var(--accent); }

.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-dark); }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule-dark); font-size: 14px; }
.list .mono { font-family: var(--mono); font-size: 12px; color: var(--on-dark-mute); white-space: nowrap; }
.list .good { color: var(--good); }

/* --------------------------------------------------------------- gráficos */

.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.chart { border: 1px solid var(--rule-dark); background: var(--ink-2); padding: 14px; }
.chart--full { grid-column: 1 / -1; }
.chart h3 { margin: 0 0 10px; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-mute); }
.chart__box { position: relative; height: 280px; }

.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 20px; border-top: 1px solid var(--rule-dark); }

/* ---------------------------------------------- medidor do teste de velocidade */

.gauge { display: flex; align-items: center; gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--rule-dark); }
.gauge__n { font-size: clamp(64px, 9vw, 112px); font-weight: 700; letter-spacing: -0.06em; line-height: 0.85; font-variant-numeric: tabular-nums; }
.gauge__n.is-good { color: var(--good); }
.gauge__n.is-mid { color: var(--mid); }
.gauge__n.is-bad { color: var(--accent); }
.gauge__t { font-size: 15px; line-height: 1.5; color: var(--on-dark-mute); max-width: 40ch; }
.gauge__t b { display: block; color: var(--on-dark); font-size: 18px; margin-bottom: 4px; }

.dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; }
.dot--good { background: var(--good); }
.dot--mid { background: var(--mid); }
.dot--bad { background: var(--accent); }

/* ----------------------------------------------------- conteúdo de apoio (SEO) */

.prose-sec { padding: 56px 0; border-bottom: 1px solid var(--rule-dark); }
.prose { max-width: 72ch; }
.prose h2 { margin: 0 0 16px; font-size: clamp(24px, 3vw, 34px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
.prose h3 { margin: 30px 0 10px; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.prose p, .prose li { font-size: 16px; line-height: 1.65; color: var(--on-dark-mute); }
.prose p { margin: 0 0 14px; }
.prose ol, .prose ul { margin: 0 0 14px; padding-left: 20px; }
.prose strong { color: var(--on-dark); font-weight: 600; }
.prose code, .code {
  font-family: var(--mono); font-size: 13px; color: var(--on-dark);
  background: var(--ink-3); padding: 2px 6px;
}

.faq { border-top: 1px solid var(--rule-dark); margin-top: 8px; }
.faq details { border-bottom: 1px solid var(--rule-dark); }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 30px 16px 0; position: relative;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 14px; font-family: var(--mono); color: var(--accent); font-size: 18px; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 18px; }

/* ------------------------------------------------------- chamada para a Fokus */

.pitch { background: var(--paper); color: var(--on-light); }
.pitch__in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: end; padding-top: 56px; padding-bottom: 56px; }
.pitch .eyebrow { color: var(--accent); }
.pitch h2 { margin: 14px 0 0; font-size: clamp(30px, 4.4vw, 56px); font-weight: 700; letter-spacing: -0.04em; line-height: 0.98; }
.pitch p { margin: 0 0 22px; font-size: 16px; line-height: 1.6; color: var(--on-light-mute); }
.pitch { border-top: 1px solid var(--rule-light); border-bottom: 1px solid var(--rule-light); }
.pitch .btn--ghost { color: var(--on-light); }
.pitch .btn--solid:hover, .pitch .btn--ghost:hover { background: var(--on-light); border-color: var(--on-light); color: var(--paper); }
.pitch__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------------------ outras ferramentas */

.more { padding: 44px 0 64px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); border-top: 1px solid var(--rule-dark); border-left: 1px solid var(--rule-dark); }
.tile {
  display: flex; flex-direction: column; gap: 10px; min-height: 190px; padding: 22px;
  border-right: 1px solid var(--rule-dark); border-bottom: 1px solid var(--rule-dark);
  transition: background-color 120ms linear, color 120ms linear;
}
.tile:hover { background: var(--on-dark); color: var(--ink); }
.tile:hover .tile__d, .tile:hover .tile__u { color: var(--invert-mute); }
.tile__u { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.tile__t { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.tile__d { font-size: 14px; line-height: 1.5; color: var(--on-dark-mute); }
.tile__go { margin-top: auto; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.tile.is-current { pointer-events: none; opacity: 0.35; }

.group-title {
  display: flex; align-items: baseline; gap: 14px; margin: 40px 0 16px;
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
}
.group-title:first-child { margin-top: 0; }
.group-title span { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-mute); }

/* ----------------------------------------------------------------- fórmulas */

.search { display: flex; border: 1px solid var(--rule-dark); background: var(--ink-2); }
.search input { flex: 1; background: transparent; border: 0; outline: none; color: var(--on-dark); font: inherit; font-size: 16px; padding: 14px 16px; }
.search input::placeholder { color: var(--placeholder); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; padding: 7px 10px; border: 1px solid var(--rule-dark); color: var(--on-dark-mute); }
.chip:hover, .chip.is-on { color: var(--ink); background: var(--on-dark); border-color: var(--on-dark); }

.fx { border-top: 1px solid var(--rule-dark); padding: 34px 0; }
.fx__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; }
.fx__name { margin: 0; font-family: var(--mono); font-size: clamp(22px, 2.6vw, 30px); font-weight: 500; letter-spacing: -0.01em; }
.fx__en { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-mute); }
.fx__what { margin: 12px 0 18px; font-size: 16px; line-height: 1.6; color: var(--on-dark-mute); max-width: 70ch; }
.fx__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.snippet { display: flex; align-items: stretch; border: 1px solid var(--rule-dark); background: var(--ink); margin-bottom: 10px; }
.snippet code { flex: 1; padding: 12px 14px; font-family: var(--mono); font-size: 13.5px; color: var(--on-dark); overflow-x: auto; white-space: nowrap; }
.snippet button {
  flex: none; padding: 0 14px; border-left: 1px solid var(--rule-dark);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-mute);
}
.snippet button:hover { color: var(--ink); background: var(--on-dark); }
.snippet__k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-mute); margin: 0 0 6px; }
.mini { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
.mini th, .mini td { border: 1px solid var(--rule-dark); padding: 6px 9px; text-align: left; }
.mini th { color: var(--on-dark-mute); font-weight: 500; background: var(--ink-3); }
.mini td.hl { color: var(--accent); }
.fx__tip { margin-top: 14px; font-size: 14px; line-height: 1.55; color: var(--on-dark-mute); }
.fx__tip b { color: var(--on-dark); font-weight: 600; }
.fx.is-hidden { display: none; }

/* ------------------------------------------------------------- responsivo */

@media (max-width: 1000px) {
  .tool__grid, .pitch__in, .fx__grid { grid-template-columns: 1fr; }
  .charts { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tool-hero__in { padding-top: 40px; }
  .tool { padding: 28px 0 44px; }
  .gauge { flex-direction: column; align-items: flex-start; gap: 10px; }
  .chart__box { height: 240px; }
  .actions .btn { flex: 1 1 auto; text-align: center; }
}
