:root {
  --fm-green-950: #08291d;
  --fm-green-900: #0b3d2a;
  --fm-green-800: #0c5135;
  --fm-green-700: #137047;
  --fm-green-100: #e4f1e9;
  --fm-green-50: #f1f8f4;
  --fm-gold: #e7b416;
  --fm-gold-light: #fff1ad;
  --fm-cream: #fbf8ed;
  --fm-ink: #12241b;
  --fm-muted: #5b6d64;
  --fm-line: #dbe4de;
  --fm-white: #ffffff;
  --fm-shadow: 0 18px 48px rgba(8, 41, 29, 0.12);
}

.fm-home-search,
.fm-home-search *,
.fm-explore,
.fm-explore *,
.fm-latest-guides,
.fm-latest-guides * {
  box-sizing: border-box;
}

/* The complete legal and medical wording remains in the footer and policy pages. */
.fm-home .fm-safety-note {
  display: none !important;
}

.fm-latest-guides {
  width: 100%;
  max-width: 1380px;
  margin: clamp(70px, 9vw, 128px) auto;
  padding: 0 clamp(18px, 3vw, 34px);
  color: var(--fm-ink);
}

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

.fm-guides-heading > div {
  max-width: 780px;
}

.fm-guides-heading h2 {
  margin: 0;
  color: var(--fm-ink);
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.fm-guides-heading > div > p:last-child {
  margin: 18px 0 0;
  color: var(--fm-muted);
  font-size: 17px;
  line-height: 1.7;
}

.fm-guides-heading__link {
  flex: 0 0 auto;
  padding: 13px 18px;
  border: 1px solid var(--fm-line);
  border-radius: 12px;
  color: var(--fm-green-800);
  font-weight: 750;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.fm-guides-heading__link:hover,
.fm-guides-heading__link:focus-visible {
  border-color: var(--fm-green-800);
  background: var(--fm-green-800);
  color: var(--fm-white);
  transform: translateY(-1px);
}

.fm-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.fm-guide-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fm-guide-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--fm-line);
  border-radius: 22px;
  background: var(--fm-white);
  box-shadow: 0 8px 28px rgba(8, 41, 29, 0.06);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.fm-guide-card:hover {
  border-color: rgba(19, 112, 71, 0.42);
  box-shadow: 0 18px 42px rgba(8, 41, 29, 0.12);
  transform: translateY(-3px);
}

.fm-guide-card__image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--fm-green-900), var(--fm-green-700));
}

.fm-guide-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
}

.fm-guide-card:hover .fm-guide-card__image img {
  transform: scale(1.035);
}

.fm-guide-card__fallback {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: radial-gradient(circle at 80% 12%, rgba(231, 180, 22, 0.52), transparent 30%), linear-gradient(135deg, var(--fm-green-900), var(--fm-green-700));
  color: var(--fm-white);
}

.fm-guide-card__fallback b {
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--fm-gold-light);
  font-size: 20px;
}

.fm-guide-card__fallback small {
  margin-top: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fm-guide-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.fm-guide-card__meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: var(--fm-muted);
  font-size: 11px;
}

