/* ===============================
   BODY PROPORTION CALCULATOR
================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

.proportion-page {
  min-height: 100vh;
  overflow-x: clip;
  color: #f8f2e6;
  background:
    radial-gradient(circle at 14% 8%, rgba(212, 175, 55, 0.12), transparent 28%),
    linear-gradient(180deg, #080808 0%, #050505 100%);
}

.proportion-container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.proportion-card,
.proportion-form,
.proportion-results,
.proportion-measure-card,
.proportion-side-stack,
.proportion-input-grid,
.field-group,
.input-shell,
.result-metric,
.measure-item {
  min-width: 0;
}

.proportion-hero {
  padding: clamp(96px, 10vw, 138px) 0 clamp(36px, 5vw, 58px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.16);
}

.proportion-eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: #e4c04c;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.proportion-hero h1 {
  max-width: 850px;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(2.7rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.proportion-lede {
  max-width: 760px;
  margin: 0;
  color: rgba(248, 242, 230, 0.82);
  font-size: 1.05rem;
  line-height: 1.75;
}

.proportion-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.proportion-hero-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(212, 175, 55, 0.38);
  border-radius: 8px;
  color: #f1cf63;
  text-decoration: none;
  font-weight: 800;
  line-height: 1.25;
  background: rgba(255, 255, 255, 0.025);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.proportion-hero-links a:hover,
.proportion-hero-links a:focus-visible {
  color: #fff4cc;
  border-color: rgba(241, 207, 99, 0.78);
  background: rgba(212, 175, 55, 0.08);
  outline: none;
}

/* ===============================
   MAIN TOOL LAYOUT
================================= */

.proportion-tool-section {
  padding: clamp(34px, 4vw, 50px) 0 clamp(30px, 4vw, 46px);
}

.proportion-quick-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 24px;
  align-items: stretch;
}

.proportion-side-stack {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  align-self: stretch;
  min-height: 0;
}

@media (min-width: 1041px) {
  .proportion-side-stack {
    position: static;
    height: 100%;
    overflow: hidden;
  }
}

.proportion-card {
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(22, 22, 24, 0.96);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
}

.proportion-form,
.proportion-results,
.proportion-measure-card {
  padding: clamp(22px, 2.5vw, 30px);
}

.proportion-card-heading {
  margin-bottom: 18px;
}

.proportion-card-heading h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  line-height: 1.1;
}

.proportion-card-heading p:last-child {
  margin-bottom: 0;
}

/* ===============================
   SEGMENTED CONTROLS
================================= */

.proportion-toggle-fieldset {
  min-width: 0;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.proportion-toggle-fieldset legend {
  margin-bottom: 7px;
  color: rgba(248, 242, 230, 0.82);
  font-size: 0.86rem;
  font-weight: 900;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.segmented-control label {
  min-width: 0;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 12px;
  color: rgba(248, 242, 230, 0.78);
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.segmented-control input:checked + span {
  color: #080808;
  background: linear-gradient(90deg, #d4af37, #f0d77a);
}

/* ===============================
   CALCULATOR SPLIT
================================= */

.calculator-step {
  position: relative;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
}

.calculator-step-primary {
  border-color: rgba(240, 215, 122, 0.3);
  background:
    linear-gradient(180deg, rgba(212, 175, 55, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.018);
}

.calculator-step-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.calculator-step-copy {
  min-width: 0;
}

.calculator-step-kicker {
  margin: 0 0 6px;
  color: #e4c04c;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.calculator-step-heading h3 {
  margin: 0 0 7px;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.25;
}

.calculator-step-heading p,
.support-toggle-text,
.proportion-form-note,
.field-hint {
  margin: 0;
  color: rgba(248, 242, 230, 0.74);
  font-size: 0.92rem;
  line-height: 1.55;
}

.calculator-step-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid rgba(212, 175, 55, 0.36);
  border-radius: 999px;
  color: #f2d675;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(212, 175, 55, 0.08);
}

/* ===============================
   SUPPORT TOGGLE
================================= */

.support-toggle-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.018);
  cursor: pointer;
  transition:
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.support-toggle-panel:hover,
.support-toggle-panel:focus-within {
  border-color: rgba(240, 215, 122, 0.48);
  background:
    linear-gradient(180deg, rgba(212, 175, 55, 0.075), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.018);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.08);
}

.support-toggle-panel input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.support-toggle-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.support-toggle-kicker {
  color: rgba(248, 242, 230, 0.72);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.25;
}

.support-toggle-title {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1.25;
}

.support-toggle-check {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(212, 175, 55, 0.48);
  border-radius: 6px;
  background: rgba(5, 5, 5, 0.54);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.16);
}

.support-toggle-panel input:checked + .support-toggle-check {
  border-color: rgba(240, 215, 122, 0.9);
  background: linear-gradient(135deg, #d4af37, #f0d77a);
  box-shadow:
    inset 0 0 0 5px rgba(5, 5, 5, 0.72),
    0 0 18px rgba(212, 175, 55, 0.24);
}

.supporting-measurements-panel {
  margin-top: 18px;
  animation: supportPanelIn 0.28s ease both;
}

.supporting-measurements-panel[hidden] {
  display: none;
}

@keyframes supportPanelIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===============================
   INPUTS
================================= */

.proportion-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.proportion-input-grid.compact-core {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-group {
  padding: 12px;
  border: 1px solid rgba(212, 175, 55, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.026);
}

.field-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: rgba(248, 242, 230, 0.9);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.25;
}

.field-hint {
  min-height: 44px;
  margin-bottom: 10px;
}

.optional-label {
  color: #d4af37;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.input-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 8px;
  background: rgba(5, 5, 5, 0.58);
}

.input-shell input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 0;
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 850;
  background: transparent;
  outline: none;
}

.input-shell input::placeholder {
  color: rgba(248, 242, 230, 0.42);
}

.input-shell span {
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(212, 175, 55, 0.18);
  color: #f0d77a;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(212, 175, 55, 0.045);
}

.input-shell:focus-within {
  border-color: rgba(240, 215, 122, 0.68);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.proportion-form-note {
  margin-top: 18px;
}

.proportion-calculate-button {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  border-radius: 8px;
  letter-spacing: 0.11em;
}

.female-only,
.female-copy {
  display: none;
}

.proportion-form.is-female .female-only,
.proportion-form.is-female .female-copy,
.proportion-page:has(.proportion-form.is-female) .proportion-side-stack .female-only {
  display: block;
}

.proportion-form.is-female .male-only,
.proportion-form.is-female .male-copy,
.proportion-page:has(.proportion-form.is-female) .proportion-side-stack .male-only {
  display: none;
}

/* ===============================
   RESULTS
================================= */

.result-metrics {
  display: grid;
  gap: 10px;
}

.result-metric {
  padding: 15px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.016)),
    rgba(255, 255, 255, 0.018);
}

