:root {
  color-scheme: light;
  --blue-700: #175acb;
  --blue-600: #216ce0;
  --blue-500: #2f7df4;
  --blue-100: #e9f2ff;
  --blue-50: #f4f8ff;
  --ink-950: #111827;
  --ink-700: #344054;
  --ink-500: #667085;
  --line: #dce5f1;
  --surface: #ffffff;
  --page: #f7f9fc;
  --success: #16794a;
  --shadow-soft: 0 8px 24px rgba(31, 72, 126, 0.08);
  --shadow-hover: 0 12px 28px rgba(33, 108, 224, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink-950);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

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

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

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

[hidden] {
  display: none !important;
}

.sr-only {
  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: relative;
  z-index: 10;
  height: 68px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.hero-inner,
.results-inner,
.footer-inner {
  width: min(100% - 40px, 1240px);
  margin-inline: auto;
}

.header-inner {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
}

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

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: var(--ink-950);
}

.brand-name {
  font-size: 21px;
  font-weight: 760;
}

.brand-mark {
  width: 21px;
  height: 21px;
  fill: var(--blue-500);
  stroke: none;
}

.header-search-link {
  display: inline-flex;
  height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--ink-700);
  font-size: 14px;
  font-weight: 650;
}

.header-search-link:hover,
.header-search-link:focus-visible {
  background: var(--blue-50);
  color: var(--blue-700);
  outline: none;
}

.header-auth-link {
  display: inline-flex;
  min-width: 68px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid #d6e5fa;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.header-auth-link:hover,
.header-auth-link:focus-visible {
  background: var(--blue-100);
  border-color: #b9d2f7;
  outline: none;
}

.header-search-link svg,
.search-form svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hero {
  min-height: 410px;
  background-color: #ffffff;
  background-image: url("/static/beauty-hero.png");
  background-position: right center;
  background-repeat: no-repeat;
  background-size: auto 100%;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: flex;
  min-height: inherit;
  align-items: center;
}

.hero-copy {
  width: min(720px, 66%);
  padding: 36px 0 42px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 690px;
  margin: 0;
  font-size: 44px;
  font-weight: 760;
  line-height: 1.06;
  overflow-wrap: break-word;
}

.hero-description {
  max-width: 620px;
  margin: 16px 0 22px;
  color: var(--ink-700);
  font-size: 18px;
  line-height: 1.55;
}

.search-form {
  position: relative;
  display: grid;
  width: min(100%, 720px);
  min-height: 78px;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  padding: 7px;
  background: var(--surface);
  border: 2px solid #b9d2f7;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(31, 72, 126, 0.11);
}

.search-form:focus-within {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(47, 125, 244, 0.12), var(--shadow-soft);
}

.search-icon {
  display: grid;
  color: var(--ink-500);
  place-items: center;
}

.search-form input {
  min-width: 0;
  height: 60px;
  padding: 0 14px 0 0;
  color: var(--ink-950);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 17px;
}

.search-form input::placeholder {
  color: #8994a6;
}

.search-form button {
  display: inline-flex;
  height: 60px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 28px;
  color: #ffffff;
  background: var(--blue-600);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 720;
}

.search-form button:hover {
  background: var(--blue-700);
}

.search-form button:focus-visible {
  outline: 3px solid rgba(47, 125, 244, 0.3);
  outline-offset: 2px;
}

.search-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.barcode-scanner-trigger {
  display: none;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 12px;
  padding: 0 16px;
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid #c9dcf7;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.barcode-scanner-trigger:hover,
.barcode-scanner-trigger:focus-visible {
  background: var(--blue-100);
  border-color: #a9c9f5;
  outline: none;
}

.barcode-scanner-trigger svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.barcode-scanner {
  width: min(100% - 28px, 520px);
  max-height: calc(100vh - 28px);
  padding: 0;
  color: var(--ink-950);
  background: transparent;
  border: 0;
}

.barcode-scanner::backdrop {
  background: rgba(17, 24, 39, 0.48);
}

.barcode-scanner__panel {
  padding: 22px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 48px rgba(17, 24, 39, 0.2);
}

.barcode-scanner__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.barcode-scanner__header h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.barcode-scanner__close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  color: var(--ink-700);
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  place-items: center;
}

.barcode-scanner__close:hover,
.barcode-scanner__close:focus-visible {
  color: var(--blue-700);
  background: var(--blue-50);
  outline: 3px solid rgba(47, 125, 244, 0.18);
}

.barcode-scanner__viewport {
  position: relative;
  aspect-ratio: 4 / 3;
  margin-top: 20px;
  overflow: hidden;
  background: #111827;
  border-radius: 8px;
}

.barcode-scanner__viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.barcode-scanner__guide {
  position: absolute;
  inset: 24% 8%;
  border: 2px solid #ffffff;
  border-radius: 8px;
  box-shadow: 0 0 0 999px rgba(17, 24, 39, 0.34);
}

.barcode-scanner__status {
  min-height: 48px;
  margin: 16px 0 0;
  color: var(--ink-700);
  line-height: 1.5;
}

.barcode-scanner__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.barcode-scanner__manual-toggle,
.barcode-scanner__name-search,
.barcode-manual-form button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
}