.fm-guide-card__meta span {
  overflow: hidden;
  color: var(--fm-green-700);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.fm-guide-card h3 {
  margin: 14px 0 10px;
  color: var(--fm-ink);
  font-size: 20px;
  line-height: 1.28;
}

.fm-guide-card h3 a {
  color: inherit;
  text-decoration: none;
}

.fm-guide-card h3 a:hover {
  color: var(--fm-green-700);
}

.fm-guide-card__body > p {
  flex: 1;
  margin: 0;
  color: var(--fm-muted);
  font-size: 14px;
  line-height: 1.65;
}

.fm-guide-card__read {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  align-self: flex-start;
  margin-top: 18px;
  color: var(--fm-green-800);
  font-weight: 780;
  text-decoration: none;
}

.fm-guide-card__read span {
  transition: transform 180ms ease;
}

.fm-guide-card__read:hover span {
  transform: translateX(3px);
}

.fm-eyebrow {
  margin: 0 0 12px;
  color: var(--fm-green-700);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.4;
}

.fm-home-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  width: 100%;
  max-width: 1380px;
  margin: clamp(28px, 5vw, 72px) auto;
  padding: clamp(34px, 5vw, 72px);
  overflow: hidden;
  border: 1px solid rgba(12, 81, 53, 0.13);
  border-radius: 30px;
  background: linear-gradient(125deg, #ffffff 0%, var(--fm-cream) 62%, #fff4c6 100%);
  box-shadow: var(--fm-shadow);
  color: var(--fm-ink);
}

.fm-home-search__glow {
  position: absolute;
  width: 340px;
  height: 340px;
  right: -120px;
  top: -180px;
  border-radius: 50%;
  background: rgba(231, 180, 22, 0.2);
  filter: blur(3px);
  pointer-events: none;
}

.fm-home-search__content {
  position: relative;
  z-index: 1;
  max-width: 850px;
}

.fm-home-search h2 {
  max-width: 760px;
  margin: 0;
  color: var(--fm-ink);
  font-size: clamp(34px, 4vw, 62px);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.fm-home-search__intro {
  max-width: 760px;
  margin: 20px 0 26px;
  color: var(--fm-muted);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.75;
}

.fm-search-form {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--fm-line);
  border-radius: 18px;
  background: var(--fm-white);
  box-shadow: 0 12px 36px rgba(8, 41, 29, 0.1);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.fm-search-form:focus-within {
  border-color: var(--fm-green-700);
  box-shadow: 0 0 0 4px rgba(19, 112, 71, 0.12), 0 14px 38px rgba(8, 41, 29, 0.12);
}

.fm-search-form__icon {
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-left: 14px;
  border: 2px solid var(--fm-green-800);
  border-radius: 50%;
}

.fm-search-form__icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  right: -6px;
  bottom: -3px;
  background: var(--fm-green-800);
  transform: rotate(45deg);
  transform-origin: left center;
}

.fm-search-form input {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 15px 18px;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--fm-ink);
  font: inherit;
  font-size: 17px;
}

.fm-search-form button,
.fm-empty-state button,
.fm-error-state button {
  flex: 0 0 auto;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 12px;
  background: var(--fm-green-800);
  color: var(--fm-white);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.fm-search-form button:hover,
.fm-search-form button:focus-visible,
.fm-empty-state button:hover,
.fm-error-state button:hover {
  background: var(--fm-green-950);
  box-shadow: 0 10px 24px rgba(8, 41, 29, 0.2);
  transform: translateY(-1px);
}

.fm-home-search__popular,
.fm-quick-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 17px;
  color: var(--fm-muted);
  font-size: 14px;
}

.fm-home-search__popular span,
.fm-quick-searches span {
  font-weight: 700;
}

.fm-home-search__popular a,
.fm-quick-searches button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--fm-green-800);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.fm-home-search__popular a:hover,
.fm-quick-searches button:hover {
  border-color: currentColor;
}

.fm-home-search__facts {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: 190px;
}

.fm-home-search__facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(12, 81, 53, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(8px);
}

.fm-home-search__facts strong {
  color: var(--fm-green-800);
  font-size: 22px;
}

.fm-home-search__facts span {
  color: var(--fm-muted);
  font-size: 13px;
}

.fm-explore {
  width: 100%;
  max-width: 1500px;
  min-width: 0;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 44px);
  color: var(--fm-ink);
}

.fm-explore-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 42px;
  align-items: center;
  overflow: hidden;
  padding: clamp(36px, 6vw, 82px);
  border-radius: 30px;
  background: radial-gradient(circle at 86% 12%, rgba(255, 241, 173, 0.85), transparent 31%), linear-gradient(125deg, var(--fm-green-50), var(--fm-cream));
  border: 1px solid rgba(12, 81, 53, 0.12);
}

.fm-explore-hero__content {
  max-width: 900px;
}

.fm-explore-hero h1 {
  margin: 0;
  max-width: 900px;
  color: var(--fm-ink);
  font-size: clamp(42px, 5vw, 76px);
  font-weight: 780;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.fm-explore-hero__content > p:last-child {
  max-width: 820px;
  margin: 24px 0 0;
  color: var(--fm-muted);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.7;
}

.fm-explore-hero__badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: var(--fm-green-800);
  color: var(--fm-white);
  box-shadow: 0 22px 50px rgba(8, 41, 29, 0.22), inset 0 0 0 9px rgba(255, 255, 255, 0.08);
  text-align: center;
}

