/* VitaMetric (calculator-bmi.site) — Clean Health & Wellness UI */
:root {
  --bg-page: #f5f7f8;
  --bg-surface: #ffffff;
  --bg-tint: #eef5f3;
  --text-main: #0f2926;
  --text-body: #3b5551;
  --text-muted: #647d79;
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --border: #dce6e4;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 18px rgba(15, 41, 38, 0.05);
  --shadow-pop: 0 12px 28px rgba(15, 41, 38, 0.12);
}

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

html {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-main);
  background-color: var(--bg-page);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-dark);
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Clean Clickable Dropdowns */
.header {
  position: sticky;
  top: 0;
  z-index: 300;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(15, 41, 38, 0.04);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

.brand-name span {
  color: var(--accent);
}

.nav-root {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
}

.nav-entry {
  position: relative;
}

.nav-btn,
.nav-anchor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 40px;
  padding: 0 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-body);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-btn:hover,
.nav-anchor:hover,
.nav-btn.is-current,
.nav-anchor.is-current,
.nav-btn[aria-expanded="true"] {
  background: var(--bg-tint);
  color: var(--accent-dark);
  border-color: #c6e3dc;
}

.caret {
  font-size: 0.72rem;
  transition: transform 0.15s ease;
}

.nav-btn[aria-expanded="true"] .caret {
  transform: rotate(180deg);
}

.dropdown-list {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 245px;
  padding: 0.45rem;
  list-style: none;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  z-index: 400;
}

.dropdown-list.is-open {
  display: block;
}

.dropdown-list li + li {
  margin-top: 2px;
}

.dropdown-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  border-radius: 7px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
}

.dropdown-list li a:hover {
  background: var(--bg-tint);
  color: var(--accent-dark);
}

.dropdown-list li a small {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.76rem;
}

/* Mobile Menu Button & Drawer */
.burger-btn {
  display: none;
  align-items: center;
  gap: 0.45rem;
  height: 40px;
  padding: 0 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-tint);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 860px) {
  .burger-btn {
    display: inline-flex;
  }

  .nav-root {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 1rem 1.25rem 1.25rem;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-pop);
  }

  .nav-root.is-open {
    display: flex;
  }

  .nav-btn,
  .nav-anchor {
    width: 100%;
    justify-content: space-between;
    height: 44px;
  }

  .dropdown-list {
    position: static;
    box-shadow: none;
    border: 1px solid var(--border);
    background: var(--bg-page);
    margin-top: 0.3rem;
    min-width: 100%;
  }
}

/* Breadcrumb */
.crumb {
  padding: 0.9rem 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.crumb a {
  text-decoration: none;
  font-weight: 600;
}

/* Hero Section */
.hero {
  margin: 1.25rem 0 1.85rem;
  padding: 2.25rem 2rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, #0b3b3a 0%, #0f766e 60%, #0284c7 100%);
  color: #ffffff;
  box-shadow: var(--shadow-card);
}

.hero-kicker {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  line-height: 1.22;
  font-weight: 800;
  margin-bottom: 0.7rem;
  max-width: 780px;
}

.hero p {
  font-size: 1.02rem;
  opacity: 0.94;
  max-width: 740px;
}

/* Grid & Cards */
.two-col {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 1.6rem;
  margin-bottom: 2.25rem;
}

@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.65rem;
  box-shadow: var(--shadow-card);
}

.card-heading {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.15rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}

.seg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tint);
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.seg-btn {
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-body);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.seg-btn.is-active {
  background: var(--accent);
  color: #ffffff;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 540px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.input-group {
  margin-bottom: 1rem;
}

.input-group label {
  display: block;
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 0.68rem 0.85rem;
  border: 1px solid #c7d4d2;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--text-main);
  background: #ffffff;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.primary-btn {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent-dark);
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn:hover {
  background: var(--text-main);
}

.result-box {
  margin-top: 1.4rem;
  padding: 1.3rem;
  border-radius: var(--radius-md);
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  display: none;
}

.result-box.is-visible {
  display: block;
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.result-big {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
}

.pill {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

.meter {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0284c7 0%, #16a34a 32%, #d97706 66%, #e11d48 100%);
  position: relative;
  margin: 0.9rem 0 0.4rem;
}

.meter-pin {
  position: absolute;
  top: -4px;
  width: 6px;
  height: 20px;
  background: #0f2926;
  border: 2px solid #ffffff;
  border-radius: 4px;
  transform: translateX(-50%);
  transition: left 0.3s ease;
}

.meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
}

.result-grid {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid #ccfbf1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  font-size: 0.88rem;
}

.quick-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.quick-links li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-page);
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 700;
}

.quick-links li a:hover {
  background: var(--bg-tint);
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* Substantial Article & Policy Cards */
.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
}

.article-card h1 {
  font-size: 1.85rem;
  line-height: 1.25;
  margin-bottom: 0.65rem;
}

.article-card h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 1.75rem 0 0.7rem;
  color: var(--text-main);
}

.article-card h2:first-child {
  margin-top: 0;
}

.article-card h3 {
  font-size: 1.12rem;
  margin: 1.2rem 0 0.45rem;
  color: var(--accent-dark);
}

.article-card p {
  margin-bottom: 0.95rem;
  color: var(--text-body);
}

.article-card ul,
.article-card ol {
  margin: 0.5rem 0 1.2rem 1.4rem;
  color: var(--text-body);
}

.article-card li {
  margin-bottom: 0.45rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.15rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--border);
  text-align: left;
}

th {
  background: var(--bg-tint);
  font-weight: 700;
  color: var(--text-main);
}

.note-box {
  background: #f0f9ff;
  border-left: 4px solid #0284c7;
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius-sm);
  margin: 1.35rem 0;
  color: #0c4a6e;
  font-size: 0.92rem;
}

/* Footer */
.footer {
  background: #0f2926;
  color: #cbd5e1;
  padding: 2.75rem 0 1.4rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer h4 {
  color: #ffffff;
  font-size: 0.98rem;
  margin-bottom: 0.8rem;
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 0.45rem;
}

.footer a {
  color: #99b8b3;
  text-decoration: none;
  font-size: 0.88rem;
}

.footer a:hover {
  color: #5eead4;
}

.footer-bottom {
  padding-top: 1.15rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: #7d9b96;
}
