
  :root {
    --nhs-blue: #005EB8;
    --nhs-dark: #003087;
    --nhs-green: #007F3B;
    --nhs-warm: #FFB81C;
    --danger: #DA291C;
    --orange: #E8632A;
    --light-bg: #F0F4F5;
    --white: #FFFFFF;
    --text-dark: #212B32;
    --text-muted: #4C6272;
    --border: #D8DDE0;
    --shadow-card: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-blue: 0 4px 24px rgba(0,94,184,0.18);
    --radius: 10px;
    --radius-lg: 16px;
  }

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

  html { scroll-behavior: smooth; }

  body {
    font-family: 'DM Sans', sans-serif;
    color: var(--text-dark);
    background: var(--white);
    line-height: 1.65;
    font-size: 16px;
  }

  h1, h2, h3, h4 {
    font-family: 'DM Serif Display', serif;
    line-height: 1.2;
  }

  a { color: var(--nhs-blue); text-decoration: none; }
  a:hover { text-decoration: underline; }

  img { max-width: 100%; }

  .container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

  /* ── HEADER ── */
  header {
    position: sticky; top: 0; z-index: 100;
    background: var(--white);
    border-bottom: 3px solid var(--nhs-blue);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  }

  .header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 68px;
  }

  .logo {
    display: flex; align-items: center; gap: 10px;
    font-family: 'DM Serif Display', serif;
    font-size: 1.15rem;
    color: var(--nhs-dark);
    text-decoration: none;
    font-weight: 700;
  }

  .logo svg { flex-shrink: 0; }

  nav { display: flex; align-items: center; gap: 4px; }

  nav a {
    padding: 6px 12px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-dark);
    border-radius: 6px;
    transition: all 0.2s;
    text-decoration: none;
  }

  nav a:hover, nav a.active {
    background: var(--light-bg);
    color: var(--nhs-blue);
  }

  nav a.active { font-weight: 600; }

  .hamburger {
    display: none;
    background: none; border: none;
    cursor: pointer; padding: 8px;
    flex-direction: column; gap: 5px;
  }

  .hamburger span {
    display: block; width: 24px; height: 2px;
    background: var(--text-dark);
    transition: all 0.3s;
    border-radius: 2px;
  }

  .mobile-nav {
    display: none;
    flex-direction: column;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--border);
    gap: 4px;
  }

  .mobile-nav.open { display: flex; }
  .mobile-nav a { padding: 10px 12px; font-weight: 500; color: var(--text-dark); border-radius: 6px; }
  .mobile-nav a:hover { background: var(--light-bg); color: var(--nhs-blue); }

  /* ── HERO ── */
  .hero {
    background: linear-gradient(135deg, #003087 0%, #005EB8 60%, #0072CE 100%);
    padding: 64px 0 80px;
    position: relative;
    overflow: hidden;
  }

  .hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    position: relative;
  }

  .hero-left { color: white; padding-top: 16px; }

  .hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  .hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: white;
    margin-bottom: 16px;
    line-height: 1.1;
  }

  .hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 28px;
    line-height: 1.6;
  }

  .trust-pills {
    display: flex; flex-wrap: wrap; gap: 8px;
  }

  .trust-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 50px;
  }

  /* ── CALCULATOR CARD ── */
  .calc-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    padding: 32px;
    animation: slideUp 0.6s ease both;
  }

  @keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .calc-card h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-dark);
  }

  .toggle-group {
    display: flex;
    background: var(--light-bg);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
  }

  .toggle-btn {
    flex: 1; padding: 8px; border: none;
    background: none; cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem; font-weight: 600;
    border-radius: 6px;
    color: var(--text-muted);
    transition: all 0.2s;
  }

  .toggle-btn.active {
    background: white;
    color: var(--nhs-blue);
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  }

  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
  .form-group { display: flex; flex-direction: column; gap: 5px; }
  .form-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }

  .form-group input, .form-group select {
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: border 0.2s;
    background: white;
  }

  .form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--nhs-blue);
    box-shadow: 0 0 0 3px rgba(0,94,184,0.12);
  }

  .gender-toggle { display: flex; gap: 8px; }

  .gender-btn {
    flex: 1; padding: 10px 8px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
  }

  .gender-btn.active {
    border-color: var(--nhs-blue);
    background: #EEF5FB;
    color: var(--nhs-blue);
  }

  .calc-btn {
    width: 100%; padding: 15px;
    background: var(--nhs-blue);
    color: white; border: none;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem; font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.2s;
    letter-spacing: 0.3px;
  }

  .calc-btn:hover { background: var(--nhs-dark); transform: translateY(-1px); box-shadow: var(--shadow-blue); }
  .calc-btn:active { transform: translateY(0); }

  /* ── RESULT ── */
  .result-panel {
    display: none;
    margin-top: 20px;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--light-bg);
    border: 1.5px solid var(--border);
    animation: fadeIn 0.4s ease;
  }

  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

  .result-panel.show { display: block; }

  .result-top { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }

  .bmi-number {
    font-family: 'DM Serif Display', serif;
    font-size: 3rem;
    line-height: 1;
    color: var(--text-dark);
  }

  .bmi-badge {
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .bmi-range-text { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 12px; }

  .bmi-bar-wrap { position: relative; margin-bottom: 10px; }

  .bmi-bar {
    height: 10px;
    border-radius: 50px;
    background: linear-gradient(to right, #4EACD9 0%, #007F3B 25%, #FFB81C 60%, #DA291C 100%);
    position: relative;
  }

  .bmi-marker {
    position: absolute;
    top: -4px;
    width: 18px; height: 18px;
    background: white;
    border: 3px solid var(--text-dark);
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .bmi-bar-labels {
    display: flex; justify-content: space-between;
    font-size: 0.72rem; color: var(--text-muted);
    margin-top: 6px;
  }

  /* ── CATEGORIES ── */
  .categories { padding: 72px 0; background: var(--white); }

  .section-header { text-align: center; margin-bottom: 48px; }
  .section-header h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; color: var(--text-dark); }
  .section-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

  .cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

  .cat-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 28px 22px;
    border-top: 4px solid;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
  }

  .cat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,0.12); }

  .cat-card.underweight { border-color: #4EACD9; }
  .cat-card.healthy { border-color: var(--nhs-green); }
  .cat-card.overweight { border-color: var(--nhs-warm); }
  .cat-card.obese { border-color: var(--danger); }

  .cat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
  }

  .cat-card.underweight .cat-icon { background: #EBF5FB; }
  .cat-card.healthy .cat-icon { background: #EAF5EE; }
  .cat-card.overweight .cat-icon { background: #FFF8E7; }
  .cat-card.obese .cat-icon { background: #FDECEC; }

  .cat-range {
    font-family: 'DM Serif Display', serif;
    font-size: 1.4rem;
    margin-bottom: 4px;
  }

  .cat-name { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 12px; }
  .cat-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

  /* ── HOW IT WORKS ── */
  .how-it-works { padding: 72px 0; background: var(--light-bg); }

  .steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

  .step {
    text-align: center;
    padding: 32px 24px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
  }

  .step-num {
    width: 52px; height: 52px;
    background: var(--nhs-blue);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'DM Serif Display', serif;
    font-size: 1.4rem;
    margin: 0 auto 16px;
  }

  .step h3 { font-size: 1.1rem; margin-bottom: 10px; }
  .step p { font-size: 0.9rem; color: var(--text-muted); }

  /* ── CONTENT ── */
  .content-section { padding: 80px 0; }

  .content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 56px; align-items: start; }

  .prose h2 {
    font-size: 1.7rem;
    margin: 40px 0 16px;
    color: var(--text-dark);
    padding-top: 8px;
  }

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

  .prose p { color: var(--text-muted); margin-bottom: 16px; line-height: 1.75; }

  .prose ul { margin: 12px 0 16px 20px; color: var(--text-muted); }
  .prose ul li { margin-bottom: 8px; line-height: 1.65; }

  .prose table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.9rem; }
  .prose table th { background: var(--nhs-blue); color: white; padding: 10px 14px; text-align: left; }
  .prose table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .prose table tr:nth-child(even) td { background: var(--light-bg); }

  /* FAQ */
  .faq-item {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
  }

  .faq-q {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
    cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px;
  }

  .faq-q::after { content: '+'; font-size: 1.3rem; color: var(--nhs-blue); flex-shrink: 0; font-weight: 300; }
  .faq-item.open .faq-q::after { content: '−'; }

  .faq-a { display: none; padding-top: 12px; color: var(--text-muted); font-size: 0.93rem; line-height: 1.7; }
  .faq-item.open .faq-a { display: block; }

  /* SIDEBAR */
  .sidebar { position: sticky; top: 88px; }

  .sidebar-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 24px;
    margin-bottom: 20px;
    border-left: 4px solid var(--nhs-blue);
  }

  .sidebar-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
  .sidebar-card p, .sidebar-card li { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; }
  .sidebar-card ul { margin-left: 16px; }
  .sidebar-card ul li { margin-bottom: 6px; }

  .nhs-link-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--nhs-blue);
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 12px;
    transition: background 0.2s;
  }

  .nhs-link-btn:hover { background: var(--nhs-dark); text-decoration: none; }

  /* TRUST */
  .trust-section {
    padding: 56px 0;
    background: var(--nhs-dark);
    color: white;
  }

  .trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

  .trust-item { text-align: center; padding: 20px; }
  .trust-item svg { margin-bottom: 12px; }
  .trust-item h3 { font-size: 1rem; margin-bottom: 6px; color: white; }
  .trust-item p { font-size: 0.85rem; color: rgba(255,255,255,0.7); }

  /* FOOTER */
  footer { background: #1a1a2e; color: rgba(255,255,255,0.8); padding: 56px 0 0; }

  .footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.5fr; gap: 48px; padding-bottom: 40px; }

  .footer-col h4 { font-family: 'DM Serif Display', serif; font-size: 1.05rem; color: white; margin-bottom: 16px; }
  .footer-col p { font-size: 0.85rem; line-height: 1.7; margin-bottom: 10px; }
  .footer-col ul { list-style: none; }
  .footer-col ul li { margin-bottom: 8px; }
  .footer-col ul li a { color: rgba(255,255,255,0.75); font-size: 0.88rem; text-decoration: none; transition: color 0.2s; }
  .footer-col ul li a:hover { color: white; text-decoration: none; }

  .footer-disclaimer {
    background: rgba(0,0,0,0.2);
    padding: 14px 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .footer-disclaimer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }

  /* HIGHLIGHT BOX */
  .info-box {
    background: #EEF5FB;
    border-left: 4px solid var(--nhs-blue);
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin: 20px 0;
  }
  .info-box p { color: var(--text-dark) !important; margin: 0 !important; font-size: 0.93rem; }

  .warning-box {
    background: #FFF8E7;
    border-left: 4px solid var(--nhs-warm);
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin: 20px 0;
  }
  .warning-box p { color: var(--text-dark) !important; margin: 0 !important; font-size: 0.93rem; }

  /* ── RESPONSIVE ── */
  @media (max-width: 900px) {
    nav { display: none; }
    .hamburger { display: flex; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero { padding: 40px 0 48px; }
    .cat-grid { grid-template-columns: 1fr 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .content-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .trust-grid { grid-template-columns: 1fr; gap: 16px; }
  }

  @media (max-width: 540px) {
    .cat-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .trust-pills { flex-direction: column; }
    .hero h1 { font-size: 1.8rem; }
    .calc-card { padding: 20px; }
    .footer-disclaimer-inner { flex-direction: column; text-align: center; }
  }

/* ── New-template page additions ── */
.ph { background: linear-gradient(135deg,#003087 0%,#005EB8 60%,#0072CE 100%); color:#fff; padding:44px 0 52px; }
.ph .sb-crumbs, .ph .sb-crumbs a { color: rgba(255,255,255,.8); }
.ph h1 { font-size: clamp(1.9rem,4vw,2.7rem); color:#fff; margin-bottom:12px; line-height:1.12; }
.ph p.lead { font-size:1.08rem; color:rgba(255,255,255,.88); max-width:760px; }
.ph .hero-grid { align-items:center; }
.tool-wrap { padding: 40px 0 8px; }
.tool-wrap .calc-card { max-width: 760px; margin: 0 auto; box-shadow: var(--shadow-card); border:1px solid var(--border); animation:none; }
.calc-card .row3 { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:14px; }
.calc-card select, .calc-card input { width:100%; }
.inline-pair { display:flex; gap:6px; }
.inline-pair > * { flex:1; min-width:0; }
.res { display:none; margin-top:20px; padding:20px; border-radius:var(--radius); background:var(--light-bg); border:1.5px solid var(--border); }
.res.show { display:block; }
.res .big { font-family:'DM Serif Display',serif; font-size:2.6rem; line-height:1; }
.res .pill { display:inline-block; padding:5px 14px; border-radius:50px; color:#fff; font-weight:700; font-size:.82rem; text-transform:uppercase; letter-spacing:.5px; margin-left:10px; vertical-align:middle; }
.res p { font-size:.92rem; color:var(--text-muted); margin-top:10px; }
.res .err { color: var(--danger); font-weight:600; }
.prose h3 { font-size:1.25rem; margin:28px 0 10px; color:var(--text-dark); }
.prose ol { margin:12px 0 16px 22px; color:var(--text-muted); }
.prose ol li { margin-bottom:8px; line-height:1.65; }
.prose a { text-decoration: underline; }
.table-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; margin:20px 0; border-radius:8px; }
.table-scroll table { margin:0; min-width:520px; }
.prose table td.uw { color:#2a7fb0; font-weight:600 } .prose table td.hw { color:#007F3B; font-weight:600 }
.prose table td.ow { color:#B87900; font-weight:600 } .prose table td.ob { color:#DA291C; font-weight:600 }
.prose tr.hl td { background:#EEF5FB !important; font-weight:700; }
.faq-d { border-bottom:1px solid var(--border); padding:4px 0; }
.faq-d summary { font-weight:700; cursor:pointer; padding:14px 28px 14px 0; position:relative; list-style:none; color:var(--text-dark); }
.faq-d summary::-webkit-details-marker { display:none; }
.faq-d summary::after { content:'+'; position:absolute; right:0; top:10px; font-size:1.4rem; color:var(--nhs-blue); font-weight:300; }
.faq-d[open] summary::after { content:'−'; }
.faq-d > div { padding:0 0 16px; color:var(--text-muted); font-size:.95rem; line-height:1.7; }
.answer-box { background:#EAF5EE; border-left:4px solid var(--nhs-green); border-radius:0 8px 8px 0; padding:16px 20px; margin:0 0 24px; }
.answer-box p { color:var(--text-dark) !important; margin:0 !important; }
.stat-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin:20px 0; }
.stat { background:#fff; border:1.5px solid var(--border); border-radius:12px; padding:16px; }
.stat b { display:block; font-family:'DM Serif Display',serif; font-size:1.7rem; color:var(--nhs-blue); line-height:1.1; }
.stat span { font-size:.82rem; color:var(--text-muted); }
.num-nav { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 8px; }
.num-nav a { padding:6px 12px; border:1.5px solid var(--border); border-radius:50px; font-weight:600; font-size:.88rem; text-decoration:none !important; }
.num-nav a.cur { background:var(--nhs-blue); color:#fff; border-color:var(--nhs-blue); }
.formula { font-family:'DM Serif Display',serif; font-size:1.35rem; background:#fff; border:1.5px dashed var(--nhs-blue); border-radius:10px; padding:14px 18px; text-align:center; margin:16px 0; color:var(--text-dark); }
.legal h2 { font-size:1.35rem !important; }
@media (max-width:540px){ .calc-card .row3 { grid-template-columns:1fr 1fr; } .res .pill { margin:8px 0 0; } }
.content-grid > *, .prose { min-width: 0; }
