/* ── Tools page ─────────────────────────────────────────────── */
.tools-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tool-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 36px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #e4e4e7;
  background: #fff;
  color: #52525b;
  transition: background 150ms, border-color 150ms, color 150ms;
  white-space: nowrap;
  user-select: none;
}
.tool-tab:hover { border-color: #d4d4d8; color: #18181b; background: #fafafa; }
.tool-tab:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.25); }
.tool-tab.active { background: #2563eb; border-color: #2563eb; color: #fff; }
.tool-tab.active:hover { background: #1d4ed8; border-color: #1d4ed8; }

/* ── Single tool panel ── */
.tool-panel {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  overflow: hidden;
  max-width: 900px;
}

.tool-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #e4e4e7;
  background: #fff;
}
.tph-ico-tile {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  flex-shrink: 0;
}
.tph-title { font-size: 14px; font-weight: 600; color: #18181b; }
.tph-sub   { font-size: 12px; color: #71717a; margin-top: 1px; }
.tph-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
  white-space: nowrap;
}

/* ── Panel body: 2-column ── */
.tool-panel-body {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

/* ── Inputs side ── */
.tool-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tool-field { display: flex; flex-direction: column; gap: 5px; }
.tool-field-label {
  font-size: 11px;
  font-weight: 600;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.tool-inp-wrap { position: relative; }
.tool-inp-prefix, .tool-inp-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 500;
  color: #a1a1aa;
  pointer-events: none;
  line-height: 1;
}
.tool-inp-prefix { left: 11px; }
.tool-inp-suffix { right: 11px; }
.tool-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  color: #18181b;
  box-sizing: border-box;
  transition: border-color 150ms, box-shadow 150ms;
  -moz-appearance: textfield;
}
.tool-input::-webkit-outer-spin-button,
.tool-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tool-input:hover { border-color: #d4d4d8; }
.tool-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.tool-input:focus-visible { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.tool-input.has-prefix { padding-left: 24px; }
.tool-input.has-suffix { padding-right: 24px; }
.tool-input.tool-select { cursor: pointer; appearance: auto; }

/* ── Fee rate bar — lives under Platform field ── */
.tool-fee-bar { margin-top: 6px; }
.tool-fee-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #71717a;
  margin-bottom: 5px;
}
.tool-fee-bar-track {
  height: 4px;
  background: #f4f4f5;
  border-radius: 99px;
  overflow: hidden;
}
.tool-fee-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: #2563eb;
  transition: width .3s;
}

/* ── Results side ── */
.tool-results {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tool-results-label {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid #f4f4f5;
}
.tool-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f4f4f5;
}
.tool-result-row:last-child { border-bottom: none; }
.tool-result-hero {
  padding: 14px 16px;
  background: #fafafa;
}
.trr-label {
  font-size: 12px;
  font-weight: 500;
  color: #71717a;
}
.trr-value {
  font-size: 16px;
  font-weight: 600;
  color: #18181b;
  text-align: right;
}
.tool-result-hero .trr-label { font-size: 12px; font-weight: 600; color: #52525b; }
.tool-result-hero .trr-value { font-size: 22px; font-weight: 700; }

/* ── Results centered (break-even) ── */
.tool-results-centered {
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

/* ── Break-even big display ── */
.tool-be-big { text-align: center; padding: 24px 16px; }
.tool-be-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}
.tool-be-price {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1;
  color: #18181b;
  margin-bottom: 8px;
}
.tool-be-note { font-size: 12px; color: #a1a1aa; }

/* ── Verdict strip ── */
.tool-verdict {
  margin: 0 16px 12px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
}
.tool-verdict.good { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.tool-verdict.warn { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.tool-verdict.bad  { background: #fff1f2; color: #b91c1c; border-color: #fecdd3; }

/* ── Price drop compare boxes ── */
.tool-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f4f4f5;
}
.tool-compare-box {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  background: #fafafa;
  text-align: center;
}
.tool-compare-box.highlight {
  border-color: rgba(37,99,235,.2);
  background: #eff6ff;
}
.tcb-label { font-size: 10px; font-weight: 600; color: #71717a; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.tcb-val   { font-size: 18px; font-weight: 700; line-height: 1; color: #18181b; }
.tcb-sub   { font-size: 11px; color: #a1a1aa; margin-top: 3px; }
.tool-compare-arrow { font-size: 14px; color: #a1a1aa; text-align: center; }

@media (max-width: 700px) {
  .tool-panel-body { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .tool-panel { max-width: 100%; }
  .tool-compare { grid-template-columns: 1fr auto 1fr; }
}

@media (max-width: 640px) {
  .tools-tabs { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px; }
  .tools-tabs::-webkit-scrollbar { display: none; }
  .tool-tab { flex-shrink: 0; min-height: 44px; font-size: 13px; }
  .tool-panel-body { grid-template-columns: 1fr !important; padding: 16px; gap: 16px; }
  .tool-panel { max-width: 100%; }
  .tool-input { height: 44px; font-size: 16px !important; }
  .tool-input.tool-select { height: 44px; font-size: 16px !important; }
}
