/* =========================================================
   Crestani Pneus e Rodas — Calculadora de pneus
   Complementa home.css; usa os mesmos tokens.
   ========================================================= */

.calc-head {
  background: var(--ink); color: #fff;
  padding-top: calc(var(--header-h) + clamp(36px, 5vw, 72px));
  padding-bottom: clamp(32px, 4vw, 60px);
}
.calc-head__inner { max-width: var(--wrap); }
.calc-head .h2 { color: #fff; margin-bottom: 16px; }
.calc-head .lead { color: #b9bcc2; max-width: 62ch; margin: 0; }

/* ---------------- Entradas ---------------- */
.calc__form {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(16px, 2vw, 28px); border: 0; padding: 0; margin: 0;
}
.calc__set {
  border: 1px solid var(--line); border-radius: 2px; margin: 0;
  padding: clamp(20px, 2vw, 28px);
  background: #fff;
}
.calc__legend {
  display: flex; align-items: center; gap: 9px; padding: 0 8px; margin-left: -8px;
  font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink);
}
.calc__dot {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none;
}
.calc__dot--a { background: var(--muted); }
.calc__dot--b { background: var(--red); }

.calc__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.calc__field { display: flex; flex-direction: column; gap: 7px; }
.calc__label {
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.calc__field select {
  appearance: none; -webkit-appearance: none;
  width: 100%; height: 52px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 2px; background: var(--paper);
  font-weight: 700; font-size: clamp(15px, 1.3vw, 18px); color: var(--ink); cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.calc__field select:hover { border-color: #c9c9c4; background: #fff; }
.calc__field select:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.calc__readout {
  display: block; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-weight: 700; font-size: clamp(20px, 2vw, 26px); letter-spacing: -.01em; color: var(--ink);
}

/* ---------------- Veredito ---------------- */
.verdict {
  margin-top: clamp(20px, 2.4vw, 32px);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(16px, 2vw, 26px);
  align-items: center;
  border: 1px solid var(--line); border-left: 4px solid var(--muted);
  border-radius: 2px; padding: clamp(18px, 2vw, 26px); background: var(--paper);
}
.verdict[data-estado="ok"] { border-left-color: #1f9d55; background: #f4faf6; }
.verdict[data-estado="alerta"] { border-left-color: #d98207; background: #fdf8f0; }
.verdict[data-estado="erro"] { border-left-color: var(--red); background: #fdf5f5; }

.verdict__badge {
  font-weight: 700; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.02em;
  line-height: 1; white-space: nowrap; color: var(--ink);
}
.verdict[data-estado="ok"] .verdict__badge { color: #1f7a44; }
.verdict[data-estado="alerta"] .verdict__badge { color: #a86205; }
.verdict[data-estado="erro"] .verdict__badge { color: var(--red-dark); }

.verdict__text { display: flex; flex-direction: column; gap: 5px; }
.verdict__title { font-weight: 700; font-size: clamp(15px, 1.3vw, 18px); color: var(--ink); }
.verdict__desc { font-size: 14.5px; line-height: 1.5; color: var(--muted-2); font-weight: 500; }

/* régua de −6% a +6%, com a faixa segura destacada */
.verdict__meter { grid-column: 1 / -1; position: relative; height: 26px; margin-top: 4px; }
.verdict__scale {
  position: absolute; left: 0; right: 0; top: 11px; height: 4px;
  background: #e2e2de; border-radius: 2px; display: block;
}
.verdict__safe {
  position: absolute; left: 25%; width: 50%; top: 0; height: 100%;
  background: #bfe3cd; border-radius: 2px; display: block;
}
.verdict__pin {
  position: absolute; top: 4px; width: 3px; height: 18px; margin-left: -1.5px;
  background: var(--ink); border-radius: 2px; transition: left .2s ease;
}

/* ---------------- Desenho ---------------- */
.calc-draw {
  margin-top: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line); border-radius: 2px; background: #fff;
  padding: clamp(16px, 2vw, 26px);
}
.calc-draw svg { display: block; width: 100%; height: clamp(210px, 25vw, 300px); }
.calc-draw__legend {
  display: flex; gap: 22px; justify-content: center; margin-top: 8px;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.calc-draw__legend span { display: inline-flex; align-items: center; gap: 8px; }

/* ---------------- Tabelas ---------------- */
.calc-table-wrap { margin-top: clamp(24px, 3vw, 40px); overflow-x: auto; }
.calc-table {
  width: 100%; border-collapse: collapse; min-width: 520px;
  border: 1px solid var(--line); background: #fff;
}
.calc-table caption { text-align: left; }
.calc-table th, .calc-table td {
  padding: 14px clamp(12px, 1.2vw, 18px); text-align: left;
  border-bottom: 1px solid var(--line); font-size: 14.5px;
}
.calc-table thead th {
  font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); background: var(--paper-2); white-space: nowrap;
}
.calc-table thead th .calc__dot { margin-right: 7px; vertical-align: middle; }
.calc-table tbody th {
  font-weight: 500; color: var(--muted-2); width: 34%;
}
.calc-table tbody td { font-weight: 700; color: var(--ink); white-space: nowrap; }
.calc-table__diff { color: var(--red) !important; }
.calc-table tbody tr:last-child th, .calc-table tbody tr:last-child td { border-bottom: 0; }

.calc-speedo { margin-top: clamp(32px, 4vw, 56px); }
.calc-sub {
  margin: 0 0 10px; font-weight: 700; font-size: clamp(19px, 1.8vw, 24px);
  letter-spacing: -.01em; text-transform: uppercase; color: var(--ink);
}
.calc-note { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted-2); max-width: 62ch; font-weight: 500; }

.calc-disclaimer {
  margin: clamp(28px, 3.5vw, 44px) 0 0; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 13px; line-height: 1.6; color: var(--muted); max-width: 78ch;
}

.calc-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(20px, 2.4vw, 30px); }

@media (max-width: 560px) {
  .calc__fields { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .calc__field select { height: 48px; padding: 0 8px; }
  .verdict { grid-template-columns: minmax(0, 1fr); }
}
