/* Vescalc / BMI — approved redesign pilot. Scoped to this page only. */

body.bmi-page {
  --ves-ink: #142326;
  --ves-muted: #647276;
  --ves-line: #d9e1df;
  --ves-surface: #ffffff;
  --ves-soft: #f5f8f7;
  --ves-primary: #0b4d4a;
  --ves-primary-hover: #083f3d;
  --ves-primary-soft: #e4f0ed;
  --ves-flame: #d97706;
  --ves-shadow: 0 16px 42px rgba(20, 35, 38, 0.06);
  --ves-radius-sm: 10px;
  --ves-radius: 16px;
  --ves-radius-lg: 22px;
  --ves-font-display: Georgia, "Times New Roman", serif;
  --primary-color: #0b4d4a;
  --primary-gradient: #0b4d4a;
  --primary-gradient-soft: rgba(11, 77, 74, 0.12);

  min-width: 320px;
  padding: 0 24px 36px;
  background: #fff;
  color: var(--ves-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.bmi-page *,
body.bmi-page *::before,
body.bmi-page *::after {
  box-sizing: border-box;
}

body.bmi-page > header,
body.bmi-page > .site-switcher,
body.bmi-page > main,
body.bmi-page > .site-footer {
  width: min(100%, 1180px);
  margin-inline: auto;
}

body.bmi-page > header {
  padding: 18px 0 12px;
  border: 0 !important;
  border-bottom: 1px solid var(--ves-line) !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}

body.bmi-page > header::before,
body.bmi-page > header::after {
  display: none !important;
}

body.bmi-page .header-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  min-height: 40px;
}

body.bmi-page .header-top h1 {
  margin: 0 auto 0 0;
  color: var(--ves-primary);
  font-family: var(--ves-font-display);
  font-size: clamp(2rem, 3.2vw, 2.7rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
  text-shadow: none !important;
  background: none !important;
  -webkit-text-fill-color: var(--ves-primary) !important;
}

body.bmi-page > header > p {
  max-width: 650px;
  margin: 12px 0 0;
  color: var(--ves-muted);
  font-size: 1rem;
  line-height: 1.65;
}

body.bmi-page .theme-btn,
body.bmi-page .user-btn {
  min-height: 42px;
  border: 1px solid var(--ves-line);
  border-radius: var(--ves-radius-sm);
  background: transparent;
  color: var(--ves-ink);
  box-shadow: none;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

body.bmi-page .theme-btn {
  display: grid;
  position: static !important;
  inset: auto !important;
  width: 42px;
  place-items: center;
  margin: 0 !important;
  padding: 0;
  transform: none !important;
}

body.bmi-page .user-menu {
  display: flex;
  position: static !important;
  align-items: center;
  margin: 0 !important;
}

body.bmi-page .theme-btn .app-icon,
body.bmi-page .user-btn .app-icon {
  color: var(--ves-primary);
}

body.bmi-page .user-btn {
  display: inline-flex;
  position: static;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  font-size: 0.91rem;
  font-weight: 650;
}

body.bmi-page #login-btn.user-btn {
  border-color: var(--ves-line) !important;
  background: transparent !important;
  background-image: none !important;
  color: var(--ves-ink) !important;
  box-shadow: none !important;
}

body.bmi-page #login-btn.user-btn:hover {
  border-color: var(--ves-primary) !important;
  background: var(--ves-primary-soft) !important;
  color: var(--ves-primary) !important;
}

body.bmi-page .theme-btn:hover,
body.bmi-page .user-btn:hover {
  border-color: var(--ves-primary);
  background: var(--ves-primary-soft);
  color: var(--ves-primary);
  transform: translateY(-1px);
}

body.bmi-page .theme-btn:hover,
body.bmi-page .theme-btn:focus-visible {
  transform: none !important;
}

body.bmi-page .site-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  align-items: center;
  padding: 12px 0 24px;
  border: 0 !important;
  border-bottom: 1px solid var(--ves-line) !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}

body.bmi-page .site-switcher a {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ves-muted);
  font-size: 0.9rem;
  font-weight: 570;
  text-decoration: none;
}

body.bmi-page .site-switcher a:hover {
  color: var(--ves-primary);
  background: transparent;
  transform: none;
}

body.bmi-page .site-switcher .app-icon {
  width: 1em;
  color: currentColor;
}

body.bmi-page .app-icon use {
  stroke: currentColor !important;
}

body.bmi-page main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

body.bmi-page main > .ad-slot,
body.bmi-page main > #results-section,
body.bmi-page main > #info-tabs,
body.bmi-page main > #history-section,
body.bmi-page main > .seo-entry-card,
body.bmi-page main > #chart-section {
  grid-column: 1 / -1;
}

body.bmi-page #calculator-section {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: 32px;
  align-items: stretch;
  margin: 0;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--ves-line);
  border-radius: var(--ves-radius-lg);
  background: var(--ves-surface);
  box-shadow: none;
}

body.bmi-page #calculator-section.page-reveal-visible {
  border: 1px solid var(--ves-line);
  background: var(--ves-surface);
  box-shadow: none;
}

body.bmi-page #bmi-form {
  display: grid;
  grid-column: 1;
  gap: 22px;
  padding: 0;
  border: 0;
  background: transparent !important;
  box-shadow: none !important;
}

body.bmi-page #bmi-form > .input-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  margin: 0;
}

body.bmi-page #bmi-form > .input-group:first-child {
  display: block;
}

body.bmi-page #bmi-form > .input-group > label {
  grid-column: 1;
  align-self: center;
  margin: 0;
  color: var(--ves-ink);
  font-size: 0.95rem;
  font-weight: 650;
}

body.bmi-page #bmi-form > .input-group > input[type="number"] {
  grid-column: 2;
  width: 116px;
  min-height: 42px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--ves-line);
  border-radius: 8px;
  background: #fff;
  color: var(--ves-ink);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

body.bmi-page #bmi-form > .input-group > input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 28px;
  margin: 0;
  accent-color: var(--ves-primary);
}

body.bmi-page .unit-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 20px;
  padding: 3px;
  border: 1px solid var(--ves-line);
  border-radius: var(--ves-radius-sm);
  background: var(--ves-soft);
}

body.bmi-page .unit-btn {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ves-muted);
  font-size: 0.91rem;
  font-weight: 620;
  box-shadow: none;
}

body.bmi-page .unit-btn.active {
  background: var(--ves-primary);
  color: #fff;
  box-shadow: none;
}

body.bmi-page .gender-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

body.bmi-page .gender-selector input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

body.bmi-page .gender-selector label {
  display: grid;
  min-height: 44px;
  place-items: center;
  margin: 0;
  border: 1px solid var(--ves-line);
  border-radius: var(--ves-radius-sm);
  background: #fff;
  color: var(--ves-ink);
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 620;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

body.bmi-page .gender-selector input:checked + label {
  border-color: var(--ves-primary);
  background: var(--ves-primary-soft);
  color: var(--ves-primary);
  box-shadow: none !important;
}

body.bmi-page .actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 2px 0 0;
}

body.bmi-page #calc-btn,
body.bmi-page #reset-btn {
  min-height: 48px;
  margin: 0;
  border-radius: var(--ves-radius-sm);
  box-shadow: none;
  font-size: 0.98rem;
  font-weight: 720;
}

body.bmi-page #calc-btn {
  border: 1px solid var(--ves-primary);
  background: var(--ves-primary);
  color: #fff;
}

body.bmi-page #calc-btn:hover {
  border-color: var(--ves-primary-hover);
  background: var(--ves-primary-hover);
  transform: translateY(-1px);
}

body.bmi-page input[type="range"] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background: transparent !important;
  accent-color: var(--ves-primary);
  box-shadow: none !important;
}

body.bmi-page input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--ves-primary) 0 var(--range-progress, 50%),
    #dfe5e4 var(--range-progress, 50%) 100%
  ) !important;
}

body.bmi-page input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--ves-primary) !important;
  box-shadow: 0 0 0 2px var(--ves-primary), 0 0 0 5px var(--ves-primary-soft) !important;
}

body.bmi-page input[type="range"]::-moz-range-track {
  height: 4px;
  border: 0 !important;
  border-radius: 999px;
  background: #dfe5e4 !important;
}

body.bmi-page input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--ves-primary) !important;
}

body.bmi-page input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid var(--ves-surface) !important;
  border-radius: 50%;
  background: var(--ves-primary) !important;
  box-shadow: 0 0 0 2px var(--ves-primary), 0 0 0 5px var(--ves-primary-soft) !important;
}

body.bmi-page input[type="range"]::-moz-focus-outer {
  border: 0;
}

body.bmi-page #reset-btn {
  min-width: 110px;
  border: 1px solid var(--ves-line);
  background: transparent;
  color: var(--ves-primary);
}

body.bmi-page #reset-btn:hover {
  border-color: var(--ves-primary);
  background: var(--ves-primary-soft);
}

