.tc-tool,
.tc-tool * {
  box-sizing: border-box;
}

.tc-tool {
  background: #f8f6f6;
  padding: 42px 18px 64px;
  color: #111827;
  font-family: inherit;
}

.tc-tool__shell {
  max-width: 1180px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 30px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.tc-tool__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 24px;
}

.tc-tool__kicker {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f5f3ff;
  color: #6d28d9;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

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

.tc-tool__intro {
  max-width: 720px;
  margin: 12px 0 0;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.7;
}

.tc-tool__privacy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  max-width: 245px;
  padding: 11px 13px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.tc-tool__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(330px, 1.1fr);
  gap: 20px;
  align-items: stretch;
}

.tc-tool__panel {
  border-radius: 26px;
  border: 1px solid #e2e8f0;
  padding: 22px;
}

.tc-tool__panel--input {
  background: #f8fafc;
}

.tc-tool__panel--results {
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.16), transparent 38%),
    #111827;
  color: #ffffff;
}

.tc-field {
  margin: 0 0 16px;
}

.tc-label {
  display: block;
  margin: 0 0 8px;
  color: #111827;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.3;
}

.tc-number-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
}

.tc-input,
.tc-select {
  width: 100%;
  min-height: 50px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  padding: 12px 14px;
}

.tc-input:focus,
.tc-select:focus,
.tc-step:focus-visible,
.tc-btn:focus-visible,
.tc-tap__button:focus-visible,
.tc-tap__reset:focus-visible,
.tc-presets button:focus-visible,
.tc-tool__links a:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.25);
  outline-offset: 3px;
}

.tc-step {
  width: 48px;
  min-height: 50px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 16px;
  background: #f5f3ff;
  color: #6d28d9;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}

.tc-help {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.tc-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.tc-presets button {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  color: #4f46e5;
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.tc-presets button:hover,
.tc-step:hover,
.tc-tap__reset:hover {
  background: #ede9fe;
}

.tc-two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.tc-tool__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 18px;
}

.tc-btn {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 11px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.tc-btn--primary {
  background: #7c3aed;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.2);
}

.tc-btn--secondary {
  background: #111827;
  color: #ffffff;
}

.tc-btn--ghost {
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.tc-btn:hover {
  transform: translateY(-1px);
}

.tc-tap {
  padding: 17px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.tc-tap__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 13px;
}

.tc-tap__label {
  margin: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}

.tc-tap__text {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.tc-tap__reset {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #4f46e5;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.tc-tap__button {
  width: 100%;
  min-height: 76px;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #ffffff;
  font-size: 22px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.2);
}

.tc-tap__button:active {
  transform: scale(0.99);
}

.tc-tap__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.tc-tap__stats span {
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.tc-tap__stats strong {
  display: block;
  color: #111827;
  font-size: 17px;
  line-height: 1.2;
}

.tc-status {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #dbeafe;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.tc-result-main {
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.tc-result-main span,
.tc-result-main small {
  display: block;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.4;
}

.tc-result-main strong {
  display: block;
  margin: 8px 0;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.tc-result-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.tc-result-card {
  padding: 17px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tc-result-card span {
  display: block;
  margin-bottom: 7px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tc-result-card strong {
  display: block;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.1;
}

.tc-formula-box {
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  color: #111827;
}

.tc-formula-box span {
  display: block;
  margin-bottom: 6px;
  color: #6d28d9;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tc-formula-box code {
  color: #111827;
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: normal;
}

.tc-table-wrap {
  margin-top: 20px;
  border-radius: 26px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.tc-table-head {
  padding: 20px 22px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.tc-table-head h3 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.tc-table-head p {
  margin: 7px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

.tc-table-scroll {
  overflow-x: auto;
}

.tc-table {
  width: 100%;
  min-width: 690px;
  border-collapse: collapse;
}

.tc-table th,
.tc-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.45;
}

.tc-table th {
  background: #ffffff;
  color: #111827;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tc-table td {
  color: #475569;
}

.tc-table td strong {
  color: #111827;
}

.tc-table tr.tc-highlight-row td {
  background: #f5f3ff;
}

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

.tc-tool__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.tc-tool__footer p {
  max-width: 560px;
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}

.tc-tool__footer strong {
  color: #111827;
}

.tc-tool__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.tc-tool__links a {
  padding: 8px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #4f46e5;
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.tc-tool__links a:hover,
.tc-tool__links a:focus {
  background: #f5f3ff;
  color: #6d28d9;
  text-decoration: none;
}

@media (max-width: 920px) {
  .tc-tool__header,
  .tc-tool__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .tc-tool__privacy {
    max-width: none;
  }

  .tc-tool__grid {
    grid-template-columns: 1fr;
  }

  .tc-tool__links {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .tc-tool {
    padding: 30px 14px 46px;
  }

  .tc-tool__shell {
    padding: 18px;
    border-radius: 24px;
  }

  .tc-tool__panel {
    padding: 17px;
    border-radius: 22px;
  }

  .tc-two-fields,
  .tc-result-cards,
  .tc-tap__stats {
    grid-template-columns: 1fr;
  }

  .tc-tool__buttons {
    display: grid;
  }

  .tc-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tc-btn,
  .tc-hero-btn,
  .tc-tap__button {
    transition: none;
  }
}
