/* ==========================================================================
   Protein Tracker — Editorial Minimalist Design System (Aligned with iOS App)
   ========================================================================== */

:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-alt: #f1f3f5;
  --ink: #1a1a1a;
  --ink-strong: #000000;
  --ink-muted: #5f6670;
  --ink-subtle: #8b929c;
  --border: #e5e7eb;
  --border-strong: #d1d5db;

  /* App Macro & Status Tokens */
  --cal: #ff5722;
  --cal-bg: #ffede8;
  --carbs: #f59e0b;
  --carbs-bg: #fef3c7;
  --fat: #8b5cf6;
  --fat-bg: #f5f3ff;
  --green: #4db86a;
  --green-dark: #207539;
  --green-bg: #e8f5e9;
  --blue: #5b8def;
  --blue-bg: #e3edfd;
  --amber: #f4a443;
  --amber-bg: #fff3e0;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(17, 24, 39, 0.04);
  --shadow-md: 0 12px 32px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 24px 56px rgba(17, 24, 39, 0.14);

  --font-body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --container: 1140px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-strong);
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0 0 0.6em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink-strong);
  color: #fff;
  padding: 10px 16px;
  z-index: 999;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  border-radius: 8px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.container.narrow {
  max-width: 820px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 249, 250, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-icon {
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: var(--ink-strong);
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink-muted);
  transition: color 0.15s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink-strong);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
}

.mobile-nav {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 0 22px;
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-nav-link {
  padding: 10px 4px;
  font-weight: 700;
  font-size: 16px;
  border-bottom: 1px solid var(--surface-alt);
}

.mobile-nav-cta {
  padding-top: 8px;
}

/* ==========================================================================
   Buttons & App Store Badges
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 13px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: #000;
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn--secondary:hover {
  background: var(--surface-alt);
}

.btn--ghost-light {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn--sm {
  padding: 9px 15px;
  font-size: 13.5px;
  border-radius: 10px;
}

.btn--lg {
  padding: 15px 24px;
  font-size: 15.5px;
  border-radius: 14px;
}

.btn--full {
  width: 100%;
}

.appstore-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  font-family: var(--font-display);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  text-decoration: none;
  flex-shrink: 0;
}

.appstore-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.appstore-btn--dark {
  background: #0d0d0d;
  color: #ffffff;
  border: 1px solid #262626;
}

.appstore-btn--light {
  background: #ffffff;
  color: #111111;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.appstore-btn--sm {
  padding: 9px 15px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 11px;
}

.appstore-btn--md {
  padding: 10px 18px;
}

.appstore-btn--lg {
  padding: 12px 24px;
}

.appstore-btn--full {
  width: 100%;
}

.appstore-btn__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.appstore-btn__sub {
  font-size: 10.5px;
  font-weight: 600;
  opacity: 0.82;
  letter-spacing: 0.01em;
}

.appstore-btn__main {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   Hero Section & iPhone App Preview
   ========================================================================== */

.hero {
  padding: 56px 0 68px;
  overflow: hidden;
  background:
    radial-gradient(640px 360px at 88% 12%, rgba(77, 184, 106, 0.10), transparent 70%),
    radial-gradient(520px 320px at 8% 85%, rgba(255, 87, 34, 0.06), transparent 70%),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 44px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(77, 184, 106, 0.22);
}

.hero-title {
  font-size: clamp(2.25rem, 4.3vw, 3.45rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 18px;
}

.hero-highlight {
  background: linear-gradient(180deg, transparent 58%, rgba(77, 184, 106, 0.30) 58%);
  padding: 0 4px;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0 0 26px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.hero-trust-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 9px;
}

.hero-trust-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink-muted);
}

.check-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green-bg);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Visual Showcase */

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 485px;
}

.hero-lifestyle-card {
  position: absolute;
  left: 0;
  bottom: 14px;
  width: 240px;
  border-radius: 24px;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: var(--shadow-lg);
  z-index: 1;
}

