/* MDRD GFR Equation — reuse IBW form chrome; page-specific results + visuals */

.hero.hero--mdrd .hero-copy {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  text-align: center;
}

.hero.hero--mdrd .hero-copy .h1-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.06em;
  line-height: 1.08;
  font-size: clamp(1.65rem, 5vw, 2.55rem);
  margin-inline: auto;
  width: 100%;
  color: #fff;
}

.hero.hero--mdrd .hero-copy .h1-line {
  display: block;
  text-align: center;
  width: 100%;
}

.hero.hero--mdrd h1 {
  color: #fff !important;
}

.hero.hero--mdrd .hero-lead {
  text-align: center;
  margin-inline: auto;
  max-width: 62ch;
}

.prose--mdrd .quick-answer,
.prose--mdrd .quick-answer h2 {
  text-align: left;
}

.results--mdrd .ibw-big,
.results--mdrd .ibw-sub,
.results--mdrd .ibw-formula-chip,
.results--mdrd .fwd-metric span,
.results--mdrd .fwd-metric b,
.results--mdrd .ibw-compare li span,
.results--mdrd .ibw-compare li b,
.results--mdrd .ibw-tip,
.results--mdrd .ibw-note-soft,
.results--mdrd .field-note,
.results--mdrd h3 {
  color: #eaf2f8;
}

.results--mdrd .ibw-big {
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mdrd-stage-pill {
  display: inline-flex;
  align-items: center;
  margin-top: 0.45rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(53, 224, 196, 0.16);
  border: 1px solid rgba(53, 224, 196, 0.35);
  color: #dffef6;
}

.mdrd-stage-pill[data-tone="mild"] {
  background: rgba(96, 165, 250, 0.16);
  border-color: rgba(96, 165, 250, 0.4);
  color: #dbeafe;
}

.mdrd-stage-pill[data-tone="warn"] {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fde68a;
}

.mdrd-stage-pill[data-tone="high"],
.mdrd-stage-pill[data-tone="crit"] {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fecaca;
}

.results--mdrd .ibw-formula-chip {
  display: block;
  margin: 0.85rem 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: rgba(53, 224, 196, 0.1);
  border: 1px solid rgba(53, 224, 196, 0.28);
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.82rem;
  line-height: 1.45;
  color: #dffef6 !important;
}

.results--mdrd .ibw-compare {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.results--mdrd .ibw-compare li {
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.results--mdrd .ibw-compare li.is-primary {
  border-color: rgba(53, 224, 196, 0.35);
  background: rgba(53, 224, 196, 0.08);
}

.results--mdrd .ibw-compare li span {
  font-size: 0.75rem;
  color: #9fb4c6 !important;
}

.results--mdrd .ibw-compare li b {
  font-size: 0.95rem;
  color: #fff !important;
}

.mdrd-spectrum {
  position: relative;
  height: 10px;
  margin: 0.85rem 0 1.1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 28%, #60a5fa 55%, #35e0c4 100%);
}

.mdrd-spectrum-marker {
  position: absolute;
  top: -5px;
  width: 4px;
  height: 20px;
  margin-left: -2px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(7, 13, 22, 0.45);
}

.prose--mdrd .formula-viz {
  margin: 1.1rem 0;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: #0a121d;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.prose--mdrd .formula-viz .fv-title {
  margin: 0 0 0.55rem;
  color: #9fb4c6;
  font-size: 0.82rem;
  font-weight: 650;
}

.prose--mdrd .fv-equation {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.92rem;
  color: #eaf2f8;
  line-height: 1.55;
}

.prose--mdrd .fv-equation b {
  color: #35e0c4;
}

.prose--mdrd .mdrd-viz-grid {
  display: grid;
  gap: 0.85rem;
  margin: 1.1rem 0 2.2rem;
  align-items: start;
}

@media (min-width: 720px) {
  .prose--mdrd .mdrd-viz-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.prose--mdrd .mdrd-viz-card {
  margin: 0;
  padding: 1rem 1.05rem 1.15rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
}

.prose--mdrd .mdrd-viz-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.prose--mdrd .mdrd-viz-card p {
  margin: 0 0 0.7rem;
}

.prose--mdrd .mdrd-viz-card svg {
  display: block;
  width: 100%;
  height: auto;
}

.prose--mdrd .ckd-stage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.prose--mdrd .ckd-stage-table th,
.prose--mdrd .ckd-stage-table td {
  padding: 0.45rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.prose--mdrd .ckd-swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 4px;
  margin-right: 0.35rem;
  vertical-align: -1px;
}

.prose--mdrd h2 {
  font-size: clamp(1.2rem, 2.6vw, 1.45rem);
  margin-top: 2.2rem;
  line-height: 1.3;
}

.hero--mdrd .ibw-unit-shell {
  overflow: visible;
}

.hero--mdrd .ibw-unit-meta {
  z-index: 5;
}

.hero--mdrd .ibw-unit-meta .unit-select {
  flex: 1 1 auto;
  min-width: 5.6rem;
  width: auto;
  padding: 0 1.7rem 0 0.55rem;
  height: 2.35rem;
  line-height: 2.35rem;
  font-size: 0.86rem;
  font-weight: 650;
  color: #eaf2f8 !important;
  -webkit-text-fill-color: #eaf2f8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: rgba(255, 255, 255, 0.06) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23eaf2f8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 10px;
}

html:not([data-theme="dark"]) .hero--mdrd .ibw-unit-meta .unit-select {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
  background-color: rgba(15, 23, 42, 0.04) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230f172a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
}

html:not([data-theme="dark"]) .prose--mdrd .formula-viz {
  background: #f4f8fc;
  border-color: rgba(15, 23, 42, 0.1);
}

html:not([data-theme="dark"]) .prose--mdrd .fv-equation,
html:not([data-theme="dark"]) .prose--mdrd .fv-equation b {
  color: #0b1220;
}

html:not([data-theme="dark"]) .prose--mdrd .fv-equation b {
  color: #0f766e;
}

html:not([data-theme="dark"]) .prose--mdrd .formula-viz .fv-title {
  color: #5b6b7c;
}

@media (max-width: 640px) {
  .hero.hero--mdrd .hero-copy .h1-stack {
    font-size: clamp(1.35rem, 6.2vw, 1.75rem);
  }

  .hero.hero--mdrd .hero-lead {
    font-size: 0.92rem;
    line-height: 1.48;
    max-width: 36ch;
  }

  .results--mdrd .ibw-compare {
    grid-template-columns: 1fr;
  }

  .hero--mdrd .seg--ibw label {
    font-size: 0.78rem;
    padding-inline: 0.35rem;
  }
}