body.bmi-page .streak-spotlight {
  grid-column: 2;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px 16px;
  min-height: 0;
  align-self: start;
  margin: 0;
  padding: 10px 0 10px 18px;
  border: 0;
  border-left: 2px solid var(--ves-flame);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.bmi-page .streak-spotlight__badge {
  display: grid;
  grid-column: 1;
  grid-row: 1;
  width: 46px;
  height: 46px;
  place-items: center;
  align-self: start;
  border-radius: 12px;
  background: var(--ves-primary-soft);
  color: var(--ves-flame);
}

body.bmi-page .streak-spotlight__badge .app-icon {
  width: 23px;
  height: 23px;
  stroke: currentColor;
}

body.bmi-page .streak-spotlight__count {
  display: none;
}

body.bmi-page .streak-spotlight__eyebrow {
  display: block;
  margin: 0 0 4px;
  color: var(--ves-flame);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.bmi-page .streak-spotlight__body {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

body.bmi-page .streak-spotlight h2 {
  margin: 0;
  color: var(--ves-ink);
  font-family: var(--ves-font-display);
  font-family: inherit;
  font-size: 1.12rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

body.bmi-page .streak-spotlight p {
  margin: 8px 0 0;
  color: var(--ves-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

body.bmi-page .streak-spotlight__progress-wrap {
  margin-top: 10px;
}

body.bmi-page .streak-spotlight__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--ves-muted);
  font-size: 0.77rem;
}

body.bmi-page .streak-spotlight__progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #f0e4d0;
}

body.bmi-page .streak-spotlight__progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ves-flame);
}

body.bmi-page .streak-spotlight__action {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 40px;
  margin-top: 0;
  padding: 0 13px;
  border: 1px solid #d8ae70;
  border-radius: 8px;
  background: transparent;
  color: #8a5100;
  font-size: 0.86rem;
  font-weight: 700;
}

body.bmi-page #results-section {
  display: block;
  margin-top: 6px;
  padding: clamp(28px, 4vw, 50px);
  border: 1px solid var(--ves-line);
  border-radius: var(--ves-radius-lg);
  background: var(--ves-soft);
  box-shadow: none;
  text-align: center;
}

body.bmi-page #results-section h2 {
  margin: 0;
  color: var(--ves-ink);
  font-family: var(--ves-font-display);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.4;
}

body.bmi-page #results-section h2 span {
  display: block;
  margin-top: 6px;
  color: var(--ves-primary) !important;
  background: none !important;
  -webkit-text-fill-color: var(--ves-primary) !important;
  font-size: clamp(4.2rem, 8vw, 6.7rem);
  font-weight: 650;
  letter-spacing: -0.07em;
  line-height: 0.86;
}

body.bmi-page #bmi-status {
  display: inline-flex !important;
  width: auto;
  margin: 16px auto 26px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--ves-primary) !important;
  border: 1px solid var(--ves-line) !important;
  background: var(--ves-surface) !important;
  box-shadow: none !important;
  font-size: 0.95rem;
  font-weight: 750;
}

body.bmi-page #bmi-scale {
  grid-column: 1 / -1;
  margin: 0;
  background: linear-gradient(
    to right,
    #87a8a5 0%,
    #9fc8bf 18%,
    #80bd8b 35%,
    #d7b866 53%,
    #cf8b50 72%,
    #b96862 100%
  ) !important;
  box-shadow: none !important;
}

body.bmi-page #bmi-scale #scale-pointer {
  background: var(--ves-surface) !important;
  box-shadow: 0 0 0 2px var(--ves-primary) !important;
}

body.bmi-page #smart-tip-container {
  margin-top: 22px;
}

body.bmi-page .smart-tip-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 0;
  padding: 4px 0 4px 14px;
  border: 0;
  border-left: 2px solid var(--ves-primary);
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
}

body.bmi-page .smart-tip-card::before {
  display: none;
}

body.bmi-page .smart-tip-card .tip-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--ves-primary-soft);
  color: var(--ves-primary);
}

body.bmi-page .smart-tip-card .tip-icon .app-icon {
  width: 20px;
  height: 20px;
}

body.bmi-page .tip-content h4 {
  margin: 0 0 8px;
  color: var(--ves-ink);
  font-size: 1.05rem;
}

body.bmi-page .tip-content p {
  margin: 0;
  color: var(--ves-muted);
  line-height: 1.65;
}

body.bmi-page #info-tabs,
body.bmi-page #history-section,
body.bmi-page .seo-entry-card,
body.bmi-page #chart-section {
  margin-top: 2px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--ves-line);
  border-radius: var(--ves-radius);
  background: var(--ves-surface) !important;
  box-shadow: none;
}

body.bmi-page #info-tabs.page-reveal-visible,
body.bmi-page #history-section.page-reveal-visible,
body.bmi-page .seo-entry-card.page-reveal-visible,
body.bmi-page #chart-section.page-reveal-visible {
  box-shadow: none;
}

body.bmi-page .tab-headers {
  display: flex;
  gap: 4px;
  margin: 0 0 24px;
  padding: 4px;
  border: 1px solid var(--ves-line);
  border-radius: var(--ves-radius-sm);
  background: var(--ves-soft) !important;
}

body.bmi-page .tab-btn {
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ves-muted);
  box-shadow: none;
  font-size: 0.9rem;
  font-weight: 650;
}

body.bmi-page .tab-btn.active {
  border-color: var(--ves-primary);
  background: transparent;
  color: var(--ves-primary);
}

body.bmi-page .tab-btn.active,
body.bmi-page .tab-btn.active::before,
body.bmi-page .tab-btn.active::after {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--ves-primary) !important;
}

body.bmi-page .tab-indicator {
  background: var(--ves-primary-soft) !important;
  box-shadow: none !important;
}

body.bmi-page .history-card::before,
body.bmi-page .history-card::after {
  display: none !important;
}

body.bmi-page .badge {
  border: 1px solid var(--ves-line);
  background: var(--ves-primary-soft) !important;
  color: var(--ves-primary) !important;
}

body.bmi-page .tab-content {
  padding: 22px 8px 8px;
  border: 0;
  border-radius: 0;
  background: transparent !important;
}

body.bmi-page #rec-content .recommendation-card {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  animation: none;
}

body.bmi-page #rec-content {
  border: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.bmi-page #rec-content .recommendation-card h4 {
  margin: 0 0 8px;
  color: var(--ves-ink);
}

body.bmi-page .tab-content h3,
body.bmi-page #history-section h2,
body.bmi-page #chart-section h2 {
  margin: 0 0 10px;
  color: var(--ves-ink);
  font-family: var(--ves-font-display);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

body.bmi-page #history-section h2 {
  color: var(--ves-ink) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
}

body.bmi-page .tab-content p,
body.bmi-page .seo-entry-card p {
  color: var(--ves-muted);
  line-height: 1.7;
}

body.bmi-page .table-container {
  border: 1px solid var(--ves-line);
  border-radius: var(--ves-radius-sm);
}

body.bmi-page .who-table {
  background: #fff;
}

body.bmi-page .who-table th {
  background: var(--ves-soft);
  color: var(--ves-muted);
  font-size: 0.79rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.bmi-page .who-table th,
body.bmi-page .who-table td {
  border-color: var(--ves-line);
}

body.bmi-page .who-table tr.highlight {
  background: rgba(73, 167, 154, 0.1) !important;
  box-shadow: inset 4px 0 0 var(--ves-primary);
  color: var(--ves-ink);
}

body.bmi-page #history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 390px;
  overflow-y: auto;
  padding: 0 8px 0 0;
  overflow-x: hidden;
  scrollbar-color: var(--ves-primary) transparent;
  scrollbar-width: thin;
}

body.bmi-page #history-section {
  position: relative;
  min-height: 116px;
  padding: 0 !important;
  overflow: hidden;
}

body.bmi-page #history-section > h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

body.bmi-page #history-list {
  display: block;
  max-height: none;
  overflow: visible;
  padding: 0;
}

body.bmi-page .bmi-history-rail {
  display: grid;
  grid-template-columns: minmax(290px, 1.35fr) minmax(150px, 0.72fr) minmax(280px, 1.1fr);
  align-items: center;
  min-height: 114px;
  padding: 16px 56px 16px 20px;
}

body.bmi-page .bmi-history-rail__trend {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
  min-width: 0;
}

body.bmi-page .bmi-history-rail__heading,
body.bmi-page .bmi-history-rail__metric {
  grid-column: 1;
}

body.bmi-page .bmi-history-rail__heading {
  align-self: end;
  color: var(--ves-ink);
  font-size: 1rem;
  font-weight: 700;
}

body.bmi-page .bmi-history-rail__metric {
  align-self: start;
  margin-top: 4px;
  color: var(--ves-muted);
  font-size: 0.78rem;
}

body.bmi-page .bmi-history-rail__chart {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
}

body.bmi-page .bmi-history-rail__chart svg {
  display: block;
  width: 100%;
  height: 42px;
  overflow: visible;
}

