/* US Navy Body Fat Percentage Calculator — content styles.
   Prefix: --nbf-  /  .nbf-

   Reference point: one hero percentage with its category label directly
   beneath it, then a 2-metric fat/lean mass row — the body fat number is
   the thing being measured, so it gets the same hero treatment this site
   gives a single-answer calculation elsewhere, distinct from the earlier
   macro planner's two-tier calorie/macro split.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --nbf-surface: #ffffff;
  --nbf-panel:   #f5f6f4;
  --nbf-line:    #dee2dc;
  --nbf-text:    #141813;
  --nbf-muted:   #5c6459;
  --nbf-bad:     #b3261e;
}

.nbf-wrap {
  width: 100%;
  max-width: 38rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Input panel ─────────────────────────────────────────────────────────── */

.nbf-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--nbf-line);
  border-radius: 2px;
  background: var(--nbf-surface);
}

.nbf-sex-toggle {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.125rem;
  padding-bottom: 1.125rem;
  border-bottom: 1px solid var(--nbf-line);
}

.nbf-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--nbf-text);
  cursor: pointer;
}

.nbf-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 26rem) {
  .nbf-field-grid { grid-template-columns: 1fr; }
}

.nbf-field {
  display: grid;
  gap: 0.375rem;
}

.nbf-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nbf-muted);
}

.nbf-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: var(--nbf-text);
  background: var(--nbf-surface);
  border: 1px solid var(--nbf-line);
  border-radius: 2px;
}

.nbf-field input:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

.nbf-error {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--nbf-bad);
  background: rgba(179, 38, 30, 0.06);
  border: 1px solid var(--nbf-bad);
  border-radius: 2px;
}

.nbf-hint {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--nbf-muted);
}

/* ── Primary action button ──────────────────────────────────────────────── */

.nbf-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--tf-accent-ink);
  background: var(--tf-accent);
  border: 1px solid var(--tf-accent);
  border-radius: 2px;
  cursor: pointer;
  margin-bottom: 1.5rem;
}

.nbf-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.nbf-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.nbf-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Hero result ─────────────────────────────────────────────────────────── */

.nbf-hero {
  padding: 1.75rem 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  border: 1px solid var(--nbf-line);
  border-radius: 2px;
  background: var(--nbf-surface);
}

.nbf-hero-label {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--nbf-muted);
}

.nbf-hero-value {
  margin: 0;
  font-size: 3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--tf-accent);
  line-height: 1;
}

.nbf-hero-category {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--nbf-text);
}

.nbf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 22rem) {
  .nbf-grid { grid-template-columns: 1fr; }
}

.nbf-metric {
  padding: 1rem 0.75rem;
  border: 1px solid var(--nbf-line);
  border-radius: 2px;
  background: var(--nbf-panel);
  text-align: center;
}

.nbf-metric-label {
  margin: 0 0 0.375rem;
  font-size: 0.75rem;
  color: var(--nbf-muted);
}

.nbf-metric-value {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--nbf-text);
}

.nbf-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--nbf-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.nbf-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 38rem;
  padding-inline: 1.5rem;
}

@media (max-width: 26rem) {
  .nbf-wrap,
  .nbf-ad { padding-inline: 1rem; }
  .nbf-panel { padding: 1.25rem; }
}

/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --nbf-surface: var(--tf-surface);
  --nbf-panel: var(--tf-surface);
  --nbf-line: var(--tf-rule);
  --nbf-text: var(--tf-ink);
  --nbf-muted: var(--tf-ink-soft);
  --nbf-bad: #da8581;
}
