.tf-tool-shell {
  background: #f8f6f6;
  padding: 58px 18px 66px;
  font-family: inherit;
  color: #111827;
}

.tf-tool-wrap {
  max-width: 1120px;
  margin: 0 auto;
}

.tf-tool-head {
  max-width: 780px;
  margin: 0 auto 32px;
  text-align: center;
}

.tf-tool-kicker,
.tf-panel-kicker {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid rgba(124, 58, 237, 0.14);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.tf-tool-title {
  margin: 0;
  color: #111827;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 900;
}

.tf-tool-intro {
  margin: 16px auto 0;
  color: #4b5563;
  font-size: 17px;
  line-height: 1.72;
}

.tf-tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 22px;
  align-items: stretch;
}

.tf-tap-panel,
.tf-converter-panel {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 30px;
  padding: 24px;
  box-shadow: 0 20px 52px rgba(15, 23, 42, 0.075);
}

.tf-tap-panel {
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.12), transparent 35%),
    #ffffff;
}

.tf-status-row,
.tf-panel-title-row,
.tf-action-row,
.tf-tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.tf-status-row,
.tf-panel-title-row {
  justify-content: space-between;
  margin-bottom: 18px;
}

.tf-status-pill {
  display: inline-flex;
  padding: 8px 11px;
  border-radius: 999px;
  background: #f5f3ff;
  color: #6d28d9;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.tf-status-pill.tf-good {
  background: #ecfdf5;
  color: #047857;
}

.tf-status-pill.tf-warn {
  background: #fff7ed;
  color: #c2410c;
}

.tf-mini-note,
.tf-help-text {
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.tf-tap-button {
  width: 100%;
  min-height: 166px;
  border: 0;
  border-radius: 28px;
  background: #7c3aed;
  color: #ffffff;
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 8px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 950;
  letter-spacing: -0.045em;
  box-shadow: 0 18px 40px rgba(124, 58, 237, 0.26);
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  touch-action: manipulation;
}

.tf-tap-button:hover,
.tf-tap-button:focus {
  background: #6d28d9;
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(124, 58, 237, 0.32);
}

.tf-tap-button:active,
.tf-tap-button.tf-pulse {
  transform: scale(0.985);
}

.tf-tap-button:focus-visible,
.tf-secondary-btn:focus-visible,
.tf-light-btn:focus-visible,
.tf-field input:focus-visible,
.tf-field select:focus-visible,
.tf-tool-links a:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.25);
  outline-offset: 3px;
}

.tf-tap-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  font-size: 29px;
  letter-spacing: 0;
}

.tf-help-text {
  margin: 14px 0 0;
  text-align: center;
}

.tf-result-card {
  margin-top: 18px;
  padding: 22px;
  border-radius: 24px;
  background: #111827;
  color: #ffffff;
}

.tf-result-label {
  display: block;
  margin-bottom: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tf-bpm-result {
  display: block;
  color: #ffffff;
  font-size: clamp(40px, 6vw, 62px);
  line-height: 0.95;
  letter-spacing: -0.07em;
  font-weight: 950;
}

.tf-result-context {
  display: block;
  margin-top: 10px;
  color: #dbeafe;
  font-size: 14px;
  line-height: 1.55;
}

.tf-meter {
  height: 12px;
  margin-top: 15px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.tf-meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #a78bfa, #7c3aed);
  border-radius: inherit;
  transition: width 0.18s ease;
}

.tf-stats-grid,
.tf-field-grid,
.tf-convert-summary {
  display: grid;
  gap: 12px;
}

.tf-stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.tf-stat-box,
.tf-convert-summary > div {
  padding: 15px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.tf-stat-box small,
.tf-convert-summary small {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.2;
}

.tf-stat-box strong,
.tf-convert-summary strong {
  color: #111827;
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.tf-action-row {
  margin-top: 16px;
}

.tf-secondary-btn,
.tf-light-btn {
  min-height: 42px;
  border-radius: 13px;
  padding: 11px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
}

.tf-secondary-btn {
  border: 1px solid rgba(124, 58, 237, 0.2);
  background: #7c3aed;
  color: #ffffff;
}

.tf-secondary-btn:hover,
.tf-secondary-btn:focus {
  background: #6d28d9;
}

.tf-secondary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.tf-light-btn {
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: #ffffff;
  color: #334155;
}

.tf-light-btn:hover,
.tf-light-btn:focus {
  border-color: rgba(124, 58, 237, 0.3);
  color: #6d28d9;
}

.tf-panel-title-row strong {
  display: block;
  margin: 0;
  color: #111827;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 950;
}

.tf-formula-badge {
  padding: 8px 10px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

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

.tf-field span {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.tf-field input,
.tf-field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 15px;
  padding: 10px 12px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  box-sizing: border-box;
}

.tf-field input:focus,
.tf-field select:focus {
  border-color: rgba(124, 58, 237, 0.58);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.tf-convert-summary {
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
}

.tf-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.tf-note-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.tf-note-table th,
.tf-note-table td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 14px;
  line-height: 1.45;
}

.tf-note-table th {
  background: #f5f3ff;
  color: #4c1d95;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tf-note-table tr:last-child td {
  border-bottom: 0;
}

.tf-note-table td:first-child {
  color: #111827;
  font-weight: 900;
}

.tf-tool-footer {
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.tf-tool-footer p {
  margin: 0;
  color: #4b5563;
  font-size: 14.5px;
  line-height: 1.65;
}

.tf-tool-footer strong {
  color: #111827;
  font-weight: 900;
}

.tf-tool-links a {
  color: #6d28d9;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.tf-tool-links a:hover,
.tf-tool-links a:focus {
  color: #5b21b6;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 980px) {
  .tf-tool-grid {
    grid-template-columns: 1fr;
  }

  .tf-tool-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .tf-tool-shell {
    padding: 48px 14px 54px;
  }

  .tf-tool-head {
    text-align: left;
  }

  .tf-tap-panel,
  .tf-converter-panel {
    padding: 20px;
    border-radius: 24px;
  }

  .tf-tap-button {
    min-height: 144px;
  }

  .tf-stats-grid,
  .tf-field-grid,
  .tf-convert-summary {
    grid-template-columns: 1fr;
  }
}