body.bmi-page .bmi-history-rail__chart polyline {
  fill: none;
  stroke: var(--ves-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.bmi-page .bmi-history-rail__chart circle {
  fill: var(--ves-primary);
}

body.bmi-page .bmi-history-rail__dates {
  display: grid;
  grid-column: 2;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  margin-top: -3px;
  color: var(--ves-muted);
  font-size: 0.7rem;
  text-align: center;
}

body.bmi-page .bmi-history-rail__dates span:only-child {
  grid-column: 3;
}

body.bmi-page .bmi-history-rail__delta,
body.bmi-page .bmi-history-rail__prompt {
  min-height: 62px;
  padding-left: 20px;
  border-left: 1px solid var(--ves-line);
}

body.bmi-page .bmi-history-rail__delta {
  display: grid;
  align-content: center;
  gap: 1px;
}

body.bmi-page .bmi-history-rail__delta span,
body.bmi-page .bmi-history-rail__delta small {
  color: var(--ves-muted);
  font-size: 0.76rem;
}

body.bmi-page .bmi-history-rail__delta strong {
  color: var(--ves-primary);
  font-family: var(--ves-font-display);
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1;
}

body.bmi-page .bmi-history-rail__delta strong.is-up {
  color: #c38447;
}

body.bmi-page .bmi-history-rail__prompt {
  display: flex;
  align-items: center;
  gap: 14px;
}

body.bmi-page .bmi-history-rail__prompt-icon {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--ves-primary-soft);
  color: var(--ves-primary);
}

body.bmi-page .bmi-history-rail__prompt-icon .app-icon {
  width: 21px;
  height: 21px;
}

body.bmi-page .bmi-history-rail__prompt p {
  margin: 0;
  color: var(--ves-muted);
  font-size: 0.79rem;
  line-height: 1.45;
}

body.bmi-page .bmi-history-rail__prompt strong {
  color: var(--ves-primary);
  font-weight: 650;
}

body.bmi-page #clear-history-btn {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 12px;
  width: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  background: var(--ves-soft);
  color: #a3382d;
  font-size: 0;
}

body.bmi-page #clear-history-btn::before {
  content: "×";
  font-size: 1.35rem;
  line-height: 1;
}

body.bmi-page .streak-spotlight__live {
  overflow: hidden;
}

body.bmi-page .history-card {
  display: grid;
  grid-template-columns: minmax(124px, 0.78fr) minmax(0, 1.45fr) auto;
  align-items: center;
  width: 100%;
  min-height: 76px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--ves-line);
  border-radius: 10px;
  background: transparent !important;
  box-shadow: none;
}

body.bmi-page .history-card-header {
  display: contents;
}

body.bmi-page .history-date {
  grid-column: 1;
}

body.bmi-page .history-card-body {
  grid-column: 2;
}

body.bmi-page .history-card-body p {
  margin: 0;
}

body.bmi-page .history-status {
  margin-top: 4px !important;
}

body.bmi-page .history-bmi-badge {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  margin: 0;
}

body.bmi-page .seo-entry-card {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
}

body.bmi-page .seo-entry-card__eyebrow {
  color: var(--ves-primary);
}

body.bmi-page .seo-entry-card h2 {
  margin: 6px 0 0;
  color: var(--ves-ink);
  font-family: var(--ves-font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

body.bmi-page .seo-entry-card a {
  flex: 0 0 auto;
  padding: 11px 14px;
  border: 1px solid var(--ves-primary);
  border-radius: 8px;
  background: transparent;
  color: var(--ves-primary);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

body.bmi-page .chart-container {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.bmi-page #bmiChart {
  color: var(--ves-primary);
}

body.bmi-page .disclaimer-wrapper {
  margin-top: 28px;
  padding: 0;
  border: 0;
  background: transparent;
}

body.bmi-page .disclaimer {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ves-muted);
  font-size: 0.84rem;
  line-height: 1.7;
}

body.bmi-page .disclaimer-kicker {
  color: var(--ves-ink);
}

body.bmi-page .site-footer {
  margin-top: 28px;
  padding: 28px 0 0;
  border-top: 1px solid var(--ves-line);
  background: transparent;
  color: var(--ves-muted);
}

body.bmi-page .site-social {
  border-color: var(--ves-line);
  background: var(--ves-soft);
}

body.bmi-page :is(button, a, input):focus-visible {
  outline: 3px solid rgba(11, 77, 74, 0.28);
  outline-offset: 3px;
}

/* Светлая тема: спокойные рабочие поверхности без тяжёлых заливок и свечений. */
html[data-theme="light"] body.bmi-page #bmi-form > .input-group > input[type="number"] {
  border-color: #d4dfdd;
  background: #fbfcfc;
  box-shadow: none !important;
}

html[data-theme="light"] body.bmi-page .unit-btn.active {
  background: #dcece8;
  color: var(--ves-primary);
}

html[data-theme="light"] body.bmi-page input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(
    to right,
    #2c716b 0 var(--range-progress, 50%),
    #dce3e1 var(--range-progress, 50%) 100%
  ) !important;
}

html[data-theme="light"] body.bmi-page input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-width: 2px;
  box-shadow: 0 0 0 1px #2c716b !important;
}

html[data-theme="light"] body.bmi-page input[type="range"]::-moz-range-track {
  height: 4px;
  background: #dce3e1 !important;
}

html[data-theme="light"] body.bmi-page input[type="range"]::-moz-range-progress {
  height: 4px;
  background: #2c716b !important;
}

html[data-theme="light"] body.bmi-page input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-width: 2px !important;
  box-shadow: 0 0 0 1px #2c716b !important;
}

html[data-theme="light"] body.bmi-page .tab-indicator {
  background: rgba(11, 77, 74, 0.1) !important;
}

html[data-theme="light"] body.bmi-page #info-tabs .tab-btn.active {
  color: var(--ves-primary) !important;
  -webkit-text-fill-color: var(--ves-primary) !important;
  text-shadow: none !important;
}

html[data-theme="light"] body.bmi-page .streak-spotlight__badge {
  border: 1px solid #eeddbb;
  background: #fbf4e7;
}

html[data-theme="light"] body.bmi-page .streak-spotlight__progress {
  background: #f0e7d7;
}

html[data-theme="light"] body.bmi-page .streak-spotlight__action {
  border-color: #d9a96a;
  background: transparent;
  box-shadow: none;
  color: #9b5b0e;
}

html[data-theme="light"] body.bmi-page #bmi-scale #scale-pointer {
  box-shadow: 0 0 0 2px rgba(11, 77, 74, 0.72) !important;
}

html[data-theme="light"] body.bmi-page .smart-tip-card {
  border-left-color: rgba(11, 77, 74, 0.58);
}

html[data-theme="dark"] body.bmi-page {
  --ves-ink: #eff4f2;
  --ves-muted: #a7b4b2;
  --ves-line: #2b3736;
  --ves-surface: #171c1d;
  --ves-soft: #111516;
  --ves-primary: #49a79a;
  --ves-primary-hover: #61b9ac;
  --ves-primary-soft: rgba(73, 167, 154, 0.16);
  --ves-flame: #f0a348;
  --ves-shadow: none;
  --primary-color: #49a79a;
  --primary-gradient: #49a79a;
  --primary-gradient-soft: rgba(73, 167, 154, 0.16);

  background: #0d1112;
  color: var(--ves-ink);
}

html[data-theme="dark"] body.bmi-page #calculator-section,
html[data-theme="dark"] body.bmi-page #info-tabs,
html[data-theme="dark"] body.bmi-page #history-section,
html[data-theme="dark"] body.bmi-page .seo-entry-card,
html[data-theme="dark"] body.bmi-page #chart-section,
html[data-theme="dark"] body.bmi-page .unit-toggle,
html[data-theme="dark"] body.bmi-page .who-table,
html[data-theme="dark"] body.bmi-page #bmi-form > .input-group > input[type="number"],
html[data-theme="dark"] body.bmi-page .gender-selector label {
  background: var(--ves-surface);
}

html[data-theme="dark"] body.bmi-page #calculator-section,
html[data-theme="dark"] body.bmi-page #chart-section {
  border-color: var(--ves-line) !important;
  background: var(--ves-surface) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.bmi-page #chart-section .disclaimer-wrapper {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.bmi-page .streak-spotlight {
  border-color: var(--ves-flame);
  background: transparent;
}

html[data-theme="dark"] body.bmi-page .streak-spotlight__badge {
  background: rgba(247, 150, 30, 0.12);
}

html[data-theme="dark"] body.bmi-page #results-section,
html[data-theme="dark"] body.bmi-page .history-card,
html[data-theme="dark"] body.bmi-page .chart-container,
html[data-theme="dark"] body.bmi-page .site-social,
html[data-theme="dark"] body.bmi-page .who-table th {
  background: #1d2424;
}

html[data-theme="dark"] body.bmi-page #info-tabs .who-table th {
  background: var(--ves-soft) !important;
  color: var(--ves-muted) !important;
}

html[data-theme="dark"] body.bmi-page #info-tabs .who-table tr.highlight {
  background: rgba(73, 167, 154, 0.13) !important;
  box-shadow: inset 4px 0 0 var(--ves-primary);
}

html[data-theme="dark"] body.bmi-page .history-card {
  background: transparent !important;
}

html[data-theme="dark"] body.bmi-page .tab-content,
html[data-theme="dark"] body.bmi-page .smart-tip-card {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.bmi-page .theme-btn,
html[data-theme="dark"] body.bmi-page .user-btn {
  color: var(--ves-ink);
}

html[data-theme="dark"] body.bmi-page .theme-btn .app-icon,
html[data-theme="dark"] body.bmi-page .user-btn .app-icon {
  color: var(--ves-primary);
}

html[data-theme="dark"] body.bmi-page input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(
    to right,
    var(--ves-primary) 0 var(--range-progress, 50%),
    #3a4645 var(--range-progress, 50%) 100%
  ) !important;
}

