:root {
  color-scheme: light;
  --paper: #f4f1e8;
  --paper-deep: #e8e1d2;
  --ink: #17211c;
  --ink-soft: #455047;
  --forest: #0f5138;
  --forest-deep: #0a3828;
  --cobalt: #2447a7;
  --coral: #c7523b;
  --gold: #a56a12;
  --line: #b9b3a6;
  --line-dark: #68716a;
  --focus: #0a69d1;
  --white-tint: #fbfaf5;
  --font-display: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --font-body: "Avenir Next", "Pretendard", "Apple SD Gothic Neo", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
a,
select,
input {
  -webkit-tap-highlight-color: transparent;
}

button,
select {
  cursor: pointer;
}

:where(
  .more-topics > summary,
  .decision-condition-details > summary,
  .brief-details > summary,
  .selected-product-list > summary,
  .stack-table-details > summary,
  .stack-purchase-panel > summary,
  .stack-bar-section > summary
) {
  margin-right: -8px;
  margin-left: -8px;
  padding-right: 8px;
  padding-left: 8px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

:where(
  .more-topics > summary:hover,
  .more-topics > summary:focus-visible,
  .decision-condition-details > summary:hover,
  .decision-condition-details > summary:focus-visible,
  .brief-details > summary:hover,
  .brief-details > summary:focus-visible,
  .selected-product-list > summary:hover,
  .selected-product-list > summary:focus-visible,
  .stack-table-details > summary:hover,
  .stack-table-details > summary:focus-visible,
  .stack-purchase-panel > summary:hover,
  .stack-purchase-panel > summary:focus-visible,
  .stack-bar-section > summary:hover,
  .stack-bar-section > summary:focus-visible
) {
  background: #e7eee7;
  color: var(--forest);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: #f0c55c;
  color: var(--ink);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white-tint);
  transform: translateY(-160%);
  transition: transform 160ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 0 3vw;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 44px;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
}

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

.primary-nav [data-results-nav][hidden] {
  display: none;
}

.primary-nav a {
  position: relative;
  min-width: 44px;
  min-height: 44px;
  padding: 11px 6px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.nav-chat {
  display: none;
}

.primary-nav a::after {
  position: absolute;
  right: 0;
  bottom: 7px;
  left: 0;
  height: 1px;
  background: var(--ink);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease);
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after,
.primary-nav a[aria-current="location"]::after {
  transform: scaleX(1);
}

.primary-nav a[aria-current="location"] {
  color: var(--forest);
  font-weight: 800;
}

.header-chat {
  justify-self: end;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease;
}

.header-chat:hover {
  background: var(--ink);
  color: var(--white-tint);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
  min-height: calc(100svh - 200px);
  max-height: 780px;
  border-bottom: 1px solid var(--line-dark);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 7vw 72px 6vw;
}

.overline,
.section-index {
  margin: 0 0 20px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 620px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 92px;
  font-weight: 400;
  line-height: .92;
}

@media (min-width: 981px) and (max-width: 1400px) {
  .hero h1 {
    font-size: 72px;
  }
}

.hero-lead {
  max-width: 520px;
  margin: 36px 0 0;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.75;
}

.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 42px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.trust-line span::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--forest);
  content: "";
  vertical-align: 1px;
}

.evidence-figure {
  position: relative;
  display: flex;
  min-width: 0;
  margin: 0;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  border-left: 1px solid var(--line-dark);
  background: var(--forest-deep);
  color: var(--white-tint);
  isolation: isolate;
}

.evidence-figure::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.evidence-figure::after {
  z-index: 1;
  inset: 0;
  background: linear-gradient(to bottom, transparent 54%, rgba(4, 25, 18, .78) 100%);
}

.evidence-image {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.evidence-stages {
  position: absolute;
  right: 5%;
  bottom: 12%;
  left: 5%;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.evidence-stages span {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--white-tint) 46%, transparent);
  background: rgba(8, 44, 32, .76);
  color: var(--white-tint);
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(6px);
}

.evidence-stages span::before {
  margin-right: 7px;
  color: #efb34f;
  content: "01";
  font-size: 9px;
}

.evidence-stages span:nth-child(2)::before {
  content: "02";
}

.evidence-stages span:nth-child(3)::before {
  content: "03";
}

.evidence-figure figcaption {
  position: absolute;
  right: 5%;
  bottom: 4%;
  left: 5%;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--white-tint) 38%, transparent);
  color: #d9e3dc;
  font-size: 11px;
  text-transform: uppercase;
}

.reveal {
  animation: reveal-in 720ms var(--ease) both;
}

.evidence-figure.reveal {
  animation-delay: 120ms;
}

@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.finder-band,
.results-section,
.tracker-section {
  padding: 96px 6vw;
}

.finder-band {
  border-bottom: 1px solid var(--line-dark);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(150px, .34fr) minmax(0, 1fr);
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto 56px;
}

.section-heading h2,
.results-header h2,
.commerce-heading h2,
.tracker-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 50px;
  font-weight: 400;
  line-height: 1.06;
}

.section-heading div > p,
.commerce-heading > p,
.tracker-copy > p {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--ink-soft);
}

.finder-form {
  max-width: 1180px;
  margin: 0 auto;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  display: block;
  width: 100%;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 800;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.topic-option {
  position: relative;
  min-width: 0;
}

.topic-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.topic-option label {
  display: flex;
  min-height: 112px;
  padding: 18px;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: transparent;
  transition: background 180ms ease, color 180ms ease;
  cursor: pointer;
}

.topic-option label span:first-child {
  font-family: var(--font-display);
  font-size: 27px;
  line-height: 1.1;
}

.topic-option label span:last-child {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.topic-option input:checked + label {
  background: var(--forest);
  color: var(--white-tint);
}

.topic-option input:checked + label span:last-child {
  color: #d5e5da;
}

.topic-option input:focus-visible + label {
  outline: 3px solid var(--focus);
  outline-offset: -4px;
}

.more-topics {
  margin-top: 14px;
}

.more-topics summary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
  text-decoration: underline;
  text-underline-offset: 5px;
  cursor: pointer;
}

.more-topics summary::-webkit-details-marker {
  display: none;
}

.more-topics summary::after {
  margin-left: 10px;
  content: "+";
  font-size: 20px;
  font-weight: 400;
}

.more-topics[open] summary::after {
  content: "−";
}

.topic-grid-more {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 50%;
  margin-top: 12px;
}

.topic-summary {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.topic-summary-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 16px;
  padding: 10px 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.topic-summary-row + .topic-summary-row {
  border-top: 1px solid var(--line);
}

.topic-summary-row strong {
  color: var(--forest);
  font-size: 12px;
}

.topic-summary-row span {
  min-width: 0;
}

.decision-condition-fieldset {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.decision-condition-summary {
  margin: 0 0 18px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
}

.decision-condition-layout {
  display: grid;
  grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.decision-profile-control {
  min-width: 0;
}

.pregnancy-profile-output {
  min-height: 48px;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--ink);
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
}

.pregnancy-profile-output[hidden] {
  display: none;
}

.decision-profile-control:has(.pregnancy-profile-output:not([hidden])) .select-label select,
.decision-profile-control:has(.pregnancy-profile-output:not([hidden])) .select-label small {
  display: none;
}

.decision-condition-details {
  border-bottom: 1px solid var(--line);
}

.decision-condition-details > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.decision-condition-details > summary::-webkit-details-marker {
  display: none;
}

.decision-condition-details > summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
}

.decision-condition-details[open] > summary::after {
  content: "−";
}

.decision-condition-body {
  display: grid;
  gap: 20px;
  padding: 16px 0 22px;
}

.decision-condition-group h3 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.select-label {
  display: grid;
  gap: 8px;
}

.select-label span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

select,
input[type="number"],
input[type="text"] {
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
}

select {
  padding: 0 34px 0 2px;
}

.check-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.check-row label {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  font-size: 13px;
  cursor: pointer;
}

.cause-status-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.cause-status-option {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.cause-status-option:has(input:checked) {
  background: var(--forest);
  color: var(--white-tint);
}

.cause-status-option:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.cause-status-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--forest);
}

.confirmed-nutrient-field {
  display: grid;
  max-width: 360px;
  margin-top: 16px;
  gap: 4px;
}

.confirmed-nutrient-field[hidden] {
  display: none;
}

.confirmed-nutrient-field > span {
  font-size: 13px;
  font-weight: 800;
}

.confirmed-nutrient-field small {
  color: var(--ink-soft);
  font-size: 12px;
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--forest);
}

.form-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
}

.form-action p {
  color: var(--ink-soft);
  font-size: 12px;
}

.form-action .profile-conflict-status {
  margin: 0;
  color: #8b2f21;
  font-size: 13px;
  font-weight: 800;
}

.profile-conflict-status[hidden] {
  display: none;
}

.finder-completion-status {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--coral-dark);
  background: color-mix(in srgb, var(--coral) 10%, var(--white-tint));
  color: var(--ink);
  align-items: baseline;
}

.finder-completion-status[hidden] {
  display: none;
}

.finder-completion-status strong {
  color: var(--coral-dark);
  font-size: 13px;
}

.finder-completion-status span {
  font-size: 13px;
  line-height: 1.55;
}

.needs-input {
  padding: 10px;
  background: color-mix(in srgb, var(--coral) 9%, transparent);
  outline: 1px solid var(--coral-dark);
  outline-offset: 2px;
}

.needs-input select {
  border-bottom: 2px solid var(--coral-dark);
}

.symptom-question {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  background: var(--white-tint);
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
}

.symptom-question:hover,
.symptom-question:focus-visible {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--white-tint);
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 12px 20px;
  border: 1px solid var(--forest);
  border-radius: 2px;
  background: var(--forest);
  color: var(--white-tint);
  font-size: 14px;
  font-weight: 800;
  transition: background 180ms ease, color 180ms ease, transform 180ms var(--ease);
}

.primary-action:hover,
.secondary-action:hover {
  background: transparent;
  color: var(--forest);
  transform: translateY(-2px);
}

.results-section {
  background: var(--white-tint);
}