.fm-explore-hero__badge span {
  color: var(--fm-gold-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.fm-explore-hero__badge strong {
  margin: 5px 0 2px;
  font-size: 36px;
  line-height: 1;
}

.fm-explore-hero__badge small {
  opacity: 0.82;
}

.fm-explore-search {
  position: relative;
  z-index: 2;
  width: min(980px, calc(100% - 40px));
  margin: -32px auto 0;
  padding: 22px;
  border: 1px solid var(--fm-line);
  border-radius: 24px;
  background: var(--fm-white);
  box-shadow: var(--fm-shadow);
}

.fm-search-form--explore {
  box-shadow: none;
  background: var(--fm-green-50);
}

.fm-category-section,
.fm-results-section {
  padding: clamp(58px, 7vw, 98px) 0 0;
}

.fm-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  min-width: 0;
  margin-bottom: 26px;
}

.fm-section-heading > div {
  min-width: 0;
  flex: 1 1 520px;
}

.fm-section-heading h2 {
  margin: 0;
  color: var(--fm-ink);
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.fm-text-button {
  flex: 0 0 auto;
  max-width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 2px solid var(--fm-gold);
  background: transparent;
  color: var(--fm-green-800);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.fm-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.fm-category-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--fm-line);
  border-radius: 18px;
  background: var(--fm-white);
  color: var(--fm-ink);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.fm-category-card:hover,
.fm-category-card:focus-visible {
  border-color: rgba(19, 112, 71, 0.5);
  box-shadow: 0 12px 30px rgba(8, 41, 29, 0.1);
  transform: translateY(-2px);
}

.fm-category-card.is-active {
  border-color: var(--fm-green-800);
  background: var(--fm-green-50);
  box-shadow: inset 0 0 0 1px var(--fm-green-800);
}

.fm-category-card__icon,
.fm-food-card__initials,
.fm-detail-heading__initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--fm-green-100);
  color: var(--fm-green-800);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.fm-category-card__text {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.fm-category-card__text strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fm-category-card__text small {
  margin-top: 3px;
  color: var(--fm-muted);
}

.fm-category-card__arrow {
  color: var(--fm-green-700);
  font-weight: 800;
}

.fm-loading-card,
.fm-error-state,
.fm-empty-state {
  grid-column: 1 / -1;
  padding: 38px;
  border: 1px dashed var(--fm-line);
  border-radius: 20px;
  background: var(--fm-green-50);
  color: var(--fm-muted);
  text-align: center;
}

.fm-section-heading--results {
  align-items: center;
}

.fm-results-summary {
  margin: 10px 0 0;
  color: var(--fm-muted);
}

.fm-active-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  border-radius: 999px;
  background: var(--fm-green-100);
  color: var(--fm-green-900);
  font-size: 14px;
}

.fm-active-filter[hidden] {
  display: none;
}

.fm-active-filter button {
  border: 0;
  background: transparent;
  color: var(--fm-green-800);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.fm-status {
  min-height: 0;
  margin-bottom: 12px;
  color: var(--fm-green-800);
  font-weight: 700;
}

.fm-status.is-loading {
  min-height: 24px;
}

.fm-food-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  transition: opacity 180ms ease;
}

.fm-food-grid.is-loading {
  opacity: 0.45;
}

.fm-food-card {
  display: flex;
  min-width: 0;
  min-height: 330px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--fm-line);
  border-radius: 22px;
  background: var(--fm-white);
  box-shadow: 0 8px 28px rgba(8, 41, 29, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.fm-food-card__visual {
  display: flex;
  width: 100%;
  min-height: 148px;
  aspect-ratio: 16 / 7;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  background: radial-gradient(circle at 78% 18%, rgba(255, 241, 173, 0.92), transparent 29%), linear-gradient(135deg, var(--fm-green-50), var(--fm-cream));
  color: var(--fm-green-800);
}

.fm-food-card__visual img,
.fm-detail-image img,
.fm-profile-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fm-food-card__visual span {
  font-size: 34px;
  font-weight: 850;
  letter-spacing: 0.03em;
}

.fm-food-card__visual small {
  margin-top: 4px;
  color: var(--fm-muted);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fm-food-card:hover {
  border-color: rgba(19, 112, 71, 0.42);
  box-shadow: 0 18px 42px rgba(8, 41, 29, 0.12);
  transform: translateY(-3px);
}

.fm-food-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 0;
}

.fm-source-badge {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--fm-green-50);
  color: var(--fm-green-700);
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
}

.fm-food-card__body {
  flex: 1;
  padding: 18px 20px 20px;
}

.fm-food-card__category {
  margin: 0 0 8px;
  color: var(--fm-green-700);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fm-food-card h3 {
  margin: 0;
  color: var(--fm-ink);
  font-size: 21px;
  line-height: 1.25;
}

.fm-food-card h3 a {
  color: inherit;
  text-decoration: none;
}

.fm-food-card h3 a:hover,
.fm-food-card h3 a:focus-visible {
  color: var(--fm-green-700);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.fm-food-card__meta {
  margin: 12px 0 0;
  color: var(--fm-muted);
  font-size: 14px;
  line-height: 1.55;
}

.fm-food-card__basis {
  margin: 14px 0 0;
  color: var(--fm-ink);
  font-size: 13px;
  font-weight: 700;
}

.fm-food-card__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  border: 0;
  border-top: 1px solid var(--fm-line);
  background: var(--fm-green-50);
  color: var(--fm-green-800);
  cursor: pointer;
  font: inherit;
  font-weight: 780;
  text-align: left;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease;
}

.fm-corrections {
  margin: 20px auto;
}

.fm-corrections > strong {
  display: block;
  margin-bottom: 10px;
  color: var(--fm-ink);
}

.fm-corrections > div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
}

.fm-corrections button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--fm-green-700);
  border-radius: 999px;
  background: var(--fm-white);
  color: var(--fm-green-800);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.fm-corrections button:hover,