html[data-theme="dark"] body.bmi-page input[type="range"]::-moz-range-track {
  background: #3a4645 !important;
}

/* Первый экран BMI: форма и результат работают как одна сцена, как в утверждённой концепции. */
@media (min-width: 993px) {
  body.bmi-page main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 16px;
  }

  body.bmi-page main > #calculator-section {
    display: contents;
  }

  body.bmi-page #bmi-form {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: stretch;
    padding: clamp(24px, 3vw, 34px);
    border: 1px solid var(--ves-line);
    border-radius: var(--ves-radius-lg);
    background: var(--ves-surface) !important;
  }

  body.bmi-page .streak-spotlight {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr) 52px;
    gap: 12px 18px;
    min-height: 156px;
    padding: 22px 24px;
    border: 1px solid var(--ves-line);
    border-radius: var(--ves-radius-lg) var(--ves-radius-lg) 0 0;
    background: var(--ves-surface);
  }

  html[data-theme="dark"] body.bmi-page .streak-spotlight {
    border-color: var(--ves-line) !important;
    background: var(--ves-surface) !important;
  }

  body.bmi-page .streak-spotlight::before,
  body.bmi-page .streak-spotlight::after {
    display: none !important;
  }

  body.bmi-page .streak-spotlight__body {
    grid-column: 1;
    grid-row: 1;
  }

  body.bmi-page .streak-spotlight__flames {
    display: flex;
    gap: 8px;
    margin: 0 0 10px;
  }

  body.bmi-page .streak-spotlight__flames .app-icon {
    width: 22px;
    height: 22px;
    color: var(--ves-muted);
    opacity: 0.34;
  }

  body.bmi-page .streak-spotlight__flames .app-icon.is-lit {
    color: var(--ves-flame);
    opacity: 1;
  }

  body.bmi-page .streak-spotlight h2 {
    font-size: 1.15rem;
  }

  body.bmi-page .streak-spotlight__badge {
    grid-column: 2;
    grid-row: 1;
    width: 52px;
    height: 52px;
    align-self: start;
  }

  body.bmi-page .streak-spotlight__progress-wrap {
    margin-top: 14px;
  }

  body.bmi-page .streak-spotlight__action {
    grid-column: 1;
    grid-row: 2;
    margin-top: 0;
  }

  body.bmi-page main > #results-section {
    grid-column: 2;
    grid-row: 2;
    min-height: 312px;
    margin: -56px 0 0;
    padding: 30px 34px;
    border: 1px solid var(--ves-line);
    border-top: 0;
    border-radius: 0 0 var(--ves-radius-lg) var(--ves-radius-lg);
    background: var(--ves-surface) !important;
    box-shadow: none !important;
  }

  body.bmi-page main > #results-section:not([style*="display: block"]) {
    display: grid !important;
    place-items: center;
    min-height: 312px;
  }

  body.bmi-page main > #results-section:not([style*="display: block"]) > :not(#smart-tip-container) {
    display: none !important;
  }

  body.bmi-page main > #results-section:not([style*="display: block"]) #smart-tip-container::before {
    content: "Заполните параметры слева, чтобы увидеть персональный результат.";
    display: block;
    max-width: 26rem;
    margin: 0 auto;
    color: var(--ves-muted);
    font-size: 0.96rem;
    line-height: 1.6;
  }
}

body.bmi-page #chart-section .chart-container,
body.bmi-page #chart-section canvas {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.bmi-page #chart-section {
  margin-top: 2px;
  padding: clamp(22px, 3vw, 28px);
  border: 1px solid var(--ves-line) !important;
  border-radius: var(--ves-radius) !important;
  background: var(--ves-surface) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.bmi-page #chart-section {
  border-color: var(--ves-line) !important;
  background: var(--ves-surface) !important;
}

body.bmi-page #chart-section .chart-container {
  height: 190px !important;
  padding: 0 !important;
}

body.bmi-page #bmiChart {
  height: 190px !important;
  max-height: none;
}

body.bmi-page #chart-section .disclaimer-wrapper {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--ves-line) !important;
  background: transparent !important;
  box-shadow: none !important;
}

@media (max-width: 820px) {
  body.bmi-page {
    padding-inline: 16px;
  }

  body.bmi-page > header {
    padding-top: 16px;
  }

  body.bmi-page .header-top {
    gap: 10px;
  }

  body.bmi-page .header-top h1 {
    font-size: 2.35rem;
  }

  body.bmi-page .user-btn {
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  body.bmi-page .user-btn span {
    display: none;
  }

  body.bmi-page .site-switcher {
    gap: 8px 16px;
    padding: 12px 0 22px;
  }

  body.bmi-page main {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  body.bmi-page #calculator-section,
  body.bmi-page #results-section {
    grid-column: 1;
  }

  body.bmi-page #calculator-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  body.bmi-page #bmi-form,
  body.bmi-page .streak-spotlight {
    grid-column: 1;
  }

  body.bmi-page .streak-spotlight {
    margin-top: 0;
    padding: 10px 0 10px 16px;
    border-radius: 0;
  }

  body.bmi-page .bmi-history-rail {
    grid-template-columns: minmax(0, 1fr) minmax(145px, 0.55fr);
    padding-right: 46px;
  }

  body.bmi-page .bmi-history-rail__prompt {
    display: none;
  }

  body.bmi-page #calculator-section,
  body.bmi-page .streak-spotlight,
  body.bmi-page #results-section,
  body.bmi-page #info-tabs,
  body.bmi-page #history-section,
  body.bmi-page .seo-entry-card,
  body.bmi-page #chart-section {
    border-radius: var(--ves-radius);
  }

  body.bmi-page #results-section {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  body.bmi-page #smart-tip-container {
    grid-column: 1;
  }

  body.bmi-page .seo-entry-card {
    display: grid;
    align-items: start;
  }

  body.bmi-page .seo-entry-card a {
    justify-self: start;
  }
}

@media (max-width: 520px) {
  body.bmi-page {
    padding-inline: 12px;
  }

  body.bmi-page > header > p {
    margin-top: 16px;
    font-size: 0.92rem;
  }

  body.bmi-page .site-switcher a {
    font-size: 0.82rem;
  }

  body.bmi-page #calculator-section,
  body.bmi-page .streak-spotlight,
  body.bmi-page #results-section,
  body.bmi-page #info-tabs,
  body.bmi-page #history-section,
  body.bmi-page .seo-entry-card,
  body.bmi-page #chart-section {
    padding: 20px;
  }

  body.bmi-page #calculator-section {
    padding: 0;
  }

  body.bmi-page #history-section {
    min-height: 0;
    padding: 0 !important;
  }

  body.bmi-page .bmi-history-rail {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 18px 42px 18px 16px;
  }

  body.bmi-page .bmi-history-rail__trend {
    grid-template-columns: 74px minmax(0, 1fr);
    column-gap: 10px;
  }

  body.bmi-page .bmi-history-rail__delta {
    min-height: 0;
    padding-left: 64px;
    border-left: 0;
  }

  body.bmi-page .streak-spotlight {
    padding: 10px 0 10px 14px;
  }

  body.bmi-page .history-card {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 8px;
    min-height: 0;
  }

  body.bmi-page .history-date {
    grid-column: 1;
    grid-row: 1;
  }

  body.bmi-page .history-card-body {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  body.bmi-page .history-bmi-badge {
    grid-column: 2;
    grid-row: 1;
  }

  body.bmi-page #bmi-form > .input-group {
    gap: 7px 10px;
  }

  body.bmi-page #bmi-form > .input-group > input[type="number"] {
    width: 94px;
  }

  body.bmi-page .unit-btn {
    min-height: 46px;
    padding: 4px 6px;
    font-size: 0.81rem;
    line-height: 1.2;
  }

  body.bmi-page .gender-selector {
    gap: 8px;
  }

  body.bmi-page .actions {
    grid-template-columns: 1fr;
  }

  body.bmi-page #reset-btn {
    min-width: 0;
  }

  body.bmi-page .streak-spotlight {
    gap: 12px;
  }

  body.bmi-page .streak-spotlight__meta {
    display: grid;
    gap: 4px;
  }

  body.bmi-page .tab-headers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  body.bmi-page .tab-btn {
    min-width: 0;
    padding-inline: 5px;
    font-size: 0.8rem;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.bmi-page *,
  body.bmi-page *::before,
  body.bmi-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* BMI reference layout: independent workspace panels, WHO rail and compact history. */
body.bmi-page > header {
  width: min(100%, 1280px);
  padding: 10px 0 22px;
  border-bottom: 0 !important;
  position: relative;
  margin-bottom: 18px !important;
}

body.bmi-page .header-top {
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  min-height: 44px;
  margin-bottom: 0;
}

body.bmi-page .brand-mark {
  color: var(--ves-ink);
  font-family: var(--ves-font-display);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  text-decoration: none;
}

body.bmi-page .header-actions {
  display: inline-flex;
  grid-column: 3;
  align-items: center;
  gap: 14px;
}

body.bmi-page > header .site-switcher {
  display: flex;
  position: absolute;
  top: 10px;
  left: 50%;
  justify-content: center;
  gap: 34px;
  margin: 0;
  padding: 0;
  width: max-content !important;
  border: 0 !important;
  transform: translateX(-50%) !important;
}

body.bmi-page > header .site-switcher a {
  min-height: 44px;
  padding: 0;
  color: var(--ves-muted);
  font-size: 0.92rem;
}

body.bmi-page > header .site-switcher a:first-child {
  color: var(--ves-ink);
  border-bottom: 2px solid var(--ves-primary);
}

body.bmi-page > header .site-switcher .app-icon {
  display: none;
}

body.bmi-page .page-intro {
  padding: 10px 0 16px;
  text-align: center;
}

body.bmi-page .page-intro h1 {
  margin: 0;
  color: var(--ves-ink);
  font-family: var(--ves-font-display);
  font-size: clamp(2.45rem, 4.4vw, 3.45rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
  -webkit-text-fill-color: currentColor !important;
}

body.bmi-page .page-intro p {
  margin: 12px 0 0;
  color: var(--ves-muted);
  font-size: 1.05rem;
}

body.bmi-page main {
  width: min(100%, 1280px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body.bmi-page main > #calculator-section {
  grid-column: 1;
  grid-row: 1;
  display: block;
  min-height: 0;
  padding: 24px;
  border-radius: 10px;
}

body.bmi-page main > #results-section {
  grid-column: 2;
  grid-row: 1;
  display: flex !important;
  min-height: 0;
  margin: 0;
  padding: 0 28px 28px;
  border-radius: 10px;
  background: var(--ves-surface);
  flex-direction: column;
}

body.bmi-page #bmi-form {
  gap: 18px;
}

body.bmi-page #bmi-form > .input-group {
  gap: 6px 14px;
}