.result-context {
  display: grid;
  max-width: 1180px;
  margin: 0 auto 42px;
  padding: 16px 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.result-context-list {
  display: grid;
  min-width: 0;
  margin: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.result-context-list[hidden] {
  display: none;
}

.result-context-summary {
  min-width: 0;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.result-context-list > div {
  min-width: 0;
}

.result-context-list dt {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.result-context-list dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 800;
}

.result-context-edit {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 2px;
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 5px;
  white-space: nowrap;
}

.results-header {
  display: grid;
  grid-template-columns: minmax(450px, .9fr) minmax(0, 1.1fr);
  gap: 48px;
  max-width: 1180px;
  margin: 0 auto 42px;
  align-items: end;
}

.briefing-decision {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 34px;
  padding: 20px 0;
  align-items: baseline;
  border-top: 3px solid var(--forest);
  border-bottom: 1px solid var(--line);
}

.briefing-decision.check-first {
  border-top-color: var(--cobalt);
}

.briefing-decision.blocked {
  border-top-color: var(--coral);
}

.briefing-decision.conditional {
  border-top-color: var(--gold);
}

.briefing-decision-label {
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
}

.briefing-decision-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.25;
}

.candidate-tier-group {
  border-top: 3px solid var(--line);
}

.candidate-tier-group.compare {
  border-top-color: var(--forest);
}

.candidate-tier-group.check-first {
  border-top-color: var(--cobalt);
}

.candidate-tier-group.conditional {
  border-top-color: var(--gold);
}

.candidate-tier-group.blocked {
  border-top-color: var(--coral);
}

.candidate-tier-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0 8px;
}

.candidate-tier-heading h4,
.candidate-tier-heading p {
  margin: 0;
}

.candidate-tier-heading p {
  color: var(--ink-soft);
  font-size: 12px;
}

.decision-tier-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: 2px;
  color: var(--forest);
  font-size: 11px;
  font-weight: 800;
}

.decision-tier-badge.conditional {
  color: #765700;
}

.decision-tier-badge.check-first {
  color: var(--cobalt);
}

.decision-tier-badge.blocked {
  color: #8b2f21;
}

.results-intro {
  max-width: 660px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
}

.safety-notice {
  max-width: 1180px;
  margin: 0 auto 36px;
  padding: 18px 20px;
  border: 1px solid var(--coral);
  background: #fff0eb;
  color: #6f251a;
  font-size: 14px;
  font-weight: 700;
}

.briefing-summary {
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
}

.briefing-summary {
  margin-top: 50px;
  margin-bottom: 72px;
}

.nutrient-brief-list {
  border-top: 2px solid var(--ink);
}

.nutrient-brief-row {
  display: grid;
  grid-template-columns: 40px 180px minmax(260px, 1fr) minmax(150px, .5fr);
  gap: 10px 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.brief-rank {
  color: var(--forest);
  font-family: var(--font-display);
  font-size: 15px;
}

.brief-name h4,
.brief-context p {
  margin: 0;
}

.brief-name h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;
}

.brief-name .decision-tier-badge {
  margin-top: 6px;
}

.brief-role {
  font-size: 12px;
  font-weight: 700;
}

.brief-rank-reason {
  margin-top: 5px !important;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.brief-actions {
  display: flex;
  justify-content: flex-end;
}

.brief-next-action {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--forest);
  border-radius: 2px;
  background: transparent;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.brief-next-action:hover,
.brief-next-action:focus-visible {
  background: var(--forest);
  color: var(--white-tint);
}

.brief-details {
  grid-column: 3 / 5;
  min-width: 0;
}

.brief-details > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.brief-details > summary::-webkit-details-marker {
  display: none;
}

.brief-details > summary::after {
  content: "+";
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
}

.brief-details[open] summary::after {
  content: "−";
}

.brief-details-body {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 18px 24px;
  padding: 12px 0 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.brief-evidence-lead p,
.brief-source p {
  margin: 0;
}

.brief-evidence-lead strong {
  display: block;
  margin-bottom: 5px;
  color: var(--forest);
}

.brief-source {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.brief-details-body > .save-nutrient {
  grid-column: 1 / -1;
  justify-self: end;
}

.subsection-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 20px;
}

.subsection-heading h3,
.stack-heading h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.15;
}

.subsection-heading > p {
  max-width: 510px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.subsection-label {
  margin: 0 0 5px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border-top: 2px solid var(--ink);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table th {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.data-table strong,
.data-table small {
  display: block;
}

.data-table small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
}

.briefing-table {
  min-width: 900px;
  table-layout: fixed;
}

.briefing-table th:nth-child(1),
.briefing-table td:nth-child(1) { width: 6%; }
.briefing-table th:nth-child(2),
.briefing-table td:nth-child(2) { width: 15%; }
.briefing-table th:nth-child(3),
.briefing-table td:nth-child(3) { width: 31%; }
.briefing-table th:nth-child(4),
.briefing-table td:nth-child(4) { width: 25%; }
.briefing-table th:nth-child(5),
.briefing-table td:nth-child(5) { width: 23%; }

.table-rank {
  color: var(--forest);
  font-family: var(--font-display);
  font-size: 16px;
}

.table-name strong,
.table-context strong {
  font-size: 13px;
}

.table-caution {
  color: #6f251a;
}

.evidence-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 18px;
}

.evidence-meta div {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.evidence-meta dt {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}

.evidence-meta dd {
  margin: 5px 0 0;
  font-size: 13px;
}

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

.source-ai-copy {
  margin: 0;
  padding: 14px 16px;
  border-left: 3px solid var(--forest);
  background: var(--paper);
  font-size: 13px;
}

.source-raw-list {
  margin: 14px 0 4px;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 12px;
}

.source-raw-list li + li {
  margin-top: 5px;
}

.source-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 700;
}

.save-nutrient {
  min-height: 44px;
  margin-left: auto;
  padding: 4px 11px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.commerce-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 1180px;
  margin: 0 auto 16px;
  align-items: end;
}

.product-list {
  max-width: 1180px;
  margin: 0 auto;
  border-top: 2px solid var(--ink);
}

.product-list > .price-snapshot-note {
  margin: 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  text-align: right;
}

.product-group {
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--line);
}

.product-evidence-only {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 20px;
  align-items: center;
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--line);
}

.product-evidence-only > div,
.product-evidence-only > p {
  min-width: 0;
}

.product-evidence-only h3,
.product-evidence-only p {
  margin: 0;
}

.product-evidence-only h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
}

.product-evidence-only p {
  grid-column: 1;
  color: var(--ink-soft);
  font-size: 13px;
}

.product-evidence-status {
  display: block;
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 800;
}

.product-evidence-only > .text-action {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.product-group-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 6px;
  list-style: none;
}

.product-group-heading::-webkit-details-marker {
  display: none;
}

.product-group h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
}