.fm-corrections button:focus-visible {
  background: var(--fm-green-800);
  color: var(--fm-white);
}

.fm-food-card__button:hover,
.fm-food-card__button:focus-visible {
  background: var(--fm-green-800);
  color: var(--fm-white);
}

.fm-empty-state span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--fm-green-100);
  color: var(--fm-green-800);
  font-weight: 850;
}

.fm-empty-state h3,
.fm-error-state h3 {
  margin: 18px 0 8px;
  color: var(--fm-ink);
}

.fm-empty-state p,
.fm-error-state p {
  margin: 0 0 20px;
}

.fm-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 36px;
}

.fm-pagination button {
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--fm-line);
  border-radius: 10px;
  background: var(--fm-white);
  color: var(--fm-green-900);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.fm-pagination button:hover:not(:disabled),
.fm-pagination button.is-active {
  border-color: var(--fm-green-800);
  background: var(--fm-green-800);
  color: var(--fm-white);
}

.fm-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.fm-food-dialog {
  width: min(900px, calc(100% - 30px));
  max-height: min(88vh, 900px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 26px;
  background: var(--fm-white);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
  color: var(--fm-ink);
}

.fm-food-dialog::backdrop {
  background: rgba(6, 28, 19, 0.72);
  backdrop-filter: blur(4px);
}

.fm-food-dialog__frame {
  position: relative;
  max-height: min(88vh, 900px);
  padding: clamp(24px, 5vw, 54px);
  overflow-y: auto;
}

.fm-food-dialog__close {
  position: sticky;
  z-index: 2;
  top: 0;
  float: right;
  margin: -8px -8px 10px 18px;
  padding: 9px 13px;
  border: 1px solid var(--fm-line);
  border-radius: 10px;
  background: var(--fm-white);
  color: var(--fm-green-900);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
}

.fm-detail-heading {
  display: flex;
  gap: 20px;
  align-items: center;
  padding-right: 50px;
}

.fm-detail-image {
  display: flex;
  width: 132px;
  height: 108px;
  flex: 0 0 132px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: radial-gradient(circle at 75% 16%, var(--fm-gold-light), transparent 32%), var(--fm-green-50);
  color: var(--fm-green-800);
}

.fm-detail-image > span {
  font-size: 27px;
  font-weight: 850;
}

.fm-detail-image > small {
  margin-top: 3px;
  color: var(--fm-muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.fm-full-profile-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--fm-green-800);
  font-size: 13px;
  font-weight: 780;
}

.fm-detail-controls,
.fm-profile-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.7fr) minmax(150px, 0.45fr);
  gap: 16px;
  align-items: end;
  margin: 30px 0;
  padding: 20px;
  border: 1px solid var(--fm-line);
  border-radius: 18px;
  background: var(--fm-cream);
}

