/*
 * nutrition.html — the "Learn more" page behind the Nutrition Tracking card.
 *
 * Built to the supplied design: the same warm paper/ink/sage palette and the same three
 * typefaces as the homepage (site.css owns those tokens), so the two pages read as one
 * site. Section order, column split, card grids and the two script notes follow the
 * mockup.
 *
 * The three phones are built here in HTML/CSS from the app's real screens, not pasted
 * screenshots: they stay sharp on every display and can be corrected when the app
 * changes. Every claim on the page is a feature that exists in the shipped app.
 */

/* ── shared bits ─────────────────────────────────────────────────────────── */
.nt-sec { padding: 56px 0; }
.nt-sec-tint { background: var(--paper-2); }
.nt-lead { font-size: 15.5px; color: var(--ink-soft); margin: 16px 0 0; max-width: 34ch; }
.nt-h2 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.12; font-weight: 700; }
.nt-h2 em { font-style: normal; color: var(--sage-deep); }

.nt-ticks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 9px; }
.nt-ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-soft); }
.nt-ticks svg { flex: none; margin-top: 3px; color: var(--sage-deep); }

.nt-cta-btn { margin-top: 24px; display: inline-flex; }

.nt-note { font-family: var(--script); font-size: 26px; line-height: 1.12; color: var(--ink-soft); }

.nt-pill {
  display: inline-block; font-family: var(--display); font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--sage-deep);
  border: 1px solid var(--sage); border-radius: 999px; padding: 2px 8px; margin-left: 6px;
  vertical-align: 2px;
}