body.bmi-page .unit-toggle {
  margin-bottom: 16px;
}

body.bmi-page .streak-spotlight {
  order: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 20px;
  width: 100%;
  margin: 0 0 26px;
  padding: 22px 0 18px;
  border: 0;
  border-bottom: 1px solid var(--ves-line);
  background: transparent !important;
}

body.bmi-page .streak-spotlight__body {
  display: block;
  grid-column: 1;
  grid-row: 1;
}

body.bmi-page .streak-spotlight__eyebrow {
  margin-bottom: 12px;
  color: var(--ves-ink);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

body.bmi-page .streak-spotlight__flames {
  display: flex;
  gap: 10px;
  align-items: center;
}

body.bmi-page .streak-spotlight__flames .app-icon {
  width: 26px;
  height: 26px;
  color: #87908f;
}

body.bmi-page .streak-spotlight__flames .app-icon.is-lit {
  color: var(--ves-flame);
}

body.bmi-page .streak-spotlight__body h2,
body.bmi-page .streak-spotlight__body p,
body.bmi-page .streak-spotlight__progress-wrap,
body.bmi-page .streak-spotlight__action {
  display: none !important;
}

body.bmi-page .streak-spotlight__badge {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  width: auto;
  height: auto;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: var(--ves-flame);
}

body.bmi-page .streak-spotlight__badge > .app-icon {
  display: none;
}

body.bmi-page .streak-spotlight__count:not([hidden]) {
  display: grid;
  gap: 2px;
  justify-items: end;
  color: var(--ves-flame);
  text-align: right;
}

body.bmi-page .streak-spotlight__count b {
  font-family: var(--ves-font-display);
  font-size: 2rem;
  font-weight: 500;
  line-height: 0.9;
}

body.bmi-page .streak-spotlight__count small {
  color: var(--ves-muted);
  font-size: 0.8rem;
}

body.bmi-page #results-section > h2 {
  order: 1;
  margin: 0;
  color: var(--ves-ink);
  font-family: var(--ves-font-display);
  font-size: 1.08rem;
  font-weight: 500;
  text-align: left;
}

body.bmi-page #results-section > h2 span {
  margin: 10px 0 0;
  font-size: clamp(5.4rem, 10vw, 7.8rem);
  line-height: 0.82;
}

body.bmi-page #bmi-status {
  order: 2;
  align-self: flex-start;
  margin: 14px 0 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: var(--ves-primary) !important;
  font-size: 1.25rem;
  font-weight: 500;
}

body.bmi-page #smart-tip-container {
  order: 3;
  margin-top: 16px;
}

body.bmi-page .smart-tip-card {
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
  border-left: 0;
}

body.bmi-page .smart-tip-card .tip-icon {
  display: none;
}

body.bmi-page .smart-tip-card .tip-content {
  grid-column: 1;
}

body.bmi-page .tip-content h4 {
  margin: 0 0 6px;
  font-size: 0.96rem;
}

body.bmi-page .tip-content p {
  max-width: 430px;
  font-size: 0.94rem;
  line-height: 1.55;
}

body.bmi-page main > #bmi-reference-section {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: 28px;
  margin: 0;
  padding: 22px 24px;
  border: 1px solid var(--ves-line);
  border-radius: 10px;
  background: var(--ves-surface);
}

body.bmi-page .bmi-reference-section__copy {
  padding-right: 28px;
  border-right: 1px solid var(--ves-line);
}

body.bmi-page .bmi-reference-section__copy h2,
body.bmi-page .bmi-reference-section__scale h2 {
  margin: 0 0 8px;
  color: var(--ves-ink);
  font-size: 1rem;
  font-weight: 650;
}

body.bmi-page .bmi-reference-section__copy p {
  margin: 0;
  color: var(--ves-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

body.bmi-page .bmi-reference-section__copy a {
  display: inline-flex;
  gap: 7px;
  margin-top: 10px;
  color: var(--ves-primary);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

body.bmi-page .bmi-reference-section__scale {
  min-width: 0;
}

body.bmi-page #bmi-reference-section #bmi-scale {
  height: 7px;
  margin: 14px 0 14px;
  background: linear-gradient(90deg, #62a7ea 0 16%, #4bb0a1 16% 33%, #edc44d 33% 50%, #ed9a4b 50% 67%, #ea6d5a 67% 84%, #e24d64 84% 100%) !important;
}

body.bmi-page #bmi-reference-section #bmi-scale #scale-pointer {
  top: -7px;
  width: 21px;
  height: 21px;
  border-width: 4px;
  box-shadow: none !important;
}

body.bmi-page .bmi-scale-labels {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

body.bmi-page .bmi-scale-labels span {
  color: var(--ves-muted);
  font-size: 0.75rem;
  text-align: center;
}

body.bmi-page .bmi-scale-labels span:nth-child(2) {
  color: var(--ves-primary);
  font-weight: 700;
}

body.bmi-page .bmi-scale-labels small {
  display: block;
  margin-top: 5px;
  color: var(--ves-muted);
  font-size: 0.69rem;
  line-height: 1.25;
}

body.bmi-page main > #history-section {
  grid-column: 1 / -1;
  grid-row: 3;
  border-radius: 10px;
}

body.bmi-page main > #info-tabs {
  grid-column: 1 / -1;
  grid-row: 5;
}

body.bmi-page main > .seo-entry-card {
  grid-column: 1 / -1;
  grid-row: 4;
}

body.bmi-page main > #chart-section {
  grid-column: 1 / -1;
  grid-row: 6;
}

html[data-theme="dark"] body.bmi-page .brand-mark,
html[data-theme="dark"] body.bmi-page .page-intro h1 {
  color: var(--ves-ink);
}

@media (max-width: 900px) {
  body.bmi-page > header,
  body.bmi-page main {
    width: min(100%, 700px);
  }

  body.bmi-page main {
    grid-template-columns: minmax(0, 1fr);
  }

  body.bmi-page main > #calculator-section,
  body.bmi-page main > #results-section,
  body.bmi-page main > #bmi-reference-section,
  body.bmi-page main > #history-section,
  body.bmi-page main > .seo-entry-card,
  body.bmi-page main > #info-tabs,
  body.bmi-page main > #chart-section {
    grid-column: 1;
    grid-row: auto;
  }

  body.bmi-page main > #bmi-reference-section {
    grid-template-columns: 1fr;
  }

  body.bmi-page .bmi-reference-section__copy {
    padding: 0 0 20px;
    border-right: 0;
    border-bottom: 1px solid var(--ves-line);
  }
}

@media (max-width: 640px) {
  body.bmi-page {
    padding-inline: 14px;
  }

  body.bmi-page .header-top {
    grid-template-columns: 1fr auto;
  }

  body.bmi-page > header .site-switcher {
    position: static;
    justify-content: flex-start;
    gap: 16px;
    margin: 10px 0 0;
    width: auto !important;
    transform: none;
    overflow-x: auto;
  }

  body.bmi-page > header .site-switcher a {
    flex: 0 0 auto;
    font-size: 0.82rem;
  }

  body.bmi-page .page-intro {
    padding-top: 24px;
  }

  body.bmi-page .page-intro h1 {
    font-size: 2.45rem;
  }

  body.bmi-page main > #calculator-section,
  body.bmi-page main > #results-section {
    padding: 18px;
  }

  body.bmi-page #results-section > h2 span {
    font-size: 5rem;
  }

  body.bmi-page .streak-spotlight__flames {
    gap: 7px;
  }

  body.bmi-page .streak-spotlight__flames .app-icon {
    width: 21px;
    height: 21px;
  }

  body.bmi-page main > #bmi-reference-section {
    padding: 18px;
  }

  body.bmi-page .bmi-scale-labels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 12px;
  }

  body.bmi-page .bmi-scale-labels small {
    font-size: 0.65rem;
  }
}