.fm-detail-controls > div,
.fm-profile-controls > div:first-child {
  display: flex;
  flex-direction: column;
}

.fm-detail-controls > div > span,
.fm-profile-controls > div:first-child > p {
  margin: 5px 0 0;
  color: var(--fm-muted);
  font-size: 13px;
  line-height: 1.5;
}

.fm-detail-controls label,
.fm-profile-controls label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: var(--fm-ink);
  font-size: 12px;
  font-weight: 750;
}

.fm-detail-controls select,
.fm-profile-controls select,
.fm-amount-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--fm-line);
  border-radius: 11px;
  background: var(--fm-white);
  color: var(--fm-ink);
  font: inherit;
}

.fm-detail-controls select,
.fm-profile-controls select {
  padding: 0 12px;
}

.fm-amount-input {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.fm-amount-input input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--fm-ink);
  font: inherit;
}

.fm-amount-input b {
  padding: 0 12px;
  color: var(--fm-green-800);
}

.fm-dialog-section-heading {
  margin: 4px 0 14px;
}

.fm-dialog-section-heading h3 {
  margin: 0;
}

.fm-dialog-section-heading > p {
  margin: 0;
  color: var(--fm-muted);
}

.fm-guidance-summary {
  max-width: 920px;
  margin: 0 0 20px;
  color: var(--fm-muted);
  font-size: 16px;
  line-height: 1.7;
}

.fm-guidance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.fm-guidance-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--fm-line);
  border-radius: 20px;
  background: var(--fm-white);
  box-shadow: 0 7px 20px rgba(8, 41, 29, 0.06);
}

.fm-guidance-card__title,
.fm-evidence-card__title,
.fm-caution-card__title {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}

.fm-guidance-card__icon,
.fm-evidence-card__title > span,
.fm-caution-card__title > span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--fm-green-100);
  color: var(--fm-green-800);
  font-size: 20px;
  font-weight: 900;
}

.fm-dv-badge,
.fm-evidence-badge {
  display: inline-flex;
  margin: 12px 0 0 55px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e6f5fb;
  color: #17647e;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.fm-guidance-card h3,
.fm-food-dialog .fm-guidance-card h3 {
  margin: 2px 0 0;
  font-size: 19px;
  line-height: 1.25;
}

.fm-system-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0;
}

.fm-system-tags span {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--fm-green-100);
  color: var(--fm-green-800);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.fm-guidance-card p {
  margin: 0;
  color: var(--fm-muted);
  font-size: 14px;
  line-height: 1.66;
}

.fm-guidance-card a {
  display: inline-flex;
  margin-top: 13px;
  color: var(--fm-green-800);
  font-size: 12px;
  font-weight: 760;
}

.fm-dialog-content-section {
  margin-top: 34px;
}

.fm-dialog-content-section[hidden],
.fm-profile-section[hidden],
[data-fm-contribution-card]:empty {
  display: none !important;
}

[data-fm-contribution-card] > .fm-evidence-card {
  height: 100%;
}

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

.fm-evidence-card,
.fm-caution-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--fm-line);
  border-radius: 20px;
  background: var(--fm-white);
  box-shadow: 0 7px 20px rgba(8, 41, 29, 0.06);
}

.fm-evidence-card__title h3,
.fm-caution-card__title h3,
.fm-food-dialog .fm-evidence-card__title h3,
.fm-food-dialog .fm-caution-card__title h3 {
  margin: 3px 0 0;
  color: var(--fm-ink);
  font-size: 19px;
  line-height: 1.28;
}

.fm-evidence-card p,
.fm-caution-card p {
  margin: 16px 0 0;
  color: var(--fm-muted);
  font-size: 14px;
  line-height: 1.66;
}

.fm-evidence-card a {
  display: inline-flex;
  margin-top: 13px;
  color: var(--fm-green-800);
  font-size: 12px;
  font-weight: 760;
}