.hero-lifestyle-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.floating-macro-chip {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.floating-macro-chip__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.floating-macro-chip strong {
  display: block;
  font-size: 11.5px;
  color: var(--ink-strong);
  line-height: 1.2;
}

.floating-macro-chip span {
  display: block;
  font-size: 10.5px;
  color: var(--ink-muted);
  font-weight: 700;
}

.phone-frame {
  position: relative;
  z-index: 2;
  width: 310px;
  background: #141414;
  border-radius: 40px;
  padding: 11px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.phone-notch {
  position: absolute;
  top: 17px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 20px;
  border-radius: 99px;
  background: #141414;
  z-index: 5;
}

.phone-screen {
  background: var(--bg);
  border-radius: 30px;
  padding: 36px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phone-brand-mini {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  font-size: 14px;
}

.phone-brand-mini img {
  border-radius: 6px;
}

.phone-streak {
  font-size: 11.5px;
  font-weight: 800;
  background: var(--amber-bg);
  color: #b45309;
  padding: 4px 9px;
  border-radius: 99px;
}

.phone-summary-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 10px;
  align-items: center;
}

.phone-ring-wrap {
  position: relative;
  width: 106px;
  height: 106px;
}

.phone-ring {
  width: 100%;
  height: 100%;
}

.phone-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.phone-ring-center strong {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.05;
}

.phone-ring-center span {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

.phone-mini-macros {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.phone-mini-tile {
  background: var(--bg);
  border-radius: 10px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.phone-mini-tile small {
  color: var(--ink-muted);
  font-weight: 700;
  margin-right: auto;
}

.phone-mini-tile b {
  font-weight: 800;
  color: var(--ink);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot--cal { background: var(--cal); }
.dot--carbs { background: var(--carbs); }
.dot--fat { background: var(--fat); }

.phone-suggest-banner {
  background: linear-gradient(90deg, #fff8eb, #fff3d6);
  border: 1px solid #f7d99b;
  border-radius: 12px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: #92400e;
}

.phone-suggest-banner small {
  font-weight: 700;
  opacity: 0.85;
}

.phone-ai-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phone-bubble-user {
  align-self: flex-end;
  background: var(--ink);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
  padding: 8px 11px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  max-width: 92%;
}

.phone-analysis-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
}

.phone-analysis-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
  font-size: 12px;
}

.pill-green {
  background: var(--green-bg);
  color: var(--green-dark);
  font-weight: 800;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
}

.phone-analysis-card__nums {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 700;
}

/* ==========================================================================
   Trust Strip & Sections
   ========================================================================== */

.trust-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 0;
}

.trust-strip__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.trust-strip__label {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-subtle);
}

.trust-strip__items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

.section {
  padding: 72px 0;
}

.section--tight-top {
  padding-top: 24px;
}

.section--alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  max-width: 680px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-header--split {
  max-width: none;
  text-align: left;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-header h2 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.section-header p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 16.5px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--green-dark);
  background: var(--green-bg);
  padding: 5px 12px;
  border-radius: 99px;
  margin-bottom: 12px;
}

.eyebrow--light {
  color: #a7f3d0;
  background: rgba(77, 184, 106, 0.18);
}

/* ==========================================================================
   3-Step Grid & Bento Features
   ========================================================================== */

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

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.step-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
}

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

.bento-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.bento-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.bento-card--wide {
  grid-column: span 2;
}

.bento-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.bento-icon--dark { background: #e8eaed; }
.bento-icon--green { background: var(--green-bg); }
.bento-icon--amber { background: var(--amber-bg); }
.bento-icon--blue { background: var(--blue-bg); }
.bento-icon--purple { background: var(--fat-bg); }
.bento-icon--orange { background: var(--cal-bg); }

.bento-card h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.bento-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
}

.bento-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.bento-tags span {
  font-size: 12.5px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 11px;
  border-radius: 99px;
  color: var(--ink);
}

/* ==========================================================================
   Interactive Protein & Calorie Calculator
   ========================================================================== */

.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  align-items: start;
}

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calc-row {
  display: grid;
  gap: 14px;
}
.calc-row--2 { grid-template-columns: repeat(2, 1fr); }
.calc-row--3 { grid-template-columns: repeat(3, 1fr); }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.field input,
.field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-alt);
  padding: 3px;
  border-radius: 11px;
  border: 1px solid var(--border);
}

.segmented__btn {
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-muted);
  cursor: pointer;
}

.segmented__btn.is-active {
  background: var(--surface);
  color: var(--ink-strong);
  box-shadow: var(--shadow-sm);
}

.calc-results {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
}

.calc-results__badge {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-dark);
  margin-bottom: 14px;
}

.calc-protein-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.calc-protein-hero__ring {
  width: 106px;
  height: 106px;
  border-radius: 50%;
  border: 8px solid var(--ink);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.calc-protein-hero__value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--ink-strong);
}

.calc-protein-hero__label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

.calc-results__title {
  font-size: 20px;
  margin: 0 0 5px;
}

.calc-results__sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-muted);
}

.calc-macro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.macro-pill {
  background: var(--surface);
  border-radius: 13px;
  padding: 11px 12px;
  border: 1px solid var(--border);
}