/* Fidelity pass: compact proportions from the approved BMI reference. */
body.bmi-page > header,
body.bmi-page main,
body.bmi-page > .site-footer {
  width: min(100%, 1080px);
}

body.bmi-page > header {
  padding-top: 8px;
  padding-bottom: 10px;
  margin-bottom: 10px !important;
}

body.bmi-page .header-top {
  min-height: 38px;
}

body.bmi-page .brand-mark {
  font-size: 1.38rem;
}

body.bmi-page > header .site-switcher {
  top: 6px;
  right: 230px;
  left: 160px;
  justify-content: center;
  gap: 28px;
  width: auto !important;
  max-width: none;
  overflow: hidden;
  transform: none !important;
}

body.bmi-page > header .site-switcher a {
  min-height: 38px;
  font-size: 0.75rem;
}

body.bmi-page .theme-btn,
body.bmi-page .user-btn {
  min-height: 32px;
}

body.bmi-page .theme-btn {
  width: 32px;
}

body.bmi-page .user-btn {
  padding-inline: 10px;
  font-size: 0.78rem;
}

body.bmi-page .page-intro {
  padding: 8px 0 6px;
}

body.bmi-page .page-intro h1 {
  font-size: clamp(2.1rem, 4vw, 2.65rem);
}

body.bmi-page .page-intro p {
  margin-top: 7px;
  font-size: 0.78rem;
}

body.bmi-page main {
  gap: 8px;
  align-items: stretch;
}

body.bmi-page main > #calculator-section,
body.bmi-page main > #results-section {
  min-height: 362px;
  padding: 12px;
  border-radius: 6px;
}

body.bmi-page #calculator-section > #bmi-form {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.bmi-page #bmi-form {
  gap: 8px;
}

body.bmi-page #bmi-form > .input-group {
  grid-template-columns: minmax(0, 1fr) 86px 28px;
  gap: 2px 10px;
}

body.bmi-page #bmi-form > .input-group > label {
  font-size: 0.78rem;
}

body.bmi-page #bmi-form > .input-group > input[type="number"] {
  grid-column: 2;
  grid-row: 1;
  width: 86px;
  min-height: 30px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.85rem;
}

body.bmi-page #bmi-form > .input-group > input[type="range"] {
  grid-column: 1 / -1;
  grid-row: 2;
  min-height: 15px;
}

body.bmi-page .input-unit {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  color: var(--ves-muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

body.bmi-page .range-bounds {
  display: none;
  grid-column: 1 / -1;
  grid-row: 3;
  justify-content: space-between;
  color: var(--ves-muted);
  font-size: 0.58rem;
  line-height: 1;
}

body.bmi-page .unit-toggle {
  margin-bottom: 8px;
  padding: 2px;
  border-radius: 5px;
}

body.bmi-page .unit-btn {
  min-height: 29px;
  border-radius: 4px;
  padding: 0;
  font-size: 0.73rem;
}

body.bmi-page .gender-selector {
  gap: 7px;
  margin-top: 4px;
}

body.bmi-page .gender-selector label {
  min-height: 31px;
  border-radius: 5px;
  padding: 0;
  font-size: 0.78rem;
}

body.bmi-page .actions {
  gap: 6px;
  margin-top: 0;
}

body.bmi-page #calc-btn,
body.bmi-page #reset-btn {
  min-height: 32px;
  border-radius: 5px;
  padding: 0;
  font-size: 0.78rem;
}

body.bmi-page #reset-btn {
  min-width: 86px;
}

body.bmi-page input[type="range"]::-webkit-slider-runnable-track,
html[data-theme="light"] body.bmi-page input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
}

body.bmi-page input[type="range"]::-webkit-slider-thumb,
html[data-theme="light"] body.bmi-page input[type="range"]::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4.5px;
  border-width: 2px;
}

body.bmi-page .streak-spotlight {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  min-height: 78px;
  margin-bottom: 12px;
  padding: 8px 0 10px;
}

body.bmi-page .streak-spotlight__eyebrow {
  margin-bottom: 7px;
  font-size: 0;
}

body.bmi-page .streak-spotlight__eyebrow::after {
  content: "Ежедневная серия";
  color: var(--ves-ink);
  font-size: 0.78rem;
  font-weight: 650;
}

body.bmi-page .streak-spotlight__flames {
  gap: 7px;
}

body.bmi-page .streak-spotlight__flames .app-icon {
  width: 20px;
  height: 20px;
}

body.bmi-page .streak-spotlight__count b {
  font-size: 1.5rem;
}

body.bmi-page .streak-spotlight__count small {
  font-size: 0.65rem;
}

/* Daily streak: compact status row matching the BMI reference. */
body.bmi-page #results-section > .streak-spotlight {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "series counter";
  align-items: center;
  gap: 24px;
  min-height: 100px;
  margin: 0 0 18px;
  padding: 16px 14px 16px 0;
  border: 0 !important;
  border-bottom: 1px solid var(--ves-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.bmi-page #results-section > .streak-spotlight__body {
  display: block !important;
  grid-area: series;
  min-width: 0;
}

body.bmi-page #results-section > .streak-spotlight__eyebrow {
  display: block;
  margin: 0 0 11px;
  color: var(--ves-muted);
  font-size: 0;
  font-weight: 600;
  line-height: 1;
}

body.bmi-page #results-section > .streak-spotlight__eyebrow::after {
  color: var(--ves-muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
}

body.bmi-page #results-section > .streak-spotlight__flames {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 29px;
}

body.bmi-page #results-section > .streak-spotlight__flames .app-icon {
  width: 26px;
  height: 26px;
  color: #677071;
  opacity: 1;
}

body.bmi-page #results-section > .streak-spotlight__flames .app-icon use {
  fill: currentColor !important;
  stroke: currentColor !important;
  stroke-width: 1.2px;
}

body.bmi-page #results-section > .streak-spotlight__flames .app-icon.is-lit {
  color: #ffb23f;
}

body.bmi-page #results-section > .streak-spotlight__badge {
  display: flex !important;
  grid-area: counter;
  width: auto !important;
  height: auto !important;
  align-items: center;
  justify-content: flex-end;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body.bmi-page #results-section > .streak-spotlight__badge > .app-icon {
  display: none !important;
}

body.bmi-page #results-section > .streak-spotlight__count:not([hidden]) {
  display: grid !important;
  gap: 2px;
  justify-items: center;
  color: var(--ves-flame);
  text-align: center;
}

body.bmi-page #results-section > .streak-spotlight__count b {
  font-family: var(--ves-font-display);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 0.86;
}

body.bmi-page #results-section > .streak-spotlight__count small {
  color: var(--ves-muted);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

body.bmi-page #results-section > .streak-spotlight h2,
body.bmi-page #results-section > .streak-spotlight p,
body.bmi-page #results-section > .streak-spotlight__progress-wrap,
body.bmi-page #results-section > .streak-spotlight__action {
  display: none !important;
}

@media (max-width: 560px) {
  body.bmi-page #results-section > .streak-spotlight {
    gap: 16px;
    min-height: 88px;
    padding: 14px 0;
  }

  body.bmi-page #results-section > .streak-spotlight__flames {
    gap: 6px;
  }

  body.bmi-page #results-section > .streak-spotlight__flames .app-icon {
    width: 23px;
    height: 23px;
  }
}

/* Final flame rendering override. This must remain after the responsive legacy rules. */
body.bmi-page #results-section > .streak-spotlight__body {
  align-self: center;
  text-align: left !important;
}

body.bmi-page #results-section > .streak-spotlight__eyebrow,
body.bmi-page #results-section > .streak-spotlight__eyebrow::after {
  text-align: left;
}

body.bmi-page #results-section > .streak-spotlight__flames {
  justify-content: flex-start;
}

body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon {
  display: block;
  width: 29px;
  height: 29px;
  color: #697170;
  fill: currentColor !important;
  stroke: none !important;
}

body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon path {
  fill: currentColor !important;
  stroke: none !important;
}

body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon.is-lit:nth-child(1) { color: #ffda72; }
body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon.is-lit:nth-child(2) { color: #ffc654; }
body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon.is-lit:nth-child(3) { color: #ffad42; }
body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon.is-lit:nth-child(4) { color: #f69539; }
body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon:not(.is-lit):nth-child(5) { color: #707877; }
body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon:not(.is-lit):nth-child(6) { color: #555e5d; }

body.bmi-page #results-section > .streak-spotlight__count:not([hidden]) {
  align-self: center;
  transform: translateY(6px);
}

body.bmi-page #results-section > .streak-spotlight__count b {
  font-size: 2.05rem;
  font-weight: 550;
  line-height: 0.8;
}

body.bmi-page #results-section > .streak-spotlight__count small {
  font-size: 0.72rem;
  line-height: 1.1;
}

body.bmi-page #results-section > .streak-spotlight__count small::after {
  content: " подряд";
}

@media (max-width: 560px) {
  body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon {
    width: 25px;
    height: 25px;
  }
}

/* Flame detail: filled sticker-like flames with a deliberate warmth gradient. */
body.bmi-page #results-section > .streak-spotlight__body {
  align-self: center;
  text-align: left !important;
}

body.bmi-page #results-section > .streak-spotlight__eyebrow,
body.bmi-page #results-section > .streak-spotlight__eyebrow::after {
  text-align: left;
}