.fm-evidence-badge {
  background: var(--fm-green-100);
  color: var(--fm-green-800);
}

.fm-caution-card {
  border-left: 5px solid #a73732;
}

.fm-caution-card__title > span {
  background: #fff0bd;
  color: #805c00;
}

.fm-caution-card > strong {
  display: inline-flex;
  margin: 12px 0 0 55px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fde7e5;
  color: #9b312c;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.fm-caution-card > b {
  display: block;
  margin-top: 14px;
  color: #8f302c;
  font-size: 12px;
  line-height: 1.5;
}

.fm-practical-card {
  overflow: hidden;
  margin-top: 22px;
  border: 1px solid var(--fm-line);
  border-radius: 20px;
  background: var(--fm-white);
  box-shadow: 0 7px 20px rgba(8, 41, 29, 0.06);
}

.fm-practical-card > div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 20px 22px;
}

.fm-practical-card > div + div {
  border-top: 1px solid var(--fm-line);
}

.fm-practical-card > div > span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--fm-green-100);
  color: var(--fm-green-800);
  font-size: 18px;
}

.fm-practical-card p {
  margin: 0;
  color: var(--fm-muted);
  font-size: 15px;
  line-height: 1.62;
}

.fm-practical-card strong {
  display: block;
  margin-bottom: 3px;
  color: var(--fm-ink);
  font-size: 16px;
}

.fm-guidance-method {
  margin-top: 18px;
  padding: 15px 18px;
  border-left: 4px solid var(--fm-gold);
  border-radius: 10px;
  background: var(--fm-cream);
}

.fm-guidance-method p {
  margin: 4px 0 0;
  color: var(--fm-muted);
  font-size: 13px;
  line-height: 1.6;
}

.fm-nutrition-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--fm-line);
  border-radius: 16px;
}

.fm-nutrition-table {
  width: 100%;
  min-width: 560px;
  border: 0;
  border-collapse: collapse;
  background: var(--fm-white);
}

.fm-nutrition-table th,
.fm-nutrition-table td {
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid var(--fm-line);
  color: var(--fm-ink);
  text-align: left;
}

.fm-nutrition-table thead th {
  background: var(--fm-green-900);
  color: var(--fm-white);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fm-nutrition-table tbody th {
  font-weight: 650;
}

.fm-nutrition-table tbody td {
  color: var(--fm-muted);
}

.fm-nutrition-table tr:last-child th,
.fm-nutrition-table tr:last-child td {
  border-bottom: 0;
}

/* Server-rendered food pages provide indexable nutrition content. */
.fm-food-profile-page {
  width: min(1440px, calc(100% - 36px));
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 58px) 0 clamp(70px, 8vw, 120px);
  color: var(--fm-ink);
}

.fm-food-profile-page,
.fm-food-profile-page * {
  box-sizing: border-box;
}

.fm-food-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--fm-muted);
  font-size: 13px;
}

.fm-food-breadcrumb a {
  color: var(--fm-green-800);
  font-weight: 720;
}

.fm-profile-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(30px, 5vw, 76px);
  align-items: center;
  padding: clamp(26px, 5vw, 70px);
  border: 1px solid rgba(12, 81, 53, 0.12);
  border-radius: 30px;
  background: radial-gradient(circle at 90% 10%, rgba(255, 241, 173, 0.88), transparent 31%), linear-gradient(125deg, var(--fm-green-50), var(--fm-cream));
}

.fm-profile-visual {
  display: flex;
  min-height: 340px;
  aspect-ratio: 4 / 3;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(12, 81, 53, 0.14);
  border-radius: 24px;
  background: radial-gradient(circle at 75% 20%, var(--fm-gold-light), transparent 32%), var(--fm-white);
  box-shadow: 0 18px 44px rgba(8, 41, 29, 0.1);
  color: var(--fm-green-800);
}

.fm-profile-visual > span {
  font-size: clamp(60px, 8vw, 108px);
  font-weight: 850;
  letter-spacing: -0.04em;
}

