  :root{
    --green-900:#0f3d2e;
    --green-700:#16653f;
    --green-600:#1b8a4f;
    --green-500:#22a35a;
    --cream:#faf9f6;
    --text-900:#1c2521;
    --text-600:#5b6661;
    --text-400:#636b68;
    --border:#e7e6e2;
    --orange:#f0a430;
    --pink:#ec6f9b;
    --blue:#3b6fe0;
    --radius-lg:20px;
    --radius-md:14px;
    --radius-sm:10px;
  }
  *{box-sizing:border-box;}
  /* ── Skip link (accessibility — Tab key on any page) ── */
  .skip-link{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;}
  .skip-link:focus{position:fixed;top:0;left:0;z-index:999999;width:auto;height:auto;padding:14px 20px;background:var(--green-700);color:#fff;font-size:14px;font-weight:700;text-decoration:none;border-radius:0 0 8px 0;}
  /* ── Screen-reader-only utility (visually-hidden labels) ── */
  .screen-reader-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}

  /* ── Heading size overrides — semantic levels corrected for accessibility
     but visual size preserved so the layout doesn't change. ── */
  .hero-art h2.widget-title{font-size:13.5px;font-weight:700;margin:0;color:var(--text-900);}
  .feat-item h3{font-size:14.5px;font-weight:700;margin:0 0 3px;}
  .goal-card h3{font-size:14.5px;font-weight:700;margin:0 0 6px;}
  .card-box-head h3{font-size:15px;font-weight:700;margin:0;}
  .did-you-know h3,.nc-donut-center h3{font-size:15px;font-weight:700;margin:0 0 8px;}
  .more-item h4{font-size:14.5px;font-weight:700;margin:0 0 4px;}
  .article-card h3,.article-card-v h3{font-size:14.5px;font-weight:700;margin:0 0 6px;line-height:1.35;}
  .nl-section h2{font-size:16px;font-weight:800;margin:0 0 6px;}

  body{
    margin:0;
    font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
    color:var(--text-900);
    background:#fff;
    -webkit-font-smoothing:antialiased;
  }
  a{text-decoration:none;color:inherit;}
  img{display:block;max-width:100%;}
  .wrap{max-width:1520px;margin:0 auto;padding:0 48px;}

  /* ---------- Header ---------- */
  header{
    border-bottom:1px solid var(--border);
    position:sticky;top:0;background:#fff;z-index:50;
  }
  .nav{
    display:flex;align-items:center;justify-content:space-between;
    padding:22px 48px;max-width:1520px;margin:0 auto;
  }
  .logo{display:flex;align-items:center;gap:10px;font-weight:700;font-size:20px;}
  /* the_custom_logo() outputs WordPress's own markup (.custom-logo-link /
     .custom-logo) with no size constraint of its own — without this rule
     an uploaded logo renders at its native pixel size, which can be far
     larger than the 36px mark it's meant to sit beside. */
  .logo .custom-logo-link{display:flex;align-items:center;}
  .logo .custom-logo{
    height:50px;width:auto;max-width:200px;object-fit:contain;display:block;
  }
  .logo-mark{
    width:36px;height:36px;border-radius:10px;
    background:var(--green-700);color:#fff;
    display:flex;align-items:center;justify-content:center;
    font-size:19px;font-weight:800;
  }
  .logo-sub{display:block;font-size:11.5px;font-weight:500;color:var(--text-600);line-height:1;margin-top:1px;}
  .nav-links{display:flex;align-items:center;gap:38px;font-size:16px;font-weight:500;color:var(--text-900);}
  /* wp_nav_menu() and the fallback menu both output a <ul><li> structure
     inside .nav-links — reset list styling and make the <ul> itself the
     flex row so menu items lay out horizontally no matter which markup
     path rendered (real menu vs. fallback_cb). */
  .nav-links ul,
  .nav-links .nav-menu{
    display:flex;align-items:center;gap:38px;list-style:none;margin:0;padding:0;
  }
  .nav-links li{list-style:none;margin:0;padding:0;}
  .nav-links a{opacity:.85;text-decoration:none;color:inherit;white-space:nowrap;}
  .nav-links a:hover{opacity:1;}
  .nav-links a.active,
  .nav-links .current-menu-item > a{opacity:1;color:var(--green-700);font-weight:700;}
  .nav-right{display:flex;align-items:center;gap:16px;}
  .nav-right .user-chip{
    display:inline-flex;align-items:center;gap:6px;
    font-size:14px;font-weight:600;color:var(--text-900);
    padding:9px 14px;border-radius:9px;border:1px solid var(--border);background:#fff;
    white-space:nowrap;max-width:180px;overflow:hidden;text-overflow:ellipsis;
    transition:border-color .15s ease;
  }
  .nav-right .user-chip:hover{border-color:var(--text-400);}
  .user-chip-name{overflow:hidden;text-overflow:ellipsis;}
  .btn{
    display:inline-flex;align-items:center;justify-content:center;gap:6px;
    padding:13px 26px;border-radius:9px;font-size:16px;font-weight:600;
    border:1px solid transparent;cursor:pointer;white-space:nowrap;
  }
  .btn-outline{border-color:var(--border);background:#fff;color:var(--text-900);}
  .btn-outline:hover{border-color:var(--text-400);}
  .btn-green{background:var(--green-700);color:#fff;}
  .btn-green:hover{background:var(--green-900);}
  .btn-sm{padding:9px 18px;font-size:14.5px;}

  /* ---------- Mobile hamburger + slide-out drawer ---------- */
  .hamburger-btn{
    display:none;width:40px;height:40px;border-radius:9px;border:1px solid var(--border);
    background:#fff;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;
    flex-direction:column;gap:4px;padding:0;
  }
  .hamburger-btn span{display:block;width:18px;height:2px;background:var(--text-900);border-radius:2px;transition:transform .25s ease,opacity .25s ease;}

  .nav-overlay{
    position:fixed;inset:0;background:rgba(15,30,22,.45);z-index:90;
    opacity:0;pointer-events:none;transition:opacity .25s ease;
  }
  .nav-overlay.open{opacity:1;pointer-events:auto;}

  .nav-drawer{
    position:fixed;top:0;right:0;height:100%;width:300px;max-width:84vw;background:#fff;
    z-index:100;box-shadow:-12px 0 32px rgba(0,0,0,.12);
    transform:translateX(100%);transition:transform .3s ease;
    display:flex;flex-direction:column;overflow-y:auto;
  }
  .nav-drawer.open{transform:translateX(0);}
  .nav-drawer-head{
    display:flex;align-items:center;justify-content:space-between;padding:20px 22px;
    border-bottom:1px solid var(--border);
  }
  .nav-drawer-close{
    width:36px;height:36px;border-radius:50%;background:#f1f0ec;border:none;
    display:flex;align-items:center;justify-content:center;font-size:16px;color:var(--text-600);cursor:pointer;
  }
  .nav-drawer-close:hover{background:#e7e6e2;}
  .nav-drawer-links{display:flex;flex-direction:column;padding:10px 12px;}
  .nav-drawer-links ul,
  .nav-drawer-links .nav-menu{
    display:flex;flex-direction:column;list-style:none;margin:0;padding:0;width:100%;
  }
  .nav-drawer-links li{list-style:none;margin:0;padding:0;}
  .nav-drawer-links a{
    display:block;
    padding:15px 14px;border-radius:9px;font-size:16px;font-weight:600;color:var(--text-900);
  }
  .nav-drawer-links a:hover{background:#f6f5f1;}
  .nav-drawer-links a.active,
  .nav-drawer-links .current-menu-item > a{color:var(--green-700);background:#eaf3ee;}
  .nav-drawer-foot{
    margin-top:auto;padding:18px 22px 26px;border-top:1px solid var(--border);
    display:flex;flex-direction:column;gap:10px;
  }
  .nav-drawer-foot .btn{width:100%;justify-content:center;}
  body.drawer-open{overflow:hidden;}

  /* ---------- Hero ---------- */
  .hero{
    position:relative;
    padding:80px 0 100px;
    overflow:hidden;
  }
  .hero-grid{
    display:grid;grid-template-columns:1fr 1fr;gap:70px;align-items:center;
  }
  .eyebrow{font-size:15px;font-weight:600;color:var(--green-700);margin-bottom:18px;}
  .hero h1{
    font-size:60px;line-height:1.1;font-weight:800;margin:0 0 24px;
    letter-spacing:-0.5px;
  }
  .hero h1 .accent{color:var(--green-600);}
  .hero p{font-size:19px;color:var(--text-600);margin:0 0 32px;max-width:520px;line-height:1.6;}
  .hero-ctas{display:flex;gap:14px;margin-bottom:26px;}
  .hero-flags{display:flex;gap:26px;font-size:14.5px;color:var(--text-600);margin-bottom:36px;}
  .hero-flags span{display:flex;align-items:center;gap:6px;}
  .trust{display:flex;align-items:center;gap:16px;}
  .trust-label{font-size:14px;color:var(--text-400);}
  .avatars{display:flex;}
  .avatars span{
    width:36px;height:36px;border-radius:50%;border:2px solid #fff;
    background:linear-gradient(135deg,#d9c2a3,#a98467);margin-left:-10px;
    display:inline-block;
  }
  .avatars span:first-child{margin-left:0;}
  .stars{color:var(--orange);font-size:15px;margin-top:5px;}
  .stars span{color:var(--text-600);font-weight:600;margin-left:5px;}

  /* hero card */
  .hero-art{position:relative;}
  .badge-new{
    position:absolute;top:-40px;right:10px;
    background:#eef3ea;color:var(--green-700);
    font-size:13px;font-weight:600;padding:7px 17px;border-radius:24px;
  }
  .summary-card{
    background:#fff;border:1px solid var(--border);border-radius:var(--radius-lg);
    box-shadow:0 24px 60px -24px rgba(20,60,40,.18);
    padding:32px;
  }
  .summary-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px;}
  .summary-head h4{margin:0;font-size:18px;font-weight:700;}
  .summary-head .date{font-size:13.5px;color:var(--text-400);display:block;margin-top:3px;}
  .export{font-size:13.5px;color:var(--text-600);display:flex;align-items:center;gap:6px;border:1px solid var(--border);padding:8px 15px;border-radius:9px;}
  .donut-row{display:flex;align-items:center;gap:30px;margin-bottom:22px;}
  .donut{position:relative;width:148px;height:148px;flex-shrink:0;}
  .donut svg{transform:rotate(-90deg);}
  .donut-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;}
  .donut-center .num{font-size:27px;font-weight:800;}
  .donut-center .lbl{font-size:12px;color:var(--text-400);}
  .macro-bars{flex:1;display:flex;flex-direction:column;gap:15px;}
  .macro-row{display:flex;align-items:center;gap:12px;font-size:14px;}
  .macro-row .name{width:56px;color:var(--text-600);}
  .macro-track{flex:1;height:7px;border-radius:4px;background:#f1f0ec;overflow:hidden;}
  .macro-track i{display:block;height:100%;border-radius:4px;}
  .macro-row .val{width:72px;text-align:right;color:var(--text-900);font-weight:600;}
  .mini-stats{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;margin-bottom:20px;}
  .mini-stat{
    border:1px solid var(--border);border-radius:var(--radius-sm);
    padding:13px 14px;display:flex;align-items:center;gap:10px;
  }
  .mini-stat .ic{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0;}
  .mini-stat .num{font-size:15px;font-weight:700;display:block;}
  .mini-stat .lbl{font-size:11.5px;color:var(--text-400);}
  .view-report{font-size:14.5px;font-weight:600;color:var(--green-700);}

  .hero-deco-nuts{
    position:absolute;top:75px;right:-50px;width:110px;height:110px;border-radius:50%;
    background:radial-gradient(circle at 35% 30%, #fff, #f4ece0);
    display:flex;align-items:center;justify-content:center;font-size:36px;
    box-shadow:0 12px 36px rgba(0,0,0,.08);
  }

  /* ---------- Hero affiliate strip (blended below summary card) ---------- */
  .hero-affiliate-strip{
    display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--border);
    border-radius:var(--radius-md);padding:14px 16px;margin-top:14px;
    box-shadow:0 8px 24px -12px rgba(20,60,40,.12);
  }
  .hero-affiliate-strip .sponsor-tag{position:absolute;top:8px;right:10px;font-size:8.5px;padding:2px 6px;}
  .hero-affiliate-strip{position:relative;}
  .hero-affiliate-icon{
    width:38px;height:38px;border-radius:10px;background:#f1f0ec;flex-shrink:0;
    display:flex;align-items:center;justify-content:center;font-size:17px;
  }
  .hero-affiliate-body{flex:1;min-width:0;}
  .hero-affiliate-body .lbl-top{font-size:9.5px;font-weight:700;color:var(--orange);text-transform:uppercase;letter-spacing:.03em;margin-bottom:2px;}
  .hero-affiliate-body h6{font-size:13px;font-weight:700;margin:0;color:var(--text-900);}
  .hero-affiliate-body .sub{font-size:11px;color:var(--text-400);}
  .hero-affiliate-strip .btn{flex-shrink:0;padding:8px 14px;font-size:12px;}

  /* ---------- How it works ---------- */
  .section{padding:90px 0;}
  .section-head{text-align:center;margin-bottom:54px;}
  .section-head h2{font-size:38px;font-weight:800;margin:0 0 10px;}
  .section-head h2 .accent{color:var(--green-600);}
  .section-head p{color:var(--text-600);font-size:17px;margin:0;}

  .steps{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;gap:24px;align-items:center;}
  .step-card{
    border:1px solid var(--border);border-radius:var(--radius-md);
    padding:32px 28px;background:#fff;
  }
  .step-top{display:flex;align-items:center;gap:13px;margin-bottom:24px;}
  .step-num{font-size:14px;font-weight:700;color:var(--text-400);}
  .step-ic{width:44px;height:44px;border-radius:12px;background:#eef3ea;display:flex;align-items:center;justify-content:center;font-size:20px;}
  .step-card h3{font-size:19px;font-weight:700;margin:0 0 8px;}
  .step-card p{font-size:15px;color:var(--text-600);margin:0;line-height:1.55;}
  .step-arrow{color:var(--text-400);font-size:26px;text-align:center;}

  /* ---------- Goals (dark green) panel ---------- */
  .panel-dark{
    background:var(--green-900);
    border-radius:32px;
    padding:68px;
    display:grid;grid-template-columns:1fr 1fr;gap:64px;align-items:center;
    color:#fff;
  }
  .panel-dark h2{font-size:34px;font-weight:800;margin:0 0 28px;line-height:1.25;}
  .panel-dark h2 .accent{color:#7fe0a5;}
  .feat-list{display:flex;flex-direction:column;gap:20px;margin-bottom:32px;}
  .feat-item{display:flex;gap:14px;align-items:flex-start;}
  .feat-check{
    width:24px;height:24px;border-radius:50%;background:rgba(255,255,255,.12);
    display:flex;align-items:center;justify-content:center;font-size:13px;flex-shrink:0;margin-top:1px;color:#7fe0a5;
  }
  .feat-item h4{margin:0 0 3px;font-size:17px;font-weight:700;}
  .feat-item p{margin:0;font-size:14.5px;color:rgba(255,255,255,.65);line-height:1.5;}
  .btn-light{background:#fff;color:var(--green-900);}
  .btn-light:hover{background:#eef3ea;}

  .nutrient-card{
    background:#fff;color:var(--text-900);border-radius:var(--radius-md);
    padding:26px;
  }
  .tab-row{display:flex;gap:8px;margin-bottom:22px;}
  .tab{font-size:14px;font-weight:600;padding:8px 18px;border-radius:9px;color:var(--text-600);}
  .tab.active{background:var(--green-700);color:#fff;}
  .nutrient-card h5{font-size:16px;font-weight:700;margin:0 0 18px;}
  .nc-row{display:flex;align-items:center;gap:24px;margin-bottom:22px;}
  .nc-donut{width:100px;height:100px;flex-shrink:0;position:relative;}
  .nc-donut svg{transform:rotate(-90deg);}
  .nc-donut-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;}
  .nc-donut-center .num{font-size:18px;font-weight:800;}
  .nc-donut-center .lbl{font-size:10px;color:var(--text-400);}
  .nc-legend{flex:1;display:flex;flex-direction:column;gap:11px;font-size:15px;}
  .nc-legend .row{display:flex;justify-content:space-between;}
  .nc-legend .left{display:flex;align-items:center;gap:9px;color:var(--text-600);}
  .dot{width:10px;height:10px;border-radius:50%;display:inline-block;}
  .nc-legend .pct{font-weight:700;}
  hr.divider{border:none;border-top:1px solid var(--border);margin:20px 0;}
  .sources-row{display:flex;justify-content:space-between;align-items:center;font-size:15px;margin-bottom:13px;}
  .sources-row .left{display:flex;align-items:center;gap:12px;color:var(--text-900);}
  .src-ic{width:32px;height:32px;border-radius:9px;background:#f1f0ec;display:flex;align-items:center;justify-content:center;font-size:16px;}
  .sources-row .cal{color:var(--text-400);}
  .view-all-link{font-size:14px;font-weight:600;color:var(--green-700);margin-top:10px;display:inline-block;}

  /* ---------- Promo banner ---------- */
  .promo{
    background:#fdf3e3;border:1px solid #f6e3bd;border-radius:var(--radius-md);
    padding:28px 36px;display:flex;align-items:center;justify-content:space-between;
    margin:0;
  }
  .promo-left{display:flex;align-items:center;gap:18px;}
  .promo-ic{font-size:28px;}
  .promo h4{margin:0 0 3px;font-size:18px;font-weight:700;}
  .promo p{margin:0;font-size:15px;color:var(--text-600);}

  /* ---------- Goals grid ---------- */
  .goals-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:18px;}
  .goal-card{
    border:1px solid var(--border);border-radius:var(--radius-md);
    padding:28px 18px;text-align:center;
  }
  .goal-ic{
    width:52px;height:52px;border-radius:50%;margin:0 auto 16px;
    display:flex;align-items:center;justify-content:center;font-size:22px;
  }
  .goal-card h4{font-size:16px;font-weight:700;margin:0 0 8px;}
  .goal-card p{font-size:13.5px;color:var(--text-600);margin:0;line-height:1.45;}

  /* ---------- Explore tabs / articles ---------- */
  .explore-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:8px;}
  .explore-head h2{font-size:34px;font-weight:800;margin:0;}
  .explore-head h2 .accent{color:var(--green-600);}
  .view-all{font-size:15px;font-weight:600;color:var(--green-700);}
  .pills{display:flex;gap:13px;margin:26px 0 30px;flex-wrap:wrap;}
  .pill{display:inline-block;font-size:14.5px;font-weight:600;padding:10px 20px;border-radius:24px;color:var(--text-600);border:1px solid var(--border);text-decoration:none;cursor:pointer;transition:border-color .15s,color .15s,background .15s;}
  .pill:hover{border-color:var(--green-700);color:var(--green-700);}
  .pill.active{background:var(--green-700);color:#fff;border-color:var(--green-700);}
  .pill.active:hover{color:#fff;}
  .articles-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:24px;}

  /* Recipe archive (/recipe/) reuses .articles-grid but needs 3 columns on
     desktop instead of the default 4 — recipe cards carry extra meta
     (prep/cook time, servings) and feel cramped at 4-up. The narrower
     breakpoints below still target plain .articles-grid, so they
     continue to apply and correctly bring this down to 2 columns on
     tablet/mobile (equal specificity + later source order wins). */
  .recipe-articles-grid{grid-template-columns:repeat(3,1fr);}
  .article-card{border-radius:var(--radius-md);overflow:hidden;border:1px solid var(--border);}
  .article-img{height:170px;background-size:cover;background-position:center;}
  .article-body{padding:18px;}
  .article-tag{font-size:12px;font-weight:700;color:var(--green-600);text-transform:uppercase;letter-spacing:.03em;}
  .article-body h5{font-size:16.5px;font-weight:700;margin:8px 0 10px;line-height:1.4;}
  .article-body .read{font-size:13px;color:var(--text-400);}

  /* ---------- Lower 3-col: recent foods / calculator / did you know ---------- */
  .lower-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:24px;}
  .card-box{border:1px solid var(--border);border-radius:var(--radius-md);padding:26px;}
  .card-box-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;}
  .card-box-head h4{font-size:17px;font-weight:700;margin:0;}
  .food-row{display:flex;justify-content:space-between;align-items:center;padding:13px 0;border-bottom:1px solid var(--border);}
  .food-row:last-of-type{border-bottom:none;}
  .food-left{display:flex;align-items:center;gap:13px;font-size:15px;}
  .food-ic{width:56px;height:56px;border-radius:12px;background:#f1f0ec;display:flex;align-items:center;justify-content:center;font-size:24px;flex-shrink:0;}
  .food-name{font-weight:600;display:block;}
  .food-sub{font-size:13px;color:var(--text-400);}
  .food-cal{font-size:15px;color:var(--text-600);font-weight:600;}

  .search-box{
    display:flex;align-items:center;gap:10px;border:1px solid var(--border);
    border-radius:9px;padding:12px 15px;font-size:15px;color:var(--text-400);margin-bottom:18px;
  }
  .qc-row{display:flex;justify-content:space-between;align-items:center;font-size:15px;padding:12px 0;border-bottom:1px solid var(--border);}
  .qc-left{display:flex;align-items:center;gap:10px;}
  .qc-amt{color:var(--text-400);}

  .dyk{background:var(--green-900);border-radius:var(--radius-md);color:#fff;padding:26px;position:relative;overflow:hidden;min-height:280px;display:flex;flex-direction:column;justify-content:space-between;}
  .dyk h4{font-size:17px;font-weight:700;margin:0 0 10px;}
  .dyk p{font-size:15px;color:rgba(255,255,255,.75);margin:0;line-height:1.55;max-width:75%;}
  .dyk-img{position:absolute;right:-26px;bottom:-26px;width:172px;height:172px;border-radius:50%;background:radial-gradient(circle at 40% 35%,#7a5640,#3a2415);opacity:.9;}

  /* ---------- More ways to track ---------- */
  .more-box{border:1px solid var(--border);border-radius:var(--radius-lg);padding:48px;text-align:center;}
  .more-box h3{font-size:25px;font-weight:800;margin:0 0 8px;}
  .more-box p{font-size:16px;color:var(--text-600);margin:0 0 38px;}
  .more-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:24px;text-align:left;}
  .more-item{display:flex;gap:14px;align-items:flex-start;}
  .more-ic{width:46px;height:46px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:19px;flex-shrink:0;}
  .more-item h5{font-size:15.5px;font-weight:700;margin:0 0 4px;}
  .more-item p{font-size:13.5px;color:var(--text-600);margin:0;line-height:1.45;}

  /* ---------- Newsletter ---------- */
  .newsletter{
    background:#f3f6f1;border-radius:var(--radius-lg);
    padding:46px 52px;display:flex;justify-content:space-between;align-items:center;gap:38px;
  }
  .newsletter h4{font-size:21px;font-weight:800;margin:0 0 8px;}
  .newsletter p{font-size:15px;color:var(--text-600);margin:0;}
  .nl-form{display:flex;gap:12px;flex-shrink:0;}
  .nl-form input{
    width:280px;padding:13px 18px;border-radius:9px;border:1px solid var(--border);font-size:15px;
  }
  .nl-img{width:72px;height:72px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff,#dceedd);flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:28px;}

  /* ---------- FAQ + Database ---------- */
  .faq-db-grid{display:grid;grid-template-columns:1.1fr 1fr;gap:30px;}
  .faq-tabs{display:flex;gap:28px;font-size:15px;font-weight:600;color:var(--text-400);margin:18px 0 20px;border-bottom:1px solid var(--border);}
  .faq-tabs span{padding-bottom:12px;}
  .faq-tabs span.active{color:var(--green-700);border-bottom:2px solid var(--green-700);}
  .faq-item{display:flex;justify-content:space-between;align-items:center;padding:18px 0;border-bottom:1px solid var(--border);font-size:16px;font-weight:600;}
  .faq-item span.plus{color:var(--text-400);font-weight:400;font-size:19px;}
  .db-search{margin:18px 0;}
  .cat-pills{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:22px;}
  .cat-pill{font-size:13.5px;font-weight:600;padding:8px 15px;border-radius:18px;border:1px solid var(--border);color:var(--text-600);}
  .pop-search-label{font-size:14px;color:var(--text-400);margin-bottom:10px;}
  .pop-pills{display:flex;gap:10px;flex-wrap:wrap;}
  .pop-pill{font-size:13.5px;font-weight:600;padding:8px 15px;border-radius:18px;background:#f1f0ec;color:var(--text-900);}
  .pop-pill.green{background:#eef3ea;color:var(--green-700);}

  /* ---------- Bottom CTA ---------- */
  .bottom-cta{
    background:var(--green-900);border-radius:28px;padding:58px 64px;
    display:flex;justify-content:space-between;align-items:center;gap:50px;color:#fff;position:relative;overflow:hidden;
  }
  .bottom-cta h3{font-size:29px;font-weight:800;margin:0 0 16px;}
  .cta-flags{display:flex;gap:24px;font-size:14.5px;color:rgba(255,255,255,.8);margin-bottom:0;}
  .cta-flags span{display:flex;align-items:center;gap:7px;}
  .cta-right{flex-shrink:0;text-align:right;}
  .cta-form{display:flex;gap:12px;margin-bottom:14px;}
  .cta-form input{width:270px;padding:13px 18px;border-radius:9px;border:none;font-size:15px;}
  .cta-sub{font-size:14px;color:rgba(255,255,255,.7);display:flex;align-items:center;gap:9px;justify-content:flex-end;}

  /* ---------- Footer ---------- */
  footer{padding:76px 0 38px;}
  .footer-grid{display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr 1fr;gap:38px;margin-bottom:50px;}
  .footer-logo{display:flex;align-items:center;gap:10px;font-weight:700;font-size:19px;margin-bottom:14px;}
  .footer-logo .custom-logo{height:50px;width:auto;max-width:200px;object-fit:contain;display:block;}
  .footer-grid p{font-size:14.5px;color:var(--text-600);line-height:1.65;max-width:260px;}
  .footer-grid h5{font-size:15.5px;font-weight:700;margin:0 0 18px;}
  .footer-grid ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:13px;font-size:14.5px;color:var(--text-600);}
  .footer-social{display:flex;gap:12px;margin-top:20px;}
  .footer-social span{width:34px;height:34px;border-radius:50%;background:#f1f0ec;display:flex;align-items:center;justify-content:center;font-size:14px;}
  .footer-bottom{
    display:flex;justify-content:space-between;align-items:center;
    border-top:1px solid var(--border);padding-top:26px;font-size:14px;color:var(--text-400);
  }

  @media (max-width:980px){
    .hero-grid,.panel-dark,.faq-db-grid{grid-template-columns:1fr;}
    .steps{grid-template-columns:1fr;}
    .step-arrow{display:none;}
    .goals-grid,.articles-grid,.lower-grid,.more-grid,.footer-grid{grid-template-columns:repeat(2,1fr);}
  }

  @media (max-width:1024px){
    .nav-links{display:none;}
    .nav-right .ncv2-login-btn{display:none;}
    .hamburger-btn{display:flex;}
  }

/* =========================================================
   SHARED — added for Food Database / Goals / Blog / Auth / Analyzer
   ========================================================= */

/* ---------- Page header (non-hero pages) ---------- */
.page-head{padding:56px 0 40px;border-bottom:1px solid var(--border);}
.page-head .eyebrow{margin-bottom:14px;}
.page-head h1{font-size:42px;font-weight:800;margin:0 0 14px;letter-spacing:-0.5px;line-height:1.15;}
.page-head h1 .accent{color:var(--green-600);}
.page-head p{font-size:17px;color:var(--text-600);margin:0;max-width:620px;line-height:1.6;}
.page-shell{padding:50px 0 90px;}

/* ---------- Breadcrumb ---------- */
.crumb{font-size:13.5px;color:var(--text-400);margin-bottom:18px;}
.crumb a{color:var(--text-600);}
.crumb a:hover{color:var(--green-700);}

/* ---------- Generic layout helpers ---------- */
.two-col{display:grid;grid-template-columns:280px 1fr;gap:36px;align-items:start;}
.sidebar-card{border:1px solid var(--border);border-radius:var(--radius-md);padding:24px;}
.sidebar-card h5{font-size:14px;font-weight:700;margin:0 0 16px;}
.sidebar-group{margin-bottom:24px;}
.sidebar-group:last-child{margin-bottom:0;}
.sidebar-group h6{font-size:12px;font-weight:700;color:var(--text-400);text-transform:uppercase;letter-spacing:.04em;margin:0 0 12px;}
.check-row{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--text-600);padding:7px 0;cursor:pointer;}
.check-row input{width:16px;height:16px;accent-color:var(--green-700);}
.range-row{display:flex;justify-content:space-between;font-size:13px;color:var(--text-400);margin-top:8px;}

/* ---------- Food Database ---------- */
.db-toolbar{display:flex;gap:12px;margin-bottom:24px;}
.db-toolbar .search-box{flex:1;margin-bottom:0;padding:13px 16px;font-size:15px;}
.sort-select{border:1px solid var(--border);border-radius:9px;padding:13px 16px;font-size:14px;color:var(--text-600);background:#fff;font-weight:600;}
.results-count{font-size:13.5px;color:var(--text-400);margin-bottom:18px;}
.food-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;}
.food-card{border:1px solid var(--border);border-radius:var(--radius-md);padding:18px;display:flex;gap:14px;align-items:center;}
.food-card:hover{border-color:var(--green-600);}
.food-card-ic{width:72px;height:72px;border-radius:14px;background:#f1f0ec;display:flex;align-items:center;justify-content:center;font-size:32px;flex-shrink:0;}
.food-card-body{flex:1;min-width:0;}
.food-card-body h4{font-size:14.5px;font-weight:700;margin:0 0 4px;}
.food-card-body .sub{font-size:12px;color:var(--text-400);margin-bottom:6px;}
.macro-tags{display:flex;gap:6px;flex-wrap:wrap;}
.macro-tag{font-size:10.5px;font-weight:600;padding:3px 8px;border-radius:6px;background:#f6f5f1;color:var(--text-600);}
.pagination{display:flex;justify-content:center;gap:8px;margin-top:36px;}
.page-btn{width:38px;height:38px;border-radius:9px;border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:13.5px;font-weight:600;color:var(--text-600);}
.page-btn.active{background:var(--green-700);color:#fff;border-color:var(--green-700);}

/* ---------- Goals page ---------- */
.goal-setup-grid{display:grid;grid-template-columns:1fr 380px;gap:32px;align-items:start;}
.form-card{border:1px solid var(--border);border-radius:var(--radius-md);padding:32px;}
.form-card h3{font-size:18px;font-weight:700;margin:0 0 6px;}
.form-card .hint{font-size:13px;color:var(--text-400);margin:0 0 24px;}
.form-row{margin-bottom:20px;}
.form-row label{display:block;font-size:13.5px;font-weight:600;margin-bottom:8px;color:var(--text-900);}
.form-row input[type=text],.form-row input[type=email],.form-row input[type=number],.form-row select{
  width:100%;padding:12px 14px;border:1px solid var(--border);border-radius:9px;font-size:14.5px;color:var(--text-900);background:#fff;box-sizing:border-box;
}
.form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.toggle-row{display:flex;gap:10px;}
.toggle-opt{flex:1;text-align:center;padding:12px;border:1px solid var(--border);border-radius:9px;font-size:13.5px;font-weight:600;color:var(--text-600);cursor:pointer;}
.toggle-opt.active{background:var(--green-700);color:#fff;border-color:var(--green-700);}
.goal-pref-card{border:1px solid var(--border);border-radius:var(--radius-md);padding:24px;margin-bottom:18px;}
.goal-pref-card h5{font-size:14px;font-weight:700;margin:0 0 14px;}
.target-row{display:flex;justify-content:space-between;align-items:center;font-size:13.5px;padding:9px 0;border-bottom:1px solid var(--border);}
.target-row:last-child{border-bottom:none;}
.target-row .name{display:flex;align-items:center;gap:9px;color:var(--text-600);}
.target-row .val{font-weight:700;color:var(--text-900);}
.summary-ring-card{background:var(--green-900);border-radius:var(--radius-md);color:#fff;padding:28px;text-align:center;}
.summary-ring-card h5{font-size:14px;font-weight:700;margin:0 0 18px;color:rgba(255,255,255,.85);}
.ring-big{width:140px;height:140px;margin:0 auto 16px;position:relative;}
.ring-big svg{transform:rotate(-90deg);}
.ring-big-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;}
.ring-big-center .num{font-size:26px;font-weight:800;}
.ring-big-center .lbl{font-size:11px;color:rgba(255,255,255,.6);}

/* ---------- Blog / Learn ---------- */
.blog-hero-feat{display:grid;grid-template-columns:1fr 1fr;gap:32px;border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;margin-bottom:40px;}
.blog-hero-feat .img{min-height:280px;}
.blog-hero-feat .body{padding:36px;display:flex;flex-direction:column;justify-content:center;}
.blog-hero-feat .article-tag{margin-bottom:10px;}
.blog-hero-feat h2{font-size:25px;font-weight:800;margin:0 0 12px;line-height:1.3;}
.blog-hero-feat p{font-size:14.5px;color:var(--text-600);margin:0 0 16px;line-height:1.6;}
.blog-meta{display:flex;gap:14px;font-size:12.5px;color:var(--text-400);align-items:center;}
.blog-meta .avatar-sm{width:22px;height:22px;border-radius:50%;background:linear-gradient(135deg,#d9c2a3,#a98467);display:inline-block;margin-right:6px;vertical-align:middle;}
.cat-filter-row{display:flex;gap:10px;margin-bottom:30px;flex-wrap:wrap;}
.blog-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px;}
.blog-card{border:1px solid var(--border);border-radius:var(--radius-md);overflow:hidden;}
.blog-card .img{height:170px;}
.blog-card .body{padding:18px;}
.blog-card h5{font-size:15.5px;font-weight:700;margin:8px 0 10px;line-height:1.4;}

/* ---------- Auth pages ---------- */
.auth-shell{min-height:calc(100vh - 73px);display:grid;grid-template-columns:1fr 1fr;}
.auth-form-side{display:flex;align-items:center;justify-content:center;padding:60px 40px;}
.auth-form-box{width:100%;max-width:400px;}
.auth-form-box .logo{margin-bottom:30px;}
.auth-form-box h1{font-size:28px;font-weight:800;margin:0 0 8px;}
.auth-form-box .sub{font-size:14.5px;color:var(--text-600);margin:0 0 30px;}
.auth-form-box .form-row label{font-size:13.5px;}
.auth-divider{display:flex;align-items:center;gap:12px;margin:22px 0;font-size:12.5px;color:var(--text-400);}
.auth-divider::before,.auth-divider::after{content:"";flex:1;height:1px;background:var(--border);}
.social-btn{width:100%;display:flex;align-items:center;justify-content:center;gap:10px;border:1px solid var(--border);border-radius:9px;padding:12px;font-size:14px;font-weight:600;margin-bottom:10px;background:#fff;cursor:pointer;}
.auth-foot{text-align:center;font-size:13.5px;color:var(--text-600);margin-top:24px;}
.auth-foot a{color:var(--green-700);font-weight:600;}
.auth-visual-side{
  background:var(--green-900);position:relative;overflow:hidden;
  display:flex;align-items:center;justify-content:center;padding:60px;color:#fff;
}
.auth-visual-side .visual-card{position:relative;z-index:2;text-align:center;max-width:380px;}
.auth-visual-side h2{font-size:24px;font-weight:800;margin:0 0 14px;line-height:1.35;}
.auth-visual-side p{font-size:14.5px;color:rgba(255,255,255,.7);line-height:1.6;margin:0;}
.auth-blob{position:absolute;border-radius:50%;opacity:.5;}
.checkbox-row{display:flex;align-items:center;gap:9px;font-size:13.5px;color:var(--text-600);}
.checkbox-row input{width:16px;height:16px;accent-color:var(--green-700);}
.row-between{display:flex;justify-content:space-between;align-items:center;}
.forgot-link{font-size:13px;font-weight:600;color:var(--green-700);}

/* ---------- AI Analyzer ---------- */
.analyzer-shell{display:grid;grid-template-columns:1fr 1fr;gap:36px;align-items:start;}
.analyzer-input-card{border:1px solid var(--border);border-radius:var(--radius-lg);padding:32px;}
.mode-tabs{display:flex;gap:8px;margin-bottom:24px;border:1px solid var(--border);border-radius:11px;padding:5px;}
.mode-tab{flex:1;text-align:center;padding:11px;border-radius:8px;font-size:14px;font-weight:600;color:var(--text-600);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:7px;}
.mode-tab.active{background:var(--green-700);color:#fff;}
.analyzer-textarea{
  width:100%;min-height:160px;border:1px solid var(--border);border-radius:11px;padding:16px;
  font-size:14.5px;font-family:inherit;color:var(--text-900);resize:vertical;line-height:1.6;
}
.analyzer-textarea::placeholder{color:var(--text-400);}
.upload-zone{
  border:2px dashed var(--border);border-radius:11px;padding:48px 24px;text-align:center;
  display:flex;flex-direction:column;align-items:center;gap:10px;
}
.upload-zone .ic{font-size:32px;}
.upload-zone h5{font-size:14.5px;font-weight:700;margin:0;}
.upload-zone p{font-size:12.5px;color:var(--text-400);margin:0;}
.example-chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px;}
.example-chip{font-size:12.5px;font-weight:600;padding:7px 14px;border-radius:16px;background:#f6f5f1;color:var(--text-600);cursor:pointer;}
.example-chip:hover{background:#eef3ea;color:var(--green-700);}
.analyze-btn{width:100%;margin-top:20px;justify-content:center;padding:15px;font-size:15.5px;}
.analyzer-disclaimer{font-size:11.5px;color:var(--text-400);text-align:center;margin-top:14px;line-height:1.5;}

/* ---------- Camera capture ---------- */
.camera-zone{
  position:relative;width:100%;min-height:340px;border-radius:11px;overflow:hidden;
  background:#0f1410;display:flex;align-items:center;justify-content:center;
}
.camera-zone video, .camera-zone img#camera-captured-img{
  width:100%;height:340px;object-fit:cover;display:block;
}
.camera-placeholder{
  display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;color:#fff;
  padding:24px;max-width:280px;
}
.camera-placeholder .ic{font-size:34px;}
.camera-placeholder h5{font-size:15px;font-weight:700;margin:0;color:#fff;}
.camera-placeholder p{font-size:12.5px;color:rgba(255,255,255,.65);margin:0;line-height:1.5;}
.camera-controls{
  position:absolute;bottom:0;left:0;right:0;padding:20px 0;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(transparent,rgba(0,0,0,.45));
}
.camera-shutter{
  width:62px;height:62px;border-radius:50%;background:#fff;border:4px solid rgba(255,255,255,.4);
  cursor:pointer;box-shadow:0 2px 10px rgba(0,0,0,.3);
}
.camera-shutter:hover{background:#f1f0ec;}
.camera-shutter:active{transform:scale(.94);}
.camera-retake-bar{
  position:absolute;bottom:16px;left:0;right:0;display:flex;justify-content:center;
}
.camera-retake-bar .btn{background:rgba(255,255,255,.95);}

.result-card{border:1px solid var(--border);border-radius:var(--radius-lg);padding:32px;}
.result-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:22px;}
.result-head h3{font-size:17px;font-weight:700;margin:0 0 4px;}
.result-head .meta{font-size:12.5px;color:var(--text-400);}
.confidence-badge{font-size:11.5px;font-weight:700;padding:5px 12px;border-radius:14px;background:#eaf3ee;color:var(--green-700);display:flex;align-items:center;gap:5px;}
.result-summary-row{display:flex;align-items:center;gap:24px;padding:20px;background:#f9f8f5;border-radius:var(--radius-md);margin-bottom:22px;}
.result-cal{font-size:30px;font-weight:800;}
.result-cal-lbl{font-size:12px;color:var(--text-400);}
.result-macro-mini{display:flex;flex-direction:column;gap:8px;flex:1;}
.nutrient-table{width:100%;border-collapse:collapse;font-size:13.5px;}
.nutrient-table th{text-align:left;font-size:11.5px;color:var(--text-400);font-weight:600;text-transform:uppercase;letter-spacing:.03em;padding:0 0 10px;border-bottom:1px solid var(--border);}
.nutrient-table td{padding:11px 0;border-bottom:1px solid var(--border);}
.nutrient-table tr:last-child td{border-bottom:none;}
.nutrient-table .nname{font-weight:600;color:var(--text-900);}
.nutrient-table .ndv{color:var(--text-400);font-size:12px;}
.ai-note{
  display:flex;gap:12px;background:#fdf3e3;border:1px solid #f6e3bd;border-radius:var(--radius-sm);
  padding:14px 16px;font-size:12.5px;color:var(--text-600);margin-top:18px;line-height:1.55;
}
.result-actions{display:flex;gap:10px;margin-top:20px;}
.result-actions .btn{flex:1;justify-content:center;}
.empty-result{
  display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;
  min-height:420px;color:var(--text-400);gap:14px;
}
.empty-result .ic{font-size:40px;opacity:.5;}
.empty-result h4{font-size:15px;color:var(--text-600);margin:0;font-weight:700;}
.empty-result p{font-size:13px;margin:0;max-width:260px;line-height:1.6;}

@media (max-width:980px){
  .two-col,.goal-setup-grid,.analyzer-shell,.auth-shell,.blog-hero-feat{grid-template-columns:1fr;}
  .food-grid,.blog-grid{grid-template-columns:repeat(2,1fr);}
  .auth-visual-side{display:none;}
}

/* =========================================================
   ROUND 2 — Article, Recipe, Legal, About, Contact, Analyzer animation
   ========================================================= */

/* ---------- Article (standard blog post) ---------- */
.article-shell{max-width:760px;margin:0 auto;}
.article-head{text-align:center;margin-bottom:32px;}
.article-head .article-tag{display:inline-block;margin-bottom:14px;}
.article-head h1{font-size:38px;font-weight:800;line-height:1.2;margin:0 0 18px;letter-spacing:-.5px;}
.article-head .blog-meta{justify-content:center;font-size:13.5px;}
.article-hero-img{
  width:100%;height:380px;border-radius:var(--radius-lg);margin:32px 0 40px;
  background-size:cover;background-position:center;
}
.article-body{font-size:17px;line-height:1.8;color:var(--text-900);}
.article-body p{margin:0 0 24px;}
.article-body h2{font-size:26px;font-weight:800;margin:40px 0 16px;letter-spacing:-.3px;}
.article-body h3{font-size:20px;font-weight:700;margin:32px 0 12px;}
.article-body ul,.article-body ol{margin:0 0 24px;padding-left:24px;}
.article-body li{margin-bottom:10px;line-height:1.7;}
.article-body strong{font-weight:700;}
.article-body blockquote{
  border-left:3px solid var(--green-600);padding:4px 0 4px 22px;margin:28px 0;
  font-size:18px;color:var(--text-600);font-style:italic;line-height:1.6;
}
.callout-box{
  background:#eef3ea;border-radius:var(--radius-md);padding:22px 26px;margin:28px 0;
  font-size:15px;color:var(--text-900);line-height:1.65;
}
.callout-box strong{color:var(--green-700);}

/* ---------- Nutrition Facts table (FDA-label style) ----------
   Targets any plain <table> generated inside an article body — this
   is exactly the markup the Food Publisher plugin's nutrition tables
   already use (Nutrient | Amount | % Daily Value columns), so no
   content/markup change is needed, only this visual treatment. */
.article-body table{
  width:100%;
  max-width:480px;
  border-collapse:collapse;
  margin:24px 0 8px;
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  font-size:15px;
  background:#fff;
  border:1px solid var(--text-900);
}
.article-body table thead tr{
  border-bottom:8px solid var(--text-900);
}
.article-body table th{
  text-align:left;
  font-size:11px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--text-400);
  padding:6px 10px 10px;
}
.article-body table th:last-child,
.article-body table td:last-child{
  text-align:right;
}
.article-body table tbody tr{
  border-bottom:1px solid var(--border);
}
.article-body table tbody tr:first-child{
  border-top:4px solid var(--text-900);
}
.article-body table tbody tr:first-child td{
  font-size:22px;
  font-weight:800;
  padding-top:10px;
  padding-bottom:10px;
}
.article-body table td{
  padding:7px 10px;
  font-size:14.5px;
}
.article-body table td:first-child{
  font-weight:600;
}
.article-body table tbody tr:not(:first-child) td:last-child{
  font-weight:700;
}
.article-body table tbody tr:last-child{
  border-bottom:4px solid var(--text-900);
}
/* Footnote line immediately after the table (the
   "*Percent Daily Values..." paragraph) — de-emphasize it so the
   table itself stays the visual focus, matching the small print at
   the bottom of a real nutrition label. */
.article-body table + p em,
.article-body table + p{
  display:block;
  font-size:12px;
  color:var(--text-400);
  margin-top:6px;
  margin-bottom:24px;
}

@media (max-width:600px){
  .article-body table{font-size:13.5px;}
  .article-body table tbody tr:first-child td{font-size:19px;}
}
.inline-stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:28px 0;}
.inline-stat{border:1px solid var(--border);border-radius:var(--radius-sm);padding:18px;text-align:center;}
.inline-stat .num{font-size:24px;font-weight:800;color:var(--green-700);display:block;margin-bottom:4px;}
.inline-stat .lbl{font-size:12.5px;color:var(--text-600);}
.article-share{display:flex;gap:10px;justify-content:center;margin:40px 0;}
.share-btn{width:40px;height:40px;border-radius:50%;border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:15px;color:var(--text-600);}
.author-box{
  display:flex;gap:16px;align-items:center;border:1px solid var(--border);border-radius:var(--radius-md);
  padding:22px;margin:40px 0;
}
.author-avatar{width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg,#d9c2a3,#a98467);flex-shrink:0;}
.author-box h5{font-size:15px;font-weight:700;margin:0 0 4px;}
.author-box p{font-size:13.5px;color:var(--text-600);margin:0;line-height:1.5;}
.related-section{margin-top:60px;border-top:1px solid var(--border);padding-top:40px;}
.related-section h3{font-size:22px;font-weight:800;margin:0 0 24px;text-align:left;max-width:none;}

/* ---------- Recipe article variant ---------- */
.recipe-meta-bar{
  display:flex;justify-content:center;gap:36px;padding:24px 0;border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);margin:32px 0;
}
.recipe-meta-item{text-align:center;}
.recipe-meta-item .ic{font-size:20px;margin-bottom:6px;}
.recipe-meta-item .num{font-size:15px;font-weight:700;display:block;}
.recipe-meta-item .lbl{font-size:11.5px;color:var(--text-400);}
.recipe-nutrition-card{
  border:1px solid var(--border);border-radius:var(--radius-md);padding:24px;margin:32px 0;background:#f9f8f5;
}
.recipe-nutrition-card h4{font-size:15px;font-weight:700;margin:0 0 16px;}
.recipe-nutrition-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;}
.rn-item{text-align:center;}
.rn-item .num{font-size:18px;font-weight:800;display:block;}
.rn-item .lbl{font-size:11px;color:var(--text-400);}
.ingredients-list{list-style:none;padding:0;margin:0 0 28px;}
.ingredients-list li{
  display:flex;gap:12px;padding:10px 0;border-bottom:1px solid var(--border);font-size:15.5px;align-items:baseline;
}
.ingredients-list li:last-child{border-bottom:none;}
.ingredients-list .amt{font-weight:700;color:var(--text-900);min-width:80px;}
.steps-list{list-style:none;padding:0;margin:0 0 28px;counter-reset:step;}
.steps-list li{
  display:flex;gap:18px;padding:20px 0;border-bottom:1px solid var(--border);counter-increment:step;
}
.steps-list li:last-child{border-bottom:none;}
.steps-list li::before{
  content:counter(step);flex-shrink:0;width:32px;height:32px;border-radius:50%;background:var(--green-700);
  color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;
}
.steps-list .step-text{font-size:15.5px;line-height:1.7;padding-top:4px;}

/* ---------- Legal pages ---------- */
.legal-shell{max-width:760px;margin:0 auto;}
.legal-updated{font-size:13px;color:var(--text-400);margin-bottom:36px;}
.legal-toc{border:1px solid var(--border);border-radius:var(--radius-md);padding:24px 26px;margin-bottom:40px;}
.legal-toc h5{font-size:14px;font-weight:700;margin:0 0 14px;}
.legal-toc ol{margin:0;padding-left:20px;font-size:14px;color:var(--text-600);}
.legal-toc li{padding:5px 0;}
.legal-toc a{color:var(--text-600);}
.legal-toc a:hover{color:var(--green-700);}
.legal-body h2{font-size:21px;font-weight:800;margin:36px 0 14px;scroll-margin-top:100px;}
.legal-body p{font-size:15px;line-height:1.8;color:var(--text-600);margin:0 0 18px;}
.legal-body ul{margin:0 0 18px;padding-left:22px;font-size:15px;line-height:1.8;color:var(--text-600);}
.legal-body li{margin-bottom:8px;}
.legal-body strong{color:var(--text-900);}

/* ---------- Affiliate page ---------- */
.affiliate-hero{text-align:center;padding:60px 0 20px;}
.affiliate-hero h1{font-size:42px;}
.tier-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:40px 0;}
.tier-card{border:1px solid var(--border);border-radius:var(--radius-md);padding:30px;text-align:center;}
.tier-card.featured{border-color:var(--green-600);box-shadow:0 0 0 3px rgba(27,138,79,.12);position:relative;}
.tier-badge{position:absolute;top:-13px;left:50%;transform:translateX(-50%);background:var(--green-700);color:#fff;font-size:11px;font-weight:700;padding:5px 14px;border-radius:12px;}
.tier-card .rate{font-size:36px;font-weight:800;color:var(--green-700);margin:14px 0 4px;}
.tier-card .rate-lbl{font-size:12.5px;color:var(--text-400);margin-bottom:18px;}
.tier-card ul{list-style:none;padding:0;margin:0;text-align:left;font-size:13.5px;color:var(--text-600);}
.tier-card li{padding:8px 0;border-bottom:1px solid var(--border);display:flex;gap:8px;align-items:flex-start;}
.tier-card li:last-child{border-bottom:none;}
.step-mini-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:40px 0;}

/* ---------- Help Center / FAQ page ---------- */
.help-search-hero{
  background:var(--green-900);border-radius:28px;padding:60px;text-align:center;color:#fff;margin-bottom:50px;
}
.help-search-hero h1{font-size:32px;font-weight:800;margin:0 0 22px;color:#fff;}
.help-search-box{
  max-width:520px;margin:0 auto;background:#fff;border-radius:11px;display:flex;align-items:center;
  gap:10px;padding:14px 18px;
}
.help-search-box input{flex:1;border:none;outline:none;font-size:14.5px;color:var(--text-900);}
.help-cat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:50px;}
.help-cat-card{border:1px solid var(--border);border-radius:var(--radius-md);padding:26px;text-align:center;}
.help-cat-card .ic{width:48px;height:48px;border-radius:50%;background:#eef3ea;display:flex;align-items:center;justify-content:center;font-size:20px;margin:0 auto 14px;}
.help-cat-card h4{font-size:14.5px;font-weight:700;margin:0 0 6px;}
.help-cat-card p{font-size:12.5px;color:var(--text-400);margin:0;}
.help-faq-section h3{font-size:20px;font-weight:800;margin:0 0 18px;}
.help-faq-section{margin-bottom:44px;}
.contact-support-banner{
  display:flex;justify-content:space-between;align-items:center;background:#f3f6f1;border-radius:var(--radius-lg);
  padding:36px 44px;margin-top:20px;
}
.contact-support-banner h4{font-size:18px;font-weight:800;margin:0 0 6px;}
.contact-support-banner p{font-size:14px;color:var(--text-600);margin:0;}

/* ---------- About page ---------- */
.about-hero{text-align:center;padding:60px 0 50px;max-width:680px;margin:0 auto;}
.about-hero h1{font-size:44px;}
.about-hero p{font-size:18px;}
.stat-band{
  display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:var(--border);
  border:1px solid var(--border);border-radius:var(--radius-md);overflow:hidden;margin:50px 0;
}
.stat-band-item{background:#fff;padding:30px 20px;text-align:center;}
.stat-band-item .num{font-size:30px;font-weight:800;color:var(--green-700);display:block;margin-bottom:6px;}
.stat-band-item .lbl{font-size:13px;color:var(--text-600);}
.about-story{display:grid;grid-template-columns:1fr 1fr;gap:50px;align-items:center;margin:60px 0;}
.about-story h2{font-size:28px;font-weight:800;margin:0 0 18px;}
.about-story p{font-size:15.5px;color:var(--text-600);line-height:1.75;margin:0 0 16px;}
.about-story-img{height:340px;border-radius:var(--radius-lg);background:linear-gradient(135deg,#9fc98a,#5a8a4a);}
.values-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:50px 0;}
.value-card{padding:6px;}
.value-card .ic{font-size:28px;margin-bottom:14px;}
.value-card h4{font-size:16px;font-weight:700;margin:0 0 8px;}
.value-card p{font-size:14px;color:var(--text-600);line-height:1.6;margin:0;}
.team-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:24px;margin:40px 0;}
.team-card{text-align:center;}
.team-avatar{width:96px;height:96px;border-radius:50%;margin:0 auto 14px;background:linear-gradient(135deg,#d9c2a3,#a98467);}
.team-card h5{font-size:14.5px;font-weight:700;margin:0 0 3px;}
.team-card p{font-size:12.5px;color:var(--text-400);margin:0;}

/* Single-founder layout — centred, larger card, readable bio */
.team-grid--single{grid-template-columns:1fr;max-width:380px;margin-left:auto;margin-right:auto;}
.team-card--founder .team-avatar{width:120px;height:120px;}
.team-card--founder h5{font-size:17px;}
.team-role{font-size:13px;color:var(--green-700);font-weight:700;margin:4px 0 0 !important;}
.team-bio{font-size:13px;color:var(--text-600);margin-top:10px !important;line-height:1.6;}

/* Photo avatar — uses a CSS custom property (--team-photo) set via
   inline style on the element, so !important here properly overrides
   the base .team-avatar gradient without fighting inline style
   specificity (the old background:none !important wiped out the
   inline background-image too, which is why the user had to add
   !important manually to every background sub-property). */
.team-avatar--photo{
	background-image: var(--team-photo) !important;
	background-size: cover !important;
	background-position: center top !important;
	background-color: transparent !important;
}

/* Initials fallback (shown when no photo is set) */
.team-avatar-initials{
  display:flex;align-items:center;justify-content:center;
  width:100%;height:100%;border-radius:50%;
  font-size:28px;font-weight:800;color:#fff;
  background:var(--green-700);
  font-family:inherit;
}

/* ---------- Contact page ---------- */
.contact-grid{display:grid;grid-template-columns:1fr 1.2fr;gap:50px;align-items:start;}
.contact-info-card{margin-bottom:24px;}
.contact-info-card h4{font-size:14.5px;font-weight:700;margin:0 0 4px;display:flex;align-items:center;gap:10px;}
.contact-info-card p{font-size:14px;color:var(--text-600);margin:0 0 0 30px;line-height:1.6;}
.contact-form-card{border:1px solid var(--border);border-radius:var(--radius-lg);padding:36px;}

/* ---------- Analyzer scanning animation ---------- */
.scan-shell{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  min-height:420px;gap:0;text-align:center;
}
.scan-visual{
  position:relative;width:180px;height:180px;border-radius:50%;
  background:#f9f8f5;display:flex;align-items:center;justify-content:center;
  margin-bottom:32px;overflow:hidden;
}
.scan-visual .icon{font-size:56px;z-index:2;}
.scan-ring{
  position:absolute;inset:0;border-radius:50%;
  border:3px solid transparent;border-top-color:var(--green-600);border-right-color:var(--green-600);
  animation:scan-spin 1.1s linear infinite;
}
.scan-ring.ring2{
  inset:14px;border-top-color:transparent;border-right-color:transparent;
  border-bottom-color:#7fe0a5;border-left-color:#7fe0a5;
  animation:scan-spin-rev 1.6s linear infinite;
}
.scan-sweep{
  position:absolute;left:0;right:0;height:3px;background:linear-gradient(90deg,transparent,#22a35a,transparent);
  animation:scan-sweep 1.8s ease-in-out infinite;
  box-shadow:0 0 12px 2px rgba(34,163,90,.5);
}
@keyframes scan-spin{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}
@keyframes scan-spin-rev{from{transform:rotate(360deg);}to{transform:rotate(0deg);}}
@keyframes scan-sweep{0%{top:8%;opacity:0;}10%{opacity:1;}50%{top:88%;opacity:1;}60%{opacity:0;}100%{top:8%;opacity:0;}}

.scan-steps{display:flex;flex-direction:column;gap:14px;max-width:320px;width:100%;margin:0 auto;}
.scan-step{
  display:flex;align-items:center;gap:12px;font-size:14px;color:var(--text-400);
  opacity:0;transform:translateY(6px);transition:opacity .4s ease,transform .4s ease,color .3s ease;
}
.scan-step.visible{opacity:1;transform:translateY(0);}
.scan-step.done{color:var(--text-900);font-weight:600;}
.scan-step .step-ic{
  width:24px;height:24px;border-radius:50%;border:2px solid var(--border);flex-shrink:0;
  display:flex;align-items:center;justify-content:center;font-size:12px;transition:all .3s ease;
}
.scan-step.active .step-ic{border-color:var(--green-600);}
.scan-step.done .step-ic{background:var(--green-600);border-color:var(--green-600);color:#fff;}
.scan-progress-track{width:100%;max-width:320px;height:5px;border-radius:4px;background:#f1f0ec;overflow:hidden;margin:28px auto 0;}
.scan-progress-fill{height:100%;background:linear-gradient(90deg,var(--green-700),var(--green-500));border-radius:4px;width:0%;transition:width .5s ease;}
.scan-cancel{margin-top:24px;font-size:13px;color:var(--text-400);cursor:pointer;}
.scan-cancel:hover{color:var(--text-600);}

@media (max-width:980px){
  .about-story,.contact-grid{grid-template-columns:1fr;}
  .tier-grid,.step-mini-grid,.help-cat-grid,.values-grid,.team-grid,.inline-stat-grid,.stat-band{grid-template-columns:repeat(2,1fr);}
  .recipe-nutrition-grid{grid-template-columns:repeat(2,1fr);}
}

/* =========================================================
   ROUND 3 — Dashboard, Analyzer result enrichment, Blog sidebar
   ========================================================= */

/* ---------- Dashboard shell ---------- */
.dash-shell{display:flex;min-height:calc(100vh - 73px);}
.dash-sidebar{
  width:260px;flex-shrink:0;background:var(--green-900);color:#fff;
  padding:32px 22px;display:flex;flex-direction:column;
}
.dash-user{text-align:center;margin-bottom:8px;padding-bottom:22px;border-bottom:1px solid rgba(255,255,255,.1);}
.dash-user-avatar{
  width:64px;height:64px;border-radius:50%;background:rgba(255,255,255,.12);margin:0 auto 12px;
  display:flex;align-items:center;justify-content:center;font-size:26px;
}
.dash-user h5{font-size:14px;font-weight:700;margin:0 0 3px;word-break:break-word;}
.dash-user p{font-size:11.5px;color:rgba(255,255,255,.55);margin:0 0 12px;word-break:break-word;}
.dash-goal-chip{
  display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,.12);
  padding:5px 12px;border-radius:14px;font-size:11.5px;font-weight:600;
}
.dash-nav{display:flex;flex-direction:column;gap:4px;margin:22px 0;flex:1;}
.dash-nav-item{
  display:flex;align-items:center;gap:11px;padding:11px 14px;border-radius:9px;
  font-size:14px;font-weight:600;color:rgba(255,255,255,.7);cursor:pointer;
}
.dash-nav-item:hover{background:rgba(255,255,255,.06);color:#fff;}
.dash-nav-item.active{background:rgba(255,255,255,.14);color:#fff;}
.dash-foot{border-top:1px solid rgba(255,255,255,.1);padding-top:18px;}
.dash-reports-bar{font-size:11.5px;color:rgba(255,255,255,.6);margin-bottom:6px;display:flex;justify-content:space-between;}
.dash-progress-track{height:5px;border-radius:4px;background:rgba(255,255,255,.12);overflow:hidden;margin-bottom:16px;}
.dash-progress-fill{height:100%;background:#f0a430;border-radius:4px;}
.dash-upgrade-btn{
  width:100%;background:#f0a430;color:#1c2521;border:none;border-radius:9px;padding:11px;
  font-size:13.5px;font-weight:700;text-align:center;margin-bottom:8px;cursor:pointer;
}
.dash-logout{font-size:13px;color:rgba(255,255,255,.55);text-align:center;display:block;padding:8px;}

.dash-main{flex:1;padding:36px 44px;background:#fafaf8;min-width:0;}
.dash-topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px;}
.dash-topbar h1{font-size:26px;font-weight:800;margin:0;}

.dash-stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:24px;}
.dash-stat-card{background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);padding:24px;}
.dash-stat-card .lbl-top{font-size:11.5px;font-weight:700;color:var(--text-400);text-transform:uppercase;letter-spacing:.04em;margin-bottom:14px;}
.dash-stat-card .big-num{font-size:30px;font-weight:800;}
.dash-stat-card .ic-emoji{font-size:22px;margin-bottom:10px;display:block;}
.dash-stat-card .sub{font-size:12px;color:var(--text-400);margin-top:4px;}
.health-ring-wrap{display:flex;flex-direction:column;align-items:center;}
.health-ring{width:84px;height:84px;position:relative;margin:4px 0 8px;}
.health-ring svg{transform:rotate(-90deg);}
.health-ring-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;}
.health-ring-center .num{font-size:19px;font-weight:800;}
.health-ring-center .lbl{font-size:8.5px;color:var(--text-400);}

.dash-card{background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);padding:28px;margin-bottom:24px;}
.dash-card h3{font-size:17px;font-weight:700;margin:0 0 22px;}
.dash-macro-row{display:flex;align-items:center;gap:16px;margin-bottom:16px;font-size:14px;}
.dash-macro-row .name{width:60px;color:var(--text-600);font-weight:600;}
.dash-macro-row .track{flex:1;height:8px;border-radius:5px;background:#f1f0ec;overflow:hidden;}
.dash-macro-row .track i{display:block;height:100%;border-radius:5px;}
.dash-macro-row .val{width:48px;text-align:right;font-weight:700;}

.bmi-grid{display:grid;grid-template-columns:auto 1fr auto;gap:30px;align-items:center;}
.bmi-gauge{text-align:center;}
.bmi-gauge .num{font-size:24px;font-weight:800;color:var(--orange);}
.bmi-gauge .lbl{font-size:10.5px;color:var(--text-400);margin-top:2px;}
.bmi-rows{display:flex;flex-direction:column;gap:8px;}
.bmi-row{
  display:flex;justify-content:space-between;align-items:center;padding:13px 18px;border-radius:9px;
  background:#f9f8f5;font-size:14px;
}
.bmi-row.active{background:#fdf3e3;border:1px solid #f0c46a;}
.bmi-row .name{display:flex;align-items:center;gap:10px;font-weight:600;}
.bmi-row .range{color:var(--text-400);font-size:12.5px;margin-left:4px;}
.bmi-row .you-tag{color:var(--green-700);font-weight:700;font-size:12.5px;}
.bmi-side-stats{display:flex;flex-direction:column;gap:16px;text-align:right;}
.bmi-side-stats .num{font-size:18px;font-weight:800;display:block;}
.bmi-side-stats .lbl{font-size:11px;color:var(--text-400);}
.bmi-side-stats a{font-size:12.5px;font-weight:600;color:var(--green-700);}

.recent-meals-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;}
.meal-card{border:1px solid var(--border);border-radius:var(--radius-md);overflow:hidden;position:relative;}
.meal-card .img{height:140px;background-size:cover;background-position:center;}
.meal-score-badge{
  position:absolute;top:12px;right:12px;width:34px;height:34px;border-radius:50%;background:#fff;
  display:flex;align-items:center;justify-content:center;font-size:12.5px;font-weight:800;color:var(--orange);
  box-shadow:0 2px 8px rgba(0,0,0,.12);
}
.meal-card .body{padding:14px;}
.meal-card h5{font-size:13.5px;font-weight:700;margin:0 0 8px;}
.meal-card .meta-row{display:flex;justify-content:space-between;font-size:12px;color:var(--text-400);margin-bottom:10px;}
.meal-card .tags{display:flex;gap:6px;flex-wrap:wrap;}
.meal-tag{font-size:10px;font-weight:700;padding:3px 8px;border-radius:6px;background:#eaf3ee;color:var(--green-700);}
.meal-tag.alt{background:#fdf1e0;color:#a96f1f;}

.dash-promo-strip{
  background:var(--green-900);border-radius:0;padding:50px 0;margin-top:10px;
}
.dash-promo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;}
.dash-promo-item{padding:0 36px;color:#fff;}
.dash-promo-item:not(:last-child){border-right:1px solid rgba(255,255,255,.12);}
.dash-promo-tag{font-size:11px;font-weight:700;color:#9ad9b3;text-transform:uppercase;letter-spacing:.04em;margin-bottom:14px;display:flex;align-items:center;gap:7px;}
.dash-promo-item .ic-box{font-size:24px;margin-bottom:14px;}
.dash-promo-item h4{font-size:16px;font-weight:700;margin:0 0 8px;}
.dash-promo-item p{font-size:13px;color:rgba(255,255,255,.65);line-height:1.55;margin:0 0 14px;}
.dash-promo-item a{font-size:13px;font-weight:700;color:#9ad9b3;}

/* ---------- Top promo bar (site-wide affiliate banner) ---------- */
.promo-topbar{
  background:#fdf3e3;border-bottom:1px solid #f6e3bd;padding:11px 0;font-size:13px;
  display:flex;align-items:center;justify-content:center;gap:14px;text-align:center;flex-wrap:wrap;
}
.promo-topbar .badge{
  background:var(--orange);color:var(--green-900);font-size:10.5px;font-weight:700;padding:3px 10px;border-radius:10px;
  text-transform:uppercase;letter-spacing:.03em;
}
.promo-topbar strong{font-weight:700;}
.promo-topbar a{font-weight:700;color:var(--green-700);}
.promo-topbar .aff-note{color:var(--text-400);font-size:11.5px;}

/* ---------- Meal history page ---------- */
.history-toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px;}
.history-list{display:flex;flex-direction:column;gap:12px;}
.history-row{
  display:flex;align-items:center;gap:18px;background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);padding:16px 20px;
}
.history-row .thumb{width:56px;height:56px;border-radius:10px;background-size:cover;background-position:center;flex-shrink:0;}
.history-row .info{flex:1;min-width:0;}
.history-row h5{font-size:14.5px;font-weight:700;margin:0 0 4px;}
.history-row .meta{font-size:12px;color:var(--text-400);}
.history-row .score{
  width:38px;height:38px;border-radius:50%;background:#f9f8f5;display:flex;align-items:center;justify-content:center;
  font-size:12.5px;font-weight:800;color:var(--orange);flex-shrink:0;
}
.history-row .cal{font-size:14px;font-weight:700;width:80px;text-align:right;flex-shrink:0;}

/* ---------- Profile page ---------- */
.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;}

/* ---------- Analyzer result enrichment ---------- */
.health-score-badge{
  display:flex;align-items:center;gap:10px;background:#f9f8f5;border-radius:var(--radius-sm);
  padding:14px 16px;margin-bottom:18px;
}
.health-score-badge .ring-sm{width:46px;height:46px;position:relative;flex-shrink:0;}
.health-score-badge .ring-sm svg{transform:rotate(-90deg);}
.health-score-badge .ring-sm-center{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;}
.health-score-badge .label{font-size:13px;color:var(--text-600);}
.health-score-badge .label strong{color:var(--text-900);}

.micro-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:18px 0;}
.micro-card{border:1px solid var(--border);border-radius:var(--radius-sm);padding:14px 16px;background:#f9f8f5;}
.micro-card .lbl-top{font-size:10.5px;font-weight:700;color:var(--text-400);text-transform:uppercase;letter-spacing:.03em;margin-bottom:6px;}
.micro-card .num{font-size:18px;font-weight:800;}
.micro-card .unit{font-size:11px;color:var(--text-400);margin-top:2px;}
.micro-track{height:4px;border-radius:3px;background:#e7e6e2;overflow:hidden;margin-top:8px;}
.micro-track i{display:block;height:100%;border-radius:3px;background:var(--green-600);}

.insights-section h4{font-size:14px;font-weight:700;margin:22px 0 12px;color:var(--green-700);text-transform:uppercase;letter-spacing:.03em;font-size:12px;}
.insight-row{
  display:flex;align-items:center;gap:10px;background:#eef3ea;border-radius:var(--radius-sm);
  padding:11px 16px;margin-bottom:9px;font-size:13.5px;color:var(--text-900);
}
.insight-row .check{
  width:18px;height:18px;border-radius:5px;background:var(--green-600);color:#fff;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;font-size:10px;
}

.result-actions-extended{display:flex;gap:10px;margin-top:20px;flex-wrap:wrap;}
.result-actions-extended .btn{flex:1;min-width:120px;justify-content:center;}
.result-actions-extended .btn-icon-only{flex:0;min-width:0;padding:11px 16px;}

/* ---------- Blog page with sidebar ---------- */
.blog-with-sidebar{display:grid;grid-template-columns:1fr 320px;gap:40px;align-items:start;}
.blog-sidebar{display:flex;flex-direction:column;gap:22px;position:sticky;top:90px;}
.sidebar-toc-card{border:1px solid var(--border);border-radius:var(--radius-md);padding:22px;}
.sidebar-toc-card h5{font-size:13px;font-weight:700;margin:0 0 14px;text-transform:uppercase;letter-spacing:.03em;color:var(--text-400);}
.sidebar-toc-card ol{margin:0;padding-left:18px;font-size:13.5px;color:var(--text-600);}
.sidebar-toc-card li{padding:6px 0;}
.sidebar-toc-card a{color:var(--text-600);}
.sidebar-toc-card a:hover{color:var(--green-700);}

/* Base sponsor-tag: small, legible, clickable label. Contextual rules below override position only. */
.sponsor-tag{
  font-size:10px;font-weight:700;color:var(--text-400);text-transform:uppercase;letter-spacing:.04em;
  padding:6px 10px;border-radius:8px;background:#f1f0ec;transition:color .15s ease,background .15s ease;
  display:inline-block;min-height:24px;
}
.sponsor-tag:hover{color:var(--green-700);background:#eaf3ee;}

.sidebar-ad-card{
  border:1px solid var(--border);border-radius:var(--radius-md);padding:20px;position:relative;
}
.sidebar-ad-card .sponsor-tag{
  position:absolute;top:14px;right:14px;font-size:9.5px;
}
.sidebar-ad-card .badge-best{
  display:inline-flex;align-items:center;gap:5px;background:#fdf3e3;color:#a96f1f;font-size:10.5px;
  font-weight:700;padding:4px 10px;border-radius:10px;margin-bottom:12px;
}
.sidebar-ad-img{
  width:100%;height:120px;border-radius:var(--radius-sm);margin-bottom:14px;background-size:cover;background-position:center;
}
.sidebar-ad-card h5{font-size:14.5px;font-weight:700;margin:0 0 6px;}
.sidebar-ad-card p{font-size:12.5px;color:var(--text-600);margin:0 0 14px;line-height:1.5;}
.sidebar-ad-card .price-row{display:flex;align-items:baseline;gap:8px;margin-bottom:14px;}
.sidebar-ad-card .price{font-size:17px;font-weight:800;}
.sidebar-ad-card .price-old{font-size:13px;color:var(--text-400);text-decoration:line-through;}
.sidebar-ad-card .stars-sm{color:var(--orange);font-size:12px;margin-bottom:4px;}

.sidebar-related-card{border:1px solid var(--border);border-radius:var(--radius-md);padding:20px;}
.sidebar-related-card h5{font-size:13px;font-weight:700;margin:0 0 14px;text-transform:uppercase;letter-spacing:.03em;color:var(--text-400);}
.sidebar-related-item{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid var(--border);}
.sidebar-related-item:last-child{border-bottom:none;padding-bottom:0;}
.sidebar-related-item .thumb{width:54px;height:54px;border-radius:8px;flex-shrink:0;background-size:cover;background-position:center;}
.sidebar-related-item h6{font-size:12.5px;font-weight:700;margin:0 0 4px;line-height:1.4;}
.sidebar-related-item .meta{font-size:11px;color:var(--text-400);}

.sidebar-newsletter-card{
  background:var(--green-900);color:#fff;border-radius:var(--radius-md);padding:22px;
}
.sidebar-newsletter-card h5{font-size:14.5px;font-weight:700;margin:0 0 8px;}
.sidebar-newsletter-card p{font-size:12.5px;color:rgba(255,255,255,.65);margin:0 0 14px;line-height:1.5;}
.sidebar-newsletter-card input{
  width:100%;padding:10px 13px;border-radius:8px;border:none;font-size:13px;margin-bottom:8px;
}
.sidebar-newsletter-card .btn{width:100%;justify-content:center;padding:10px;font-size:13.5px;}

/* ---------- Inline in-article affiliate block ---------- */
.inline-affiliate-block{
  display:flex;gap:20px;align-items:center;border:1px solid var(--border);border-radius:var(--radius-md);
  padding:20px;margin:32px 0;background:#f9f8f5;position:relative;
}
.inline-affiliate-block .sponsor-tag{position:absolute;top:14px;right:16px;}
.inline-affiliate-thumb{
  width:84px;height:84px;border-radius:var(--radius-sm);flex-shrink:0;background-size:cover;background-position:center;
  background-color:#e3e1da;
}
.inline-affiliate-body{flex:1;min-width:0;}
.inline-affiliate-body .badge-best{margin-bottom:8px;}
.inline-affiliate-body h5{font-size:15px;font-weight:700;margin:0 0 5px;}
.inline-affiliate-body p{font-size:13px;color:var(--text-600);margin:0;line-height:1.5;}
.inline-affiliate-cta{flex-shrink:0;text-align:right;}
.inline-affiliate-cta .price{font-size:16px;font-weight:800;display:block;margin-bottom:8px;}

/* ---------- AdSense slots (article body + sidebar) ---------- */
.ad-slot{margin:32px 0;width:100%;}
.ad-slot-label{display:block;font-size:10px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text-400);text-align:center;margin-bottom:8px;opacity:.7;}
.ad-slot-inner{
  min-height:100px;display:flex;align-items:center;justify-content:center;
  background:#f9f8f5;border:1px dashed var(--border);border-radius:var(--radius-md);
  color:var(--text-400);font-size:13px;
}
.ad-slot--sidebar .ad-slot-inner{min-height:200px;}

/* ---------- Dashboard "shop the gap" promo strip (3-card, like screenshot) ---------- */
/* uses .dash-promo-strip / .dash-promo-grid / .dash-promo-item already defined above */

@media (max-width:980px){
  .dash-shell{flex-direction:column;}
  .dash-sidebar{width:100%;flex-direction:row;align-items:center;padding:16px 20px;overflow-x:auto;}
  .dash-stat-grid,.recent-meals-grid,.dash-promo-grid,.bmi-grid,.profile-grid{grid-template-columns:repeat(2,1fr);}
  .blog-with-sidebar{grid-template-columns:1fr;}
  .blog-sidebar{position:static;}
  .inline-affiliate-block{flex-direction:column;text-align:center;}
  .inline-affiliate-cta{text-align:center;width:100%;}
  .ad-slot-inner{min-height:80px;}
}

/* =========================================================
   ROUND 4 — Expanded affiliate surface area
   ========================================================= */

/* ---------- Recommended Gear comparison table ---------- */
.gear-block{border:1px solid var(--border);border-radius:var(--radius-lg);padding:28px;margin:32px 0;}
.gear-block-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:6px;}
.gear-block-head h3{font-size:18px;font-weight:800;margin:0;}
.gear-block-head .sponsor-tag{position:static;}
.gear-block-sub{font-size:13px;color:var(--text-400);margin:0 0 20px;}
.gear-table{width:100%;border-collapse:collapse;}
.gear-table th{
  text-align:left;font-size:11px;font-weight:700;color:var(--text-400);text-transform:uppercase;
  letter-spacing:.03em;padding:0 12px 12px;border-bottom:1px solid var(--border);
}
.gear-table th:first-child{padding-left:0;}
.gear-table td{padding:16px 12px;border-bottom:1px solid var(--border);vertical-align:middle;}
.gear-table td:first-child{padding-left:0;}
.gear-table tr:last-child td{border-bottom:none;}
.gear-table tr.best-pick{background:#f6faf7;}
.gear-product-cell{display:flex;align-items:center;gap:12px;min-width:200px;}
.gear-thumb{width:48px;height:48px;border-radius:9px;flex-shrink:0;background-size:cover;background-position:center;background-color:#e3e1da;}
.gear-product-cell h6{font-size:13.5px;font-weight:700;margin:0 0 3px;}
.gear-product-cell .stars-sm{font-size:11px;}
.gear-pick-tag{
  display:inline-block;font-size:9.5px;font-weight:700;color:var(--green-700);background:#eaf3ee;
  padding:2px 8px;border-radius:8px;margin-bottom:4px;text-transform:uppercase;letter-spacing:.03em;
}
.gear-table .price-cell{font-size:14px;font-weight:800;white-space:nowrap;}
.gear-table .rating-cell{font-size:12.5px;color:var(--text-600);white-space:nowrap;}
.gear-table .cta-cell{text-align:right;}
.gear-table .btn{padding:8px 16px;font-size:12.5px;white-space:nowrap;}

/* ---------- Mobile gear cards (stack on small screens) ---------- */
.gear-card-mobile{display:none;}
.gear-card-mobile-body{flex:1;}

/* ---------- Result-page contextual affiliate pick ---------- */
.result-pick-block{
  border:1px solid #f0c46a;background:#fdf8ee;border-radius:var(--radius-md);
  padding:18px;margin:20px 0;display:flex;gap:14px;align-items:center;position:relative;
}
.result-pick-block .sponsor-tag{position:absolute;top:12px;right:14px;}
.result-pick-icon{
  width:46px;height:46px;border-radius:11px;background:#fff;display:flex;align-items:center;justify-content:center;
  font-size:20px;flex-shrink:0;box-shadow:0 1px 4px rgba(0,0,0,.06);
}
.result-pick-body{flex:1;min-width:0;}
.result-pick-tag{font-size:10.5px;font-weight:700;color:#a96f1f;text-transform:uppercase;letter-spacing:.03em;margin-bottom:4px;}
.result-pick-body h6{font-size:13.5px;font-weight:700;margin:0 0 3px;}
.result-pick-body p{font-size:12px;color:var(--text-600);margin:0;line-height:1.45;}
.result-pick-cta{flex-shrink:0;}
.result-pick-cta .btn{padding:9px 16px;font-size:12.5px;white-space:nowrap;}

/* ---------- Native "shop the post" strip (horizontal scroll cards) ---------- */
.shop-strip{margin:36px 0;}

/* ── Shared affiliate section header ── */
.aff-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:22px;flex-wrap:wrap;}
.aff-section-head h3{font-size:20px;font-weight:800;margin:0 0 3px;}
.aff-section-sub{font-size:13.5px;color:var(--text-400);margin:0;}
.aff-view-all{font-size:13px;font-weight:700;color:var(--green-700);text-decoration:none;white-space:nowrap;}
.aff-view-all:hover{text-decoration:underline;}
.aff-price-old{font-size:12px;color:var(--text-400);text-decoration:line-through;margin-right:5px;}
.aff-price-now{font-size:14px;font-weight:800;color:var(--text-900);}
.aff-badge{display:inline-block;font-size:10.5px;font-weight:700;background:#fff3e0;color:#c67e00;padding:3px 9px;border-radius:10px;margin-bottom:8px;}

/* ── Bestsellers carousel ── */
.aff-bestsellers{margin:0;}
.aff-carousel{display:flex;gap:16px;overflow-x:auto;padding-bottom:12px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;}
.aff-carousel::-webkit-scrollbar{height:4px;}
.aff-carousel::-webkit-scrollbar-thumb{background:var(--border);border-radius:4px;}
.aff-carousel-card{flex:0 0 180px;scroll-snap-align:start;border:1px solid var(--border);border-radius:var(--radius-md);padding:14px;display:flex;flex-direction:column;gap:10px;background:#fff;transition:box-shadow .15s;}
.aff-carousel-card:hover{box-shadow:0 4px 18px rgba(0,0,0,.08);}
.aff-carousel-thumb{width:100%;height:140px;border-radius:8px;overflow:hidden;background:#f6f5f1;flex-shrink:0;}
.aff-carousel-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.aff-carousel-body{display:flex;flex-direction:column;gap:6px;flex:1;}
.aff-carousel-name{font-size:13px;font-weight:700;line-height:1.35;color:var(--text-900);}
.aff-stars{display:flex;align-items:center;gap:3px;font-size:13px;}
.aff-stars .star.full,.aff-stars .star.half{color:#f59e0b;}
.aff-stars .star.empty{color:#ddd;}
.aff-review-count{font-size:11px;color:var(--text-400);margin-left:2px;}
.aff-carousel-price{display:flex;align-items:baseline;gap:4px;flex-wrap:wrap;}
.aff-carousel-btn{font-size:12px;padding:8px 12px;text-align:center;justify-content:center;margin-top:auto;}
.aff-trust-row{display:flex;gap:20px;flex-wrap:wrap;margin-top:16px;padding-top:14px;border-top:1px solid var(--border);font-size:12px;color:var(--text-400);}

/* ── Boost banner ── */
.aff-boost-banner{background:var(--green-700);border-radius:var(--radius-lg);padding:42px 48px;display:flex;align-items:center;justify-content:space-between;gap:32px;overflow:hidden;}
.aff-boost-text{flex:1;min-width:0;}
.aff-boost-eyebrow{font-size:12px;font-weight:700;color:#a8e6c1;text-transform:uppercase;letter-spacing:.08em;margin-bottom:10px;}
.aff-boost-banner h3{font-size:24px;font-weight:800;color:#fff;margin:0 0 10px;line-height:1.25;}
.aff-boost-banner p{font-size:14.5px;color:#c5e8d4;margin:0 0 22px;line-height:1.6;}
.aff-boost-btn{background:#fff;color:var(--green-700);font-weight:800;font-size:14px;padding:13px 24px;}
.aff-boost-btn:hover{background:#f0faf4;}
.aff-boost-images{display:flex;gap:12px;flex-shrink:0;}
.aff-boost-img-wrap{width:130px;height:130px;border-radius:12px;overflow:hidden;background:rgba(255,255,255,.1);flex-shrink:0;}
.aff-boost-img-wrap img{width:100%;height:100%;object-fit:cover;display:block;}

/* ── Deals carousel ── */
.aff-deals{margin:0;}
.aff-deals-row{gap:18px;}
.aff-deal-card{flex:0 0 210px;border:1px solid var(--border);border-radius:var(--radius-md);overflow:hidden;background:#fff;display:flex;flex-direction:column;transition:box-shadow .15s;scroll-snap-align:start;}
.aff-deal-card:hover{box-shadow:0 4px 18px rgba(0,0,0,.08);}
.aff-deal-thumb{width:100%;height:160px;background:#f6f5f1;overflow:hidden;}
.aff-deal-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.aff-deal-body{padding:14px;display:flex;flex-direction:column;gap:7px;flex:1;}
.aff-deal-badge{font-size:10.5px;font-weight:700;background:#eaf3ee;color:var(--green-700);padding:3px 9px;border-radius:10px;width:fit-content;}
.aff-deal-name{font-size:13.5px;font-weight:700;color:var(--text-900);line-height:1.3;}
.aff-deal-blurb{font-size:12px;color:var(--text-400);line-height:1.5;}
.aff-deal-price-row{display:flex;align-items:baseline;gap:5px;}
.aff-deal-btn{font-size:12.5px;padding:9px 14px;text-align:center;justify-content:center;margin-top:auto;}

/* ── Amazon CTA strip ── */
.aff-amazon-cta{background:var(--green-900);border-radius:var(--radius-lg);padding:36px 48px;display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;}
.aff-amazon-cta-text h3{font-size:20px;font-weight:800;color:#fff;margin:0 0 6px;}
.aff-amazon-cta-text p{font-size:14px;color:#9ecfb5;margin:0;}
.aff-amazon-cta-btn{background:#f59e0b;color:#1a0f00;font-weight:800;font-size:14px;padding:13px 26px;border-radius:50px;white-space:nowrap;flex-shrink:0;}
.aff-amazon-cta-btn:hover{background:#e08c00;color:#fff;}

@media(max-width:980px){
  .aff-boost-images{display:none;}
  .aff-boost-banner{padding:32px 28px;}
  .aff-amazon-cta{padding:28px 24px;}
}
@media(max-width:640px){
  .aff-boost-banner h3{font-size:19px;}
  .aff-trust-row{gap:10px;}
  .aff-section-head{flex-direction:column;align-items:flex-start;gap:8px;}
}
.shop-strip-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:14px;}
.shop-strip-head h4{font-size:14px;font-weight:700;margin:0;color:var(--text-600);text-transform:uppercase;letter-spacing:.03em;}
.shop-strip-head .sponsor-tag{position:static;}
.shop-strip-row{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;}
.shop-card{border:1px solid var(--border);border-radius:var(--radius-sm);padding:14px;text-align:center;}
.shop-card-thumb{width:100%;height:200px;border-radius:8px;margin-bottom:10px;background-size:cover;background-position:center;background-color:#e3e1da;}
.shop-card h6{font-size:12.5px;font-weight:700;margin:0 0 4px;line-height:1.35;}
.shop-card .price{font-size:13px;font-weight:800;display:block;margin-bottom:8px;}
.shop-card .btn{width:100%;justify-content:center;padding:7px;font-size:11.5px;}

/* ---------- Database result-row native ad (blends into food grid) ---------- */
.food-card.sponsored-card{
  border-color:#f0c46a;background:#fdf8ee;position:relative;
}
.food-card.sponsored-card .sponsor-tag{position:absolute;top:10px;right:12px;font-size:9px;}

/* ---------- Goals page sidebar gear suggestion ---------- */
.goal-gear-card{border:1px solid var(--border);border-radius:var(--radius-md);padding:20px;margin-top:18px;}
.goal-gear-card .sponsor-tag{display:block;text-align:right;margin-bottom:8px;}
.goal-gear-row{display:flex;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border);}
.goal-gear-row:last-child{border-bottom:none;}
.goal-gear-row .gear-thumb{width:40px;height:40px;}
.goal-gear-row .info{flex:1;min-width:0;}
.goal-gear-row h6{font-size:12.5px;font-weight:700;margin:0 0 2px;}
.goal-gear-row .price{font-size:11.5px;color:var(--text-400);}
.goal-gear-row a{font-size:11.5px;font-weight:700;color:var(--green-700);flex-shrink:0;}

@media (max-width:980px){
  .gear-table{display:none;}
  .gear-card-mobile{display:flex;flex-direction:column;gap:14px;}
  .gear-card-mobile .gear-card-item{border:1px solid var(--border);border-radius:var(--radius-sm);padding:16px;display:flex;gap:14px;align-items:center;}
  .gear-card-mobile .gear-card-item.best-pick{border-color:var(--green-600);background:#f6faf7;}
  .shop-strip-row{grid-template-columns:repeat(2,1fr);}
  .result-pick-block{flex-direction:column;text-align:center;}
}

/* =========================================================
   ROUND 5 — Sticky floating affiliate widget
   ========================================================= */
.sticky-affiliate-widget{
  position:fixed;bottom:24px;right:24px;width:260px;background:#fff;border:1px solid var(--border);
  border-radius:var(--radius-md);box-shadow:0 16px 40px -12px rgba(20,40,30,.25);
  padding:16px;z-index:200;
  opacity:0;transform:translateY(16px) scale(.96);pointer-events:none;
  transition:opacity .35s ease,transform .35s ease;
}
.sticky-affiliate-widget.visible{opacity:1;transform:translateY(0) scale(1);pointer-events:auto;}
.sticky-affiliate-widget-close{
  position:absolute;top:8px;right:8px;width:22px;height:22px;border-radius:50%;
  background:#f1f0ec;color:var(--text-400);display:flex;align-items:center;justify-content:center;
  font-size:13px;cursor:pointer;line-height:1;border:none;
}
.sticky-affiliate-widget-close:hover{background:#e7e6e2;color:var(--text-600);}
.sticky-affiliate-widget .sponsor-tag{font-size:8.5px;margin-bottom:10px;display:inline-block;}
.sticky-affiliate-widget-body{display:flex;gap:10px;align-items:center;margin-bottom:12px;}
.sticky-affiliate-thumb{
  width:44px;height:44px;border-radius:10px;flex-shrink:0;background-size:cover;background-position:center;
  background-color:#e3e1da;
}
.sticky-affiliate-widget h6{font-size:12.5px;font-weight:700;margin:0 0 2px;}
.sticky-affiliate-widget .stars-sm{font-size:10px;margin-bottom:2px;}
.sticky-affiliate-widget .price-row{font-size:13px;font-weight:800;}
.sticky-affiliate-widget .btn{width:100%;justify-content:center;padding:9px;font-size:12.5px;}

@media (max-width:980px){
  .sticky-affiliate-widget{left:16px;right:16px;bottom:16px;width:auto;}
}


/* =========================================================
   ROUND 6 — Real phone breakpoint (≤640px) + dashboard bottom tab bar
   This layer sits below the existing 980px tablet rules and tightens
   everything further for actual phone widths (iPhone SE through Pro Max).
   ========================================================= */

@media (max-width:640px){

  /* ---------- Global ---------- */
  .wrap{padding:0 20px;}
  .page-shell{padding:32px 0 60px;}
  .section{padding:56px 0;}

  /* ---------- Header / nav ---------- */
  .nav{padding:14px 20px;}
  .logo{font-size:16px;gap:7px;}
  .logo .custom-logo{height:30px;max-width:140px;}
  .logo-mark{width:30px;height:30px;font-size:15px;border-radius:8px;}
  .logo-sub{font-size:10px;}
  .nav-right{gap:10px;}
  .nav-right .btn-green{padding:9px 14px;font-size:13.5px;}
  .hamburger-btn{width:36px;height:36px;}

  /* User chip — name + "Analyze a meal" button + hamburger icon all
     competing for one row was the actual cause of the cramped mobile
     header (the WordPress admin bar above it, fixed separately, was
     a second contributing factor but not the only one). Collapsing
     the chip to just the 👤 icon on phones frees enough width that
     the other two elements fit comfortably without wrapping/clipping. */
  .nav-right .user-chip{
    width:38px;height:38px;padding:0;justify-content:center;
    border-radius:50%;gap:0;
  }
  .user-chip-name{display:none;}
  .user-chip-icon{font-size:16px;}

  .promo-topbar{
    flex-direction:column;gap:4px;padding:10px 16px;font-size:12px;text-align:center;
  }
  .promo-topbar .aff-note{display:none;}

  /* ---------- Hero ---------- */
  .hero{padding:36px 0 48px;}
  .hero-grid{gap:32px;}
  .eyebrow{font-size:13px;margin-bottom:12px;}
  .hero h1{font-size:36px;margin:0 0 16px;}
  .hero p{font-size:16px;margin:0 0 22px;max-width:none;}
  .hero-ctas{flex-direction:column;gap:10px;}
  .hero-ctas .btn{width:100%;}
  .hero-flags{flex-wrap:wrap;gap:14px 18px;font-size:13px;margin-bottom:24px;}
  .trust{flex-wrap:wrap;}

  .badge-new{position:static;display:inline-block;margin-bottom:14px;font-size:11.5px;padding:6px 13px;}
  .summary-card{padding:20px;}
  .summary-head h4{font-size:16px;}
  .donut-row{gap:16px;flex-wrap:wrap;}
  .donut{width:108px;height:108px;}
  .donut-center .num{font-size:20px;}
  .macro-bars{min-width:160px;}
  .macro-row{font-size:12.5px;gap:8px;}
  .macro-row .name{width:46px;}
  .macro-row .val{width:62px;font-size:11.5px;}
  .mini-stats{grid-template-columns:1fr 1fr;gap:8px;}
  .mini-stat{padding:10px 11px;}
  .hero-deco-nuts{display:none;}
  .hero-affiliate-strip{padding:12px;gap:10px;}
  .hero-affiliate-icon{width:34px;height:34px;font-size:15px;}
  .hero-affiliate-body h6{font-size:12px;}
  .hero-affiliate-strip .btn{padding:7px 11px;font-size:11px;}

  /* ---------- Section headers ---------- */
  .section-head h2{font-size:27px;}
  .section-head p{font-size:14.5px;}
  .explore-head h2{font-size:24px;}
  .page-head{padding:36px 0 28px;}
  .page-head h1{font-size:28px;}
  .page-head p{font-size:15px;}

  /* ---------- Steps / goals / articles grids ---------- */
  .steps{gap:14px;}
  .step-card{padding:22px 18px;}
  .step-card h3{font-size:16px;}
  .goals-grid,.articles-grid,.lower-grid,.more-grid,.footer-grid,
  .tier-grid,.step-mini-grid,.help-cat-grid,.values-grid,.team-grid,
  .inline-stat-grid,.stat-band,.recipe-nutrition-grid,.food-grid,.blog-grid,
  .micro-grid,.shop-strip-row{
    grid-template-columns:1fr 1fr;
  }
  .goal-card{padding:20px 12px;}

  /* ---------- Dark panel ---------- */
  .panel-dark{padding:32px 22px;border-radius:22px;gap:32px;}
  .panel-dark h2{font-size:25px;}
  .feat-item h4{font-size:15px;}
  .nutrient-card{padding:18px;}

  /* ---------- "Did You Know?" card (fix decorative circle
     overlapping the paragraph text on narrow screens — the circle
     is sized/positioned for the desktop 3-column layout, where the
     card is wide enough that it never reaches the text) ---------- */
  .dyk{min-height:0;padding:24px 22px;}
  .dyk p{max-width:100%;position:relative;z-index:1;}
  .dyk-img{width:96px;height:96px;right:-18px;bottom:-18px;opacity:.5;}

  /* ---------- Promo / newsletter / bottom CTA (fix overflow bugs) ---------- */
  .promo{flex-direction:column;align-items:flex-start;gap:14px;padding:20px;}
  .promo .btn{width:100%;justify-content:center;}

  .newsletter{flex-direction:column;text-align:center;padding:30px 24px;gap:18px;}
  .nl-form{width:100%;flex-direction:column;}
  .nl-form input{width:100%;}
  .nl-img{display:none;}

  .bottom-cta{flex-direction:column;text-align:center;padding:34px 24px;gap:24px;border-radius:20px;}
  .bottom-cta h3{font-size:22px;}
  .cta-flags{flex-direction:column;align-items:center;gap:10px;}
  .cta-right{text-align:center;width:100%;}
  .cta-form{flex-direction:column;width:100%;}
  .cta-form input{width:100%;}
  .cta-sub{justify-content:center;}

  /* ---------- Footer ---------- */
  footer{padding:48px 0 26px;}
  .footer-grid{grid-template-columns:1fr 1fr;gap:28px 18px;margin-bottom:32px;}
  .footer-grid > div:first-child{grid-column:1 / -1;margin-bottom:8px;}
  .footer-bottom{flex-direction:column;gap:8px;text-align:center;}

  /* ---------- Two-column layouts (database, etc) ---------- */
  .two-col{grid-template-columns:1fr;}
  .db-toolbar{flex-direction:column;align-items:stretch;}
  .sort-select{width:100%;}

  /* ---------- Analyzer ---------- */
  .analyzer-input-card,.result-card{padding:20px;}
  .mode-tabs{font-size:13px;}
  .mode-tab{padding:9px;font-size:12.5px;}
  .camera-zone,.camera-zone video,.camera-zone img#camera-captured-img{height:260px;min-height:260px;}
  .scan-visual{width:130px;height:130px;}
  .scan-icon,.scan-visual .icon{font-size:40px;}
  .result-summary-row{flex-direction:column;align-items:flex-start;gap:14px;padding:16px;}
  .result-cal{font-size:26px;}
  .result-macro-mini{width:100%;}
  .nutrient-table{font-size:12.5px;}
  .nutrient-table th,.nutrient-table td{padding:9px 0;}
  .micro-card{padding:11px 12px;}
  .result-actions-extended .btn{min-width:100%;}
  .result-actions-extended .btn-icon-only{min-width:0;flex:1;}
  .result-pick-block{padding:14px;}
  .result-pick-icon{width:38px;height:38px;font-size:17px;}

  /* ---------- Goals page ---------- */
  .goal-setup-grid{gap:22px;}
  .form-card{padding:22px;}
  .form-grid-2{grid-template-columns:1fr;}
  .toggle-row{flex-direction:column;}
  .ring-big{width:110px;height:110px;}
  .ring-big-center .num{font-size:21px;}

  /* ---------- Blog / article / recipe ---------- */
  .blog-hero-feat{grid-template-columns:1fr;}
  .blog-hero-feat .img{min-height:180px;}
  .blog-hero-feat .body{padding:22px;}
  .blog-hero-feat h2{font-size:20px;}
  .article-head h1{font-size:27px;}
  .article-hero-img{height:200px;margin:22px 0 28px;}
  .article-body{font-size:15.5px;}
  .article-body h2{font-size:21px;margin:30px 0 14px;}
  .article-body h3{font-size:17.5px;}
  .article-body blockquote{font-size:16px;padding-left:16px;}
  .callout-box{padding:16px 18px;font-size:14px;}
  .inline-affiliate-block{padding:16px;}
  .inline-affiliate-thumb{width:64px;height:64px;}
  .author-box{padding:16px;gap:12px;}
  .author-avatar{width:44px;height:44px;}
  .recipe-meta-bar{gap:10px;padding:16px 0;flex-wrap:wrap;justify-content:center;}
  .recipe-meta-item{min-width:70px;}
  .steps-list li{gap:12px;}
  .gear-block{padding:18px;}
  .gear-block-head{flex-direction:column;align-items:flex-start;gap:8px;}
  .gear-block-head h3{font-size:15.5px;}

  /* ---------- Refine stacked gear cards: wrap content, full-width CTA on phones ---------- */
  .gear-card-mobile .gear-card-item{padding:14px;gap:10px;flex-wrap:wrap;}
  .gear-card-mobile .gear-thumb{width:40px !important;height:40px !important;}
  .gear-card-mobile-body{min-width:0;flex-basis:calc(100% - 56px);}
  .gear-card-mobile .gear-card-item .btn{width:100%;justify-content:center;margin-top:4px;}

  /* ---------- FAQ + Database combined section ---------- */
  .faq-tabs{gap:16px;overflow-x:auto;white-space:nowrap;}
  .faq-item{font-size:14px;padding:14px 0;}
  .cat-pills,.pop-pills{gap:7px;}

  /* ---------- About / Contact ---------- */
  .about-hero h1{font-size:30px;}
  .stat-band-item{padding:20px 12px;}
  .stat-band-item .num{font-size:22px;}
  .about-story-img{height:200px;}
  .team-grid{grid-template-columns:1fr 1fr;gap:16px;}
  .contact-grid{gap:30px;}
  .contact-form-card{padding:22px;}

  /* ---------- Auth pages ---------- */
  .auth-form-side{padding:36px 22px;}
  .auth-form-box h1{font-size:23px;}

  /* ---------- Legal pages ---------- */
  .legal-toc{padding:18px 20px;}
  .legal-body h2{font-size:17.5px;}

  /* ---------- Help center ---------- */
  .help-search-hero{padding:32px 22px;border-radius:20px;}
  .help-search-hero h1{font-size:22px;}
  .help-cat-grid{grid-template-columns:1fr 1fr;gap:12px;}
  .help-cat-card{padding:18px 14px;}
  .contact-support-banner{flex-direction:column;text-align:center;gap:14px;padding:24px;}

  /* ---------- Affiliate program page ---------- */
  .affiliate-hero h1{font-size:26px;}
  .tier-card{padding:22px;}

  /* ---------- Sticky widget ---------- */
  .sticky-affiliate-widget{padding:13px;}
  /* On the dashboard, the fixed bottom tab bar occupies the bottom edge — lift the sticky widget above it */
  .has-mobile-tabbar .sticky-affiliate-widget,
  body:has(.dash-mobile-tabbar) .sticky-affiliate-widget{bottom:78px;}

  /* ---------- Shop strip ---------- */
  .shop-card{padding:11px;}
  .shop-card h6{font-size:11.5px;}
}

/* =========================================================
   ROUND 7 — Small phone breakpoint (≤480px)
   The 640px tier above assumes ~360-430px is "as narrow as it gets"
   and settles several grids at 2 columns permanently. That's too
   cramped on genuinely small/older phones (and on anything tested
   below ~420px in responsive dev tools) — search inputs, button
   text, and icon+heading combinations start clipping or overlapping.
   This tier drops those specific grids to a single column instead.
   ========================================================= */
@media (max-width:480px){
  /* "Recent Foods" + "Quick Calculator" side-by-side cards, and the
     4-icon "More Ways to Track Smarter" grid — both were stuck at
     2 columns from the 640px tier with no narrower fallback. */
  .lower-grid,.more-grid{grid-template-columns:1fr !important;gap:18px;}

  /* "Did You Know?" card — the 640px-tier fix (96px circle) still
     slightly reaches the last line of text at sub-320px widths,
     where the card itself is narrower still. Shrink further and
     drop opacity more so any residual overlap is unnoticeable. */
  .dyk-img{width:64px;height:64px;right:-12px;bottom:-12px;opacity:.35;}
  .dyk p{font-size:14px;}

  /* Quick Calculator's search input + Calculate button were
     truncating ("Calculate Nutri...") inside the cramped 2-column
     cell — now full-width in their own single-column card, this is
     no longer needed, but keeping an explicit rule here protects
     against any future grid change reintroducing the squeeze. */
  .card-box{padding:18px;}
  .card-box-head h4{font-size:15px;}

  /* Food Database grid (/calories/) and the "Tools to Log These
     Foods More Accurately" shop strip — both still 2 columns at this
     width (set at the 980px tier with no narrower fallback), which
     is too tight for a photo + 3-line title + serving size, or for
     a product card's name/price/button. Drop both to 1 column. */
  .food-grid,.shop-strip-row{grid-template-columns:1fr !important;}

  /* Sidebar affiliate ad image — height was a fixed 120px regardless
     of width. Once the sidebar stacks full-width below the main
     content on phones, that fixed height makes the image look like
     an oversized, disproportionate gray block. Scale it down and let
     it keep a sensible aspect ratio instead of a flat fixed height. */
  .sidebar-ad-img{height:0;padding-bottom:42%;background-size:cover;}
}

/* =========================================================
   Dashboard: convert dark sidebar into a fixed bottom tab bar on phones
   ========================================================= */
.dash-mobile-tabbar{display:none;}

@media (max-width:640px){
  .dash-shell{padding-bottom:64px;} /* room for the fixed tab bar */
  .dash-sidebar{display:none;}      /* hide the desktop/tablet sidebar entirely */
  .dash-main{padding:24px 18px 90px;}
  .dash-topbar{flex-direction:column;align-items:flex-start;gap:12px;}
  .dash-topbar h1{font-size:21px;}
  .dash-stat-grid{grid-template-columns:1fr 1fr;gap:12px;}
  .dash-stat-card{padding:16px;}
  .dash-card{padding:18px;}
  .recent-meals-grid{grid-template-columns:1fr 1fr;gap:12px;}
  .bmi-grid{grid-template-columns:1fr;gap:18px;text-align:center;}
  .bmi-side-stats{flex-direction:row;justify-content:space-around;text-align:center;}
  .bmi-side-stats a{width:100%;text-align:center;margin-top:6px;}
  .dash-promo-strip{margin-left:-18px !important;margin-right:-18px !important;}
  .dash-promo-grid{grid-template-columns:1fr;gap:0;padding:0 18px !important;}
  .dash-promo-item{padding:24px 0;border-right:none !important;border-bottom:1px solid rgba(255,255,255,.12);}
  .dash-promo-item:last-child{border-bottom:none;}
  .history-toolbar{flex-direction:column;align-items:stretch;gap:10px;}
  .history-row{padding:12px 14px;gap:12px;}
  .history-row h5{font-size:13px;}
  .profile-grid{grid-template-columns:1fr;}

  /* Fixed bottom tab bar, replaces the dark sidebar nav on phones */
  .dash-mobile-tabbar{
    display:flex;position:fixed;bottom:0;left:0;right:0;z-index:80;
    background:var(--green-900);border-top:1px solid rgba(255,255,255,.1);
    padding:8px 6px calc(8px + env(safe-area-inset-bottom));
  }
  .dash-mobile-tab{
    flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;
    padding:7px 4px;border-radius:10px;color:rgba(255,255,255,.55);font-size:10.5px;font-weight:600;
    background:none;border:none;cursor:pointer;
  }
  .dash-mobile-tab .ic{font-size:18px;}
  .dash-mobile-tab.active{color:#fff;background:rgba(255,255,255,.12);}
}

.ncv2-goals-banner { font-size: 13px; font-weight: 600; padding: 10px 14px; border-radius: 10px; text-align: center; }
.ncv2-goals-banner--ok { background: var(--green-50); color: var(--green-700); }
.ncv2-goals-banner--err { background: #fef2f2; color: #b91c1c; }