.product-group-heading p,
.price-snapshot-note {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.product-count {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.product-selection-impact {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  padding: 2px 6px;
  border-left: 3px solid var(--coral);
  background: #f8e3dc;
  color: #8f2f1f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.product-selection-impact.at-upper,
.product-selection-impact.high {
  border-left-color: var(--gold);
  background: #f4e8c8;
  color: #6f4609;
}

.product-selection-impact[hidden] {
  display: none;
}

.evidence-grade-note {
  display: block;
  margin-bottom: 4px;
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 800;
}

.product-table-scroll {
  border-top-width: 1px;
}

.product-table {
  min-width: 1040px;
  table-layout: fixed;
}

.product-table th:nth-child(1),
.product-table td:nth-child(1) { width: 7%; }
.product-table th:nth-child(2),
.product-table td:nth-child(2) { width: 29%; }
.product-table th:nth-child(3),
.product-table td:nth-child(3) { width: 28%; }
.product-table th:nth-child(4),
.product-table td:nth-child(4) { display: none; }
.product-table th:nth-child(5),
.product-table td:nth-child(5) { width: 12%; }
.product-table th:nth-child(6),
.product-table td:nth-child(6) { width: 11%; }
.product-table th:nth-child(7),
.product-table td:nth-child(7) { width: 13%; }

.product-name-cell strong,
.product-ingredients strong {
  font-size: 14px;
}

.product-mobile-summary,
.product-link-compact,
.product-select-copy {
  display: none;
}

.product-ingredients .ingredient-primary {
  color: var(--ink);
  line-height: 1.45;
}

.product-ingredients .ingredient-secondary {
  color: var(--cobalt);
  line-height: 1.45;
}

.product-ingredients .ingredient-serving {
  color: var(--ink-soft);
}

.product-label-details {
  margin-top: 7px;
  border-top: 1px dotted var(--line-dark);
}

.product-label-details summary {
  display: grid;
  min-height: 44px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.product-label-details summary::-webkit-details-marker {
  display: none;
}

.product-label-details summary::after {
  grid-row: 1 / span 2;
  grid-column: 2;
  content: "+";
  font-family: var(--font-display);
  font-size: 18px;
}

.product-label-details[open] summary::after {
  content: "−";
}

.product-label-details summary > span {
  font-size: 12px;
  font-weight: 800;
}

.product-label-details summary > small {
  color: var(--ink-soft);
  font-size: 12px;
}

.product-label-details summary > small.verified-complete {
  color: var(--forest);
}

.product-label-details summary > small.search-only {
  color: #6f470c;
}

.product-label-list {
  border-top: 1px solid var(--line);
}

.product-label-item {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dotted var(--line);
  font-size: 12px;
}

.product-label-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.product-label-item strong {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.product-label-item em {
  display: block;
  color: var(--cobalt);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.product-label-source {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding-top: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.product-label-source a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  flex: 0 0 auto;
  color: var(--cobalt);
  font-weight: 800;
}

.price-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.product-daily-cost {
  color: var(--forest);
  font-weight: 800;
}

.product-empty {
  margin: 0;
  padding: 22px 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.product-gate {
  padding: 18px;
  border-top: 1px solid var(--line);
}

.product-gate strong,
.product-gate p {
  margin: 0;
}

.product-gate p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 13px;
}

.product-context-note {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--gold) 8%, transparent);
}

.product-context-note strong,
.product-context-note p {
  margin: 0;
}

.product-context-note strong {
  font-size: 12px;
}

.product-context-note p {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 12px;
}

.product-link {
  display: inline-flex;
  min-width: 96px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.product-link:hover {
  background: var(--ink);
  color: var(--white-tint);
}

.product-link-secondary {
  border-color: var(--line-dark);
  color: var(--ink-soft);
  font-weight: 700;
}

.product-priority-reason {
  display: block;
  margin-top: 5px;
  color: var(--forest);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.product-group-toolbar {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.product-sort-control {
  display: flex;
  flex: 0 0 auto;
  min-width: 170px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  margin-left: auto;
}

.product-sort-label {
  flex: 0 0 auto;
}

.product-sort-control select {
  width: 100%;
  min-height: 44px;
  font-size: 12px;
  font-weight: 700;
}

.product-purchase-confirm {
  display: grid;
  min-width: 220px;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--gold);
  background: color-mix(in srgb, var(--paper) 86%, #f2d58a);
  text-align: left;
}

.product-purchase-confirm[hidden] {
  display: none;
}

.product-link[hidden] {
  display: none !important;
}

.product-purchase-confirm strong,
.product-purchase-confirm p {
  margin: 0;
}

.product-purchase-confirm strong {
  font-size: 12px;
}

.product-purchase-confirm p {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.product-purchase-nutrient-note {
  display: grid;
  gap: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 70%, var(--ink));
}

.product-purchase-nutrient-note strong {
  color: var(--forest);
}

.product-purchase-confirm .product-link,
.product-purchase-confirm-close {
  min-height: 44px;
}

.product-purchase-confirm-close {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.product-more-toggle {
  display: none;
}

.product-link[aria-disabled="true"] {
  border-color: var(--line);
  color: var(--ink-soft);
  cursor: not-allowed;
}

.product-link:disabled {
  border-color: var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor: not-allowed;
}

.stack-analyzer {
  max-width: 1180px;
  margin: 44px auto 0;
  padding: 26px 0 0;
  border-top: 2px solid var(--ink);
}

.stack-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.reference-profile {
  display: grid;
  min-width: 220px;
  gap: 2px;
}

.reference-profile span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.reference-profile select {
  min-height: 44px;
  font-size: 13px;
}

.stack-scope {
  max-width: 820px;
  margin: 8px 0 14px;
  color: var(--ink-soft);
  font-size: 12px;
}

.stack-scope a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.stack-empty-state {
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--white-tint);
}

.stack-empty-state[hidden] {
  display: none;
}

.stack-empty-state strong {
  font-size: 14px;
}

.stack-empty-state span {
  color: var(--ink-soft);
  font-size: 12px;
}

.stack-empty-state a {
  min-height: 44px;
  padding-top: 12px;
  border-bottom: 1px solid currentColor;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
}

.stack-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--line);
}

.stack-metrics[hidden],
.selected-product-list[hidden],
.stack-graph-section[hidden],
.stack-table-details[hidden] {
  display: none;
}

.stack-metric {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stack-metric span,
.stack-metric strong {
  display: block;
}

.stack-metric span {
  color: var(--ink-soft);
  font-size: 12px;
}

.stack-metric strong {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.selected-product-list {
  margin: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.selected-product-list > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.selected-product-list > summary::-webkit-details-marker {
  display: none;
}

.selected-product-list > summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
}

.selected-product-list[open] > summary::after {
  content: "−";
}

.stack-empty {
  margin: 0;
  padding: 32px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}

.selected-product-rows {
  border-top: 1px solid var(--line);
}

.selected-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.selected-product-row strong,
.selected-product-row small {
  display: block;
}

.selected-product-row strong {
  font-size: 13px;
}

.selected-product-row small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 12px;
}

.selected-product-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.selected-product-actions a,
.selected-product-actions button {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: var(--white-tint);
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.selected-product-actions button {
  min-width: 44px;
  color: var(--ink-soft);
}

.stack-decision {
  display: grid;
  gap: 14px;
  margin: 0 0 34px;
  padding: 18px 20px;
  border-left: 3px solid var(--forest);
  background: #f1f5ed;
}

.stack-decision[hidden] {
  display: none;
}

.stack-decision.risk {
  border-left-color: var(--coral);
  background: #fbf1ec;
}

.stack-decision-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr);
  gap: 20px;
  align-items: end;
}

.stack-decision h4 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
}

.stack-decision-copy,
.stack-decision-no-action {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.stack-decision-risks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-decision-risks span {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--coral) 45%, var(--line));
  background: var(--white-tint);
  color: var(--ink-soft);
  font-size: 12px;
}

.stack-decision-risks strong {
  color: var(--coral-dark);
  font-size: 12px;
}

.stack-decision-actions {
  display: grid;
  border-top: 1px solid color-mix(in srgb, var(--coral) 35%, var(--line));
}

.stack-decision-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--coral) 22%, var(--line));
  align-items: center;
}

.stack-decision-action > div,
.stack-decision-action strong,
.stack-decision-action small {
  display: block;
  min-width: 0;
}

.stack-decision-action strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.stack-decision-action small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 12px;
}

.stack-decision-action.resolves small {
  color: var(--forest);
  font-weight: 700;
}

.stack-decision-action button {
  min-width: 88px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--coral-dark);
  border-radius: 2px;
  background: transparent;
  color: var(--coral-dark);
  font-size: 11px;
  font-weight: 800;
}

.stack-decision-action button:hover,
.stack-decision-action button:focus-visible {
  background: var(--coral-dark);
  color: var(--white-tint);
}

.stack-decision-clinician {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line-dark);
  color: var(--coral-dark);
  font-size: 12px;
  font-weight: 700;
}

.stack-purchase {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.stack-purchase-panel {
  margin: 12px 0 18px;
  border: 1px solid var(--forest);
  background: var(--white-tint);
}

.stack-purchase-panel[hidden] {
  display: none;
}

.stack-purchase-panel > summary {
  display: flex;
  min-height: 56px;
  margin: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--forest);
  color: var(--white-tint);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  list-style: none;
}

.stack-purchase-panel > summary:hover,
.stack-purchase-panel > summary:focus-visible {
  background: var(--ink);
  color: var(--white-tint);
}

.stack-purchase-panel > summary::-webkit-details-marker {
  display: none;
}

.stack-purchase-panel > summary::after {
  content: '+';
  font-size: 20px;
  line-height: 1;
}

.stack-purchase-panel[open] > summary::after {
  content: '−';
}

.stack-purchase-intro,
.stack-purchase-link span,
.stack-purchase-link strong,
.stack-purchase-link small {
  display: grid;
}

.stack-purchase-intro {
  gap: 2px;
}

.stack-purchase-intro strong {
  font-size: 12px;
}

.stack-purchase-intro span {
  color: var(--ink-soft);
  font-size: 12px;
}

.stack-purchase-disclosure {
  max-width: none;
  margin: 0;
  padding: 8px 0;
  font-size: 11px;
}

.stack-purchase-links {
  display: grid;
  gap: 6px;
}

.stack-purchase-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 6px;
}

.stack-purchase-link {
  display: grid;
  min-height: 52px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 8px 10px;
  border: 1px solid var(--forest);
  background: var(--white-tint);
  align-items: center;
  text-decoration: none;
}

.stack-purchase-link strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.stack-purchase-link small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 12px;
}

.stack-purchase-link b {
  color: var(--forest);
  font-size: 12px;
  white-space: nowrap;
}

.stack-purchase-link:hover,
.stack-purchase-link:focus-visible {
  background: var(--forest);
  color: var(--white-tint);
}

.stack-purchase-link:hover small,
.stack-purchase-link:hover b,
.stack-purchase-link:focus-visible small,
.stack-purchase-link:focus-visible b {
  color: inherit;
}

.stack-purchase-remove {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line-dark);
  background: var(--white-tint);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.stack-purchase-remove:hover,
.stack-purchase-remove:focus-visible {
  border-color: var(--coral-dark);
  color: var(--coral-dark);
}

.stack-undo {
  min-height: 44px;
  margin: -22px 0 20px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
}

.stack-undo[hidden] {
  display: none;
}

.stack-graph-section {
  margin-top: 46px;
}

.stack-graph-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}

.stack-graph-heading h4,
.stack-graph-heading p {
  margin: 0;
}

.stack-graph-heading h4 {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
}

.stack-graph-heading p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
}

.stack-status-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
  font-size: 12px;
  font-weight: 800;
}

.stack-status-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.stack-status-summary span::before {
  width: 8px;
  height: 8px;
  background: var(--line-dark);
  content: "";
}

.stack-status-summary .risk::before { background: var(--coral); }
.stack-status-summary .under::before { background: var(--gold); }
.stack-status-summary .covered::before { background: var(--forest); }
.stack-status-summary .recorded::before { background: var(--cobalt); }

.stack-graph-key {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
}

.stack-graph-key span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stack-graph-key i {
  display: inline-block;
  width: 16px;
  height: 6px;
}

.stack-color-legend {
  display: contents !important;
}

.key-status.risk i { background: var(--coral); }
.key-status.under i { background: var(--gold); }
.key-status.absent i { background: var(--line-dark); }
.key-status.covered i { background: var(--forest); }
.key-status.recorded i { background: var(--cobalt); }
.key-target { border-left: 2px solid var(--forest); }
.key-upper { border-left: 2px solid var(--coral); }

.stack-graph {
  border-bottom: 1px solid var(--line);
}

.stack-graph-empty {
  margin: 0;
  padding: 36px 18px;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}

.absent-nutrient-details {
  border-top: 1px solid var(--line);
}

.absent-nutrient-details > summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.absent-nutrient-details > summary::-webkit-details-marker {
  display: none;
}

.absent-nutrient-details > summary::after {
  content: "+";
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
}

.absent-nutrient-details[open] > summary::after {
  content: "−";
}

.absent-nutrient-list .nutrient-graph-row:first-child {
  border-top: 1px solid var(--line);
}

.nutrient-graph-row {
  display: grid;
  grid-template-columns: 130px minmax(280px, .95fr) minmax(340px, 1.05fr);
  gap: 22px;
  padding: 19px 0;
  border-top: 1px solid var(--line);
  align-items: center;
}