.fm-profile-visual > small {
  margin-top: 8px;
  color: var(--fm-muted);
  font-weight: 780;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fm-profile-hero__content h1 {
  margin: 0;
  color: var(--fm-ink);
  font-size: clamp(42px, 5vw, 76px);
  font-weight: 790;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.fm-profile-hero__content > p:not(.fm-eyebrow) {
  max-width: 760px;
  margin: 17px 0 0;
  color: var(--fm-muted);
  font-size: 16px;
  line-height: 1.7;
}

.fm-profile-preparation {
  color: var(--fm-green-800) !important;
  font-weight: 760;
}

.fm-profile-source-state {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.fm-profile-source-state > * {
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--fm-white);
  color: var(--fm-green-800);
  font-size: 12px;
}

.fm-profile-controls {
  grid-template-columns: minmax(300px, 1fr) minmax(220px, 0.55fr) minmax(170px, 0.35fr);
  margin: 28px 0 0;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 22px;
  background: var(--fm-white);
  box-shadow: var(--fm-shadow);
}

.fm-profile-controls > .fm-amount-controls {
  display: grid;
  grid-column: 2 / -1;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.62fr);
  gap: 16px;
  align-items: end;
}

.fm-profile-controls h2,
.fm-profile-section h2 {
  margin: 0;
  color: var(--fm-ink);
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 770;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.fm-profile-section {
  padding: clamp(58px, 7vw, 96px) 0 0;
}

.fm-profile-section__heading {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.fm-profile-section__heading > p {
  margin: 0;
  color: var(--fm-muted);
  font-weight: 720;
}

.fm-profile-nutrient-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fm-profile-nutrient-grid .fm-nutrient-tile {
  min-height: 116px;
  padding: 18px;
}

.fm-guidance-section {
  margin-top: clamp(58px, 7vw, 96px);
  padding: clamp(34px, 5vw, 68px);
  border-radius: 28px;
  background: var(--fm-green-50);
}

.fm-guidance-section.fm-profile-section {
  padding-top: clamp(34px, 5vw, 68px);
}

.fm-food-dialog .fm-guidance-section {
  margin-top: 34px;
  padding: 24px;
  border-radius: 20px;
}

.fm-profile-sources .fm-source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.fm-profile-sources .fm-source-list li {
  padding: 17px;
  border: 1px solid var(--fm-line);
  border-radius: 14px;
}

.fm-image-credit {
  margin-top: 15px;
  color: var(--fm-muted);
  font-size: 12px;
}

.fm-profile-cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fm-profile-cta-links a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 10px 17px;
  border: 2px solid var(--fm-gold);
  border-radius: 11px;
  background: var(--fm-green-900);
  color: var(--fm-gold-light);
  font-weight: 800;
  text-decoration: none;
}

.fm-profile-cta-links a:hover,
.fm-profile-cta-links a:focus-visible {
  border-color: var(--fm-gold);
  background: var(--fm-green-950);
  color: var(--fm-gold-light);
}

.fm-detail-heading__initials {
  width: 72px;
  height: 72px;
  border-radius: 21px;
  font-size: 18px;
}

.fm-detail-heading h2 {
  margin: 0;
  color: var(--fm-ink);
  font-size: clamp(27px, 4vw, 42px);
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.fm-detail-heading p:last-child {
  margin: 8px 0 0;
  color: var(--fm-muted);
}

.fm-detail-note {
  display: flex;
  gap: 8px;
  flex-direction: column;
  margin: 28px 0;
  padding: 17px 20px;
  border-left: 4px solid var(--fm-gold);
  border-radius: 10px;
  background: var(--fm-cream);
  color: var(--fm-muted);
}

.fm-detail-note strong {
  color: var(--fm-ink);
}

.fm-food-dialog h3 {
  margin: 30px 0 14px;
  color: var(--fm-ink);
  font-size: 20px;
}

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

.fm-nutrient-tile {
  display: flex;
  min-width: 0;
  min-height: 104px;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--fm-line);
  border-radius: 14px;
  background: var(--fm-green-50);
}

.fm-nutrient-tile span {
  color: var(--fm-muted);
  font-size: 12px;
  line-height: 1.35;
}

.fm-nutrient-tile strong {
  color: var(--fm-green-900);
  font-size: 18px;
}

.fm-detail-list,
.fm-source-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fm-detail-list li,
.fm-source-list li {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--fm-line);
}

.fm-source-list li {
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}

.fm-source-list a {
  color: var(--fm-green-800);
  font-weight: 720;
}

.fm-source-list span {
  color: var(--fm-muted);
  font-size: 13px;
}

.fm-medical-note,
.fm-noscript {
  margin: 30px 0 0;
  padding: 15px 17px;
  border-radius: 12px;
  background: #f4f5f4;
  color: var(--fm-muted);
  font-size: 13px;
  line-height: 1.6;
}

.fm-dialog-loading {
  display: flex;
  min-height: 280px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--fm-muted);
}

