:root {
  --mint: #d8f3e8;
  --mint-dark: #2d6a4f;
  --blush: #fce8ef;
  --lavender: #ebe6fa;
  --peach: #ffe9dc;
  --sky: #e5f4ff;
  --cream: #fffbf7;
  --ink: #1f2933;
  --muted: #5c6b7a;
  --border: #e2e8f0;
  --white: #ffffff;
  --accent: #6b9fd4;
  --accent-strong: #4a7fb8;
  --success: #2d8a5e;
  --warning: #c9852d;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(45, 106, 79, 0.08);
  --font: "Nunito", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(160deg, var(--cream) 0%, var(--sky) 45%, var(--lavender) 100%);
  min-height: 100vh;
  line-height: 1.6;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

main.container {
  padding-top: 1.5rem;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  min-height: 6.5rem;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.9;
}

.brand img {
  display: block;
  height: 112px;
  width: auto;
  max-width: min(560px, 96vw);
  object-fit: contain;
  object-position: left center;
}

@media (min-width: 768px) {
  .brand img {
    height: 148px;
    max-width: min(740px, 68vw);
  }
}

@media (min-width: 1024px) {
  .brand img {
    height: 168px;
    max-width: min(840px, 72vw);
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    align-items: flex-start;
    min-height: auto;
  }

  .brand {
    width: 100%;
    max-width: 100%;
  }

  .brand img {
    height: 104px;
    width: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
  }
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.nav-links > li > a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links > li > a:hover,
.nav-links > li > a[aria-current="page"] {
  color: var(--mint-dark);
}

.nav-dropdown {
  position: relative;
  z-index: 2;
}

.nav-dropdown.is-open,
.nav-dropdown:focus-within {
  z-index: 600;
}

.nav-links > li:not(.nav-dropdown) {
  position: relative;
  z-index: 1;
}

.nav-dropdown-toggle {
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0;
  line-height: 1.4;
}

.nav-dropdown-toggle:hover,
.nav-dropdown--active .nav-dropdown-toggle,
.nav-dropdown.is-open .nav-dropdown-toggle {
  color: var(--mint-dark);
}

.nav-dropdown-chevron {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.15s ease;
}

.nav-dropdown.is-open .nav-dropdown-chevron {
  transform: rotate(-135deg) translateY(2px);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  min-width: 280px;
  margin: 0;
  padding: 0.45rem;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 14px 44px rgba(45, 106, 79, 0.14);
  z-index: 601;
}

.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.6rem;
  height: 0.6rem;
}

.nav-dropdown.is-open .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .nav-dropdown:hover {
    z-index: 600;
  }

  .nav-dropdown:hover .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown:hover .nav-dropdown-toggle {
    color: var(--mint-dark);
  }

  .nav-dropdown:hover .nav-dropdown-chevron {
    transform: rotate(-135deg) translateY(2px);
  }
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.12s ease;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a[aria-current="page"] {
  background: linear-gradient(135deg, var(--mint), #f0faf5);
  color: var(--mint-dark);
  text-decoration: none;
}

.nav-dropdown-emoji {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.nav-dropdown-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  line-height: 1.25;
}

.nav-dropdown-text strong {
  font-size: 0.92rem;
  font-weight: 800;
}

.nav-dropdown-text small {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
}

.nav-dropdown-menu a:hover small,
.nav-dropdown-menu a[aria-current="page"] small {
  color: var(--mint-dark);
  opacity: 0.85;
}

.hero {
  padding: 2rem 0 2.75rem;
  background: linear-gradient(165deg, #e8f5ee 0%, #dceef8 45%, #ebe6fa 100%);
  border-bottom: 1px solid rgba(45, 106, 79, 0.08);
}

.hub-main {
  background: var(--cream);
  padding: 2.5rem 0 3rem;
}

.hero-card {
  position: relative;
  text-align: center;
  padding: clamp(2.25rem, 5vw, 3.25rem) clamp(1.75rem, 4vw, 3.5rem);
  border-radius: 28px;
  background: linear-gradient(155deg, #ffffff 0%, #f9fdfb 40%, #edf7f1 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 24px rgba(45, 106, 79, 0.06),
    0 24px 56px rgba(45, 106, 79, 0.1);
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% -30%, rgba(168, 230, 207, 0.45), transparent 55%),
    radial-gradient(ellipse 45% 50% at 100% 80%, rgba(107, 159, 212, 0.14), transparent 50%),
    radial-gradient(ellipse 40% 45% at 0% 90%, rgba(252, 232, 239, 0.35), transparent 50%);
  pointer-events: none;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2rem, 4.8vw, 2.9rem);
  font-weight: 800;
  margin: 0 0 1rem;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.hero-lead {
  color: #4a5d6b;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  line-height: 1.65;
  max-width: 42rem;
  margin: 0 auto 1.85rem;
  font-weight: 600;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.hero-badges .badge {
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 800;
  border-radius: 999px;
  border-width: 2px;
  border-style: solid;
  box-shadow: 0 2px 10px rgba(31, 41, 51, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-badges .badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(31, 41, 51, 0.1);
}

.hero-badges .badge-uk {
  background: linear-gradient(135deg, #fff 0%, #eef6fc 100%);
  border-color: #a8cce8;
  color: #2d5a87;
}

.hero-badges .badge-stone {
  background: linear-gradient(135deg, #fff 0%, #edf7f1 100%);
  border-color: #9fd4b8;
  color: var(--mint-dark);
}

.hero-badges .badge-pace {
  background: linear-gradient(135deg, #fff 0%, #eef6fc 100%);
  border-color: #9ecae8;
  color: #2a6a8a;
}

.hero-badges .badge-mobile {
  background: linear-gradient(135deg, #fff 0%, #f5f0fc 100%);
  border-color: #c4b5e8;
  color: #5a4a8a;
}

.badge {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--mint-dark);
}

.section-block {
  margin-bottom: 2.75rem;
}

.section-block:last-child {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.15rem;
  padding: 1.1rem 1.25rem;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 18px;
  box-shadow: 0 2px 14px rgba(45, 106, 79, 0.05);
}

.section-header-text {
  flex: 1;
  min-width: min(100%, 16rem);
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.28rem, 2.5vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-header-emoji {
  margin-right: 0.35rem;
}

.section-header-desc {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
  max-width: 46rem;
  font-weight: 600;
}

.section-view-all {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.48rem 1rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  background: #fff;
  color: var(--accent-strong);
  border: 2px solid var(--accent);
  box-shadow: 0 1px 4px rgba(74, 127, 184, 0.1);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.section-view-all:hover {
  background: var(--sky);
  text-decoration: none;
  color: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(74, 127, 184, 0.14);
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.calc-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(45, 106, 79, 0.12);
}

.calc-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.calc-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.calc-card h3 a:hover {
  color: var(--mint-dark);
}

.calc-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  flex: 1;
}

.calc-card-cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: auto;
  padding: 0.48rem 1rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 999px;
  text-decoration: none;
  background: var(--white);
  color: var(--accent-strong);
  border: 2px solid var(--accent);
  box-shadow: 0 1px 4px rgba(74, 127, 184, 0.1);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.calc-card-cta:hover {
  background: var(--sky);
  border-color: var(--accent-strong);
  text-decoration: none;
  color: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(74, 127, 184, 0.16);
}

.calc-card-cta--soon {
  background: var(--peach);
  color: #8a5a20;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

.calc-emoji {
  font-size: 1.6rem;
  line-height: 1;
}

.status-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--mint);
  color: var(--mint-dark);
  width: fit-content;
}

.status-pill.soon {
  background: var(--peach);
  color: #8a5a20;
}

.page-hero {
  padding: 2rem 0 1rem;
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}

.page-hero .lead {
  color: var(--muted);
  max-width: 720px;
  margin: 0;
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.35rem;
  margin-bottom: 1.35rem;
  padding-top: 0.15rem;
}

.breadcrumb a {
  color: var(--muted);
  font-weight: 600;
}

.breadcrumb a:hover {
  color: var(--mint-dark);
}

.breadcrumb [aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

.calc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-bottom: 3rem;
}

@media (min-width: 900px) {
  .calc-layout {
    grid-template-columns: 1fr 320px;
    align-items: start;
  }
}

.calc-panel,
.info-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

input,
select,
button {
  font-family: inherit;
  font-size: 1rem;
}

input[type="number"],
input[type="date"],
input[type="time"],
select {
  width: 100%;
  max-width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--cream);
}

input.inline {
  width: 5.5rem;
}

.unit-toggle {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.unit-toggle button {
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--muted);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
}

.unit-toggle button.active {
  background: var(--mint);
  border-color: var(--mint-dark);
  color: var(--mint-dark);
}

.btn-primary {
  background: linear-gradient(135deg, var(--mint-dark), #40916c);
  color: white;
  border: none;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  margin-top: 0.5rem;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.results {
  margin-top: 1.25rem;
  padding: 1.15rem 1.15rem 1.05rem;
  background: linear-gradient(165deg, #f6fcf8 0%, #e8f5ee 100%);
  border: 1px solid rgba(45, 138, 94, 0.14);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: none;
}

.results.visible {
  display: block;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(45, 138, 94, 0.12);
}

.btn-result-action {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--mint);
  background: var(--white);
  color: var(--mint-dark);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-result-action:hover {
  background: var(--mint);
  color: #fff;
}

.btn-result-action:disabled {
  opacity: 0.7;
  cursor: default;
}

.print-sheet-header {
  display: none;
}

.print-disclaimer {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.results.error {
  background: linear-gradient(165deg, #fff8f8 0%, #ffefef 100%);
  border: 1px solid #f0c4c4;
}

.result-error {
  margin: 0;
  color: #8b2e2e;
  font-weight: 600;
  line-height: 1.5;
}

.results h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

.result-category {
  margin: 0.1rem 0 0.65rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.result-sub {
  margin: -0.15rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.result-sub strong {
  color: var(--ink);
}

.result-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--mint-dark);
  margin: 0.15rem 0 0.25rem;
  line-height: 1.15;
}

.result-note {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0.65rem 0 0;
  line-height: 1.5;
}

.result-note a {
  color: var(--mint-dark);
  font-weight: 700;
}

.viz-note-warning {
  background: #fff8e6;
  border: 1px solid #f0d78a;
  color: #7a5a10;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

.info-panel h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.info-panel ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.disclaimer {
  background: var(--peach);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #6b4423;
  margin-top: 1rem;
}

.content-block {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.content-block h2 {
  margin-top: 0;
}

.content-block h3 {
  margin-top: 1.5rem;
}

.site-footer {
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.site-footer h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.cookie-notice {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  max-width: 320px;
  background: var(--ink);
  color: #e8eef3;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.8rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 200;
  display: none;
  line-height: 1.45;
}

.cookie-notice.visible {
  display: block;
}

.cookie-notice a {
  color: #a8d4ff;
}

.cookie-notice button {
  margin-top: 0.5rem;
  background: var(--mint);
  color: var(--mint-dark);
  border: none;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.78rem;
}

.sitemap-list {
  columns: 2;
  column-gap: 2rem;
}

@media (max-width: 600px) {
  .sitemap-list {
    columns: 1;
  }

  .header-inner {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .nav-links {
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    gap: 0.5rem 1rem;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-menu {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    margin-top: 0.35rem;
    box-shadow: 0 4px 16px rgba(45, 106, 79, 0.08);
  }

  .nav-dropdown.is-open .nav-dropdown-menu {
    display: block;
  }
}

.coming-soon-box {
  text-align: center;
  padding: 3rem 1.5rem;
}

.coming-soon-box .big-emoji {
  font-size: 3rem;
}

.badge-uk {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-flag {
  width: 20px;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Result visuals — white cards on soft green results panel */
.viz {
  margin-top: 0.85rem;
  padding: 0.9rem 0.85rem 0.8rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.viz-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--mint-dark);
  margin: 0 0 0.7rem;
  letter-spacing: 0.01em;
}

.viz-bmi {
  padding-bottom: 0.65rem;
}

.viz-bmi .bmi-scale-card {
  border: none;
  box-shadow: none;
  padding: 0.75rem 0.5rem 0.5rem;
  margin: 0;
  background: #f9fbfa;
  border-radius: 10px;
}

.viz-bmi .viz-legend {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.viz-hint,
.viz-band {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.viz-band strong {
  color: var(--ink);
}

/* BMI scale: white card, arrow points down at bar (no overlap with zone text) */
.bmi-scale-card {
  --marker-color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 0.75rem 0.75rem;
  margin-bottom: 0.5rem;
}

.bmi-scale-card.bmi-under { --marker-color: #4a8fb8; }
.bmi-scale-card.bmi-healthy { --marker-color: #2d8a5e; }
.bmi-scale-card.bmi-over { --marker-color: #d97a2b; }
.bmi-scale-card.bmi-obese { --marker-color: #c94e32; }

.bmi-marker-rail {
  position: relative;
  height: 2.6rem;
  margin-bottom: 0.4rem;
}

.bmi-marker {
  position: absolute;
  top: 0;
  left: var(--bmi-pos);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 4.5rem;
}

.bmi-marker-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--marker-color);
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.bmi-marker-label strong {
  color: var(--marker-color);
  font-size: 0.9rem;
}

.bmi-marker-arrow {
  display: block;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--marker-color);
  margin-top: 0.15rem;
  text-shadow: 0 1px 0 #fff;
}

.bmi-marker.bmi-marker-edge-left {
  left: 14%;
  transform: translateX(-50%);
}

.bmi-marker.bmi-marker-edge-right {
  left: 86%;
  transform: translateX(-50%);
}

.bmi-scale-bar {
  display: flex;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.bmi-zone {
  flex: 1;
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  padding: 0.35rem 0.15rem;
  line-height: 1.2;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bmi-zone span {
  font-weight: 600;
  opacity: 0.9;
}

.bmi-under { background: #7eb8da; }
.bmi-healthy { background: #52b788; }
.bmi-over { background: #f4a261; }
.bmi-obese { background: #e76f51; }

/* Shared scale marker (arrow points at bar, labels stay clear) */
.scale-marker-card {
  background: #f9fbfa;
  border-radius: 10px;
  padding: 0.5rem 0.5rem 0.65rem;
  margin-bottom: 0.35rem;
}

.scale-marker-rail {
  position: relative;
  height: 2.5rem;
  margin-bottom: 0.35rem;
}

.scale-marker-callout {
  position: absolute;
  top: 0;
  left: var(--scale-pos);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  --marker-color: var(--ink);
}

.scale-marker-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--marker-color);
  padding: 0.18rem 0.45rem;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.scale-marker-label strong {
  color: var(--marker-color);
}

.scale-marker-arrow {
  font-size: 0.9rem;
  line-height: 1;
  color: var(--marker-color);
  margin-top: 0.1rem;
}

.scale-marker-callout.scale-marker-edge-left {
  left: 10%;
}

.scale-marker-callout.scale-marker-edge-right {
  left: 90%;
}

.wh-card.wh-ok { --marker-color: #2d8a5e; }
.wh-card.wh-warn { --marker-color: #d97a2b; }
.wh-card.wh-high { --marker-color: #c94e32; }
.gfr-card.gfr-ok { --marker-color: #2d8a5e; }
.gfr-card.gfr-mild { --marker-color: #c9a227; }
.gfr-card.gfr-mid { --marker-color: #d97a2b; }
.gfr-card.gfr-low { --marker-color: #c94e32; }
.bac-card.bac-low { --marker-color: #2d8a5e; }
.bac-card.bac-warn { --marker-color: #d97a2b; }
.bac-card.bac-danger { --marker-color: #c94e32; }

.bf-gradient-bar {
  position: relative;
  height: 16px;
  background: #eef2f6;
  border-radius: 999px;
  overflow: hidden;
}

.bf-gradient-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #7eb8da, #52b788, #f4a261, #e76f51);
  opacity: 0.85;
}

.wh-track {
  display: flex;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.gfr-bar {
  display: flex;
  height: 20px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.gfr-labels,
.bac-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.35rem;
  font-weight: 600;
}

.bac-track {
  display: flex;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
}

.bac-track .bac-zone {
  flex: 1;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  text-align: center;
  padding: 0 0.2rem;
}

.bac-track.bac-meter-track .bac-zone.safe {
  flex: 7;
}

.bac-track.bac-meter-track .bac-zone.danger {
  flex: 3;
}

.viz-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.viz-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.25rem;
  vertical-align: middle;
}

.range-bar {
  position: relative;
  height: 28px;
  background: #eef2f6;
  border-radius: 999px;
  overflow: visible;
  margin: 0.5rem 0 1rem;
}

.range-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background: var(--ink);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.range-healthy {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(82, 183, 136, 0.45);
  border-radius: 999px;
}

.range-marker.in-range { background: var(--success); }
.range-marker.out-range { background: var(--warning); }

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
}

.viz-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.65rem;
}

.viz-stat {
  background: #f9fbfa;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.5rem;
  text-align: center;
}

.viz-stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
}

.viz-stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--mint-dark);
}

.viz-stat-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
}

.macro-bar {
  display: flex;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
}

.macro-p { background: #e76f51; display: flex; align-items: center; justify-content: center; min-width: 2rem; }
.macro-c { background: #f4a261; display: flex; align-items: center; justify-content: center; min-width: 2rem; }
.macro-f { background: #52b788; display: flex; align-items: center; justify-content: center; min-width: 2rem; }

.macro-grams {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
}

.macro-grams li { margin-bottom: 0.35rem; }
.macro-grams .dot.macro-p { background: #e76f51; }
.macro-grams .dot.macro-c { background: #f4a261; }
.macro-grams .dot.macro-f { background: #52b788; }

.cal-row {
  display: grid;
  grid-template-columns: 7rem 1fr 4rem;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.cal-bar {
  height: 14px;
  background: #eef2f6;
  border-radius: 999px;
  overflow: hidden;
}

.cal-fill.maintenance { height: 100%; background: #94a3b8; border-radius: 999px; }
.cal-fill.target { height: 100%; background: var(--mint-dark); border-radius: 999px; }

.hr-target-box {
  background: #eef8f2;
  border: 1px solid rgba(45, 138, 94, 0.2);
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  margin-bottom: 0.65rem;
  font-size: 0.9rem;
}

.hr-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  font-size: 0.85rem;
  border-bottom: 1px solid #f0f2f4;
}

.hr-row:last-child {
  border-bottom: none;
}

.hr-row.active {
  background: #eef8f2;
  font-weight: 700;
  border-color: transparent;
}

.hr-bpm { color: var(--mint-dark); font-weight: 800; }
.hr-pct { color: var(--muted); font-size: 0.78rem; }

.viz-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.viz-table th,
.viz-table td {
  padding: 0.45rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.viz-table th {
  font-size: 0.75rem;
  color: var(--muted);
}

.bac-zone.safe {
  background: #95d5b2;
}

.bac-zone.danger {
  background: #e76f51;
}

.gfr-seg.gfr-ok { background: #52b788; }
.gfr-seg.gfr-mild { background: #f4d35e; }
.gfr-seg.gfr-mid { background: #f4a261; }
.gfr-seg.gfr-low { background: #e76f51; }

.composition-bar {
  display: flex;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
}

.comp-lean { background: #40916c; display: flex; align-items: center; justify-content: center; }
.comp-fat { background: #e76f51; display: flex; align-items: center; justify-content: center; }

.activity-ring {
  text-align: center;
  padding: 1.1rem 1rem;
  background: linear-gradient(160deg, #f0faf5 0%, #fff 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.activity-cals {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--mint-dark);
}

.activity-unit {
  font-size: 0.85rem;
  color: var(--muted);
}

.viz-timeline .timeline-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.7rem 0.65rem;
  margin-bottom: 0.45rem;
  background: #f9fbfa;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
}

.viz-timeline .timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.progress-track {
  height: 16px;
  background: #eef2f6;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
}

.progress-fill.protein { background: #e76f51; }
.progress-fill.carb { background: #f4a261; }
.progress-fill.fat { background: #52b788; }

/* Section category pages */
.section-page {
  padding-bottom: 3rem;
}

.section-hero {
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.section-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.2;
}

.section-hero .lead {
  margin: 0;
  font-size: 1.05rem;
  max-width: 640px;
  opacity: 0.95;
}

.section-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.section-hero-meta span {
  background: rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.section-intro {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 1.75rem;
}

.section-intro h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.section-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.section-calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-more {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.section-more h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.section-more-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-more-links a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.section-more-links a:hover {
  background: var(--mint);
  border-color: var(--mint-dark);
  color: var(--mint-dark);
  text-decoration: none;
}

.section-more-links a[aria-current="page"] {
  background: var(--mint);
  border-color: var(--mint-dark);
  color: var(--mint-dark);
}

.theme-body-measurements .section-hero { background: linear-gradient(135deg, var(--mint), #fff); color: var(--ink); }
.theme-nutrition .section-hero { background: linear-gradient(135deg, var(--peach), #fff); }
.theme-fitness .section-hero { background: linear-gradient(135deg, var(--sky), #fff); }
.theme-womens-health .section-hero { background: linear-gradient(135deg, var(--blush), #fff); }
.theme-lifestyle .section-hero { background: linear-gradient(135deg, #e8f5e9, #fff); }
.theme-health-checks .section-hero { background: linear-gradient(135deg, var(--lavender), #fff); }

.section-header-link {
  color: var(--ink);
  text-decoration: none;
}

.section-header-link:hover {
  color: var(--mint-dark);
  text-decoration: none;
}

.section-header-link:hover .section-header-emoji {
  text-decoration: none;
}

.form-hint {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.range-badge {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.range-badge.in {
  background: #e8f7ef;
  color: #1d6b42;
}

.range-badge.out {
  background: #fff4e6;
  color: #8a5a12;
}

.wh-zone {
  flex: 1;
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  padding: 0.35rem 0.1rem;
  color: #fff;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wh-zone.ok { background: #52b788; }
.wh-zone.warn { background: #f4a261; }
.wh-zone.high { background: #e76f51; }

.sleep-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.8rem;
  background: #f9fbfa;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
}

.sleep-row:last-of-type {
  margin-bottom: 0;
}

.sleep-row strong {
  color: var(--mint-dark);
  font-size: 1.05rem;
}

.sleep-cycles {
  font-size: 0.85rem;
  color: var(--muted);
}

.bodytype-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 0.35rem;
}

.bodytype-desc {
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.bodytype-bars .bt-row {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.bt-bar {
  height: 10px;
  background: var(--cream);
  border-radius: 999px;
  overflow: hidden;
}

.bt-fill.ecto { background: #7eb8da; height: 100%; }
.bt-fill.meso { background: #52b788; height: 100%; }
.bt-fill.endo { background: #f4a261; height: 100%; }

.preg-bar {
  height: 12px;
  background: var(--cream);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.preg-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blush), var(--mint));
  border-radius: 999px;
}

.macro-bar-foot {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.macro-bar-foot strong {
  color: var(--ink);
}

.water-progress {
  height: 10px;
  background: var(--cream);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.water-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7eb8da, var(--mint));
  border-radius: 999px;
  transition: width 0.35s ease;
}

.water-glasses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 1.15rem;
  line-height: 1;
}

.water-glass {
  opacity: 0.35;
}

.water-glass.filled {
  opacity: 1;
}

.bsa-track {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  height: 2.5rem;
}

.bsa-zone {
  flex: 1;
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  padding: 0.35rem 0.1rem;
  color: #fff;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bsa-zone.low { background: #7eb8da; }
.bsa-zone.mid { background: #52b788; }
.bsa-zone.high { background: #9b8ec4; }

.pw-bands {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
}

.pw-band {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem 0.75rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  background: #f9fbfa;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.85rem;
}

.pw-band.pw-active {
  background: #eef8f3;
  border-color: var(--mint);
  box-shadow: 0 0 0 2px rgba(82, 183, 136, 0.2);
}

.pw-band-label {
  font-weight: 700;
  color: var(--ink);
}

.pw-band-range {
  font-weight: 800;
  color: var(--mint-dark);
  text-align: right;
}

.pw-band-stone {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
}

.sleep-row.sleep-recommended {
  background: #eef8f3;
  border-color: var(--mint);
}

.sleep-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #1d6b42;
  background: #d4edda;
  border-radius: 999px;
  vertical-align: middle;
}

/* Calculator results: print-friendly sheet */
@media print {
  body[data-calc] .site-header,
  body[data-calc] .site-footer,
  body[data-calc] .cookie-notice,
  body[data-calc] .breadcrumb,
  body[data-calc] .info-panel,
  body[data-calc] .result-actions,
  body[data-calc] #calc-form > *:not(#calc-results) {
    display: none !important;
  }

  body[data-calc] .page-hero {
    display: block !important;
    margin-bottom: 0.75rem;
    box-shadow: none;
    background: none !important;
    padding: 0 !important;
  }

  body[data-calc] .page-hero .lead {
    color: #333 !important;
  }

  body[data-calc] .calc-layout,
  body[data-calc] .calc-panel,
  body[data-calc] #calc-form,
  body[data-calc] .results.visible {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  body[data-calc] .print-sheet-header {
    display: flex !important;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2d8a5e;
    font-size: 10pt;
    color: #333;
  }

  body[data-calc] .print-site {
    font-weight: 800;
    color: #2d8a5e;
  }

  body[data-calc] .result-value {
    color: #1a5c3a !important;
  }

  body[data-calc] .viz {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
  }

  body[data-calc] .bmi-marker-arrow,
  body[data-calc] .scale-marker-arrow {
    color: #333 !important;
  }

  body[data-calc] a {
    color: #333 !important;
    text-decoration: underline;
  }

  @page {
    margin: 1.2cm;
  }
}
