.quadratic-formula-calculator-page {
  --tool-author-footer-max: 1120px;
}

.quad-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;
}

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

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

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

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

.quad-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);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.quad-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;
}

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

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

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

.quad-result-card .quad-result-value {
  margin: 0;
  color: #101828;
  font-size: clamp(28px, 3.7vw, 44px);
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

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

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

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

.quad-graph-wrap svg {
  width: 100%;
  height: 100%;
}

.quad-axis {
  stroke: #cbd5e1;
  stroke-width: 2;
}

.quad-parabola {
  fill: none;
  stroke: #0369a1;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quad-symmetry {
  stroke: #16a34a;
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

.quad-vertex {
  fill: #16a34a;
  stroke: #ffffff;
  stroke-width: 3;
}

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

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

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

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

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

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

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

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

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

.quad-reference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quad-reference-grid article {
  display: grid;
  gap: 4px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #f9fafb;
  padding: 12px;
}

.quad-reference-grid strong {
  color: #101828;
  font-size: 16px;
}

.quad-reference-grid span {
  color: #475467;
  font-size: 14px;
}

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

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

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

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

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

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

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

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

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

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