.fm-dialog-loading span {
  width: 38px;
  height: 38px;
  border: 4px solid var(--fm-green-100);
  border-top-color: var(--fm-green-800);
  border-radius: 50%;
  animation: fm-spin 800ms linear infinite;
}

@keyframes fm-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
  .fm-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fm-food-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-nutrient-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fm-guidance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-profile-nutrient-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .fm-guides-heading { align-items: flex-start; flex-direction: column; }
  .fm-home-search { grid-template-columns: 1fr; border-radius: 22px; }
  .fm-home-search__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .fm-home-search__facts div { flex-direction: column; align-items: flex-start; }
  .fm-explore { width: 100%; max-width: 100%; padding: 14px; }
  .fm-explore-hero { grid-template-columns: 1fr; border-radius: 22px; }
  .fm-explore-hero__badge { display: none; }
  .fm-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-nutrient-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-profile-hero { grid-template-columns: 1fr; }
  .fm-profile-visual { min-height: 280px; }
  .fm-detail-controls,
  .fm-profile-controls { grid-template-columns: 1fr 1fr; }
  .fm-detail-controls > div,
  .fm-profile-controls > div:first-child { grid-column: 1 / -1; }
  .fm-profile-controls > .fm-amount-controls { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .fm-latest-guides { margin: 68px auto; }
  .fm-guide-grid { grid-template-columns: 1fr; }
  .fm-home-search { margin: 24px auto; padding: 28px 18px; }
  .fm-home-search h2 { font-size: 36px; }
  .fm-search-form { align-items: stretch; flex-wrap: wrap; padding: 7px; }
  .fm-search-form__icon { margin-top: 15px; }
  .fm-search-form input { width: calc(100% - 52px); padding-left: 14px; }
  .fm-search-form button { width: 100%; }
  .fm-home-search__facts { gap: 7px; }
  .fm-home-search__facts div { padding: 12px 9px; }
  .fm-home-search__facts strong { font-size: 17px; }
  .fm-home-search__facts span { font-size: 11px; }
  .fm-explore-hero { padding: 38px 24px 58px; }
  .fm-explore-hero h1 { font-size: 42px; }
  .fm-explore-search { width: calc(100% - 18px); padding: 12px; }
  .fm-section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .fm-section-heading--results { align-items: flex-start; }
  .fm-category-grid,
  .fm-food-grid { grid-template-columns: 1fr; }
  .fm-food-card { min-height: 0; }
  .fm-food-dialog { width: calc(100% - 16px); border-radius: 18px; }
  .fm-food-dialog__frame { padding: 20px 16px 30px; }
  .fm-detail-heading { align-items: flex-start; padding-right: 0; }
  .fm-detail-heading__initials { width: 54px; height: 54px; border-radius: 16px; }
  .fm-nutrient-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-detail-heading { flex-direction: column; }
  .fm-detail-image { width: 100%; height: 180px; flex-basis: auto; }
  .fm-detail-controls,
  .fm-profile-controls { grid-template-columns: 1fr; }
  .fm-profile-controls > .fm-amount-controls { grid-template-columns: 1fr; }
  .fm-guidance-grid,
  .fm-evidence-grid,
  .fm-caution-grid,
  .fm-profile-nutrient-grid,
  .fm-profile-sources .fm-source-list { grid-template-columns: 1fr; }
  .fm-food-profile-page { width: min(100% - 24px, 1440px); }
  .fm-profile-hero { padding: 24px 18px; border-radius: 22px; }
  .fm-profile-visual { min-height: 220px; }
  .fm-guidance-section { padding: 28px 18px; border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .fm-home-search *,
  .fm-explore * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