.barcode-scanner__manual-toggle {
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid #c9dcf7;
}

.barcode-scanner__name-search,
.barcode-manual-form button {
  color: #ffffff;
  background: var(--blue-600);
  border: 1px solid var(--blue-600);
}

.barcode-scanner__manual-toggle:hover,
.barcode-scanner__manual-toggle:focus-visible,
.barcode-scanner__name-search:hover,
.barcode-scanner__name-search:focus-visible,
.barcode-manual-form button:hover,
.barcode-manual-form button:focus-visible {
  outline: 3px solid rgba(47, 125, 244, 0.18);
  outline-offset: 2px;
}

.barcode-manual-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.barcode-manual-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-700);
  font-size: 14px;
  font-weight: 700;
}

.barcode-manual-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.barcode-manual-form input {
  min-width: 0;
  height: 46px;
  padding: 0 13px;
  color: var(--ink-950);
  background: #ffffff;
  border: 1px solid #bdc9d9;
  border-radius: 7px;
  outline: none;
}

.barcode-manual-form input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(47, 125, 244, 0.12);
}

.barcode-scanner__privacy {
  margin: 18px 0 0;
  color: var(--ink-500);
  font-size: 13px;
}

.results-section {
  min-height: 360px;
  padding: 28px 0 64px;
  background: var(--page);
}

.discovery-intro {
  display: grid;
  gap: 22px;
  padding: 4px 0 8px;
}

.discovery-intro h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

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

.discovery-card {
  display: grid;
  min-width: 0;
  min-height: 132px;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(31, 72, 126, 0.04);
}

.discovery-card__number {
  display: grid;
  width: 34px;
  height: 34px;
  color: var(--blue-700);
  background: var(--blue-100);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 760;
  place-items: center;
}

.discovery-card h3 {
  margin: 2px 0 7px;
  font-size: 17px;
  line-height: 1.3;
}

.discovery-card p {
  margin: 0;
  color: var(--ink-500);
  font-size: 14px;
  line-height: 1.5;
}

