/* Candidate styling for the six-method body-fat flagship; scoped to its native calculator root. */
.strength-tool-page.body-fat-flagship-page {
  --bf-ink: #101828;
  --bf-muted: #475467;
  --bf-line: #d7dfe9;
  --bf-paper: #f6f8fc;
  --bf-orange: #f28b2d;
  color: var(--bf-ink);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.body-fat-flagship-page .strength-form-panel,
.body-fat-flagship-page .strength-result-panel {
  border: 1px solid var(--bf-line);
  border-top: 4px solid var(--bf-orange);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px #0b14280a;
  color: var(--bf-ink);
}

.body-fat-flagship-page .strength-form-panel h2,
.body-fat-flagship-page .strength-form-panel h3,
.body-fat-flagship-page .strength-result-panel h3,
.body-fat-flagship-page .strength-result-panel h4 {
  color: #0d1628;
  line-height: 1.3;
}

.body-fat-flagship-page .strength-form-panel > p,
.body-fat-flagship-page .body-fat-flagship-help,
.body-fat-flagship-page .body-fat-flagship-form-panel small,
.body-fat-flagship-page .body-fat-flagship-result p {
  color: var(--bf-muted);
}

.body-fat-flagship-page input,
.body-fat-flagship-page select,
.body-fat-flagship-page textarea {
  box-sizing: border-box;
  max-width: 100%;
  min-height: 48px;
  border: 1px solid #667085;
  border-radius: 8px;
  background: #fff;
  color: #101828;
  font: inherit;
  padding: 10px 12px;
}

.body-fat-flagship-page input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--bf-orange);
}

.body-fat-flagship-page button {
  max-width: 100%;
  min-height: 44px;
  border: 1px solid #a94e08;
  border-radius: 8px;
  background: #fff;
  color: #843e08;
  font: inherit;
  font-weight: 650;
  white-space: normal;
  overflow-wrap: anywhere;
}

.body-fat-flagship-page button[type="submit"] {
  border-color: var(--bf-orange);
  background: var(--bf-orange);
  color: #0b1428;
  font-weight: 750;
}

.body-fat-flagship-page button:focus-visible,
.body-fat-flagship-page input:focus-visible,
.body-fat-flagship-page select:focus-visible,
.body-fat-flagship-page textarea:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.body-fat-flagship-page .body-fat-flagship-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin-block: 12px;
}

.body-fat-flagship-page .body-fat-flagship-control,
.body-fat-flagship-page .body-fat-flagship-method label,
.body-fat-flagship-page .body-fat-flagship-group-list,
.body-fat-flagship-page .body-fat-flagship-height-pair,
.body-fat-flagship-page .body-fat-flagship-fold-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.body-fat-flagship-page .body-fat-flagship-control {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.body-fat-flagship-page .body-fat-flagship-unit,
.body-fat-flagship-page .body-fat-flagship-unit-select {
  color: var(--bf-muted);
  font-size: 13px;
}

.body-fat-flagship-page .body-fat-flagship-unit-select {
  display: grid;
  gap: 3px;
}

.body-fat-flagship-page .body-fat-flagship-groups,
.body-fat-flagship-page .body-fat-flagship-methods,
.body-fat-flagship-page .body-fat-flagship-globals,
.body-fat-flagship-page .body-fat-flagship-fields,
.body-fat-flagship-page .body-fat-flagship-test-panel,
.body-fat-flagship-page .body-fat-flagship-result section,
.body-fat-flagship-page .body-fat-flagship-next-check,
.body-fat-flagship-page .body-fat-flagship-sources,
.body-fat-flagship-page .body-fat-flagship-previous-baseline {
  margin-block: 18px;
  padding: 16px;
  border: 1px solid var(--bf-line);
  border-radius: 12px;
  background: var(--bf-paper);
}

.body-fat-flagship-page .body-fat-flagship-group-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.body-fat-flagship-page .body-fat-flagship-group[aria-pressed="true"] {
  border-color: #176eaf;
  background: #edf4fc;
  color: #0d1628;
  box-shadow: inset 0 0 0 1px #176eaf;
}

.body-fat-flagship-page .body-fat-flagship-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.body-fat-flagship-page .body-fat-flagship-method {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--bf-line);
  border-radius: 10px;
  background: #fff;
}

.body-fat-flagship-page .body-fat-flagship-method.is-selected {
  border-color: #176eaf;
  box-shadow: 0 0 0 2px #176eaf19;
}