.nutrient-graph-row:first-child {
  border-top: 0;
}

.nutrient-graph-row.interest-related {
  margin: 0 -14px;
  padding-right: 14px;
  padding-left: 11px;
  border-left: 3px solid var(--forest);
  background: #f1f5ed;
}

.graph-name-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 7px;
}

.interest-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  background: var(--forest);
  color: var(--paper);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.graph-identity h5,
.graph-identity strong,
.graph-identity small {
  display: block;
  margin: 0;
}

.graph-identity h5 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 400;
}

.graph-identity strong {
  margin-top: 5px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.graph-identity small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 12px;
}

.graph-plot {
  min-width: 0;
}

.graph-track {
  position: relative;
  height: 18px;
  margin: 30px 0 23px;
  border: 1px solid var(--line-dark);
  background: var(--paper-deep);
}

.graph-fill {
  display: block;
  width: var(--graph-amount, 0%);
  height: 100%;
  background: var(--forest);
  transform-origin: left;
  animation: graph-in 480ms var(--ease) both;
}

.graph-fill.segmented {
  display: flex;
}

.graph-segment {
  position: relative;
  min-width: 1px;
  height: 100%;
  flex: var(--segment-share, 1) 1 0;
  background: transparent;
  cursor: help;
}

.graph-segment + .graph-segment {
  box-shadow: inset 1px 0 rgba(255, 255, 255, .78);
}

.graph-segment-number {
  position: absolute;
  top: 1px;
  left: 50%;
  z-index: 2;
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  border: 1px solid rgba(23, 33, 28, .65);
  background: rgba(251, 250, 245, .94);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  transform: translateX(-50%);
}

.graph-segment:hover,
.graph-segment:focus-visible {
  z-index: 5;
  filter: brightness(1.08);
}

.graph-segment:focus-visible {
  outline-width: 2px;
  outline-offset: 2px;
}

.graph-segment-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  z-index: 8;
  display: grid;
  width: max-content;
  max-width: min(240px, calc(100vw - 44px));
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white-tint);
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.graph-segment-tooltip::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  content: "";
  transform: translate(-50%, -4px) rotate(45deg);
}

.graph-segment-tooltip strong {
  font-size: 10px;
}

.graph-segment:hover .graph-segment-tooltip,
.graph-segment:focus-visible .graph-segment-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.graph-segment:first-child .graph-segment-tooltip {
  left: 0;
  transform: translate(0, 4px);
}

.graph-segment:first-child:hover .graph-segment-tooltip,
.graph-segment:first-child:focus-visible .graph-segment-tooltip {
  transform: translate(0, 0);
}

.graph-segment:first-child .graph-segment-tooltip::after {
  left: 12px;
}

.graph-segment:last-child .graph-segment-tooltip {
  right: 0;
  left: auto;
  transform: translate(0, 4px);
}

.graph-segment:last-child:hover .graph-segment-tooltip,
.graph-segment:last-child:focus-visible .graph-segment-tooltip {
  transform: translate(0, 0);
}

.graph-segment:last-child .graph-segment-tooltip::after {
  right: 12px;
  left: auto;
}

.graph-segment:only-child .graph-segment-tooltip {
  right: auto;
  left: 0;
}

.graph-segment:only-child .graph-segment-tooltip::after {
  right: auto;
  left: 12px;
}

.graph-fill.under { background: var(--gold); }
.graph-fill.over,
.graph-fill.at-upper,
.graph-fill.high { background: var(--coral); }
.graph-fill.recorded { background: var(--cobalt); }