.result-metric-label {
  margin: 0 0 8px;
  color: #f0d77a;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.result-metric-value {
  margin: 0 0 6px;
  color: #fff;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  font-weight: 950;
  line-height: 1.05;
}

.result-metric-note {
  margin: 0;
  color: rgba(248, 242, 230, 0.72);
  font-size: 0.92rem;
  line-height: 1.48;
}

.proportion-status {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(212, 175, 55, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.018);
}

.proportion-status h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1rem;
  line-height: 1.3;
}

.proportion-status p {
  margin: 0;
  color: rgba(248, 242, 230, 0.82);
  line-height: 1.58;
}

/* ===============================
   MEASUREMENT GUIDE
================================= */

.proportion-measure-card {
  min-height: 0;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.proportion-measure-card .measure-grid {
  max-height: 100%;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.45) rgba(255, 255, 255, 0.05);
}

.measure-grid {
  display: grid;
  gap: 12px;
}

.measure-grid-compact {
  grid-template-columns: 1fr;
}

.measure-item {
  padding: 14px;
  border: 1px solid rgba(212, 175, 55, 0.13);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
}

.measure-item h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 0.96rem;
  line-height: 1.28;
}

.measure-item p {
  margin: 0;
  color: rgba(248, 242, 230, 0.72);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ===============================
   ANALYSIS
================================= */

.proportion-analysis-section {
  padding: clamp(22px, 4vw, 42px) 0 clamp(34px, 5vw, 58px);
  scroll-margin-top: 96px;
}

.proportion-analysis-section .proportion-container {
  display: grid;
  gap: 18px;
}

.comparison-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(212, 175, 55, 0.13);
  border-radius: 12px;
}

.comparison-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 15px 14px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.11);
  text-align: left;
  vertical-align: top;
}

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

.comparison-table th {
  color: #f0d77a;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  background: rgba(212, 175, 55, 0.055);
}

.comparison-table td {
  color: rgba(248, 242, 230, 0.82);
  font-size: 0.94rem;
  line-height: 1.5;
}

.comparison-table td:first-child {
  color: #fff;
  font-weight: 900;
}

.priority-pill,
.priority-label,
.priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.priority-high,
.priority-pill.high,
.priority-label.high,
[data-priority="high"] {
  border: 1px solid rgba(240, 215, 122, 0.62);
  color: #080808;
  background: linear-gradient(90deg, #d4af37, #f5df87);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.22);
}

.priority-medium,
.priority-pill.medium,
.priority-label.medium,
[data-priority="medium"] {
  border: 1px solid rgba(212, 175, 55, 0.42);
  color: #f7df89;
  background: rgba(212, 175, 55, 0.12);
}

.priority-low,
.priority-pill.low,
.priority-label.low,
[data-priority="low"] {
  border: 1px solid rgba(248, 242, 230, 0.16);
  color: rgba(248, 242, 230, 0.72);
  background: rgba(255, 255, 255, 0.045);
}

.roadmap-card,
.meaning-card {
  padding: clamp(22px, 2.5vw, 30px);
}

.roadmap-card h3,
.meaning-card h3,
#roadmapOutput h3,
#meaningOutput h3 {
  margin: 22px 0 10px;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.3;
}