.body-fat-flagship-page .body-fat-flagship-method label {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-width: 0;
}

.body-fat-flagship-page .body-fat-flagship-method label span,
.body-fat-flagship-page .body-fat-flagship-method label small {
  display: block;
  min-width: 0;
  color: var(--bf-muted);
}

.body-fat-flagship-page .body-fat-flagship-method label strong {
  color: #0d1628;
}

.body-fat-flagship-page .body-fat-flagship-fold,
.body-fat-flagship-page .body-fat-flagship-protocol {
  min-width: 0;
  margin-block: 12px;
  padding: 14px;
  border: 1px solid var(--bf-line);
  border-radius: 10px;
  background: #fff;
}

.body-fat-flagship-page .body-fat-flagship-fold small,
.body-fat-flagship-page .body-fat-flagship-protocol p {
  color: var(--bf-muted);
}

.body-fat-flagship-page .body-fat-flagship-actions {
  align-items: center;
}

.body-fat-flagship-page .body-fat-flagship-result .strength-primary {
  display: flex;
  align-items: baseline;
  gap: .18em;
  flex-wrap: nowrap;
  margin-block: 10px;
  color: #0d1628;
  font-size: clamp(44px, 10vw, 78px);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.body-fat-flagship-page .body-fat-flagship-result .strength-primary output {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.body-fat-flagship-page .body-fat-flagship-short-meaning {
  max-width: 48rem;
  font-size: 17px;
}

.body-fat-flagship-page .body-fat-flagship-method-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.body-fat-flagship-page .body-fat-flagship-method-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--bf-line);
  border-radius: 10px;
  background: #fff;
}

.body-fat-flagship-page .body-fat-flagship-method-card h4 {
  margin-top: 0;
}

.body-fat-flagship-page .body-fat-flagship-method-card p strong {
  color: #0d1628;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.body-fat-flagship-page .body-fat-flagship-composition dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.body-fat-flagship-page .body-fat-flagship-composition dl > div {
  padding: 12px;
  border: 1px solid var(--bf-line);
  border-radius: 8px;
  background: #fff;
}

