.tool-page {
  min-height: 70vh;
  padding: 42px 0 72px;
  background: linear-gradient(180deg, #fff7ed 0, #f8fafc 340px);
}

.tool-container,
.tool-page *,
.tool-page *::before,
.tool-page *::after {
  box-sizing: border-box;
}

.tool-container {
  width: min(1120px, calc(100% - 32px));
  min-width: 0;
}

.tool-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  color: #64748b;
  font-size: .9rem;
}

.tool-breadcrumb a {
  color: #9a3412;
  text-decoration: none;
}

.tool-hero {
  max-width: 790px;
  margin-bottom: 28px;
}

.tool-hero .eyebrow {
  margin: 0 0 8px;
  color: #c2410c;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .13em;
}

.tool-hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.14;
  overflow-wrap: anywhere;
}

.tool-hero p,
.tool-hub-intro p {
  margin: 16px 0 0;
  color: #475569;
  font-size: 1.04rem;
  line-height: 1.75;
}

.tool-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 22px;
  align-items: start;
  margin: 28px 0;
}

.tool-form,
.tool-result,
.tool-checklist,
.tool-content,
.tool-hub-intro,
.tool-hub-section,
.tool-listing-cta,
.tool-disclaimer {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

.tool-form,
.tool-result,
.tool-checklist,
.tool-content,
.tool-hub-intro,
.tool-hub-section,
.tool-listing-cta {
  padding: 26px;
}

.tool-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tool-field {
  display: grid;
  min-width: 0;
  gap: 8px;
  color: #334155;
  font-weight: 800;
}

.tool-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
}

.tool-input-wrap:focus-within {
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, .15);
}

.tool-input-wrap input {
  min-width: 0;
  width: 100%;
  padding: 13px 12px;
  border: 0;
  outline: 0;
  font: inherit;
  text-align: right;
}

.tool-unit {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: .88rem;
  font-weight: 700;
}

.tool-field-error {
  color: #b91c1c;
  font-size: .82rem;
  font-weight: 700;
}

.tool-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.tool-actions .button {
  min-width: 140px;
}

.tool-result {
  position: sticky;
  top: 20px;
}

.tool-result h2,
.tool-content h2,
.tool-hub-intro h2,
.tool-hub-section h2,
.tool-listing-cta h2 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 1.3rem;
}

.tool-result > p,
.tool-content p,
.tool-content li,
.tool-listing-cta p,
.tool-hub-intro p {
  color: #475569;
  line-height: 1.7;
}

.tool-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.tool-result-grid div {
  min-width: 0;
  padding: 14px;
  border-radius: 12px;
  background: #fff7ed;
}

.tool-result-grid dt {
  color: #9a3412;
  font-size: .8rem;
  font-weight: 800;
}

.tool-result-grid dd {
  margin: 5px 0 0;
  color: #0f172a;
  font-size: 1.2rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.tool-result-interpretation {
  margin-bottom: 0;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.tool-content,
.tool-hub-section,
.tool-listing-cta,
.tool-hub-intro {
  margin-top: 20px;
}

.tool-content ol,
.tool-content ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 22px;
}

.tool-related-grid,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tool-card,
.tool-related-card {
  display: flex;
  min-width: 0;
  min-height: 150px;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fffaf5;
  color: #334155;
  text-decoration: none;
}

.tool-card strong,
.tool-related-card strong {
  color: #9a3412;
  font-size: 1.05rem;
}

.tool-card span,
.tool-related-card span {
  flex: 1;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.tool-card em {
  color: #c2410c;
  font-style: normal;
  font-weight: 800;
}

.tool-card:hover,
.tool-related-card:hover {
  border-color: #f97316;
  transform: translateY(-2px);
}

.tool-page :focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.tool-listing-cta {
  background: #172554;
  color: #fff;
}

.tool-listing-cta h2,
.tool-listing-cta p {
  color: #fff;
}

.tool-disclaimer {
  margin-top: 20px;
  padding: 16px 18px;
  background: #f8fafc;
  color: #64748b;
  font-size: .85rem;
  line-height: 1.65;
}

.tool-checklist {
  grid-column: 1 / -1;
  display: grid;
  gap: 20px;
}

.tool-checklist-stage {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.tool-checklist-stage legend {
  padding: 0 8px;
  color: #0f172a;
  font-weight: 900;
}

.tool-check-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px;
  border-radius: 10px;
  color: #334155;
  line-height: 1.55;
  cursor: pointer;
}

.tool-check-item:hover {
  background: #fff7ed;
}

.tool-check-item input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: #ea580c;
}

.tool-progress {
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
}

@media (max-width: 800px) {
  .tool-workspace,
  .tool-related-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-result {
    position: static;
  }
}

@media (max-width: 480px) {
  .tool-page {
    padding: 24px 0 52px;
  }

  .tool-container {
    width: min(100% - 20px, 1120px);
  }

  .tool-form {
    grid-template-columns: 1fr;
  }

  .tool-form,
  .tool-result,
  .tool-checklist,
  .tool-content,
  .tool-hub-intro,
  .tool-hub-section,
  .tool-listing-cta {
    padding: 18px;
  }

  .tool-actions,
  .tool-actions .button {
    width: 100%;
  }

  .tool-result-grid {
    grid-template-columns: 1fr;
  }
}