.roadmap-card h3:first-child,
.meaning-card h3:first-child,
#roadmapOutput h3:first-child,
#meaningOutput h3:first-child {
  margin-top: 0;
}

#roadmapOutput p,
#meaningOutput p,
#roadmapOutput li,
#meaningOutput li {
  color: rgba(248, 242, 230, 0.78);
  line-height: 1.68;
}

#roadmapOutput p,
#meaningOutput p {
  margin: 0 0 14px;
}

#roadmapOutput ul,
#meaningOutput ul {
  margin: 0 0 18px;
  padding-left: 20px;
}

#roadmapOutput li,
#meaningOutput li {
  margin-bottom: 8px;
}

/* ===============================
   EDUCATION
================================= */

.proportion-education-section {
  padding: 0 0 clamp(58px, 7vw, 88px);
}

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

.education-grid .proportion-card {
  padding: clamp(22px, 2.5vw, 30px);
}

.education-grid h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 1.32rem;
  line-height: 1.25;
}

.education-grid p {
  margin: 0 0 14px;
  color: rgba(248, 242, 230, 0.76);
  line-height: 1.7;
}

.education-grid p:last-child {
  margin-bottom: 0;
}

.proportion-page a:not(.primary-cta) {
  color: #f0d77a;
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 175, 55, 0.38);
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.proportion-page a:not(.primary-cta):hover,
.proportion-page a:not(.primary-cta):focus-visible {
  color: #fff4cc;
  border-bottom-color: rgba(240, 215, 122, 0.8);
  outline: none;
}

/* ===============================
   RESPONSIVE
================================= */

@media (max-width: 1180px) {
  .proportion-container {
    width: min(100% - 32px, 1120px);
  }

  .proportion-quick-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
    gap: 20px;
  }

  .proportion-form,
  .proportion-results,
  .proportion-measure-card {
    padding: 22px;
  }
}

@media (max-width: 1040px) {
  .proportion-quick-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .proportion-side-stack {
    height: auto;
    overflow: visible;
  }

  .proportion-measure-card .measure-grid {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .proportion-results {
    order: 1;
  }

  .proportion-measure-card {
    order: 2;
  }

  .result-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .measure-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .education-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .calculator-step-heading {
    gap: 12px;
  }

  .proportion-input-grid,
  .proportion-input-grid.compact-core {
    grid-template-columns: 1fr;
  }

  .result-metrics,
  .measure-grid-compact {
    grid-template-columns: 1fr;
  }

  .comparison-table-wrap {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .proportion-container {
    width: min(100% - 28px, 1120px);
  }

  .proportion-hero {
    padding-top: 88px;
  }

  .proportion-hero h1 {
    font-size: clamp(2.25rem, 12vw, 3.35rem);
  }

  .proportion-hero-links {
    flex-direction: column;
  }

  .proportion-hero-links a {
    width: 100%;
  }

  .proportion-form,
  .proportion-results,
  .proportion-measure-card,
  .roadmap-card,
  .meaning-card,
  .education-grid .proportion-card {
    padding: 20px;
    border-radius: 14px;
  }

  .calculator-step {
    padding: 16px;
  }

  .calculator-step-heading {
    display: block;
  }

  .calculator-step-badge {
    margin-top: 12px;
  }

  .proportion-input-grid,
  .proportion-input-grid.compact-core,
  .result-metrics,
  .measure-grid-compact {
    grid-template-columns: 1fr;
  }

  .support-toggle-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 15px;
  }

  .comparison-table {
    min-width: 700px;
  }
}

@media (max-width: 560px) {
  .proportion-container {
    width: min(100% - 24px, 1120px);
  }

  .proportion-form,
  .proportion-results,
  .proportion-measure-card,
  .roadmap-card,
  .meaning-card,
  .education-grid .proportion-card {
    padding: 18px;
  }

  .input-shell input {
    font-size: 0.95rem;
  }

  .field-hint {
    min-height: 0;
  }

  .comparison-table {
    min-width: 640px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 12px;
  }
}

@media (max-width: 440px) {
  .segmented-control span {
    min-height: 40px;
    padding-inline: 8px;
    font-size: 0.82rem;
  }

  .field-group {
    padding: 11px;
  }

  .input-shell {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .support-toggle-check {
    width: 22px;
    height: 22px;
  }
}