.results-heading {
  display: flex;
  min-height: 50px;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.results-heading h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.results-summary {
  margin: 0 0 3px;
  color: var(--ink-500);
  font-size: 14px;
}

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

.product-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 370px;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(31, 72, 126, 0.05);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.product-card__link {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.product-card:hover {
  border-color: #9fc2f6;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.product-card__link:focus-visible {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(47, 125, 244, 0.14), var(--shadow-hover);
  outline: none;
}

.favorite-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  color: var(--blue-700);
  background: #ffffff;
  border: 1px solid #b9d2f7;
  border-radius: 50%;
  cursor: pointer;
  font-family: inherit;
  font-size: 23px;
  line-height: 1;
  place-items: center;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.favorite-button:hover,
.favorite-button:focus-visible {
  color: #135fca;
  background: var(--blue-50);
  border-color: var(--blue-500);
  outline: none;
}

.favorite-button.is-favorite {
  color: #176edc;
  background: #eaf3ff;
  border-color: #8db8f5;
}

.favorite-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.favorite-button--overlay {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  box-shadow: 0 3px 12px rgba(31, 72, 126, 0.12);
}

.favorite-button--detail {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
}

.favorite-login-prompt {
  position: fixed;
  z-index: 50;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(calc(100% - 40px), 360px);
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  color: var(--ink-950);
  background: #ffffff;
  border: 1px solid #cbdcf4;
  border-radius: 8px;
  box-shadow: 0 14px 38px rgba(31, 72, 126, 0.18);
}

.favorite-login-prompt p {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}

.favorite-login-prompt__cta {
  color: var(--blue-700);
  font-size: 14px;
  font-weight: 750;
}

.favorite-login-prompt__close {
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--ink-500);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 22px;
}

.product-card__media {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f2f6fb;
  border-bottom: 1px solid #e7edf5;
  place-items: center;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
  background: #ffffff;
}

.image-placeholder {
  display: grid;
  width: 76px;
  height: 92px;
  color: #7ea8e7;
  background: #e8f1ff;
  border: 1px solid #c8daf5;
  border-radius: 8px 8px 12px 12px;
  place-items: center;
}

.image-placeholder svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.product-card__body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.product-brand {
  margin: 0 0 7px;
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.product-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink-950);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.34;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

.category-label {
  max-width: 70%;
  overflow: hidden;
  padding: 5px 8px;
  color: var(--ink-700);
  background: #f2f5f9;
  border-radius: 6px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-status {
  display: none;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  color: var(--ink-500);
  text-align: center;
}

.results-status.is-visible {
  display: flex;
}

.empty-state {
  display: grid;
  max-width: 460px;
  gap: 10px;
  justify-items: center;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  color: var(--blue-500);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.empty-state strong {
  color: var(--ink-950);
  font-size: 18px;
}

.empty-state p {
  margin: 0;
}

.skeleton-card {
  min-height: 370px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.skeleton-media {
  aspect-ratio: 4 / 3;
  background: #edf2f8;
}

.skeleton-lines {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.skeleton-lines span {
  display: block;
  height: 12px;
  background: #edf2f8;
  border-radius: 4px;
}

.skeleton-lines span:nth-child(1) {
  width: 42%;
}

.skeleton-lines span:nth-child(2) {
  width: 88%;
}

.skeleton-lines span:nth-child(3) {
  width: 66%;
}

.site-footer {
  padding: 24px 0;
  color: var(--ink-500);
  background: #ffffff;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.auth-page {
  display: grid;
  min-height: calc(100vh - 68px);
  padding: 56px 20px;
  background: var(--page);
  place-items: start center;
}

.auth-panel {
  width: min(100%, 460px);
  padding: 32px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.auth-panel h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.15;
}

.auth-panel__copy {
  margin: 14px 0 26px;
  color: var(--ink-500);
}

.auth-panel--loading {
  color: var(--ink-500);
  text-align: center;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  color: var(--ink-700);
  font-size: 14px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  color: var(--ink-950);
  background: #ffffff;
  border: 1px solid #b9c6d8;
  border-radius: 7px;
  outline: none;
}

.auth-form input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(47, 125, 244, 0.12);
}

.auth-code-input {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.auth-primary-button,
.auth-secondary-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 720;
}

.auth-primary-button {
  margin-top: 8px;
  color: #ffffff;
  background: var(--blue-600);
  border: 1px solid var(--blue-600);
}

.auth-primary-button:hover,
.auth-primary-button:focus-visible {
  background: var(--blue-700);
  outline: none;
}

.auth-secondary-button {
  width: 100%;
  color: var(--blue-700);
  background: #ffffff;
  border: 1px solid #b9d2f7;
}

.auth-secondary-button:hover,
.auth-secondary-button:focus-visible {
  background: var(--blue-50);
  outline: none;
}

.auth-primary-button:disabled,
.auth-secondary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.auth-status {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--ink-500);
  font-size: 14px;
}

.auth-status.is-error {
  color: #a23b3b;
}

.account-details {
  margin: 26px 0;
}

.account-details > div {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.account-details dt {
  color: var(--ink-500);
  font-size: 13px;
}

.account-details dd {
  margin: 4px 0 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.account-panel {
  width: min(100%, 920px);
}

.account-favorites {
  margin: 30px 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.account-comparisons {
  margin: 30px 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.account-favorites__heading h2 {
  margin: 4px 0 0;
  font-size: 25px;
}

.account-favorites-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.account-favorite-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.account-favorite-card__link {
  display: grid;
  min-height: 142px;
  grid-template-columns: 112px minmax(0, 1fr);
}

.account-favorite-card__media {
  display: grid;
  overflow: hidden;
  background: #f2f6fb;
  border-right: 1px solid var(--line);
  place-items: center;
}

.account-favorite-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  background: #ffffff;
}

.account-favorite-card__placeholder {
  color: var(--ink-500);
  font-size: 12px;
}

.account-favorite-card__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px 58px 18px 16px;
}

.account-favorite-card__copy p {
  margin: 0 0 5px;
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.account-favorite-card__copy h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.account-favorite-card__copy span {
  margin-top: auto;
  color: var(--ink-500);
  font-size: 12px;
}

.account-favorite-card .favorite-button {
  position: absolute;
  top: 12px;
  right: 12px;
}

.account-favorites-empty {
  padding: 24px;
  color: var(--ink-700);
  background: var(--blue-50);
  border: 1px solid #d9e7fa;
  border-radius: 8px;
}

.account-favorites-empty p {
  margin: 6px 0 0;
  color: var(--ink-500);
}

.account-comparisons-grid {
  display: grid;
  gap: 14px;
}

.account-comparison-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.account-comparison-card__products {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: stretch;
}

.account-comparison-product {
  display: grid;
  min-width: 0;
  min-height: 132px;
  grid-template-columns: 94px minmax(0, 1fr);
}

.account-comparison-product__media {
  display: grid;
  overflow: hidden;
  background: #f2f6fb;
  place-items: center;
}

.account-comparison-product__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 9px;
  background: #ffffff;
}

.account-comparison-product > div:last-child {
  min-width: 0;
  padding: 18px 14px;
}

.account-comparison-product p {
  margin: 0 0 6px;
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.account-comparison-product h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.account-comparison-card__versus {
  display: grid;
  color: var(--ink-500);
  background: var(--page);
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  font-size: 11px;
  font-weight: 760;
  place-items: center;
}

.account-comparison-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.account-comparison-card__open {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 15px;
  color: #ffffff;
  background: var(--blue-600);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 720;
}

.account-comparison-card__actions button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink-500);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 650;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.product-page {
  min-height: calc(100vh - 133px);
  background: var(--page);
}

.product-loading,
.product-overview {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.product-loading__inner,
.product-overview__inner,
.formula-section__inner {
  width: min(100% - 40px, 1120px);
  margin-inline: auto;
}

.product-loading__inner {
  display: grid;
  min-height: 470px;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(44px, 7vw, 96px);
  padding: 52px 0;
}

.product-loading__media {
  width: 100%;
  aspect-ratio: 1;
  background: #edf2f8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-loading__copy {
  display: grid;
  max-width: 570px;
  gap: 18px;
}

.product-loading__copy span {
  display: block;
  height: 16px;
  background: #edf2f8;
  border-radius: 4px;
}

.product-loading__copy span:nth-child(1) {
  width: 24%;
}

.product-loading__copy span:nth-child(2) {
  width: 82%;
  height: 42px;
}

.product-loading__copy span:nth-child(3) {
  width: 38%;
}

.product-loading__copy span:nth-child(4) {
  width: 44%;
  height: 58px;
  margin-top: 18px;
}

.product-overview__inner {
  padding: 24px 0 56px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  color: var(--ink-500);
  font-size: 14px;
  font-weight: 650;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--blue-700);
  outline: none;
}

.back-link svg,
.primary-cta svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.product-overview__grid {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(44px, 7vw, 96px);
}

.product-detail-media {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f4f7fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  place-items: center;
}

.product-detail-media > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 24px;
  background: #ffffff;
}

.product-image-placeholder {
  display: grid;
  width: 120px;
  height: 150px;
  color: #79a4e3;
  background: #e8f1ff;
  border: 1px solid #c8daf5;
  border-radius: 8px;
  place-items: center;
}

.product-image-placeholder svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.product-summary {
  min-width: 0;
}

.product-summary__brand {
  margin: 0 0 10px;
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

.product-summary h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 760;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.product-summary__category {
  display: inline-flex;
  margin: 20px 0 30px;
  padding: 7px 10px;
  color: var(--ink-700);
  background: var(--blue-50);
  border: 1px solid #dbe8fa;
  border-radius: 6px;
  font-size: 14px;
}

.primary-cta {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 26px;
  color: #ffffff;
  background: var(--blue-600);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(33, 108, 224, 0.2);
  font-weight: 720;
}

.primary-cta:hover {
  background: var(--blue-700);
}

.primary-cta:focus-visible {
  box-shadow: 0 0 0 4px rgba(47, 125, 244, 0.2), 0 10px 24px rgba(33, 108, 224, 0.2);
  outline: none;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.secondary-cta {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  color: var(--blue-700);
  background: #ffffff;
  border: 1px solid #b9d2f7;
  border-radius: 8px;
  font-weight: 720;
}

.secondary-cta:hover,
.secondary-cta:focus-visible {
  background: var(--blue-50);
  border-color: var(--blue-500);
  outline: none;
}

.formula-section {
  padding: 44px 0 72px;
}

.formula-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.formula-heading h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.15;
}

.ingredient-count {
  margin: 0 0 4px;
  color: var(--ink-500);
  font-size: 14px;
}

.formula-summary {
  margin-bottom: 22px;
}

.formula-summary__heading {
  margin-bottom: 15px;
}

.formula-summary__heading h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
}

.formula-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.formula-summary-card {
  min-width: 0;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.formula-summary-card h4 {
  margin: 0 0 11px;
  color: var(--ink-700);
  font-size: 14px;
  line-height: 1.35;
}

.formula-summary-card__ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.formula-summary-card__ingredients span {
  max-width: 100%;
  padding: 4px 7px;
  color: #31557f;
  background: var(--blue-50);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.formula-summary-card__ingredients .is-count {
  color: var(--ink-500);
  background: #f2f5f9;
}

.full-formula {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.full-formula > summary {
  position: relative;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 54px 16px 20px;
  cursor: pointer;
  list-style: none;
}

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

.full-formula > summary::after {
  position: absolute;
  top: 50%;
  right: 23px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--blue-700);
  border-bottom: 2px solid var(--blue-700);
  content: "";
  transform: translateY(-65%) rotate(45deg);
}

.full-formula[open] > summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.full-formula > summary span:first-child {
  font-weight: 720;
}

.full-formula > summary span:last-child {
  color: var(--ink-500);
  font-size: 13px;
}

.full-formula .ingredient-list {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.ingredient-list {
  padding: 0;
  margin: 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  list-style: none;
}

.ingredient-row {
  display: grid;
  min-height: 82px;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 17px 22px;
  border-bottom: 1px solid #e8edf4;
}

.ingredient-row:last-child {
  border-bottom: 0;
}

.ingredient-position {
  color: #7b8a9f;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.ingredient-details {
  display: grid;
  min-width: 0;
  gap: 9px;
}

.ingredient-name {
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ingredient-inci-name {
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.ingredient-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ingredient-roles span {
  padding: 4px 7px;
  color: #41536b;
  background: #f2f5f9;
  border-radius: 5px;
  font-size: 12px;
}

.ingredient-row.is-unresolved {
  background: #fbfcfe;
}

.ingredient-row.is-unresolved .ingredient-name {
  color: var(--ink-700);
  font-weight: 650;
}

.ingredient-source-token {
  color: var(--ink-500);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.formula-empty {
  padding: 42px 24px;
  color: var(--ink-500);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}

.product-state {
  min-height: calc(100vh - 133px);
  padding: 64px 20px;
  background: #ffffff;
}

.product-state__content {
  display: grid;
  max-width: 500px;
  gap: 14px;
  justify-items: center;
  margin: 8vh auto 0;
  text-align: center;
}

.product-state__content svg {
  width: 38px;
  height: 38px;
  color: var(--blue-500);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.product-state__content h1 {
  margin: 4px 0 0;
  font-size: 30px;
}

.product-state__content p {
  margin: 0;
  color: var(--ink-500);
}

.product-state__content a {
  margin-top: 10px;
  color: var(--blue-700);
  font-weight: 700;
}

.analogs-page {
  min-height: calc(100vh - 133px);
  background: var(--page);
}

.analogs-intro {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.analogs-intro__inner,
.analogs-results__inner,
.analogs-loading__inner {
  width: min(100% - 40px, 1120px);
  margin-inline: auto;
}

.analogs-intro__inner {
  padding: 24px 0 46px;
}

.analogs-intro__grid {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(46px, 7vw, 92px);
}

.source-product {
  display: grid;
  min-width: 0;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 5px 18px rgba(31, 72, 126, 0.05);
}

.source-product__media {
  display: grid;
  width: 112px;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f2f6fb;
  border-radius: 6px;
  place-items: center;
}

.source-product__media img,
.analog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  background: #ffffff;
}

.source-product__copy {
  min-width: 0;
}

.source-product__copy p {
  margin: 0 0 5px;
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.source-product__copy h2 {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.source-product__copy > span {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 7px;
  color: var(--ink-700);
  background: #f2f5f9;
  border-radius: 5px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-image-placeholder,
.analog-image-placeholder {
  display: grid;
  color: #7ea8e7;
  background: #e8f1ff;
  border: 1px solid #c8daf5;
  border-radius: 7px;
  place-items: center;
}

.source-image-placeholder {
  width: 58px;
  height: 72px;
}

.analog-image-placeholder {
  width: 70px;
  height: 88px;
}

.source-image-placeholder svg,
.analog-image-placeholder svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.analogs-intro__copy h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 54px);
  line-height: 1.04;
}

.analogs-intro__copy > p:last-child {
  max-width: 600px;
  margin: 18px 0 0;
  color: var(--ink-700);
  font-size: 18px;
  line-height: 1.55;
}

.analogs-results {
  padding: 38px 0 72px;
}

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

.analogs-heading h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}

.analogs-heading > p {
  margin: 0 0 4px;
  color: var(--ink-500);
  font-size: 14px;
}

.analogs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
}

.analog-card {
  min-width: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 5px 18px rgba(31, 72, 126, 0.055);
}

.analog-card__product {
  display: grid;
  min-height: 232px;
  grid-template-columns: 168px minmax(0, 1fr);
}

.analog-card__product:hover .analog-card__body h3,
.analog-card__product:focus-visible .analog-card__body h3 {
  color: var(--blue-700);
}

.analog-card__product:focus-visible {
  outline: 3px solid rgba(47, 125, 244, 0.22);
  outline-offset: -3px;
}

.analog-card__media {
  display: grid;
  min-width: 0;
  overflow: hidden;
  background: #f2f6fb;
  border-right: 1px solid #e7edf5;
  place-items: center;
}

.analog-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
}

.analog-card__signals {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 17px;
}

.match-label,
.confidence-label {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.match-label.is-very_similar {
  color: #116642;
  background: #e9f8f0;
}

.match-label.is-similar {
  color: var(--blue-700);
  background: var(--blue-100);
}

.match-label.is-noticeable_differences {
  color: #8a5613;
  background: #fff5df;
}

.match-label.is-not_similar {
  color: #58667a;
  background: #edf1f6;
}

.confidence-label {
  color: var(--ink-500);
  background: #f3f5f8;
  font-weight: 600;
}

.analog-card__brand {
  margin: 0 0 6px;
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.analog-card__body h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  transition: color 140ms ease;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.analog-card__category {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  margin-top: auto;
  padding: 5px 8px;
  color: var(--ink-700);
  background: #f2f5f9;
  border-radius: 5px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analog-card__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid #e7edf5;
}

.analog-compare-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: #ffffff;
  background: var(--blue-600);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 720;
}

.analog-compare-link:hover,
.analog-compare-link:focus-visible {
  background: var(--blue-700);
  outline: none;
}

.analog-explanation {
  border-top: 1px solid #e7edf5;
}

.analog-explanation summary {
  position: relative;
  padding: 15px 46px 15px 18px;
  color: var(--blue-700);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  list-style: none;
}

.analog-explanation summary::-webkit-details-marker {
  display: none;
}

.analog-explanation summary::after {
  position: absolute;
  top: 50%;
  right: 19px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-65%) rotate(45deg);
}

.analog-explanation[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.analog-explanation__content {
  display: grid;
  gap: 19px;
  padding: 3px 18px 20px;
}

.explanation-group {
  display: grid;
  gap: 8px;
}

.explanation-group > strong {
  color: var(--ink-700);
  font-size: 13px;
}

.explanation-group ul {
  display: grid;
  gap: 7px;
  padding-left: 18px;
  margin: 0;
  color: var(--ink-500);
  font-size: 13px;
}

.explanation-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.explanation-chips span {
  padding: 4px 7px;
  color: #31557f;
  background: var(--blue-50);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 650;
}

.variant-results {
  margin-top: 52px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.analogs-loading {
  min-height: calc(100vh - 133px);
  background: var(--page);
}

.analogs-loading__inner {
  padding: 56px 0 72px;
}

.analogs-loading__source {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 72px;
  margin-bottom: 56px;
}

.analogs-loading__source span,
.analogs-loading__source div,
.analogs-loading__cards div {
  display: block;
  background: #eaf0f7;
  border-radius: 8px;
}

.analogs-loading__source span {
  height: 136px;
}

.analogs-loading__source div {
  height: 110px;
}

.analogs-loading__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.analogs-loading__cards div {
  height: 280px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.compare-page {
  min-height: calc(100vh - 133px);
  background: var(--page);
}

.compare-shell {
  width: min(100% - 40px, 1120px);
  margin-inline: auto;
}

.compare-hero {
  padding: 24px 0 52px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.compare-back {
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.compare-heading {
  max-width: 760px;
  margin: 2px auto 34px;
  text-align: center;
}

.compare-heading h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 690;
  line-height: 1.3;
}

.compare-result-label {
  margin: 12px 0 0;
  color: var(--ink-950);
  font-size: 36px;
  font-weight: 780;
  line-height: 1.15;
}

.compare-similarity {
  margin: 9px 0 0;
  color: var(--ink-500);
  font-size: 14px;
  font-weight: 650;
}

.compare-variant-note {
  display: inline-flex;
  margin: 17px 0 0;
  padding: 7px 10px;
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid #d5e4fa;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 680;
}

.saved-comparison-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 0 16px;
  color: var(--blue-700);
  background: #ffffff;
  border: 1px solid #b9d2f7;
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 720;
}

.saved-comparison-button:hover,
.saved-comparison-button:focus-visible,
.saved-comparison-button.is-saved {
  background: var(--blue-50);
  border-color: var(--blue-500);
  outline: none;
}

.saved-comparison-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.compare-products {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  align-items: stretch;
}

.compare-product-wrap {
  position: relative;
  min-width: 0;
}

.compare-product-wrap .compare-product {
  height: 100%;
}

.compare-product {
  display: grid;
  min-width: 0;
  min-height: 230px;
  grid-template-columns: 174px minmax(0, 1fr);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 7px 22px rgba(31, 72, 126, 0.065);
}

.compare-product:hover .compare-product__copy h2,
.compare-product:focus-visible .compare-product__copy h2 {
  color: var(--blue-700);
}

.compare-product:focus-visible {
  outline: 3px solid rgba(47, 125, 244, 0.22);
  outline-offset: 2px;
}

.compare-product__media {
  display: grid;
  min-width: 0;
  overflow: hidden;
  background: #f2f6fb;
  border-right: 1px solid #e7edf5;
  place-items: center;
}

.compare-product__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
  background: #ffffff;
}

.compare-image-placeholder {
  display: grid;
  width: 74px;
  height: 96px;
  color: #7ea8e7;
  background: #e8f1ff;
  border: 1px solid #c8daf5;
  border-radius: 7px;
  place-items: center;
}

.compare-image-placeholder svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.compare-product__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
}

.compare-product__index {
  margin-bottom: 18px;
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.compare-product__copy p {
  margin: 0 0 6px;
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.compare-product__copy h2 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 20px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  transition: color 140ms ease;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.compare-product__category {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  margin-top: auto;
  padding: 5px 8px;
  color: var(--ink-700);
  background: #f2f5f9;
  border-radius: 5px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-versus {
  display: grid;
  width: 30px;
  height: 30px;
  align-self: center;
  justify-self: center;
  color: var(--ink-500);
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 760;
  place-items: center;
}

.compare-details {
  padding: 42px 0 76px;
}

.compare-difference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.difference-panel {
  min-width: 0;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 5px 18px rgba(31, 72, 126, 0.045);
}

.difference-panel--shared {
  grid-column: 1 / -1;
  background: #fbfdff;
  border-color: #ccdef7;
}

.difference-panel__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.difference-panel__heading h2,
.compare-section__heading h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.difference-panel__heading .section-kicker,
.compare-section__heading .section-kicker {
  margin-bottom: 3px;
}

.difference-panel__icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  color: var(--blue-700);
  background: var(--blue-100);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 780;
  place-items: center;
}

.ingredient-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ingredient-chips > span:not(.ingredient-chips__empty) {
  padding: 6px 9px;
  color: #31557f;
  background: var(--blue-50);
  border: 1px solid #dfebfb;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.ingredient-chips > span.is-important {
  color: #116642;
  background: #eaf8f1;
  border-color: #cceadb;
}

.ingredient-chips__empty {
  color: var(--ink-500);
  font-size: 14px;
}

.compare-section {
  margin-top: 38px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.compare-section__heading {
  margin-bottom: 20px;
}

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

.important-grid > div {
  min-width: 0;
  padding: 20px;
  background: #fffaf0;
  border: 1px solid #f0dfbd;
  border-radius: 8px;
}

.important-grid h3 {
  margin: 0 0 14px;
  color: var(--ink-700);
  font-size: 15px;
}

.component-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 34px;
}

.component-row {
  display: grid;
  gap: 9px;
}

.component-row__copy {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-700);
  font-size: 13px;
  font-weight: 650;
}

.component-row__copy span:last-child {
  color: var(--ink-500);
  font-variant-numeric: tabular-nums;
}

.component-row__track {
  height: 7px;
  overflow: hidden;
  background: #e7edf5;
  border-radius: 4px;
}

.component-row__track span {
  display: block;
  height: 100%;
  background: var(--blue-500);
  border-radius: inherit;
}

.compare-limitations ul {
  display: grid;
  gap: 10px;
  padding: 18px 20px 18px 38px;
  margin: 0;
  color: var(--ink-700);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
}

.compare-loading {
  min-height: calc(100vh - 133px);
  padding: 54px 0 72px;
}

.compare-loading__inner {
  display: grid;
  gap: 34px;
}

.compare-loading__title,
.compare-loading__products > div,
.compare-loading__sections > div {
  display: block;
  background: #eaf0f7;
  border-radius: 8px;
}

.compare-loading__title {
  width: min(70%, 520px);
  height: 58px;
  justify-self: center;
}

.compare-loading__products,
.compare-loading__sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.compare-loading__products > div {
  height: 230px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.compare-loading__sections > div {
  height: 180px;
  background: #ffffff;
  border: 1px solid var(--line);
}

@media (max-width: 1020px) {
  .hero {
    background-position: right center;
    background-size: auto 88%;
  }

  .hero-copy {
    width: 62%;
  }

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

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

@media (max-width: 760px) {
  .header-inner,
  .hero-inner,
  .results-inner,
  .footer-inner {
    width: min(100% - 28px, 1240px);
  }

  .header-search-link span {
    display: none;
  }

  .hero {
    min-height: 0;
    background-color: #ffffff;
    background-image: none;
  }

  .hero-inner {
    align-items: start;
  }

  .hero-copy {
    width: 100%;
    padding: 36px 0 40px;
  }

  .hero h1 {
    max-width: 560px;
    font-size: 38px;
    line-height: 1.1;
  }

  .hero-description {
    max-width: 540px;
    margin: 18px 0 24px;
    font-size: 17px;
  }

  .barcode-scanner-trigger {
    display: inline-flex;
  }

  .search-form {
    min-height: 64px;
    grid-template-columns: 45px minmax(0, 1fr) auto;
    padding: 5px;
  }

  .search-form input,
  .search-form button {
    height: 50px;
  }

  .search-form button {
    padding: 0 18px;
  }

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

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

  .discovery-card {
    min-height: 0;
  }

  .results-section {
    padding-top: 28px;
  }

  .product-loading__inner,
  .product-overview__inner,
  .formula-section__inner {
    width: min(100% - 28px, 1120px);
  }

  .product-loading__inner,
  .product-overview__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .product-loading__inner {
    padding: 28px 0 42px;
  }

  .product-loading__media,
  .product-detail-media {
    max-height: 330px;
    aspect-ratio: 4 / 3;
  }

  .product-overview__inner {
    padding: 18px 0 40px;
  }

  .back-link {
    margin-bottom: 16px;
  }

  .product-summary h1 {
    font-size: 34px;
  }

  .product-summary__category {
    margin: 16px 0 24px;
  }

  .formula-section {
    padding: 34px 0 56px;
  }

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

  .analogs-intro__inner,
  .analogs-results__inner,
  .analogs-loading__inner {
    width: min(100% - 28px, 1120px);
  }

  .analogs-intro__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .source-product {
    max-width: 480px;
  }

  .analogs-intro__copy {
    grid-row: 1;
  }

  .analogs-intro__copy h1 {
    font-size: 39px;
  }

  .analogs-grid,
  .analogs-loading__cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .analogs-loading__source {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .compare-shell {
    width: min(100% - 28px, 1120px);
  }

  .compare-product {
    grid-template-columns: 130px minmax(0, 1fr);
  }

  .compare-product__copy {
    padding: 18px;
  }
}

@media (max-width: 760px) {
  .compare-hero {
    padding-bottom: 36px;
  }

  .compare-heading {
    margin-bottom: 26px;
  }

  .compare-result-label {
    font-size: 30px;
  }

  .compare-products {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .compare-versus {
    position: relative;
    z-index: 1;
    margin: -21px 0;
  }

  .compare-product {
    min-height: 190px;
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .compare-difference-grid,
  .important-grid,
  .component-list,
  .compare-loading__products,
  .compare-loading__sections {
    grid-template-columns: minmax(0, 1fr);
  }

  .difference-panel--shared {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .site-header {
    height: 62px;
  }

  .brand-name {
    font-size: 19px;
  }

  .header-actions {
    gap: 4px;
  }

  .header-auth-link {
    min-width: 58px;
    padding: 0 10px;
  }

  .auth-page {
    min-height: calc(100vh - 62px);
    padding: 28px 14px;
  }

  .auth-panel {
    padding: 24px 20px;
  }

  .account-favorites-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-comparison-card__products {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-comparison-card__versus {
    min-height: 32px;
    border-top: 1px solid var(--line);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }

  .account-comparison-card__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .account-comparison-card__open,
  .account-comparison-card__actions button {
    justify-content: center;
    text-align: center;
  }

  .auth-panel h1 {
    font-size: 28px;
  }

  .hero {
    min-height: 0;
  }

  .hero-copy {
    padding: 28px 0 32px;
  }

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

  .eyebrow {
    margin-bottom: 8px;
  }

  .search-form {
    grid-template-columns: 42px minmax(0, 1fr) 52px;
  }

  .search-form button {
    width: 52px;
    padding: 0;
  }

  .search-form button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .barcode-scanner-trigger {
    width: 100%;
  }

  .barcode-scanner {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
  }

  .barcode-scanner__panel {
    padding: 18px;
  }

  .barcode-scanner__header h2 {
    font-size: 21px;
  }

  .barcode-scanner__actions,
  .barcode-manual-form > div {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: minmax(0, 1fr);
  }

  .barcode-scanner__manual-toggle,
  .barcode-scanner__name-search,
  .barcode-manual-form button {
    width: 100%;
  }

  .results-section {
    padding: 24px 0 48px;
  }

  .results-heading {
    display: block;
  }

  .results-heading h2 {
    font-size: 24px;
  }

  .discovery-intro h2 {
    font-size: 24px;
  }

  .discovery-card {
    padding: 18px;
  }

  .results-summary {
    margin-top: 8px;
  }

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

  .product-card {
    min-height: 350px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 4px;
  }

  .product-loading__media,
  .product-detail-media {
    max-height: 290px;
  }

  .product-summary h1 {
    font-size: 30px;
  }

  .primary-cta {
    width: 100%;
  }

  .product-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .favorite-button--detail {
    width: 52px;
    height: 52px;
    justify-self: start;
  }

  .favorite-login-prompt {
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
  }

  .secondary-cta {
    width: 100%;
  }

  .formula-heading {
    display: block;
  }

  .formula-heading h2 {
    font-size: 28px;
  }

  .ingredient-count {
    margin-top: 8px;
  }

  .formula-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .full-formula > summary {
    display: grid;
    gap: 3px;
    padding-left: 16px;
  }

  .ingredient-row {
    min-height: 76px;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 15px 14px;
  }

  .product-state__content h1 {
    font-size: 26px;
  }

  .analogs-intro__inner {
    padding: 18px 0 34px;
  }

  .analogs-intro__copy h1 {
    font-size: 34px;
  }

  .analogs-intro__copy > p:last-child {
    margin-top: 13px;
    font-size: 16px;
  }

  .source-product {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 13px;
  }

  .source-product__media {
    width: 86px;
  }

  .analogs-results {
    padding: 28px 0 52px;
  }

  .analogs-heading {
    display: block;
  }

  .analogs-heading h2 {
    font-size: 25px;
  }

  .analogs-heading > p {
    margin-top: 7px;
  }

  .analog-card__product {
    min-height: 218px;
    grid-template-columns: 122px minmax(0, 1fr);
  }

  .analog-card__body {
    padding: 14px;
  }

  .analog-card__signals {
    gap: 5px;
    margin-bottom: 13px;
  }

  .analog-card__body h3 {
    font-size: 16px;
  }

  .confidence-label {
    display: none;
  }

  .variant-results {
    margin-top: 40px;
    padding-top: 27px;
  }

  .analog-card__actions {
    padding: 11px 14px;
  }

  .analog-compare-link {
    width: 100%;
  }

  .compare-shell {
    width: min(100% - 24px, 1120px);
  }

  .compare-hero {
    padding-top: 18px;
  }

  .compare-heading h1 {
    font-size: 16px;
  }

  .compare-result-label {
    font-size: 27px;
  }

  .compare-product {
    min-height: 168px;
    grid-template-columns: 106px minmax(0, 1fr);
  }

  .compare-product__copy {
    padding: 14px;
  }

  .compare-product__index {
    margin-bottom: 11px;
  }

  .compare-product__copy h2 {
    font-size: 16px;
    -webkit-line-clamp: 3;
  }

  .compare-product__category {
    font-size: 11px;
  }

  .compare-details {
    padding: 28px 0 52px;
  }

  .difference-panel {
    padding: 18px;
  }

  .difference-panel__heading h2,
  .compare-section__heading h2 {
    font-size: 21px;
  }

  .compare-section {
    margin-top: 30px;
    padding-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .product-card {
    transition: none;
  }
}