body.bmi-page #results-section > .streak-spotlight__flames {
  justify-content: flex-start;
}

body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon {
  display: block;
  width: 29px;
  height: 29px;
  color: #697170;
  fill: currentColor;
  stroke: none !important;
}

body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon path {
  fill: currentColor !important;
  stroke: none !important;
}

body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon.is-lit:nth-child(1) {
  color: #ffda72;
}

body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon.is-lit:nth-child(2) {
  color: #ffc654;
}

body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon.is-lit:nth-child(3) {
  color: #ffad42;
}

body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon.is-lit:nth-child(4) {
  color: #f69539;
}

body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon:not(.is-lit):nth-child(5) {
  color: #707877;
}

body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon:not(.is-lit):nth-child(6) {
  color: #555e5d;
}

body.bmi-page #results-section > .streak-spotlight__count:not([hidden]) {
  align-self: center;
  transform: translateY(6px);
}

body.bmi-page #results-section > .streak-spotlight__count b {
  font-size: 2.05rem;
  font-weight: 550;
  line-height: 0.8;
}

body.bmi-page #results-section > .streak-spotlight__count small {
  font-size: 0.72rem;
  line-height: 1.1;
}

body.bmi-page #results-section > .streak-spotlight__count small::after {
  content: " подряд";
}

@media (max-width: 560px) {
  body.bmi-page #results-section > .streak-spotlight__flames .streak-flame-icon {
    width: 25px;
    height: 25px;
  }
}

body.bmi-page #results-section > h2 {
  margin-top: 0;
  font-size: 0.82rem;
  text-align: center;
}

body.bmi-page #results-section > h2 span {
  margin-top: 5px;
  font-size: clamp(4rem, 7vw, 5.25rem);
  text-align: center;
}

body.bmi-page #bmi-status {
  align-self: center;
  margin-top: 7px;
  font-size: 1rem;
}

body.bmi-page #smart-tip-container {
  align-self: center;
  width: 100%;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--ves-line);
  text-align: center;
}

body.bmi-page .tip-content p {
  max-width: 330px;
  margin-inline: auto;
  font-size: 0.77rem;
  line-height: 1.45;
}

body.bmi-page .tip-content h4 {
  font-size: 0.78rem;
}

body.bmi-page main > #bmi-reference-section {
  gap: 16px;
  padding: 12px;
  border-radius: 6px;
}

body.bmi-page .bmi-reference-section__copy {
  padding-right: 16px;
}

body.bmi-page .bmi-reference-section__copy h2,
body.bmi-page .bmi-reference-section__scale h2 {
  margin-bottom: 5px;
  font-size: 0.78rem;
}

body.bmi-page .bmi-reference-section__copy p {
  font-size: 0.66rem;
  line-height: 1.45;
}

body.bmi-page .bmi-reference-section__copy a {
  margin-top: 6px;
  font-size: 0.68rem;
}

body.bmi-page #bmi-reference-section #bmi-scale {
  height: 5px;
  margin: 10px 0 8px;
}

html[data-theme="light"] body.bmi-page .range-bounds {
  display: flex;
}

body.bmi-page #bmi-reference-section #bmi-scale #scale-pointer {
  top: -5px;
  width: 15px;
  height: 15px;
  border-width: 3px;
}

body.bmi-page .bmi-scale-labels span {
  font-size: 0.61rem;
}

body.bmi-page .bmi-scale-labels small {
  margin-top: 3px;
  font-size: 0.57rem;
}

body.bmi-page main > #history-section {
  min-height: 80px;
}

body.bmi-page .bmi-history-rail {
  min-height: 80px;
  padding: 10px 42px 10px 12px;
}

body.bmi-page .bmi-history-rail__heading {
  font-size: 0.78rem;
}

body.bmi-page .bmi-history-rail__metric,
body.bmi-page .bmi-history-rail__dates,
body.bmi-page .bmi-history-rail__delta-label,
body.bmi-page .bmi-history-rail__delta-unit,
body.bmi-page .bmi-history-rail__reminder p,
body.bmi-page .bmi-history-rail__reminder strong {
  font-size: 0.61rem;
}

@media (max-width: 900px) {
  body.bmi-page > header,
  body.bmi-page main,
  body.bmi-page > .site-footer {
    width: min(100%, 700px);
  }

  body.bmi-page main > #calculator-section,
  body.bmi-page main > #results-section {
    min-height: 0;
  }

  body.bmi-page > header .site-switcher {
    right: 180px;
    left: 140px;
    gap: 18px;
  }
}

@media (max-width: 640px) {
  body.bmi-page > header .site-switcher {
    width: auto !important;
    right: auto;
    left: auto;
  }

  body.bmi-page main > #calculator-section,
  body.bmi-page main > #results-section {
    padding: 16px;
  }

  body.bmi-page .page-intro h1 {
    font-size: 2.3rem;
  }

  body.bmi-page .page-intro p {
    font-size: 0.82rem;
  }

  body.bmi-page #bmi-form {
    gap: 14px;
  }

  body.bmi-page #bmi-form > .input-group > label {
    grid-column: 1;
    font-size: 0.88rem;
  }

  body.bmi-page #bmi-form > .input-group > input[type="number"] {
    min-height: 38px;
    font-size: 0.95rem;
  }

  body.bmi-page .input-unit {
    font-size: 0.75rem;
  }

  body.bmi-page .unit-btn,
  body.bmi-page .gender-selector label {
    min-height: 38px;
    font-size: 0.82rem;
  }

  body.bmi-page #calc-btn,
  body.bmi-page #reset-btn {
    min-height: 42px;
    font-size: 0.9rem;
  }

  body.bmi-page .streak-spotlight {
    min-height: 0;
    padding-block: 12px;
  }

  body.bmi-page .streak-spotlight__flames .app-icon {
    width: 22px;
    height: 22px;
  }

  body.bmi-page main > #bmi-reference-section {
    padding: 16px;
  }
}

/* Header navigation fidelity: quiet text navigation instead of rounded controls. */
body.bmi-page > header {
  width: min(100%, 1080px);
  min-height: 56px;
  padding: 0;
  border-bottom: 1px solid rgba(133, 154, 153, 0.24) !important;
}

body.bmi-page .header-top {
  min-height: 56px;
  gap: 18px;
}

body.bmi-page .brand-mark {
  font-size: 1.34rem;
  letter-spacing: -0.045em;
}

body.bmi-page > header .site-switcher {
  top: 0;
  right: 188px;
  left: 166px;
  height: 56px;
  gap: 38px;
  align-items: stretch;
  overflow: visible;
  z-index: 2;
}

body.bmi-page > header .site-switcher a {
  position: relative;
  display: flex;
  min-height: 56px;
  align-items: center;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ves-muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1;
  transition: color 160ms ease;
}

body.bmi-page .header-top {
  position: relative;
  z-index: 1;
}

body.bmi-page > header .site-switcher a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
  transition: background-color 160ms ease;
}

body.bmi-page > header .site-switcher a:first-child {
  border-bottom: 0 !important;
  color: var(--ves-ink);
}

body.bmi-page > header .site-switcher a:first-child::after {
  background: var(--ves-primary);
}

body.bmi-page > header .site-switcher a:hover,
body.bmi-page > header .site-switcher a:focus-visible {
  color: var(--ves-ink);
  outline: none;
}

body.bmi-page > header .site-switcher a:focus-visible::after {
  background: var(--ves-primary);
}

body.bmi-page .theme-btn,
body.bmi-page .user-btn {
  min-height: 30px;
  border-color: rgba(133, 154, 153, 0.28);
  border-radius: 6px;
  background: transparent !important;
  box-shadow: none !important;
}

body.bmi-page .theme-btn {
  width: 34px;
}

body.bmi-page .user-btn {
  padding-inline: 9px;
}

@media (max-width: 900px) {
  body.bmi-page > header {
    width: min(100%, 700px);
  }

  body.bmi-page main,
  body.bmi-page > .site-footer {
    width: min(100%, 700px);
  }

  body.bmi-page > header .site-switcher {
    right: 168px;
    left: 136px;
    gap: 20px;
  }

  body.bmi-page > header .site-switcher a {
    font-size: 0.72rem;
  }
}

@media (max-width: 640px) {
  body.bmi-page > header {
    min-height: 0;
    padding-bottom: 8px;
  }

  body.bmi-page .header-top {
    min-height: 48px;
  }

  body.bmi-page > header .site-switcher {
    position: static;
    height: 34px;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
  }

  body.bmi-page > header .site-switcher a {
    min-height: 34px;
    font-size: 0.72rem;
  }
}

/* Header shell: full-width top bar with the calculator workspace set below it. */
body.bmi-page > header {
  width: calc(100% + 48px);
  min-height: 58px;
  margin-right: -24px;
  margin-left: -24px;
  padding-inline: max(24px, calc((100vw - 1200px) / 2));
  background: #fbfcfc !important;
  border-bottom-color: rgba(133, 154, 153, 0.3) !important;
}