.macro-pill--calories { border-top: 3px solid var(--cal); }
.macro-pill--carbs { border-top: 3px solid var(--carbs); }
.macro-pill--fat { border-top: 3px solid var(--fat); }

.macro-pill__label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

.macro-pill__val {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-strong);
}

.calc-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.calc-metrics-row span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
}

.calc-metrics-row strong {
  font-size: 14px;
  font-weight: 800;
}

.calc-cta-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.calc-cta-box__text {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
}

/* ==========================================================================
   Tables, Comparison & FAQ
   ========================================================================== */

.science-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}

.data-table thead th {
  background: var(--bg);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13.5px;
  color: var(--ink-strong);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table .col-highlight {
  background: #f4fbf6;
  color: #14532d;
  font-weight: 700;
}

.comparison-table thead .col-highlight {
  background: var(--ink);
  color: #fff;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 500;
  color: var(--ink-muted);
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item__body {
  padding: 0 20px 18px;
  color: var(--ink-muted);
  font-size: 15.5px;
}

.faq-item__body p {
  margin: 0;
}

/* ==========================================================================
   Blog Index & Article Reading Experience
   ========================================================================== */

.page-hero {
  padding: 44px 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.page-hero--compact {
  padding: 42px 0 28px;
}

.page-hero h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.lead {
  font-size: 18px;
  color: var(--ink-muted);
  max-width: 720px;
  margin: 0;
}

.meta-muted {
  font-size: 13.5px;
  color: var(--ink-subtle);
  margin: 10px 0 0;
  font-weight: 700;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.breadcrumbs a:hover {
  color: var(--ink-strong);
  text-decoration: underline;
}

.blog-toolbar {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-search {
  display: flex;
  gap: 10px;
  max-width: 520px;
}

.blog-search input {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--bg);
}

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

.pill-filter {
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink-muted);
  transition: all 0.15s ease;
}

.pill-filter:hover,
.pill-filter.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.featured-post {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.featured-post h2 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  margin-bottom: 12px;
}

.featured-post h2 a:hover {
  text-decoration: underline;
}

.featured-post__body p {
  color: var(--ink-muted);
  font-size: 16.5px;
  margin: 0 0 22px;
}

.featured-post__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.featured-post__cta {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.featured-post__cta h3 {
  font-size: 17px;
  margin: 4px 0 0;
}

.featured-post__cta p {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--ink-muted);
}

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

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-subtle);
  margin-bottom: 12px;
}

.cat-pill {
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
}

.cat-pill--dark {
  background: var(--ink);
  color: #fff;
}

.blog-card__title {
  font-size: 19px;
  line-height: 1.3;
  margin-bottom: 10px;
}

.blog-card__title a:hover {
  text-decoration: underline;
}

.blog-card__excerpt {
  color: var(--ink-muted);
  font-size: 14.5px;
  margin: 0 0 18px;
  flex: 1;
}

.blog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--surface-alt);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-subtle);
}

.text-link {
  color: var(--ink-strong);
  font-weight: 800;
}

.text-link:hover {
  text-decoration: underline;
}

.pagination {
  margin-top: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pagination__info {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-muted);
}

/* Article Detail */

.article-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 38px 0 34px;
}

.article-hero__inner {
  max-width: 860px;
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.article-title {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
}

.article-excerpt {
  font-size: 18px;
  color: var(--ink-muted);
  margin: 0 0 22px;
}

.author-strip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-strip strong {
  display: block;
  font-size: 14px;
}

.author-strip span {
  display: block;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 32px;
  padding-top: 32px;
  padding-bottom: 56px;
  align-items: start;
}

.prose-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 38px;
  box-shadow: var(--shadow-sm);
}

.prose {
  font-size: 17px;
  line-height: 1.78;
  color: #262a30;
}

.prose h2 {
  font-size: 25px;
  margin-top: 2rem;
  margin-bottom: 0.7rem;
  scroll-margin-top: 90px;
}