@keyframes graph-in {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.graph-marker {
  position: absolute;
  top: -9px;
  left: var(--marker-position, 0%);
  width: 0;
  height: 30px;
  border-left: 2px solid var(--forest);
  pointer-events: none;
}

.graph-marker.upper {
  border-left-color: var(--coral);
}

.graph-marker > span {
  position: absolute;
  left: 0;
  color: var(--forest-deep);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  transform: translateX(-50%);
}

.graph-marker.target > span {
  top: 31px;
}

.graph-marker.upper > span {
  bottom: 31px;
  color: #8a2e20;
}

.graph-marker.edge-left > span { transform: translateX(0); }
.graph-marker.edge-right > span { transform: translateX(-100%); }

.graph-scale {
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.graph-explanation {
  min-width: 0;
  padding-left: 18px;
  border-left: 3px solid var(--line-dark);
}

.graph-explanation.quiet {
  padding-left: 0;
  border-left: 0;
  color: var(--ink-soft);
}

.nutrient-graph-row.under .graph-explanation { border-left-color: var(--gold); }
.nutrient-graph-row.over .graph-explanation,
.nutrient-graph-row.at-upper .graph-explanation,
.nutrient-graph-row.high .graph-explanation { border-left-color: var(--coral); }
.nutrient-graph-row.covered .graph-explanation { border-left-color: var(--forest); }
.nutrient-graph-row.recorded .graph-explanation { border-left-color: var(--cobalt); }

.graph-difference {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.graph-difference.under { color: #6f470c; }
.graph-difference.over,
.graph-difference.at-upper,
.graph-difference.high { color: #8a2e20; }

.graph-alert-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.graph-sources {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 22px;
  padding-top: 11px;
  border-top: 1px dotted var(--line-dark);
}

.graph-sources-label {
  color: var(--ink-soft);
  font-size: 10px;
}

.graph-source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
}

.graph-source-item {
  display: grid;
  min-width: 0;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 5px 12px;
  align-items: baseline;
}

.graph-source-number {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  align-self: center;
  background: var(--ink);
  color: var(--paper);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.graph-source-item > strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 10px;
  font-weight: 700;
}

.graph-source-amount {
  color: var(--ink-soft);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.graph-source-label,
.graph-source-value {
  display: block;
}

.graph-source-amount em {
  display: block;
  color: var(--cobalt);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.stack-table-details {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stack-table-details summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.stack-table-details summary::-webkit-details-marker {
  display: none;
}

.stack-table-details summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
}

.stack-table-details[open] summary::after {
  content: "−";
}

.stack-table {
  min-width: 760px;
}

.stack-total,
.stack-status {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.stack-status.over {
  color: #8a2e20;
}

.stack-status.at-upper {
  color: #8a2e20;
}

.stack-status.under {
  color: #6f470c;
}

.affiliate-disclosure {
  max-width: 1180px;
  margin: 4px auto 0;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
}

.affiliate-disclosure strong {
  margin-right: 8px;
  color: var(--ink);
}

.recipes-section {
  padding: 72px 6vw;
  background: var(--paper-deep);
  color: var(--ink);
}

.light-heading .section-index,
.recipes-section .section-index {
  color: var(--forest);
}

.light-heading div > p {
  color: var(--ink-soft);
}

.recipes-section .section-heading {
  margin-bottom: 32px;
}

.recipes-section .section-heading h2 {
  font-size: 38px;
}

.recipe-ranking {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  border-top: 1px solid var(--line-dark);
  list-style: none;
}

.recipe-item {
  display: grid;
  grid-template-columns: 56px minmax(180px, .7fr) minmax(0, 1fr) auto;
  min-height: 88px;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--line-dark);
}

.recipe-rank {
  color: var(--forest);
  font-family: var(--font-display);
  font-size: 24px;
}

.recipe-item h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 400;
}

.recipe-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.recipe-open {
  min-width: 92px;
  min-height: 44px;
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  background: transparent;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
}

.recipe-open:hover {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--white-tint);
}

.tracker-section {
  padding: 72px 6vw;
  border-top: 1px solid var(--line-dark);
  display: grid;
  grid-template-columns: minmax(260px, .6fr) minmax(0, 1.4fr);
  gap: 5vw;
  border-bottom: 1px solid var(--line-dark);
}

.tracker-copy h2 {
  font-size: 38px;
}

.tracker-copy > p {
  font-size: 13px;
  line-height: 1.55;
}

.tracker-copy {
  position: sticky;
  top: 124px;
  height: max-content;
}

.tracker-tool {
  border-top: 1px solid var(--ink);
}

.label-scan-tool,
.manual-intake-tool {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.label-scan-heading {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
}

.label-scan-heading h3,
.label-scan-review h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
}

.label-scan-limit {
  padding: 5px 9px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.label-scan-description,
.label-scan-privacy,
.label-scan-status {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.label-scan-privacy {
  padding-left: 22px;
  background: linear-gradient(var(--forest), var(--forest)) 4px 8px / 8px 8px no-repeat;
}

.label-scan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  align-items: center;
}

.label-scan-actions input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.label-photo-picker {
  display: inline-flex;
  min-height: 44px;
  padding: 9px 15px;
  align-items: center;
  border: 1px solid var(--line-dark);
  background: var(--white-tint);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.label-photo-picker:hover,
.label-photo-picker:focus-within {
  border-color: var(--forest);
  color: var(--forest);
}

.label-scan-status[data-kind="error"],
.label-photo-state.error {
  color: var(--coral);
}

.label-scan-status[data-kind="warning"],
.label-review-warning {
  color: var(--gold);
}

.label-scan-status[data-kind="success"],
.label-photo-state.success {
  color: var(--forest);
}

.label-scan-selection {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.label-photo-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  align-items: center;
}

.label-photo-preview {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.label-photo-copy {
  min-width: 0;
}

.label-photo-copy strong,
.label-photo-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-photo-copy strong {
  font-size: 12px;
}

.label-photo-copy span {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11px;
}

.label-scan-review {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.label-scan-review-list {
  display: grid;
  gap: 14px;
  margin: 12px 0 18px;
}

.label-review-card {
  padding: 16px;
  border: 1px solid var(--line-dark);
  background: var(--white-tint);
}

.label-review-card legend {
  width: auto;
  padding: 0 6px;
  margin: 0;
}

.label-review-field {
  display: grid;
  grid-template-columns: minmax(100px, .35fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 10px;
  align-items: center;
}

.label-review-field span {
  font-size: 12px;
  font-weight: 800;
}

.label-review-ingredients {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.label-review-ingredient {
  display: grid;
  grid-template-columns: 24px minmax(100px, .8fr) minmax(140px, 1fr) minmax(90px, .5fr) auto;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.label-review-ingredient.confidence-low {
  background: color-mix(in srgb, #f2c14e 12%, transparent);
}

.label-review-ingredient small {
  grid-column: 2 / -1;
  color: var(--gold);
}

.label-review-unit {
  color: var(--ink-soft);
  font-size: 12px;
}

.label-review-exclude {
  margin-top: 14px;
}

.scanned-product-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  align-items: center;
}

.scanned-product-copy strong,
.scanned-product-copy span,
.scanned-product-copy small {
  display: block;
}

.scanned-product-copy span,
.scanned-product-copy small {
  margin-top: 3px;
  color: var(--ink-soft);
}

.scanned-product-copy small {
  font-size: 11px;
}

.intake-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(160px, .7fr) auto;
  gap: 12px;
  padding: 20px 0 22px;
  border-bottom: 1px solid var(--line);
  align-items: end;
}

.amount-control {
  position: relative;
}

.amount-control input {
  width: 100%;
  padding-right: 58px;
}

.amount-control output {
  position: absolute;
  right: 4px;
  bottom: 12px;
  color: var(--ink-soft);
  font-size: 12px;
}

.summary-title {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
}

.summary-title h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
}

.text-action {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  background: var(--white-tint);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.text-action:hover,
.text-action:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white-tint);
}

.intake-empty {
  padding: 48px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  text-align: center;
}

.intake-empty strong,
.intake-empty span {
  display: block;
}

.intake-empty span {
  margin-top: 6px;
  font-size: 12px;
}

.intake-row {
  display: grid;
  grid-template-columns: minmax(130px, .7fr) minmax(180px, 1fr) minmax(90px, auto);
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  align-items: center;
}

.intake-name strong,
.intake-name small {
  display: block;
}

.intake-name small {
  margin-top: 3px;
  color: var(--ink-soft);
}

.intake-meter {
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  background: var(--paper-deep);
}

.intake-meter span {
  display: block;
  width: var(--meter-width, 0%);
  height: 100%;
  background: var(--meter-color, var(--forest));
  transform-origin: left;
  animation: meter-in 420ms var(--ease) both;
}

@keyframes meter-in {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.intake-status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  font-size: 11px;
  font-weight: 800;
}

.intake-status.over {
  border-color: var(--coral);
  color: #8a2e20;
}

.intake-status.under {
  border-color: var(--gold);
  color: #6f470c;
}

.intake-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.remove-intake {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer {
  display: grid;
  grid-template-columns: .8fr 1.6fr .5fr;
  gap: 42px;
  padding: 50px 6vw;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 11px;
}

.site-footer strong {
  color: var(--ink);
  font-size: 13px;
}

.site-footer p {
  margin: 4px 0 0;
}

.site-footer-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  margin-top: 10px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
}

.floating-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 35;
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  border: 1px solid var(--ink);
  border-radius: 28px;
  background: var(--white-tint);
  box-shadow: 0 8px 20px rgba(23, 33, 28, .14);
  font-size: 13px;
  font-weight: 800;
}

.floating-chat > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: var(--white-tint);
  font-family: var(--font-display);
  font-size: 18px;
}

.chat-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  display: grid;
  width: min(430px, 100vw);
  height: 100dvh;
  grid-template-rows: auto 1fr auto auto auto;
  border-left: 1px solid var(--ink);
  background: var(--white-tint);
  box-shadow: -18px 0 48px rgba(23, 33, 28, .18);
  animation: panel-in 320ms var(--ease) both;
}

.chat-panel[hidden] {
  display: none;
}

@keyframes panel-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px;
  border-bottom: 1px solid var(--line);
}

.chat-header .overline {
  margin-bottom: 6px;
}

.chat-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
}

.close-chat {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-size: 30px;
}

.chat-log {
  overflow-y: auto;
  padding: 24px;
}

.chat-message {
  width: fit-content;
  max-width: 88%;
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 13px;
}

.chat-message.user {
  margin-left: auto;
  border-color: var(--forest);
  background: var(--forest);
  color: var(--white-tint);
}

.chat-message.emergency {
  border-color: var(--coral);
  background: #fff0eb;
  color: #6f251a;
}

.chat-message a,
.chat-message button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  margin-top: 8px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 800;
}

.chat-suggestions {
  display: flex;
  gap: 6px;
  padding: 0 24px 12px;
  overflow-x: auto;
}

.chat-suggestions button {
  min-width: max-content;
  min-height: 38px;
  padding: 5px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  background: transparent;
  font-size: 11px;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
}

.chat-form input {
  padding: 0 4px;
}

.chat-form button {
  min-width: 64px;
  min-height: 44px;
  border: 1px solid var(--forest);
  border-radius: 2px;
  background: var(--forest);
  color: var(--white-tint);
  font-size: 12px;
  font-weight: 800;
}

.chat-disclaimer {
  margin: 0;
  padding: 0 24px 18px;
  color: var(--ink-soft);
  font-size: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  min-width: 240px;
  max-width: calc(100vw - 32px);
  padding: 8px 10px 8px 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--white-tint);
  font-size: 13px;
  font-weight: 700;
  align-items: center;
  gap: 16px;
  text-align: left;
  transform: translateX(-50%);
}

.toast:not([hidden]) {
  display: flex;
}

.toast button {
  min-width: max-content;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #9aa49d;
  border-radius: 2px;
  background: transparent;
  color: var(--white-tint);
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

noscript {
  display: block;
  padding: 16px;
  background: #fff0eb;
  color: #6f251a;
  text-align: center;
}

.hero-action {
  display: inline-flex;
  width: max-content;
  min-height: 48px;
  align-items: center;
  gap: 28px;
  margin-top: 24px;
  border-bottom: 1px solid var(--ink);
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.select-label small {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.result-tabs {
  position: sticky;
  top: 72px;
  z-index: 20;
  display: grid;
  max-width: 1180px;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto 26px;
  border: 1px solid var(--line-dark);
  background: color-mix(in srgb, var(--white-tint) 96%, transparent);
  backdrop-filter: blur(10px);
}

.result-tabs a {
  min-height: 44px;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.result-tabs a:last-child {
  border-right: 0;
}

#briefing-summary-title,
#commerce,
#stack-analyzer {
  scroll-margin-top: 140px;
}

.stack-controls {
  display: flex;
  align-items: end;
  gap: 16px;
}

.clear-stack-action {
  min-width: 64px;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: var(--white-tint);
  color: #8a2e20;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.clear-stack-action:hover,
.clear-stack-action:focus-visible {
  background: #f4e5e0;
}

.clear-stack-action:disabled {
  border-color: var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor: not-allowed;
  opacity: .45;
}

.stack-mode {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line-dark);
}

.stack-mode button {
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-right: 1px solid var(--line-dark);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.stack-mode button:last-child {
  border-right: 0;
}

.stack-mode button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white-tint);
}

.product-select-label {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  cursor: pointer;
}

.selected-product-actions select {
  min-height: 44px;
  padding-left: 8px;
  font-size: 12px;
  font-weight: 800;
}

.stack-status-summary .absent::before {
  background: var(--line-dark);
}

.nutrient-graph-row.absent .graph-explanation {
  border-left-color: var(--line-dark);
}

.graph-difference.absent,
.stack-status.absent {
  color: var(--ink-soft);
}

.stack-bar {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 38;
  width: min(400px, calc(100vw - 48px));
  border: 1px solid var(--ink);
  background: var(--white-tint);
  box-shadow: 0 10px 30px rgba(23, 33, 28, .18);
  transition: opacity 160ms var(--ease), transform 160ms var(--ease), visibility 160ms;
  max-height: min(40vh, 520px);
  overflow-y: auto;
}

.stack-bar[data-verdict="over"],
.stack-bar[data-verdict="at-upper"],
.stack-bar[data-verdict="high"] {
  border-top: 4px solid var(--coral);
}

.stack-bar[data-verdict="missing"] {
  border-top: 4px solid var(--gold);
}

.stack-bar[data-verdict="clear"] {
  border-top: 4px solid var(--forest);
}

.stack-bar[hidden] {
  display: inline-flex;
}

.stack-bar-header {
  display: grid;
  min-height: 62px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  align-items: center;
}

.stack-bar-header > div {
  min-width: 0;
}

.stack-bar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.stack-bar-purchase {
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--forest);
  background: var(--forest);
  color: var(--white-tint);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.stack-bar-purchase:hover,
.stack-bar-purchase:focus-visible {
  background: var(--ink);
}

.stack-bar-purchase[hidden] {
  display: none;
}

.stack-bar-compare {
  min-height: 44px;
  padding: 6px 9px;
  border: 1px solid var(--forest);
  background: transparent;
  color: var(--forest);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.stack-bar-actions .clear-stack-action {
  min-width: 52px;
  padding-right: 6px;
  padding-left: 6px;
  font-size: 11px;
}

.stack-bar strong,
.stack-bar span {
  display: block;
}

.stack-bar strong {
  font-size: 13px;
  line-height: 1.4;
}

.stack-bar span {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.4;
}

.stack-bar-toggle {
  display: none;
  min-width: 64px;
  min-height: 44px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: var(--forest);
  font-size: 11px;
  font-weight: 800;
}

.stack-bar-toggle > span {
  display: inline;
  color: inherit;
}

.stack-bar-toggle > span:last-child {
  margin-left: 4px;
}

.stack-bar-content {
  display: grid;
  gap: 16px;
  padding: 4px 16px 16px;
  border-top: 1px solid var(--line);
}

.stack-bar-section {
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.stack-bar-section > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
}

.stack-bar-section > summary::-webkit-details-marker {
  display: none;
}

.stack-bar-section > summary span:first-child {
  margin-right: auto;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.stack-bar-section > summary span:nth-child(2) {
  font-size: 10px;
  font-weight: 800;
}

.stack-bar-section > summary::after {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  content: "+";
}

.stack-bar-section[open] > summary::after {
  content: "−";
}

.stack-bar-section[open] > .stack-bar-list {
  padding-bottom: 8px;
}

.stack-bar-list {
  display: grid;
}

.stack-bar-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}

.stack-bar-row.product {
  grid-template-columns: minmax(0, 1fr) auto 44px;
  padding: 4px 0;
  align-items: center;
}

.stack-bar-remove {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 20px;
  cursor: pointer;
}

.stack-bar-remove:hover,
.stack-bar-remove:focus-visible {
  background: #f4e5e0;
  color: #8a2e20;
}

.stack-bar-row strong {
  overflow: hidden;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.stack-bar-row.product strong {
  white-space: nowrap;
}

.stack-bar-row > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.stack-bar-chart-key {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: -2px 0 4px;
  color: var(--ink-soft);
  font-size: 9px;
}

.stack-bar-chart-key span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
}

.stack-bar-chart-key span::before {
  width: 2px;
  height: 10px;
  background: var(--forest);
  content: "";
}

.stack-bar-chart-key .upper::before {
  background: var(--coral);
}

.stack-bar-nutrient {
  display: grid;
  gap: 5px;
  padding: 9px 0 10px;
  border-top: 1px solid var(--line);
}

.stack-bar-nutrient-heading {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.stack-bar-nutrient-heading strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stack-bar-nutrient-heading span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stack-bar-chart {
  position: relative;
  height: 8px;
  overflow: visible;
  background: var(--paper);
}

.stack-bar-chart-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  background: var(--forest);
}

.stack-bar-chart-fill.under {
  background: var(--gold);
}

.stack-bar-chart-fill.over,
.stack-bar-chart-fill.at-upper,
.stack-bar-chart-fill.high {
  background: var(--coral);
}

.stack-bar-chart-fill.recorded {
  background: var(--cobalt);
}

.stack-bar-chart-marker {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: var(--forest);
  transform: translateX(-1px);
}

.stack-bar-chart-marker.upper {
  background: var(--coral);
}

.stack-bar-nutrient-difference {
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.35;
}

.stack-bar-nutrient-difference[data-status="over"],
.stack-bar-nutrient-difference[data-status="at-upper"],
.stack-bar-nutrient-difference[data-status="high"] {
  color: #8a2e20;
  font-weight: 800;
}

.stack-bar-nutrient-difference[data-status="under"] {
  color: #6f470c;
}

.stack-bar-more {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.stack-bar-content > button {
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--forest);
  border-radius: 2px;
  background: var(--forest);
  color: var(--white-tint);
  font-size: 12px;
  font-weight: 800;
}

body.has-stack-items .floating-chat {
  bottom: 102px;
}

.stack-bar[data-collapsed="false"] ~ .floating-chat {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
}

body.chat-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    max-height: none;
  }

  .hero-copy {
    min-height: 620px;
    padding: 70px 7vw;
  }

  .evidence-figure {
    min-height: 520px;
    border-top: 1px solid var(--line-dark);
    border-left: 0;
  }

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

  .results-header {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .topic-grid-more {
    max-width: 100%;
  }

  .decision-condition-layout {
    grid-template-columns: 1fr;
  }

  .check-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nutrient-graph-row {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .graph-explanation {
    grid-column: 2;
  }

  .tracker-section {
    grid-template-columns: 1fr;
  }

  .tracker-copy {
    position: static;
  }
}

@media (max-width: 1100px) {
  .result-tabs {
    display: none;
  }

  .commerce-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .commerce-heading h2 {
    font-size: 40px;
  }

  #briefing-summary-title,
  #commerce,
  #stack-analyzer {
    scroll-margin-top: 84px;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 64px;
  }

  body {
    font-size: 15px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 64px;
    padding: 0 16px;
  }

  .primary-nav,
  .header-chat {
    display: none;
  }

  .hero-copy {
    min-height: calc(100svh - 184px);
    padding: 56px 22px;
  }

  .hero h1 {
    font-size: 64px;
  }

  .hero-lead {
    margin-top: 28px;
    font-size: 17px;
  }

  .evidence-figure {
    min-height: 390px;
  }

  .evidence-figure figcaption {
    bottom: 18px;
  }

  .finder-band,
  .results-section {
    padding: 56px 20px;
  }

  .recipes-section,
  .tracker-section {
    padding: 44px 20px;
  }

  .section-heading,
  .results-header,
  .commerce-heading {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 30px;
  }

  .section-heading h2,
  .results-header h2,
  .commerce-heading h2,
  .tracker-copy h2 {
    font-size: 38px;
  }

  .topic-option label {
    min-height: 98px;
    padding: 14px;
  }

  .topic-option label span:first-child {
    font-size: 23px;
  }

  .check-row {
    grid-template-columns: 1fr;
  }

  .cause-status-options {
    grid-template-columns: 1fr;
  }

  .form-action {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .form-action p {
    margin: 0;
  }

  .result-context {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 24px;
    padding: 12px 0;
  }

  .result-context-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .result-context-list > div {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
  }

  .result-context-list dd {
    margin: 0;
  }

  .result-context-edit {
    min-height: 44px;
    justify-content: flex-start;
  }

  .symptom-question {
    width: 100%;
  }

  .primary-action {
    width: 100%;
  }

  .evidence-meta {
    grid-template-columns: 1fr;
  }

  .briefing-summary {
    margin-top: 30px;
    margin-bottom: 40px;
  }

  .nutrient-brief-row {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 4px 10px;
    padding: 12px 0;
  }

  .brief-rank {
    grid-row: 1 / span 4;
    padding-top: 2px;
  }

  .brief-name h4 {
    font-size: 20px;
  }

  .brief-context {
    grid-column: 2;
  }

  .brief-role {
    font-size: 12px;
    line-height: 1.45;
  }

  .brief-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .brief-details {
    grid-column: 2;
  }

  .brief-details > summary {
    min-height: 44px;
    justify-content: flex-start;
  }

  .brief-details-body {
    grid-template-columns: 1fr;
  }

  .brief-source,
  .brief-details-body > .save-nutrient {
    grid-column: 1;
  }

  .subsection-heading,
  .stack-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .subsection-heading h3,
  .stack-heading h3 {
    font-size: 27px;
  }

  .save-nutrient {
    width: 100%;
    margin-left: 0;
  }

  .product-group {
    padding: 22px 0;
  }

  .product-group-heading {
    gap: 12px;
  }

  .stack-analyzer {
    margin-top: 42px;
    padding-top: 28px;
  }

  .reference-profile {
    width: 100%;
  }

  .stack-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selected-product-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .selected-product-actions {
    justify-content: flex-start;
  }

  .selected-product-list {
    margin: 20px 0 28px;
  }

  .stack-decision-header {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stack-graph-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .stack-status-summary {
    justify-content: flex-start;
  }

  .nutrient-graph-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px 0;
  }

  .nutrient-graph-row.interest-related {
    margin: 0 -10px;
    padding: 16px 10px 16px 7px;
  }

  .graph-explanation {
    grid-column: 1;
    padding-left: 12px;
  }

  .graph-sources {
    grid-template-columns: 1fr;
    gap: 6px;
    padding-top: 10px;
  }

  .graph-source-list {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .graph-source-item > strong,
  .graph-source-amount,
  .graph-sources-label {
    font-size: 12px;
  }

  .graph-track {
    margin: 30px 0 21px;
  }

  .graph-identity {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    align-items: baseline;
  }

  .graph-identity strong {
    margin-top: 0;
  }

  .graph-identity small {
    grid-column: 1 / -1;
  }

  .graph-alert-copy {
    font-size: 10px;
  }

  .recipe-item {
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
    padding: 16px 0;
  }

  .recipe-note {
    grid-column: 2 / -1;
  }

  .recipe-open {
    min-width: 70px;
  }

  .intake-form {
    grid-template-columns: 1fr;
  }

  .intake-row {
    grid-template-columns: 1fr auto;
  }

  .intake-meter {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 42px 20px 110px;
  }

  .floating-chat {
    width: 52px;
    right: 16px;
    bottom: 16px;
    left: auto;
    justify-content: center;
    padding: 8px;
  }

  .floating-chat > span:last-child {
    display: none;
  }

  .chat-panel {
    border-left: 0;
  }
}

@media (max-width: 390px) {
  .hero h1 {
    font-size: 56px;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .topic-grid-more {
    grid-template-columns: 1fr;
  }

  .trust-line {
    gap: 6px 12px;
  }
}

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

  body.has-stack-items {
    padding-bottom: 120px;
  }

  .site-header {
    grid-template-columns: 1fr;
    background: var(--paper);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .primary-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    display: grid;
    height: 56px;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-top: 1px solid var(--line-dark);
    background: var(--white-tint);
  }

  .primary-nav.results-ready {
    grid-template-columns: repeat(4, 1fr);
  }

  .primary-nav a,
  .nav-chat {
    display: grid;
    min-height: 56px;
    place-items: center;
    padding: 0;
    border: 0;
    border-right: 1px solid var(--line);
    background: var(--white-tint);
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
  }

  .nav-chat {
    border-right: 0;
  }

  .primary-nav a::after {
    display: none;
  }

  .header-chat {
    display: none;
  }

  .hero {
    display: block;
    min-height: auto;
    max-height: none;
  }

  .hero-copy {
    min-height: 0;
    padding: 18px 20px 16px;
  }

  .hero .overline {
    margin-bottom: 8px;
    font-size: 10px;
  }

  .hero h1 {
    font-size: 36px;
    line-height: 1;
  }

  .hero h1 br {
    display: none;
  }

  .hero-lead {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.45;
  }

  .trust-line {
    display: none;
  }

  .hero-action {
    display: none;
  }

  .evidence-figure {
    display: flex;
    min-height: 230px;
    border-top: 1px solid var(--line-dark);
    border-left: 0;
  }

  .evidence-image {
    object-position: center;
  }

  .evidence-stages {
    right: 12px;
    bottom: 34px;
    left: 12px;
    gap: 5px;
  }

  .evidence-stages span {
    padding: 7px 5px;
    font-size: 9px;
    text-align: center;
  }

  .evidence-stages span::before {
    display: block;
    margin: 0 0 2px;
  }

  .evidence-figure figcaption {
    right: 12px;
    bottom: 9px;
    left: 12px;
    padding-top: 0;
    border-top: 0;
    font-size: 9px;
  }

  .evidence-figure figcaption span:first-child {
    display: none;
  }

  .finder-band {
    padding: 26px 16px 30px;
  }

  .finder-band .section-heading {
    gap: 4px;
    margin-bottom: 18px;
  }

  .finder-band .section-index {
    display: none;
  }

  .finder-band .section-heading h2 {
    font-size: 30px;
  }

  .finder-band .section-heading div > p {
    margin-top: 6px;
    font-size: 13px;
  }

  legend {
    margin-bottom: 8px;
    font-size: 12px;
  }

  .topic-grid,
  .topic-grid-more {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
  }

  .topic-option label {
    min-height: 48px;
    justify-content: center;
    padding: 8px 10px;
  }

  .topic-option label span:first-child {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 800;
  }

  .topic-option label span:last-child {
    display: none;
  }

  .more-topics {
    margin-top: 6px;
  }

  .more-topics summary {
    min-height: 44px;
    font-size: 12px;
  }

  .topic-summary {
    margin-top: 12px;
  }

  .topic-summary-row {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 0;
    font-size: 12px;
  }

  .decision-condition-fieldset {
    margin-top: 16px;
    padding-top: 14px;
  }

  .decision-condition-summary {
    margin-bottom: 10px;
    padding: 8px 0;
    font-size: 12px;
  }

  .decision-condition-layout {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .select-label {
    gap: 2px;
  }

  .select-label span,
  .select-label small {
    font-size: 11px;
  }

  .decision-condition-details > summary {
    min-height: 44px;
    font-size: 12px;
  }

  .decision-condition-body {
    gap: 16px;
    padding-top: 10px;
  }

  .form-action {
    margin-top: 14px;
  }

  .form-action p {
    display: none;
  }

  .form-action .profile-conflict-status:not([hidden]) {
    display: block;
  }

  .primary-action {
    min-height: 48px;
  }

  .results-section {
    padding: 34px 16px;
  }

  .results-header {
    margin-bottom: 18px;
  }

  .results-header h2,
  .commerce-heading h2,
  .tracker-copy h2 {
    font-size: 32px;
  }

  .results-intro {
    font-size: 14px;
  }

  .result-tabs {
    position: static;
    top: auto;
    margin: 0 -1px 20px;
  }

  .result-tabs a {
    font-size: 11px;
  }

  #briefing-summary-title,
  #commerce,
  #stack-analyzer {
    scroll-margin-top: 76px;
  }

  .briefing-summary {
    margin-top: 22px;
    margin-bottom: 24px;
  }

  .nutrient-brief-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .briefing-decision {
    grid-template-columns: 1fr;
    gap: 5px;
    margin-bottom: 22px;
    padding: 14px 0;
  }

  .briefing-decision-text {
    font-size: 23px;
  }

  .brief-details-body {
    font-size: 12px;
  }

  .brief-next-action {
    width: 100%;
  }

  .brief-details > summary {
    min-height: 44px;
    font-size: 12px;
  }

  .evidence-meta dd,
  .source-ai-copy,
  .source-raw-list {
    font-size: 14px;
  }

  .evidence-meta dt,
  .source-meta {
    font-size: 12px;
  }

  .commerce-heading {
    margin-bottom: 18px;
  }

}

@media (max-width: 1919px) {

  .product-group-heading {
    min-height: 48px;
    align-items: center;
    cursor: pointer;
  }

  .product-group-heading::after {
    flex: 0 0 auto;
    margin-left: 4px;
    color: var(--forest);
    content: '+';
    font-size: 24px;
    line-height: 1;
  }

  .product-group[open] > .product-group-heading::after {
    content: '−';
  }

  .product-group:not([open]) > .product-group-heading {
    margin-bottom: 0;
  }

  .product-group-heading:focus-visible {
    outline: 3px solid var(--mustard);
    outline-offset: 4px;
  }

  .product-table-scroll {
    overflow: visible;
    border-top: 0;
  }

  .product-table {
    display: block;
    min-width: 0;
  }

  .product-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .product-table tbody {
    display: grid;
    gap: 10px;
  }

  .product-table tr {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) minmax(104px, auto) 72px;
    gap: 5px 8px;
    padding: 10px 8px;
    border: 1px solid var(--line);
    background: var(--white-tint);
    align-items: start;
  }

  .product-table tr.product-extra-row {
    display: none;
  }

  .product-group.show-all-products .product-table tr.product-extra-row {
    display: grid;
  }

  .product-table tr[data-stack-status] {
    border-color: var(--forest);
  }

  .product-table td {
    display: block;
    width: auto !important;
    padding: 0;
    border: 0;
  }

  .product-select-cell {
    grid-row: 2;
    grid-column: 2;
  }

  .product-select-label {
    display: flex;
    width: 100%;
    height: 44px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 8px;
    border: 1px solid var(--line-dark);
  }

  .product-select-copy {
    display: block;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
  }

  .product-name-cell {
    grid-row: 1;
    grid-column: 1 / -1;
  }

  .product-name-cell > strong {
    display: block;
    padding-right: 2px;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.45;
  }

  .product-name-cell > small {
    display: none;
  }

  .product-mobile-summary {
    display: grid;
    gap: 5px;
    margin-top: 6px;
  }

  .product-mobile-serving {
    color: var(--ink-soft);
    font-size: 11px;
    line-height: 1.4;
  }

  .product-mobile-verification {
    width: fit-content;
    color: var(--forest);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
  }

  .product-mobile-verification.verified-partial {
    color: #6f470c;
  }

  .product-mobile-verification.search-only {
    color: var(--cobalt);
  }

  .product-mobile-primary {
    color: var(--ink);
    overflow-wrap: anywhere;
    font-size: 12px !important;
    line-height: 1.45;
  }

  .product-mobile-cost {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 9px;
  }

  .product-mobile-cost {
    font-variant-numeric: tabular-nums;
  }

  .product-mobile-cost strong,
  .product-mobile-cost span {
    font-size: 12px;
  }

  .product-mobile-cost strong {
    color: var(--forest);
    font-weight: 800;
  }

  .product-mobile-cost span {
    color: var(--ink-soft);
  }

  .product-mobile-cost small {
    color: var(--ink-soft);
    font-size: 11px;
  }

  .product-mobile-summary .product-label-details {
    margin-top: 0;
  }

  .product-ingredients,
  .product-price,
  .product-unit-price,
  .product-daily-cost {
    display: none !important;
  }

  .product-label-details summary > span,
  .product-label-details summary > small,
  .product-label-item,
  .product-label-item strong,
  .product-label-source {
    font-size: 12px;
  }

  .product-label-source {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-action-cell {
    display: grid !important;
    min-width: 0;
    grid-row: 2;
    grid-column: 3;
    align-self: start;
  }

  .product-action-cell:has(.product-purchase-confirm:not([hidden])) {
    grid-row: 3;
    grid-column: 1 / -1;
  }

  .product-action-cell .product-purchase-confirm {
    width: 100%;
    min-width: 0;
  }

  .product-link {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    padding: 6px;
    color: var(--ink-soft);
    font-size: 11px;
    text-align: center;
  }

  .product-link-full {
    display: none;
  }

  .product-link-compact {
    display: inline;
  }

  .product-more-toggle {
    display: inline-flex;
    width: auto;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-bottom: 1px solid currentColor;
    background: transparent;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
  }

  .product-more-toggle:hover,
  .product-more-toggle:focus-visible {
    border-color: var(--forest);
    color: var(--forest);
  }

  .price-snapshot-note,
  .product-group-heading p,
  .product-count {
    font-size: 12px;
  }

}

@media (max-width: 720px) {

  .stack-heading {
    gap: 14px;
  }

  .stack-controls {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .stack-controls > .clear-stack-action {
    width: 100%;
    border: 1px solid var(--line);
  }

  .stack-mode,
  .reference-profile {
    width: 100%;
  }

  .reference-profile select {
    min-height: 48px;
  }

  .stack-scope,
  .stack-graph-heading p,
  .stack-metric span,
  .stack-status-summary,
  .stack-graph-key,
  .graph-identity small,
  .selected-product-row small,
  .affiliate-disclosure {
    font-size: 12px;
  }

  .stack-scope {
    font-size: 14px;
  }

  .selected-product-actions {
    flex-wrap: wrap;
  }

  .selected-product-actions select {
    width: 100%;
  }

  .stack-decision {
    gap: 12px;
    margin-bottom: 26px;
    padding: 16px 12px;
  }

  .stack-decision h4 {
    font-size: 22px;
  }

  .stack-decision-copy {
    font-size: 14px;
  }

  .stack-decision-risks {
    display: grid;
  }

  .stack-decision-risks span {
    justify-content: space-between;
    font-size: 12px;
  }

  .stack-decision-risks strong,
  .stack-decision-action strong,
  .stack-decision-action small {
    font-size: 12px;
  }

  .stack-decision-action {
    gap: 10px;
  }

  .stack-purchase-link {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .stack-purchase-link b {
    justify-self: start;
  }

  .stack-empty-state {
    padding: 16px 12px;
  }

  .nutrient-graph-row .graph-identity { order: 1; }
  .nutrient-graph-row .graph-plot { order: 2; }
  .nutrient-graph-row .graph-sources { order: 3; }
  .nutrient-graph-row .graph-explanation { order: 4; }

  .graph-source-label {
    display: none;
  }

  .graph-source-value {
    white-space: nowrap;
  }

  .graph-segment {
    cursor: default;
  }

  .graph-segment-tooltip {
    display: none;
  }

  .graph-alert-copy {
    font-size: 14px;
  }

  .stack-bar span {
    font-size: 11px;
  }

  .floating-chat {
    display: none;
  }

  .chat-panel {
    z-index: 70;
  }

  .chat-message a,
  .chat-message button,
  .chat-suggestions button {
    min-height: 44px;
  }

  .site-footer {
    padding-bottom: 42px;
  }
}

@media (min-width: 1280px) {
  .results-section {
    padding-right: 3vw;
    padding-left: 3vw;
  }

  .commerce-section {
    display: grid;
    width: 100%;
    max-width: 1660px;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 470px);
    column-gap: 32px;
    margin: 0 auto;
    align-items: start;
  }

  .commerce-heading {
    width: 100%;
    max-width: none;
    grid-column: 1 / -1;
  }

  .product-list {
    width: 100%;
    max-width: none;
    grid-column: 1;
    margin: 0;
  }

  .stack-analyzer {
    position: sticky;
    top: 88px;
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 112px);
    grid-column: 2;
    grid-row: 3;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--ink);
    background: var(--white-tint);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .stack-analyzer .stack-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .stack-analyzer .stack-heading h3 {
    font-size: 22px;
  }

  .stack-analyzer .stack-controls {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 6px 8px;
  }

  .stack-analyzer .stack-mode {
    grid-column: 1 / -1;
  }

  .stack-analyzer .reference-profile {
    width: 100%;
    min-width: 0;
  }

  .stack-analyzer .stack-scope {
    margin-bottom: 18px;
  }

  .stack-analyzer[data-desktop-expanded="false"] .stack-scope,
  .stack-analyzer[data-desktop-expanded="false"] .selected-product-list,
  .stack-analyzer[data-desktop-expanded="false"] .stack-table-details,
  .stack-analyzer[data-desktop-expanded="false"] .graph-sources,
  .stack-analyzer[data-desktop-expanded="false"] .stack-graph-key,
  .stack-analyzer[data-desktop-expanded="false"] .stack-decision-actions,
  .stack-analyzer[data-desktop-expanded="false"] .stack-decision-copy,
  .stack-analyzer[data-desktop-expanded="false"] .stack-decision-no-action,
  .stack-analyzer[data-desktop-expanded="false"] .stack-decision-clinician,
  .stack-analyzer[data-desktop-expanded="false"] .graph-alert-copy,
  .stack-analyzer[data-desktop-expanded="false"] .stack-graph-heading p {
    display: none;
  }

  .stack-analyzer[data-desktop-expanded="false"] .stack-decision {
    gap: 8px;
    margin-bottom: 10px;
    padding: 12px;
  }

  .stack-analyzer[data-desktop-expanded="false"] .stack-decision h4 {
    margin-top: 2px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 800;
  }

  .stack-analyzer[data-desktop-expanded="false"] .stack-decision-risks {
    gap: 5px;
  }

  .stack-analyzer[data-desktop-expanded="false"] .stack-decision-risks span {
    padding: 4px 6px;
    font-size: 11px;
  }

  .stack-analyzer[data-desktop-expanded="false"] .stack-graph {
    margin-top: 6px;
  }

  .stack-analyzer[data-desktop-expanded="false"] .stack-graph-section {
    margin-top: 10px;
  }

  .stack-analyzer[data-desktop-expanded="false"] .stack-graph-heading {
    min-height: 44px;
    align-items: center;
    flex-direction: row;
    gap: 8px;
    padding-bottom: 7px;
  }

  .stack-analyzer[data-desktop-expanded="false"] .stack-graph-heading h4 {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 800;
  }

  .stack-analyzer[data-desktop-expanded="false"] .stack-status-summary {
    gap: 4px 8px;
    justify-content: flex-end;
    font-size: 10px;
  }

  .stack-analyzer[data-desktop-expanded="false"] .nutrient-graph-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "identity explanation"
      "plot plot";
    gap: 7px;
    padding: 9px 0;
  }

  .stack-analyzer[data-desktop-expanded="false"] .graph-identity {
    display: flex;
    grid-area: identity;
    min-width: 0;
    align-items: baseline;
    gap: 7px;
  }

  .stack-analyzer[data-desktop-expanded="false"] .graph-identity > strong {
    flex: 0 0 auto;
    margin-top: 0;
    font-size: 13px;
  }

  .stack-analyzer[data-desktop-expanded="false"] .graph-identity > small {
    display: none;
  }

  .stack-analyzer[data-desktop-expanded="false"] .graph-name-line {
    min-width: 0;
    flex-wrap: nowrap;
  }

  .stack-analyzer[data-desktop-expanded="false"] .graph-identity h5 {
    overflow: hidden;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stack-analyzer[data-desktop-expanded="false"] .interest-badge {
    min-height: 18px;
    padding: 2px 4px;
    font-size: 9px;
  }

  .stack-analyzer[data-desktop-expanded="false"] .graph-plot {
    grid-area: plot;
  }

  .stack-analyzer[data-desktop-expanded="false"] .graph-track {
    margin: 24px 0 17px;
  }

  .stack-analyzer[data-desktop-expanded="false"] .graph-explanation {
    grid-area: explanation;
    min-height: 0;
    padding: 6px 8px;
    white-space: nowrap;
  }

  .stack-analyzer[data-desktop-expanded="false"] .stack-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stack-analyzer[data-desktop-expanded="false"] .stack-metric {
    padding: 8px;
  }

  .stack-analyzer[data-desktop-expanded="false"] .stack-metric span {
    font-size: 10px;
  }

  .stack-analyzer[data-desktop-expanded="false"] .stack-metric strong {
    font-size: 17px;
  }

  .stack-analyzer[data-desktop-expanded="false"] .reference-profile {
    gap: 0;
  }

  .stack-analyzer[data-desktop-expanded="false"] .reference-profile span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .stack-analyzer[data-desktop-expanded="true"] .stack-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stack-analyzer .selected-product-row,
  .stack-analyzer .stack-decision-header,
  .stack-analyzer .nutrient-graph-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .stack-analyzer .selected-product-actions {
    justify-content: flex-start;
  }

  .stack-analyzer .stack-graph-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .stack-analyzer .stack-status-summary {
    justify-content: flex-start;
  }

  .stack-analyzer .nutrient-graph-row {
    gap: 10px;
    padding: 16px 0;
  }

  .stack-analyzer .nutrient-graph-row.interest-related {
    margin: 0;
    padding-right: 10px;
    padding-left: 10px;
  }

  .stack-analyzer .nutrient-graph-row .graph-identity { order: 1; }
  .stack-analyzer .nutrient-graph-row .graph-plot { order: 2; }
  .stack-analyzer .nutrient-graph-row .graph-explanation { order: 3; }
  .stack-analyzer .nutrient-graph-row .graph-sources { order: 4; }

  .stack-analyzer .graph-sources {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .stack-analyzer .graph-source-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .stack-analyzer .graph-explanation {
    grid-column: auto;
  }

  .affiliate-disclosure {
    width: 100%;
    max-width: none;
    grid-column: 1 / -1;
  }

  .stack-bar {
    display: none !important;
  }
}

@media (max-width: 1279px) {
  body.has-stack-items {
    padding-bottom: 104px;
  }

  .stack-bar {
    display: block;
    right: 16px;
    bottom: 16px;
    left: 16px;
    z-index: 44;
    width: auto;
    max-height: min(40vh, 520px);
    overflow-y: auto;
  }

  .stack-bar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .stack-bar[data-collapsed="true"] .stack-bar-content {
    display: none;
  }

  .stack-bar[data-collapsed="false"] .stack-bar-toggle > span:last-child {
    transform: rotate(180deg);
  }

  body.has-stack-items .floating-chat {
    bottom: 102px;
  }
}

@media (max-width: 720px) {
  .label-scan-heading,
  .label-review-field {
    grid-template-columns: 1fr;
    flex-direction: column;
    gap: 8px;
  }

  .label-scan-review .summary-title {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .label-scan-description,
  .label-scan-privacy {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .label-scan-selection {
    grid-template-columns: 1fr;
  }

  .label-review-ingredient {
    grid-template-columns: 24px minmax(0, 1fr) auto;
  }

  .label-review-ingredient select,
  .label-review-ingredient input[type="number"] {
    grid-column: 2 / -1;
    width: 100%;
  }

  .label-review-ingredient small {
    grid-column: 2 / -1;
  }
}

@media (max-width: 540px) {
  body.has-stack-items {
    padding-bottom: 146px;
  }

  .stack-bar-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .stack-bar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
  }

  .stack-bar-purchase,
  .stack-bar-compare {
    width: 100%;
  }

  body.has-stack-items .floating-chat {
    bottom: 144px;
  }
}

.stack-desktop-expand {
  display: none;
}

@media (min-width: 1280px) {
  .stack-desktop-expand {
    display: inline-flex;
    position: absolute;
    top: 12px;
    right: 16px;
    width: auto;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid var(--forest);
    background: var(--white-tint);
    color: var(--forest);
    font-size: 12px;
    font-weight: 800;
  }

  .stack-analyzer .stack-heading > div:first-child {
    padding-right: 122px;
  }
}

@media (max-width: 720px) {
  body.has-stack-items {
    padding-bottom: 128px;
  }

  .stack-bar {
    right: 0;
    bottom: 56px;
    left: 0;
    width: 100%;
    max-height: min(40vh, 360px, calc(100dvh - 128px - env(safe-area-inset-bottom)));
    border-right: 0;
    border-left: 0;
  }

  .stack-bar-content {
    gap: 12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  body.has-stack-items .toast {
    bottom: 133px;
  }

  .stack-bar[data-collapsed="false"] ~ .toast {
    bottom: calc(56px + min(40vh, 360px, calc(100dvh - 128px - env(safe-area-inset-bottom))) + 12px);
  }

  .product-evidence-only {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .product-evidence-only > .text-action {
    width: fit-content;
    grid-row: auto;
    grid-column: 1;
  }

  .product-group {
    padding: 16px 0 18px;
  }

  .product-group-toolbar {
    gap: 8px;
    margin-bottom: 8px;
  }

  .product-sort-control {
    width: 132px;
    min-width: 0;
  }

  .product-action-cell {
    min-width: 0;
  }

  .product-purchase-confirm {
    min-width: 0;
  }
}

@media (max-width: 1279px) {
  body.has-stack-items.stack-analyzer-in-view {
    padding-bottom: 0;
  }

  body.stack-analyzer-in-view .stack-bar {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #5f665f;
    --ink-soft: #263129;
  }
}