/* ── phone ───────────────────────────────────────────────────────────────── */
.ntp {
  width: 341px; border-radius: 40px; padding: 9px; flex: none;
  background: linear-gradient(150deg, #4A4A50, #121215 32%, #0A0A0C 70%, #3A3A40);
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.30);
}
.ntp-screen {
  background: #0B0B0D; border-radius: 32px; overflow: hidden; color: #fff;
  padding: 11px 12px 14px; font-size: 11px;
}
.ntp-status { display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; font-weight: 600; }
.ntp-status span:last-child { letter-spacing: 1px; }
.ntp-title { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.ntp-title b { font-family: var(--display); font-size: 13px; font-weight: 600; }
.ntp-title i { font-style: normal; color: #6E6E76; }

.ntp-search {
  display: flex; align-items: center; gap: 7px; margin-top: 11px;
  background: #17171A; border-radius: 9px; padding: 8px 10px; color: #8A8A92; font-size: 10.5px;
}
.ntp-chips { display: flex; gap: 6px; margin-top: 10px; }
.ntp-chip { font-size: 9.5px; padding: 4px 9px; border-radius: 999px; background: #17171A; color: #9A9AA2; }
.ntp-chip.on { background: #F2F1ED; color: #111113; font-weight: 600; }

.ntp-row { display: flex; gap: 9px; align-items: center; background: #141417; border-radius: 10px; padding: 8px; margin-top: 8px; }
.ntp-thumb { width: 34px; height: 34px; border-radius: 8px; flex: none; display: grid; place-items: center; font-size: 15px; background: #23232a; }
.ntp-row b { display: block; font-family: var(--display); font-size: 11px; font-weight: 600; }
.ntp-row span { display: block; font-size: 9px; color: #7E7E86; }
.ntp-row .ntp-kcal { font-size: 9.5px; color: #C9C9D0; margin-top: 2px; }
.ntp-row .ntp-kcal b { display: inline; font-weight: 600; color: #fff; }

/* Today screen */
.ntp-ring { --pct: 78%; --w: 9px; width: 132px; height: 132px; margin: 14px auto 0; position: relative; }
.ntp-ring::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(#8FB98F var(--pct), #1E1E22 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--w)), #000 calc(100% - var(--w)));
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--w)), #000 calc(100% - var(--w)));
}
.ntp-ring span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ntp-ring b { display: block; font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1; }
.ntp-ring i { font-style: normal; font-size: 9.5px; color: #8A8A92; }

.ntp-macros { display: flex; justify-content: space-between; margin-top: 14px; }
.ntp-macro { flex: 1; }
.ntp-macro em { font-style: normal; display: block; font-size: 9.5px; color: #8A8A92; }
.ntp-macro b { font-family: var(--display); font-size: 14px; font-weight: 600; }
.ntp-macro s { text-decoration: none; font-size: 8.5px; color: #6E6E76; }
.ntp-macro .bar { height: 3px; border-radius: 2px; background: #1E1E22; margin-top: 5px; overflow: hidden; }
.ntp-macro .bar i { display: block; height: 100%; border-radius: 2px; }

.ntp-sub { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; }
.ntp-sub b { font-family: var(--display); font-size: 11px; font-weight: 600; }
.ntp-sub a { font-size: 9.5px; color: #8FB98F; }
.ntp-micros { display: flex; justify-content: space-between; margin-top: 10px; }
.ntp-micro { text-align: center; font-size: 8px; color: #8A8A92; }
.ntp-dot {
  width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 4px; display: grid; place-items: center;
  font-size: 8.5px; font-weight: 600; color: #fff; border: 2px solid #8FB98F;
}

/* ── hero ────────────────────────────────────────────────────────────────── */
/* The photo bleeds into the top-right corner, the phone stands over its left edge
   and the script note sits between them — as drawn. */
.nt-hero { position: relative; background: var(--paper); padding: 0 0 26px; }
.nt-hero-photo {
  position: absolute; right: 0; top: 0; bottom: 0; width: 48%;
  clip-path: polygon(6% 0, 100% 0, 100% 100%, 0 100%);
}
.nt-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.nt-hero-grid {
  position: relative; display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 20px; align-items: start; padding: 66px 0 56px; min-height: 620px;
}
.nt-hero h1 { font-size: clamp(38px, 4.2vw, 52px); line-height: 1.08; font-weight: 700; margin-top: 16px; }
.nt-hero h1 em { font-style: normal; color: #93A47C; }
.nt-hero-sub { font-size: 15.5px; color: var(--ink-soft); margin: 18px 0 0; max-width: 42ch; }
.nt-stores { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.nt-hero .trust { margin-top: 26px; }
.nt-hero-art { position: relative; height: 100%; }
.nt-hero .ntp { position: absolute; left: 153px; top: -16px; z-index: 2; }
.nt-hero-note {
  position: absolute; left: auto; right: -40px; top: 18px; z-index: 3; color: #2C2C2E;
  font-size: 30px; line-height: 1.05; text-shadow: 0 1px 10px rgba(255,255,255,0.45);
}

/* ── log food ────────────────────────────────────────────────────────────── */
.nt-log-grid { display: grid; grid-template-columns: 340px 317px minmax(0, 1fr); gap: 34px; align-items: start; }
.nt-cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nt-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px;
  display: flex; flex-direction: column; gap: 7px;
}
.nt-card-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--paper-2); display: grid; place-items: center; color: var(--ink); }
.nt-card h3 { font-size: 14px; font-weight: 600; }
.nt-card p { margin: 0; font-size: 12px; color: var(--ink-mute); line-height: 1.4; }
.nt-card-shot { border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; margin-top: auto; }
.nt-card-shot img { width: 100%; height: 100%; object-fit: cover; }

.nt-nutriscore { position: relative; }
.nt-nutriscore b {
  position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px; border-radius: 50%;
  background: #2E9E5B; color: #fff; display: grid; place-items: center;
  font-family: var(--display); font-size: 13px; font-weight: 700;
}
.nt-detect { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.nt-detect span {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; background: var(--paper-2);
  border-radius: 999px; padding: 4px 9px; color: var(--ink-soft);
}
.nt-detect svg { color: #2E9E5B; }

.nt-macrotable { margin-top: auto; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 12px; }
.nt-macrotable div { display: flex; justify-content: space-between; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.nt-macrotable div:last-child { border-bottom: 0; }
.nt-macrotable span:last-child { color: var(--ink-mute); }
.nt-save { align-self: flex-end; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; border-radius: 7px; padding: 6px 14px; }

/* ── daily targets ───────────────────────────────────────────────────────── */
.nt-targets { position: relative; overflow: hidden; }
.nt-targets-bg { position: absolute; right: 0; top: 0; bottom: 0; width: 30%; }
.nt-targets-bg img { width: 100%; height: 100%; object-fit: cover; }
.nt-targets-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--paper-2) 2%, rgba(242,241,237,0.55) 34%, transparent 62%); }
.nt-targets-grid { position: relative; display: grid; grid-template-columns: 320px 310px minmax(0, 330px); gap: 30px; align-items: start; }
.nt-side { position: relative; }
.nt-goals { display: flex; justify-content: space-between; gap: 6px; margin-top: 14px; }
.nt-goal { text-align: center; font-size: 10.5px; color: var(--ink-soft); }
.nt-goal span { width: 34px; height: 34px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; margin: 0 auto 6px; }
.nt-spark { width: 100%; height: 66px; margin-top: 12px; }
.nt-targets-note { position: absolute; right: -132px; top: 54px; width: 130px; text-align: left; color: #2C2C2E; }

/* ── insights ────────────────────────────────────────────────────────────── */
.nt-ins-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 34px; align-items: start; }
.nt-ins-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-content: start; }
.nt-ins-cards .nt-card { gap: 5px; padding: 13px; }
.nt-ins-cards .nt-card h3 { font-size: 13px; line-height: 1.25; }
.nt-ins-cards .nt-card p { font-size: 11.5px; }
.nt-ins-cards .nt-card-ic { width: 26px; height: 26px; border-radius: 8px; }
.nt-ins-row2 { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px; align-items: start; }

/* ── meal planning ───────────────────────────────────────────────────────── */
.nt-plan-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 34px; align-items: start; }
.nt-plan-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.nt-plan-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; }
.nt-plan-card > .nt-plan-img { aspect-ratio: 4 / 3; }
.nt-plan-img img { width: 100%; height: 100%; object-fit: cover; }
.nt-plan-body { padding: 12px 13px 14px; }
.nt-plan-body h3 { font-size: 13px; font-weight: 600; line-height: 1.25; }
.nt-plan-body ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.nt-plan-body li { display: flex; gap: 6px; font-size: 11px; color: var(--ink-mute); line-height: 1.3; }
.nt-plan-body svg { flex: none; margin-top: 2px; color: var(--sage-deep); }

/* ── closing band ────────────────────────────────────────────────────────── */
.nt-end { background: var(--paper-2); border-top: 1px solid var(--line); padding: 44px 0; }
.nt-end-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 36px; align-items: center; }
.nt-end h2 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; }
.nt-end p { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.nt-end .btn { white-space: nowrap; padding: 15px 26px; font-size: 15px; }
.nt-end ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.nt-end li { display: flex; gap: 9px; font-size: 13px; color: var(--ink-soft); }
.nt-end svg { flex: none; margin-top: 3px; color: var(--sage-deep); }

/* ── narrower screens ────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .nt-log-grid, .nt-targets-grid { grid-template-columns: 1fr 320px; }
  .nt-log-grid .nt-cards2, .nt-targets-grid .nt-side { grid-column: 1 / -1; }
  .nt-ins-cards { grid-template-columns: repeat(3, 1fr); }
  .nt-ins-row2 { grid-template-columns: repeat(3, 1fr); }
  .nt-plan-cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .nt-sec { padding: 64px 0; }
  .nt-hero-grid { grid-template-columns: 1fr; }
  .nt-hero-art { min-height: 0; margin-top: 34px; }
  .nt-hero-photo { position: relative; right: 0; width: 100%; height: 300px; border-radius: var(--r-md); }
  .nt-hero .ntp { position: relative; left: 0; margin: 0 auto 22px; }
  .nt-hero-note, .nt-targets-note { display: none; }
  .nt-targets-bg { display: none; }
  .nt-log-grid, .nt-targets-grid, .nt-ins-grid, .nt-plan-grid { grid-template-columns: 1fr; }
  .nt-log-grid .ntp, .nt-targets-grid .ntp { margin: 0 auto; }
  .nt-end-row { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .nt-cards2, .nt-ins-cards, .nt-ins-row2, .nt-plan-cards { grid-template-columns: 1fr 1fr; }
  .ntp { width: 100%; max-width: 320px; }
}

/* ── header, to the design ───────────────────────────────────────────────── */
.nt-head { background: #fff; border-bottom: 1px solid var(--line); }
.nt-brand { gap: 9px; align-items: center; }
.nt-wordmark { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.nt-nav { gap: 26px; font-size: 14px; }
.nt-nav .is-on { position: relative; }
.nt-nav .is-on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--ink); }
.nt-btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--ink); padding: 9px 18px; font-size: 13.5px; }
.nt-btn-ghost:hover { border-color: var(--ink); }
.nt-btn-cta { padding: 10px 20px; font-size: 13.5px; }

/* detected items over the photo */
.nt-shot-detect { position: relative; }
.nt-shot-detect .nt-detect { position: absolute; left: 8px; bottom: 8px; margin: 0; }
.nt-shot-detect .nt-detect span { background: rgba(255,255,255,0.92); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }

/* The strip is tighter here than on the homepage, as drawn. */
.nt-strip .strip-row { padding: 18px 0; }

/* Each section draws the phone at its own size in the design. */
#log-food .ntp { width: 317px; }
#targets .ntp { width: 310px; }

/* ── page scale ──────────────────────────────────────────────────────────── */
/* The design runs wider than the homepage grid and one step up in type size. */
body .wrap { width: min(1320px, calc(100% - 56px)); }
/* The header and footer keep the site-wide width so every page's header is identical. */
.site-head .wrap, .site-foot .wrap { width: min(1180px, calc(100% - 48px)); }
.nt-hero h1 { font-size: clamp(42px, 4.4vw, 62px); line-height: 1.07; }
.nt-hero-sub { font-size: 17px; max-width: 46ch; }
.nt-h2 { font-size: clamp(32px, 3.2vw, 45px); }
.nt-lead { font-size: 16px; max-width: 36ch; }
.nt-ticks li { font-size: 14.5px; }
.nt-card h3 { font-size: 15px; }
.nt-card p { font-size: 13px; line-height: 1.45; }
.nt-ins-cards .nt-card h3 { font-size: 14px; }
.nt-ins-cards .nt-card p { font-size: 12.5px; }
.nt-plan-body h3 { font-size: 14px; }
.nt-plan-body li { font-size: 12px; }
.nt-note { font-size: 29px; }
.nt-end h2 { font-size: clamp(24px, 2.6vw, 32px); }
@media (min-width: 901px) {
  .nt-hero-grid { grid-template-columns: minmax(0, 470px) minmax(0, 1fr); }
  .nt-log-grid { grid-template-columns: 380px 317px minmax(0, 1fr); }
  .nt-targets-grid { grid-template-columns: 330px 310px minmax(0, 390px); }
  .nt-ins-grid, .nt-plan-grid { grid-template-columns: 330px minmax(0, 1fr); }
}

/* Insight cards carry more air in the design. */
.nt-ins-cards .nt-card { padding: 16px; gap: 7px; min-height: 132px; }
.nt-ins-cards { gap: 14px; }
.nt-ins-row2 { gap: 14px; }
.nt-plan-body { padding: 14px 15px 16px; }

/* Goal labels stay on one line, as drawn. */
.nt-goal { font-size: 10px; white-space: nowrap; }
.nt-goals { gap: 4px; }

/* ── hero, to the drawn scale ────────────────────────────────────────────── */
.nt-hero h1 { font-size: clamp(46px, 5.2vw, 75px); line-height: 1.05; letter-spacing: -0.025em; }
.nt-hero-sub { font-size: 19px; line-height: 1.5; margin-top: 22px; }
.nt-hero .store { padding: 12px 20px; }
.nt-hero .store strong { font-size: 19px; }
.nt-hero .store small { font-size: 11px; }
.nt-hero .trust-txt { font-size: 15px; }
.nt-hero .stars { font-size: 15px; }
.nt-hero .faces span { width: 38px; height: 38px; }
/* The phone runs past the bottom of the band and is cut by it, as drawn. */
.nt-hero { overflow: hidden; }
.nt-hero .ntp { top: -6px; }
.nt-hero .ntp-screen { padding-bottom: 26px; }
/* Nav sits next to the wordmark, not centred. */
.nt-head .head-row { justify-content: flex-start; gap: 44px; }
.nt-head .nt-nav { margin-right: auto; }

/* Hairlines between the five strip items, as drawn. */
.nt-strip .strip-item { flex: 1; justify-content: flex-start; padding-left: 26px; border-left: 1px solid var(--line); }
.nt-strip .strip-item:first-child { border-left: 0; padding-left: 0; }

/* ── columns fit their row ───────────────────────────────────────────────── */
/* Nothing stretches: the phone keeps its own height and the card block is sized
   to sit inside it, so there is no empty space under either one. */
.nt-log-grid, .nt-targets-grid { align-items: start; }
.nt-cards2 .nt-card { padding: 12px; gap: 5px; }
.nt-cards2 .nt-card h3 { font-size: 13.5px; }
.nt-cards2 .nt-card p { font-size: 12px; line-height: 1.35; }
.nt-cards2 .nt-card-ic { width: 26px; height: 26px; }
.nt-cards2 .nt-card-shot { aspect-ratio: auto; height: 132px; margin-top: auto; }
.nt-side .nt-card { padding: 13px; }
.nt-side .nt-spark { height: 48px; margin-top: 8px; }
.nt-side .nt-goals { margin-top: 10px; }
.nt-cards2 .nt-macrotable { margin-top: auto; }
.nt-side { display: block; }

/* ── phones and small tablets ────────────────────────────────────────────── */
@media (max-width: 900px) {
  body .wrap { width: calc(100% - 32px); }
  .nt-sec { padding: 40px 0; }

  /* Hero: photo first, then the copy, then the phone — nothing absolute. */
  .nt-hero { padding: 0; }
  .nt-hero-photo { position: relative; width: 100%; height: 230px; clip-path: none; }
  .nt-hero-grid { grid-template-columns: 1fr; min-height: 0; padding: 26px 0 32px; }
  .nt-hero h1 { font-size: clamp(32px, 9vw, 44px); }
  .nt-hero-sub { font-size: 16px; max-width: none; }
  .nt-hero-art { height: auto; }
  .nt-hero .ntp { position: relative; left: 0; top: 0; margin: 26px auto 0; }
  .nt-hero-note, .nt-targets-note { display: none; }

  .nt-stores { gap: 10px; }
  .store { padding: 10px 14px; }

  /* The five-item strip becomes a two-column list. */
  .nt-strip .strip-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 0; }
  .nt-strip .strip-item { border-left: 0; padding-left: 0; }

  .nt-log-grid, .nt-targets-grid, .nt-ins-grid, .nt-plan-grid { grid-template-columns: 1fr; gap: 26px; }
  .nt-log-grid .ntp, .nt-targets-grid .ntp, #log-food .ntp, #targets .ntp { width: min(320px, 100%); margin-inline: auto; }
  .nt-cards2 { grid-template-columns: 1fr 1fr; }
  .nt-cards2 .nt-card-shot { height: 92px; }
  .nt-targets-bg { display: none; }
  .nt-ins-cards { grid-template-columns: 1fr 1fr; }
  .nt-ins-row2 { grid-template-columns: 1fr 1fr; }
  .nt-ins-row2 .nt-note { grid-column: 1 / -1; }
  .nt-plan-cards { grid-template-columns: 1fr 1fr; }
  .nt-end-row { grid-template-columns: 1fr; gap: 20px; text-align: left; }
}

@media (max-width: 560px) {
  .nt-cards2, .nt-ins-cards, .nt-ins-row2, .nt-plan-cards { grid-template-columns: 1fr; }
  .nt-strip .strip-row { grid-template-columns: 1fr; }
  .nt-h2 { font-size: 28px; }
}