.prose h3 {
  font-size: 20px;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose p {
  margin: 0 0 1.15rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose a:not(.appstore-btn):not(.btn):not(.tag-chip) {
  color: var(--ink-strong);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-underline-offset: 3px;
}

.prose .appstore-btn,
.prose .btn {
  text-decoration: none;
}

.prose .inline-cta-card h3,
.prose .end-cta-card h3,
.prose .mid-cta-card h3 {
  margin-top: 0;
}

.prose .inline-cta-card p,
.prose .end-cta-card p,
.prose .mid-cta-card p {
  margin-bottom: 0;
}

.prose blockquote {
  margin: 1.4rem 0;
  padding: 14px 20px;
  border-left: 4px solid var(--ink);
  background: var(--bg);
  border-radius: 0 12px 12px 0;
  color: var(--ink);
  font-weight: 600;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: block;
  overflow-x: auto;
}

.prose thead th {
  background: var(--bg);
  font-family: var(--font-display);
  font-weight: 800;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.prose tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.prose tbody tr:last-child td {
  border-bottom: none;
}

.mid-cta-card {
  margin: 2rem 0;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fafc, #f0fdf4);
  border: 1px solid #ccebd5;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mid-cta-card__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.mid-cta-card__head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--ink-strong);
  margin-bottom: 4px;
}

.mid-cta-card__head p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.mid-cta-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.article-faq {
  margin-top: 2.2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.tag-chip {
  font-size: 13px;
  font-weight: 700;
  background: var(--surface-alt);
  color: var(--ink-muted) !important;
  text-decoration: none !important;
  padding: 4px 12px;
  border-radius: 99px;
}

.tag-chip:hover {
  background: var(--ink);
  color: #fff !important;
}

.end-cta-card,
.final-cta {
  margin-top: 2rem;
  background: linear-gradient(135deg, #111111, #222629);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.end-cta-card h3,
.final-cta h2 {
  color: #ffffff;
  margin-bottom: 10px;
}

.end-cta-card p,
.final-cta p {
  color: #d1d5db;
  margin: 0;
  max-width: 560px;
}

.final-cta {
  margin-top: 0;
  padding: 44px 46px;
}

.final-cta h2 {
  font-size: clamp(1.65rem, 3vw, 2.3rem);
}

.final-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.final-cta__badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 24px 28px;
  border-radius: 22px;
  flex-shrink: 0;
}

.final-cta__icon {
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.final-cta__badge span {
  font-size: 13px;
  color: #9ca3af;
}

.inline-cta-card {
  margin-top: 32px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.inline-cta-card h3 {
  font-size: 19px;
  margin: 0 0 6px;
}

.inline-cta-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 14.5px;
}

/* Sidebar */

.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sticky-sidebar {
  position: sticky;
  top: 90px;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.sidebar-heading {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-muted);
  line-height: 1.35;
}

.toc-link:hover {
  color: var(--ink-strong);
}

.sidebar-app-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sidebar-app-head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
}

.sidebar-app-head span {
  font-size: 12.5px;
  color: var(--ink-muted);
  font-weight: 700;
}

.sidebar-card--app p {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0 0 12px;
}

.sidebar-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.sidebar-calc-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}

.sidebar-calc-link:hover {
  text-decoration: underline;
}

.empty-state {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
}

/* ==========================================================================
   Footer & Mobile Sticky CTA
   ========================================================================== */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 58px 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

.footer-desc {
  color: var(--ink-muted);
  font-size: 14.5px;
  margin: 14px 0 18px;
  max-width: 340px;
}

.footer-heading {
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-subtle);
}

.footer-bottom p {
  margin: 0;
}

.sticky-mobile-cta {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 95;
  background: rgba(17, 17, 17, 0.96);
  backdrop-filter: blur(12px);
  color: #fff;
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sticky-mobile-cta__info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sticky-mobile-cta__icon {
  border-radius: 9px;
  flex-shrink: 0;
}

.sticky-mobile-cta__title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-mobile-cta__sub {
  font-size: 11px;
  color: #d1d5db;
}

.sticky-mobile-cta__btn {
  background: #fff;
  color: #111;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  padding: 8px 15px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 980px) {
  .hero-grid,
  .calc-grid,
  .featured-post,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    justify-content: center;
    min-height: 460px;
  }

  .hero-lifestyle-card {
    left: 20px;
  }

  .steps-grid,
  .bento-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-card--wide {
    grid-column: span 2;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .final-cta,
  .end-cta-card,
  .inline-cta-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: 84px;
  }

  .site-nav,
  .header-actions .appstore-btn {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .sticky-mobile-cta {
    display: flex;
  }

  .hero {
    padding: 34px 0 48px;
  }

  .hero-lifestyle-card {
    display: none;
  }

  .hero-visual {
    min-height: auto;
  }

  .phone-frame {
    width: 100%;
    max-width: 330px;
  }

  .steps-grid,
  .bento-grid,
  .blog-grid,
  .calc-row--2,
  .calc-row--3,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .bento-card--wide {
    grid-column: span 1;
  }

  .section-header--split {
    flex-direction: column;
    align-items: flex-start;
  }

  .calc-card,
  .prose-card {
    padding: 22px 18px;
  }

  .calc-protein-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .final-cta {
    padding: 28px 22px;
  }
}
