.pythagorean-theorem-calculator-page {
  --tool-author-footer-max: 1120px;
}

.pyth-shell {
  width: min(1120px, calc(100% - 32px));
  max-width: none;
  margin: 24px auto 60px;
  padding: 0;
  color: #101828;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.pyth-shell .calc-page-head {
  margin-bottom: 20px;
}

.pyth-shell .calc-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #667085;
  font-size: 12px;
}

.pyth-shell .calc-breadcrumbs a {
  color: #667085;
  text-decoration: none;
}

.pyth-shell .calc-breadcrumbs a:hover,
.pyth-shell .calc-breadcrumbs a:focus-visible {
  color: #2364d2;
  text-decoration: underline;
}

.pyth-shell .calc-card {
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(20, 24, 30, 0.08);
  border-radius: 8px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 18px 34px -30px rgba(15, 23, 42, 0.7);
}

.pyth-hero {
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}

.pyth-kicker {
  margin: 0 0 8px;
  color: #0369a1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pyth-hero h1 {
  margin: 0 0 12px;
  color: #101828;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

.pyth-shell .calc-page-intro {
  margin: 0;
  max-width: 850px;
  color: #475467;
  font-size: 15px;
  line-height: 1.6;
}

.pyth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.76fr);
  gap: 16px;
  align-items: start;
}

.pyth-panel,
.pyth-result-card {
  display: grid;
  gap: 16px;
}

.pyth-detail-card,
.pyth-action-section {
  grid-column: 1 / -1;
}

.pyth-panel-head {
  display: grid;
  gap: 4px;
}

.pyth-panel h2,
.pyth-result-card h2,
.pyth-reference h2 {
  margin: 0;
  color: #101828;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.pyth-panel-head p,
.pyth-result-card p,
.pyth-reference p {
  margin: 0;
}

.pyth-panel-head p {
  color: #667085;
  font-size: 14px;
  line-height: 1.55;
}

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

.pyth-field {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.pyth-field input,
.pyth-field select {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #ffffff;
  color: #101828;
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
}

.pyth-field input:focus,
.pyth-field select:focus {
  border-color: #0369a1;
  outline: none;
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.14);
}

.pyth-field input:disabled {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
  cursor: not-allowed;
  opacity: 1;
}

.pyth-field input:disabled::placeholder {
  color: #0369a1;
  font-weight: 800;
  opacity: 1;
}

.pyth-example-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pyth-example-list button {
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #101828;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 0 14px;
  cursor: pointer;
}

.pyth-example-list button:hover,
.pyth-example-list button:focus-visible {
  border-color: #0369a1;
}

.pyth-validation {
  margin: 0;
  color: #0369a1;
  font-size: 13px;
  font-weight: 800;
}

.pyth-result-label {
  margin: 0;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pyth-result-card .pyth-result-value {
  margin: 0;
  color: #101828;
  font-size: clamp(26px, 3.5vw, 41px);
  font-weight: 850;
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

#pyth-result-title,
#pyth-result-copy {
  color: #475467;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.6;
}

.pyth-result-card p:not(.pyth-result-value) {
  color: #475467;
  font-size: 15px;
  line-height: 1.6;
}

.pyth-result-stats,
.pyth-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pyth-result-stats article,
.pyth-detail-list li {
  display: grid;
  gap: 4px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #f9fafb;
  padding: 12px;
}

.pyth-result-stats span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.pyth-result-stats strong,
.pyth-detail-list li {
  color: #101828;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.pyth-detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pyth-triangle-wrap {
  aspect-ratio: 21 / 13;
  display: grid;
  place-items: center;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.pyth-triangle-wrap svg {
  width: 100%;
  height: 100%;
}

.pyth-triangle-fill {
  fill: rgba(3, 105, 161, 0.08);
}

.pyth-triangle-line,
.pyth-right-angle {
  fill: none;
  stroke: #0369a1;
  stroke-width: 5;
  stroke-linejoin: round;
}

.pyth-right-angle {
  stroke: #16a34a;
  stroke-width: 4;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.pyth-svg-label {
  fill: #101828;
  font-size: 18px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
}

.pyth-reference {
  margin-top: 16px;
}

.pyth-reference h2 {
  margin-bottom: 8px;
}

.pyth-reference p {
  color: #344054;
  font-size: 15px;
  line-height: 1.65;
}

.pyth-reference p + p {
  margin-top: 12px;
}

.pyth-triples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pyth-triples span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  padding: 0 14px;
  color: #101828;
  font-size: 14px;
  font-weight: 800;
}

.pyth-reference .calc-faq {
  display: grid;
  gap: 10px;
}

.pyth-reference .calc-faq-item {
  overflow: hidden;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #ffffff;
}

.pyth-reference .calc-faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  color: #101828;
  font-size: 17px;
  font-weight: 700;
}

.pyth-reference .calc-faq-item summary::-webkit-details-marker {
  display: none;
}

.pyth-reference .calc-faq-item > p {
  margin: 0;
  padding: 0 14px 14px;
}

@media (max-width: 900px) {
  .pyth-layout {
    grid-template-columns: 1fr;
  }

  .pyth-detail-card,
  .pyth-action-section {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .pyth-shell {
    width: calc(100% - 20px);
    margin-top: 20px;
    margin-bottom: 42px;
  }

  .pyth-shell .calc-card {
    padding: 16px;
  }

  .pyth-field-grid,
  .pyth-result-stats,
  .pyth-detail-list {
    grid-template-columns: 1fr;
  }
}