body.bmi-page .header-top {
  min-height: 58px;
  height: 58px;
  align-items: center;
}

body.bmi-page .brand-mark {
  font-size: 1.58rem;
}

body.bmi-page .header-actions,
body.bmi-page .user-menu {
  height: 58px;
  align-items: center;
}

body.bmi-page .user-menu {
  position: static !important;
  inset: auto !important;
  margin: 0 !important;
  transform: none !important;
}

body.bmi-page .theme-btn,
body.bmi-page .user-btn {
  box-sizing: border-box;
  height: 34px;
  min-height: 34px;
  align-self: center;
}

body.bmi-page .theme-btn {
  flex: 0 0 34px;
  padding: 0;
}

body.bmi-page > header .site-switcher {
  top: 0;
  left: 50%;
  right: auto;
  height: 58px;
  transform: translateX(-50%) !important;
}

body.bmi-page > header .page-intro {
  margin: 0 calc(-1 * max(24px, calc((100vw - 1200px) / 2)));
  padding: 18px max(24px, calc((100vw - 1200px) / 2)) 16px;
  border-top: 1px solid rgba(133, 154, 153, 0.3);
  background: #ffffff;
}

html[data-theme="dark"] body.bmi-page > header {
  background: #111718 !important;
  border-bottom-color: rgba(161, 185, 182, 0.2) !important;
}

html[data-theme="dark"] body.bmi-page > header .page-intro {
  border-top-color: rgba(161, 185, 182, 0.2);
  background: #0d1112;
}

@media (max-width: 900px) {
  body.bmi-page > header {
    width: calc(100% + 48px);
    margin-right: -24px;
    margin-left: -24px;
    padding-inline: 24px;
  }

  body.bmi-page > header .site-switcher {
    right: auto;
    left: 50%;
  }

  body.bmi-page > header .page-intro {
    margin-inline: -24px;
    padding-inline: 24px;
  }
}

@media (max-width: 640px) {
  body.bmi-page > header {
    width: calc(100% + 28px);
    margin-right: -14px;
    margin-left: -14px;
    padding-inline: 14px;
  }

  body.bmi-page .header-top,
  body.bmi-page .header-actions,
  body.bmi-page .user-menu {
    min-height: 48px;
    height: 48px;
  }

  body.bmi-page .brand-mark {
    font-size: 1.38rem;
  }

  body.bmi-page > header .page-intro {
    margin-inline: -14px;
    padding: 14px 14px 10px;
  }

  body.bmi-page > header .site-switcher {
    transform: none !important;
  }
}

/* Intro and form controls: align the content with the approved calculator anatomy. */
body.bmi-page .brand-mark {
  font-size: 1.72rem;
}

body.bmi-page #login-btn.user-btn {
  border-radius: 6px !important;
}

body.bmi-page > header .page-intro,
body.bmi-page > header .page-intro h1,
body.bmi-page > header .page-intro p {
  width: 100%;
  text-align: center;
}

body.bmi-page > header .page-intro p {
  margin-right: auto;
  margin-left: auto;
}

body.bmi-page .gender-selector {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 4px;
  padding: 2px;
  border: 1px solid var(--ves-line);
  border-radius: 5px;
  background: var(--ves-soft);
  min-height: 35px;
}

body.bmi-page .gender-selector label {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ves-muted);
  font-size: 0.73rem;
  font-weight: 620;
}

body.bmi-page .gender-selector .gender-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.bmi-page .gender-selector input:checked + label {
  border: 0;
  background: var(--ves-primary-soft);
  color: var(--ves-primary);
}

@media (max-width: 640px) {
  body.bmi-page .brand-mark {
    font-size: 1.46rem;
  }

  body.bmi-page .gender-selector label {
    min-height: 38px;
    font-size: 0.82rem;
  }
}

/* Reference correction: the intro is an independent, centered block below the top bar. */
body.bmi-page > header {
  height: 58px;
  min-height: 58px;
  margin-bottom: 0 !important;
}

body.bmi-page > .page-intro {
  width: min(100%, 1080px);
  margin: 0 auto 10px;
  padding: 18px 0 12px;
  border: 0;
  background: transparent !important;
  text-align: center;
}

body.bmi-page > .page-intro h1,
body.bmi-page > .page-intro p {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

body.bmi-page > .page-intro p {
  margin-top: 8px;
}

/* Keep the BMI title as clean typography, without the old floating-card effect. */
body.bmi-page > .page-intro,
body.bmi-page > .page-intro:hover {
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  filter:none !important;
  transform:none !important;
}
body.bmi-page > .page-intro h1 {
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  text-shadow:none !important;
  -webkit-text-stroke:0 !important;
}

body.bmi-page .unit-btn {
  font-size: 0.71rem;
}

body.bmi-page .gender-selector {
  background: var(--ves-soft) !important;
  justify-items: stretch !important;
}

body.bmi-page .gender-selector label {
  width: 100% !important;
  justify-self: stretch !important;
  background: transparent !important;
  color: var(--ves-muted) !important;
}

body.bmi-page .gender-selector input:checked + label {
  background: rgba(11, 77, 74, 0.16) !important;
  color: var(--ves-primary) !important;
}

html[data-theme="dark"] body.bmi-page .gender-selector input:checked + label {
  background: rgba(73, 167, 154, 0.19) !important;
  color: #6ec4b7 !important;
}

@media (max-width: 900px) {
  body.bmi-page > .page-intro {
    width: min(100%, 700px);
  }
}

@media (max-width: 640px) {
  body.bmi-page > .page-intro {
    width: 100%;
    margin-bottom: 8px;
    padding: 14px 0 8px;
  }

  body.bmi-page .unit-btn {
    font-size: 0.68rem;
  }
}

/* Input rows and actions: centered numeric fields and full-width vertical actions. */
body.bmi-page #bmi-form > .input-group:not(:first-child) {
  grid-template-columns: minmax(0, 1fr) 86px minmax(0, 1fr);
}

body.bmi-page #bmi-form > .input-group > input[type="number"] {
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

body.bmi-page #bmi-form > .input-group > input[type="number"]::-webkit-outer-spin-button,
body.bmi-page #bmi-form > .input-group > input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

body.bmi-page .input-unit {
  justify-self: end;
}

body.bmi-page .actions {
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  width: 100%;
}

body.bmi-page #calc-btn,
body.bmi-page #reset-btn {
  width: 100%;
  min-height: 32px;
}

body.bmi-page #reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
}

body.bmi-page .reset-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Final BMI streak row: deliberate, compact reference composition. */
body.bmi-page #results-section > .streak-spotlight {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "series counter";
  align-items: center;
  gap: 24px;
  min-height: 100px;
  margin: 0 0 18px;
  padding: 16px 14px 16px 0;
  border: 0 !important;
  border-bottom: 1px solid var(--ves-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.bmi-page #results-section > .streak-spotlight__body {
  display: block !important;
  grid-area: series;
  min-width: 0;
}

body.bmi-page #results-section > .streak-spotlight__eyebrow {
  display: block;
  margin: 0 0 11px;
  color: var(--ves-muted);
  font-size: 0;
  font-weight: 600;
  line-height: 1;
}

body.bmi-page #results-section > .streak-spotlight__eyebrow::after {
  color: var(--ves-muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
}

body.bmi-page #results-section > .streak-spotlight__flames {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 29px;
}

body.bmi-page #results-section > .streak-spotlight__flames .app-icon {
  width: 26px;
  height: 26px;
  color: #677071;
  opacity: 1;
}

body.bmi-page #results-section > .streak-spotlight__flames .app-icon use {
  fill: currentColor !important;
  stroke: currentColor !important;
  stroke-width: 1.2px;
}

body.bmi-page #results-section > .streak-spotlight__flames .app-icon.is-lit {
  color: #ffb23f;
}

body.bmi-page #results-section > .streak-spotlight__badge {
  display: flex !important;
  grid-area: counter;
  width: auto !important;
  height: auto !important;
  align-items: center;
  justify-content: flex-end;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body.bmi-page #results-section > .streak-spotlight__badge > .app-icon {
  display: none !important;
}

body.bmi-page #results-section > .streak-spotlight__count:not([hidden]) {
  display: grid !important;
  gap: 2px;
  justify-items: center;
  color: var(--ves-flame);
  text-align: center;
}

body.bmi-page #results-section > .streak-spotlight__count b {
  font-family: var(--ves-font-display);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 0.86;
}

body.bmi-page #results-section > .streak-spotlight__count small {
  color: var(--ves-muted);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

body.bmi-page #results-section > .streak-spotlight h2,
body.bmi-page #results-section > .streak-spotlight p,
body.bmi-page #results-section > .streak-spotlight__progress-wrap,
body.bmi-page #results-section > .streak-spotlight__action {
  display: none !important;
}

@media (max-width: 560px) {
  body.bmi-page #results-section > .streak-spotlight {
    gap: 16px;
    min-height: 88px;
    padding: 14px 0;
  }

  body.bmi-page #results-section > .streak-spotlight__flames {
    gap: 6px;
  }

  body.bmi-page #results-section > .streak-spotlight__flames .app-icon {
    width: 23px;
    height: 23px;
  }
}