.body-fat-flagship-page .body-fat-flagship-composition dd {
  margin: 4px 0 0;
  color: #0d1628;
  font-size: 1.2rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.body-fat-flagship-page .body-fat-flagship-result-body {
  margin-top: 18px;
}

.body-fat-flagship-page .body-fat-flagship-result .body-fat-flagship-details > section:first-child {
  margin-top: 0;
}

.body-fat-flagship-page .body-fat-flagship-baseline-v2,
.body-fat-flagship-page .body-fat-comparison-baseline-v2 {
  color: var(--bf-ink);
}

.body-fat-flagship-page .body-fat-flagship-caution,
.body-fat-flagship-page .body-fat-flagship-main-unavailable {
  padding: 12px;
  border-left: 4px solid #947539;
  background: #fbf8ef;
  color: #344054 !important;
}

.body-fat-flagship-page .one-rm-save-slot {
  margin-top: 16px;
  border-top: 1px solid var(--bf-line);
}

.body-fat-flagship-page .one-rm-save-slot > .result-account-save-panel {
  background: var(--bf-paper);
  color: var(--bf-ink);
}

@media (max-width: 700px) {
  .strength-tool-page.body-fat-flagship-page .strength-form-panel,
  .strength-tool-page.body-fat-flagship-page .strength-result-panel {
    padding: 18px 14px;
    border-radius: 10px;
  }

  .body-fat-flagship-page .body-fat-flagship-group-list,
  .body-fat-flagship-page .body-fat-flagship-method-grid,
  .body-fat-flagship-page .body-fat-flagship-method-cards,
  .body-fat-flagship-page .body-fat-flagship-fold-grid,
  .body-fat-flagship-page .body-fat-flagship-composition dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .body-fat-flagship-page .body-fat-flagship-method {
    align-items: stretch;
  }

  .body-fat-flagship-page .body-fat-flagship-method [data-bf-set-main] {
    width: 100%;
  }

  .body-fat-flagship-page .body-fat-flagship-group-list button,
  .body-fat-flagship-page .body-fat-flagship-actions button {
    width: 100%;
  }

  .body-fat-flagship-page .body-fat-flagship-result .strength-primary {
    font-size: clamp(42px, 14vw, 64px);
  }

  .body-fat-flagship-page .one-rm-save-slot > .result-account-save-panel .result-save-account {
    width: 100%;
  }
}

@media print {
  .body-fat-flagship-page .body-fat-flagship-baseline-v2,
  .body-fat-flagship-page .body-fat-flagship-previous-baseline,
  .body-fat-flagship-page .strength-actions {
    display: none !important;
  }
}

@media screen {
  /* The shared one-rep-max hero uses a navy gradient; keep its flagship result
     text light while leaving the nested account-save panel on its light surface. */
  .body-fat-flagship-page .body-fat-flagship-result .one-rm-hero > .strength-result-kind {
    color: #a4d2fc;
  }

  .body-fat-flagship-page .body-fat-flagship-result .one-rm-hero > .strength-primary,
  .body-fat-flagship-page .body-fat-flagship-result .one-rm-hero > .strength-primary output {
    color: #fff;
  }

  .body-fat-flagship-page .body-fat-flagship-result .one-rm-hero > .strength-primary span {
    color: #c8d8eb;
  }

  .body-fat-flagship-page .body-fat-flagship-result .one-rm-hero > .body-fat-flagship-short-meaning {
    color: #e5edf7;
  }
}

/* Compact canonical Quick Links: the theme's full-width rule must not stretch these pills. */
@media (max-width: 768px) {
  body:has(.body-fat-flagship-page) .tool-quick-links__items {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
  }
  body:has(.body-fat-flagship-page) a.tool-quick-link,
  body:has(.body-fat-flagship-page) a.tool-quick-link:visited {
    width: auto !important;
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
    padding: 10px 14px;
    min-height: 44px;
    font-size: 15px;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }
}

.body-fat-flagship-composition-graphic { margin: 1rem 0; }
.body-fat-flagship-composition-bar { display:flex; height:28px; overflow:hidden; border-radius:8px; background:#dbeafe; }
.body-fat-flagship-composition-fat { background:#0284c7; }
.body-fat-flagship-composition-rest { flex:1; background:#dbeafe; }
.body-fat-flagship-composition-graphic figcaption { margin-top:.6rem; font-size:.95rem; line-height:1.5; color:#334155; }
.body-fat-flagship-composition-graphic .body-fat-flagship-key { display:inline-block; width:.8rem; height:.8rem; margin-right:.3rem; border-radius:2px; }
.body-fat-flagship-key--fat { background:#0284c7; }
.body-fat-flagship-key--rest { background:#dbeafe; border:1px solid #93c5fd; }

/* FAQ questions are smaller than the FAQ section heading on the flagship page. */
body:has(.body-fat-flagship-page) .standards-body-composition-btcc #strength-032-faqs > h2 {
  font-size: 1.45rem !important;
  line-height: 1.25 !important;
}
body:has(.body-fat-flagship-page) .standards-body-composition-btcc #strength-032-faqs .strength-faq-item > h3 {
  font-size: 1.05rem !important;
  line-height: 1.4 !important;
  margin-block: 1.15rem .35rem;
}

/* Match the established Endura calculator palette on the live input and result cards. */
@media screen {
.strength-tool-page.body-fat-flagship-page {
  --bf-ink: #f1f5f9;
  --bf-muted: #cbd5e1;
  --bf-line: #2c374a;
  --bf-paper: #151e29;
  color: var(--bf-ink);
}

.body-fat-flagship-page .strength-form-panel,
.body-fat-flagship-page .strength-result-panel {
  border-color: #2c374a;
  background: #151e29;
  box-shadow: 0 8px 28px #0005;
  color: #f1f5f9;
}

.body-fat-flagship-page .strength-form-panel h2,
.body-fat-flagship-page .strength-form-panel h3,
.body-fat-flagship-page .strength-result-panel h3,
.body-fat-flagship-page .strength-result-panel h4,
.body-fat-flagship-page .body-fat-flagship-result h2,
.body-fat-flagship-page .body-fat-flagship-result h3,
.body-fat-flagship-page .body-fat-flagship-result h4 {
  color: #62b7f4;
}

.body-fat-flagship-page .strength-form-panel > p,
.body-fat-flagship-page .body-fat-flagship-help,
.body-fat-flagship-page .body-fat-flagship-form-panel small,
.body-fat-flagship-page .body-fat-flagship-result p,
.body-fat-flagship-page .body-fat-flagship-method label span,
.body-fat-flagship-page .body-fat-flagship-method label small,
.body-fat-flagship-page .body-fat-flagship-unit,
.body-fat-flagship-page .body-fat-flagship-unit-select {
  color: #cbd5e1;
}

.body-fat-flagship-page input,
.body-fat-flagship-page select,
.body-fat-flagship-page textarea {
  border-color: #3b4b61;
  background: #1e293b;
  color: #f1f5f9;
}

.body-fat-flagship-page .body-fat-flagship-groups,
.body-fat-flagship-page .body-fat-flagship-methods,
.body-fat-flagship-page .body-fat-flagship-globals,
.body-fat-flagship-page .body-fat-flagship-fields,
.body-fat-flagship-page .body-fat-flagship-test-panel,
.body-fat-flagship-page .body-fat-flagship-result section,
.body-fat-flagship-page .body-fat-flagship-next-check,
.body-fat-flagship-page .body-fat-flagship-sources,
.body-fat-flagship-page .body-fat-flagship-previous-baseline,
.body-fat-flagship-page .body-fat-flagship-method,
.body-fat-flagship-page .body-fat-flagship-fold,
.body-fat-flagship-page .body-fat-flagship-protocol,
.body-fat-flagship-page .body-fat-flagship-method-card,
.body-fat-flagship-page .body-fat-flagship-composition dl > div {
  border-color: #2c374a;
  background: #192330;
  color: #f1f5f9;
}

.body-fat-flagship-page .body-fat-flagship-method label strong,
.body-fat-flagship-page .body-fat-flagship-method-card p strong,
.body-fat-flagship-page .body-fat-flagship-composition dd,
.body-fat-flagship-page .body-fat-flagship-result .strength-primary,
.body-fat-flagship-page .body-fat-flagship-result .strength-primary output {
  color: #62b7f4;
}

.body-fat-flagship-page .body-fat-flagship-group[aria-pressed="true"] {
  border-color: #62b7f4;
  background: #213348;
  color: #f1f5f9;
  box-shadow: inset 0 0 0 1px #62b7f4;
}

.body-fat-flagship-page button {
  border-color: #3b4b61;
  background: #1e293b;
  color: #f1f5f9;
}

.body-fat-flagship-page button[type="submit"] {
  border-color: #f28b2d;
  background: #f28b2d;
  color: #111827;
}

.body-fat-flagship-page .result-account-save-panel {
  border-color: #2c374a !important;
  background: #151e29 !important;
  color: #f1f5f9 !important;
}

.body-fat-flagship-page .result-account-save-panel__copy,
.body-fat-flagship-page .result-account-save-panel__copy p,
.body-fat-flagship-page .result-account-save-panel__copy strong {
  color: #e2e8f0 !important;
}

.body-fat-flagship-page .result-save-account {
  border-color: #62b7f4 !important;
  background: #62b7f4 !important;
  color: #0b1428 !important;
}

.body-fat-flagship-page .body-fat-flagship-caution,
.body-fat-flagship-page .body-fat-flagship-main-unavailable {
  border-left-color: #f28b2d;
  background: #2a2418;
  color: #f1f5f9 !important;
}

.body-fat-flagship-page .body-fat-flagship-form-panel label {
  color: #f1f5f9;
}

.body-fat-flagship-page .body-fat-flagship-form-panel h4 {
  color: #62b7f4;
}
}

/* Quick Links: aligned columns with equal-width buttons and consistent gaps. */
body:has(.strength-standards-root[data-tool="body_fat_comparison"]) .tool-quick-links {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
body:has(.strength-standards-root[data-tool="body_fat_comparison"]) .tool-quick-links__label {
  display: block;
  margin: 0 0 12px;
}
body:has(.strength-standards-root[data-tool="body_fat_comparison"]) .tool-quick-links__items {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 0;
  align-items: stretch;
}
body:has(.strength-standards-root[data-tool="body_fat_comparison"]) a.tool-quick-link,
body:has(.strength-standards-root[data-tool="body_fat_comparison"]) a.tool-quick-link:visited {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 10px 12px;
  text-align: center;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.35;
}
@media (min-width: 600px) and (max-width: 900px) {
  body:has(.strength-standards-root[data-tool="body_fat_comparison"]) .tool-quick-links__items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 599px) {
  body:has(.strength-standards-root[data-tool="body_fat_comparison"]) .tool-quick-links__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  body:has(.strength-standards-root[data-tool="body_fat_comparison"]) a.tool-quick-link,
  body:has(.strength-standards-root[data-tool="body_fat_comparison"]) a.tool-quick-link:visited {
    min-height: 64px;
    font-size: 15px;
  }
}
