.scanner-page {
  min-height: 100vh;
}

.scanner-page button:focus-visible,
.scanner-page a:focus-visible,
.scanner-page input:focus-visible,
.scanner-page textarea:focus-visible {
  outline: 3px solid rgba(23, 63, 53, 0.24);
  outline-offset: 3px;
}

.scanner-site-header {
  background: rgba(244, 242, 235, 0.82);
  border-color: var(--line);
  backdrop-filter: blur(18px);
}

.scanner-site-header .desktop-nav a.is-active::after {
  right: 0;
  height: 2px;
}

.scanner-site-header .desktop-nav a.is-active {
  color: var(--ink);
  font-weight: 650;
}

.scanner-site-header .mobile-nav a.is-active {
  color: var(--forest);
  font-weight: 700;
}

.scanner-main {
  position: relative;
  padding: 132px 0 104px;
  overflow: hidden;
}

.scanner-main::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 760px;
  opacity: 0.23;
  pointer-events: none;
  background-image: radial-gradient(rgba(23, 32, 29, 0.13) 0.65px, transparent 0.65px);
  background-size: 9px 9px;
  mask-image: linear-gradient(180deg, #000, transparent 90%);
}

.scanner-page-orb {
  position: absolute;
  z-index: 0;
  width: 720px;
  height: 720px;
  right: -410px;
  top: -170px;
  border-radius: 50%;
  background: #e1e5d5;
  opacity: 0.8;
  pointer-events: none;
}

.scanner-intro,
.scanner-tool,
.scanner-after {
  position: relative;
  z-index: 1;
}

.scanner-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: end;
  gap: 70px;
  margin-bottom: 42px;
}

.scanner-intro-copy {
  max-width: 820px;
}

.scanner-intro .eyebrow {
  margin-bottom: 19px;
}

.scanner-intro h1 {
  margin-bottom: 19px;
  font-size: clamp(43px, 5vw, 64px);
  font-weight: 560;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.scanner-intro-copy > p {
  max-width: 720px;
  margin-bottom: 18px;
  color: #57605c;
  font-size: 16px;
  line-height: 1.58;
}

.scanner-intro-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #7b8580;
  font-size: 11px;
}

.scanner-intro-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.scanner-profile-note {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(251, 250, 246, 0.54);
}

.scanner-profile-note > .ui-icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 50%;
  background: #e2e8df;
  color: var(--forest);
}

.scanner-profile-note p {
  margin: 0;
}

.scanner-profile-note strong,
.scanner-profile-note span,
.scanner-profile-note a {
  display: block;
}

.scanner-profile-note strong {
  margin-bottom: 5px;
  font-size: 12px;
}

.scanner-profile-note p > span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.scanner-profile-note a {
  width: fit-content;
  margin-top: 9px;
  border-bottom: 1px solid currentColor;
  color: var(--forest);
  font-size: 10px;
  font-weight: 700;
}

.scanner-tool {
  width: min(920px, var(--container));
}

.scanner-workspace {
  overflow: hidden;
  border: 1px solid rgba(23, 32, 29, 0.11);
  border-radius: 36px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.53);
  box-shadow: 0 30px 75px rgba(25, 48, 40, 0.13);
  backdrop-filter: blur(12px);
}

.workspace-header {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 13px 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.workspace-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-align: right;
}

.workspace-status i {
  width: 7px;
  height: 7px;
  flex: none;
  border: 1px solid var(--forest);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(23, 63, 53, 0.06);
}

.workspace-status[data-tone="working"] i,
.workspace-status[data-tone="active"] i {
  border: 0;
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(217, 238, 114, 0.17);
}

.workspace-status[data-tone="success"] i {
  border: 0;
  background: var(--forest);
}

.workspace-status[data-tone="attention"] i,
.workspace-status[data-tone="error"] i {
  border: 0;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(222, 118, 93, 0.1);
}

.workspace-surface {
  overflow: hidden;
  border: 1px solid rgba(23, 32, 29, 0.08);
  border-radius: 26px;
  background: var(--surface);
}

.workspace-state-title:focus {
  outline: none;
}

.scanner-noscript-state {
  min-height: 300px;
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.scanner-camera-viewport {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  min-height: 400px;
  color: var(--white);
  background: #bfc7bc;
}

.scanner-camera-placeholder {
  background: url("assets/beauty-products.jpg") center 61% / cover no-repeat;
}

.scanner-viewport-shade,
.scanner-video-shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 31, 25, 0.22), rgba(9, 31, 25, 0.48));
}

.scanner-frame {
  position: absolute;
  z-index: 2;
  inset: 54px 118px 117px;
  pointer-events: none;
}

.scanner-frame > i {
  position: absolute;
  width: 47px;
  height: 47px;
  border-color: rgba(255, 255, 255, 0.94);
  border-style: solid;
}

.scanner-frame > i:nth-child(1) {
  left: 0;
  top: 0;
  border-width: 2px 0 0 2px;
  border-radius: 15px 0 0;
}

.scanner-frame > i:nth-child(2) {
  right: 0;
  top: 0;
  border-width: 2px 2px 0 0;
  border-radius: 0 15px 0 0;
}

.scanner-frame > i:nth-child(3) {
  right: 0;
  bottom: 0;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 15px;
}

.scanner-frame > i:nth-child(4) {
  left: 0;
  bottom: 0;
  border-width: 0 0 2px 2px;
  border-radius: 0 0 0 15px;
}

.scanner-frame > span {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 50%;
  height: 1px;
  background: var(--acid);
  box-shadow: 0 0 20px 5px rgba(217, 238, 114, 0.24);
  animation: scanner-line 3.4s ease-in-out infinite;
}

.scanner-viewport-instruction {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  display: grid;
  gap: 6px;
  transform: translate(-50%, -50%);
  text-align: center;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.scanner-viewport-instruction strong {
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
}

.scanner-viewport-instruction small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.scanner-camera-button {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 31px;
  min-width: 230px;
  transform: translateX(-50%);
}

.scanner-camera-button:hover {
  transform: translate(-50%, -2px);
}

.scanner-camera-button:active {
  transform: translate(-50%, 0);
}

.scanner-alternatives {
  padding: 0 30px 27px;
}

.scanner-divider {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 0 14px;
  color: #8b938f;
  font-size: 10px;
}

.scanner-divider::before,
.scanner-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.scanner-search > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.scanner-search-control {
  position: relative;
}

.scanner-search-control > .ui-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: #74807a;
  transform: translateY(-50%);
  pointer-events: none;
}

.scanner-search-control input {
  width: 100%;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 64px 0 50px;
  outline: 0;
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.scanner-search-control input:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 4px rgba(23, 63, 53, 0.07);
}

.scanner-search-control button {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
}

.scanner-search-control button .ui-icon {
  width: 17px;
  height: 17px;
}

.scanner-upload-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 13px 28px;
  margin-top: 18px;
}

.scanner-upload-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid rgba(23, 32, 29, 0.35);
  padding: 0 0 4px;
  background: transparent;
  color: #56635e;
  font-size: 11px;
  cursor: pointer;
}

.scanner-upload-actions .ui-icon {
  width: 14px;
  height: 14px;
}

.scanner-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 15px auto 0;
  color: #7a847f;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.scanner-privacy .ui-icon {
  width: 13px;
  height: 13px;
}

.scanner-state-camera {
  position: relative;
}

.camera-requesting {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
  background: var(--forest-2);
  text-align: center;
}

.camera-requesting::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(rgba(255, 255, 255, 0.8) 0.6px, transparent 0.6px);
  background-size: 9px 9px;
}

.camera-requesting > * {
  position: relative;
  z-index: 1;
}

.camera-requesting h2 {
  margin: 20px 0 8px;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.camera-requesting p {
  max-width: 420px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.55;
}

.scanner-progress-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.scanner-progress-mark i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 7px rgba(217, 238, 114, 0.1);
  animation: scanner-pulse 1.6s ease-in-out infinite;
}

.scanner-cancel-button {
  position: absolute;
  z-index: 6;
  left: 18px;
  top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 100px;
  padding: 8px 15px;
  background: rgba(8, 29, 23, 0.55);
  color: var(--white);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.camera-active video {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  background: #091e19;
}

.camera-active .scanner-video-shade {
  background: linear-gradient(180deg, rgba(5, 20, 16, 0.12), rgba(5, 20, 16, 0.3));
}

.scanner-camera-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 18px;
}

.scanner-camera-actions .button {
  min-width: 180px;
}

.scanner-browser-note {
  max-width: 560px;
  margin: -5px auto 20px;
  padding-inline: 20px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.scanner-transition-state,
.scanner-empty-state,
.scanner-error-state {
  min-height: 510px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 54px;
  text-align: center;
}

.scanner-transition-state {
  background: linear-gradient(180deg, #f4f5ee, var(--surface));
}

.scanner-transition-icon,
.scanner-state-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 63, 53, 0.13);
  border-radius: 50%;
  background: #e7ece4;
  color: var(--forest);
}

.scanner-transition-icon .ui-icon,
.scanner-state-icon .ui-icon {
  width: 24px;
  height: 24px;
}

.scanner-transition-state h2,
.scanner-empty-state h2,
.scanner-error-state h2 {
  max-width: 560px;
  margin: 20px 0 8px;
  font-size: clamp(28px, 4vw, 39px);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.scanner-transition-state > p,
.scanner-empty-state > p,
.scanner-error-state > p {
  max-width: 510px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.scanner-transition-state > p {
  color: var(--forest);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scanner-progress-line {
  width: min(360px, 80%);
  height: 2px;
  overflow: hidden;
  margin: 38px 0 13px;
  border-radius: 4px;
  background: var(--paper-2);
}

.scanner-progress-line i {
  width: 42%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--forest);
  animation: scanner-progress 1.8s ease-in-out infinite;
}

.scanner-transition-state > span {
  color: #7b8580;
  font-size: 11px;
}

.scanner-state-code {
  margin-top: 18px;
  color: var(--forest);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scanner-empty-state > small {
  margin-top: 17px;
  color: #7c8581;
  font-size: 10px;
}

.scanner-state-actions,
.scanner-result-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.scanner-error-state .scanner-state-icon {
  background: #f4e5e0;
  color: #934b3a;
}

.scanner-error-state ul {
  margin: 18px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
  list-style-position: inside;
}

.scanner-result {
  padding: 38px;
}

.scanner-result-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 25px;
  color: var(--forest);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scanner-result-kicker > span {
  margin-right: 4px;
  border-radius: 100px;
  padding: 5px 7px;
  background: var(--acid);
}

.scanner-result-kicker .ui-icon {
  width: 13px;
  height: 13px;
}

.scanner-result-main {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}

.scanner-result-visual {
  height: 190px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 22px;
  background: #e8e8df;
}

.scanner-result-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.scanner-result-placeholder {
  position: relative;
  background: linear-gradient(145deg, #e5e8df, #f3f1e9);
}

.scanner-result-placeholder::before {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(23, 63, 53, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(23, 63, 53, 0.025);
}

.scanner-package {
  width: 72px;
  height: 125px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px 8px 10px;
  border: 1px solid rgba(23, 63, 53, 0.14);
  border-radius: 11px 11px 19px 19px;
  background: linear-gradient(90deg, #c8d1c7, #f6f5ef 35%, #d8ded6 72%, #b8c5ba);
  color: var(--forest);
  box-shadow: 0 16px 30px rgba(23, 63, 53, 0.12);
}

.scanner-package i {
  position: absolute;
  top: -17px;
  width: 32px;
  height: 19px;
  border-radius: 6px 6px 3px 3px;
  background: #dfe4dd;
}

.scanner-package span {
  max-width: 58px;
  overflow: hidden;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.scanner-package small {
  margin-top: 5px;
  color: #6e7a74;
  font-size: 6px;
  line-height: 1.25;
  text-align: center;
}

.scanner-result-brand {
  display: block;
  margin-bottom: 7px;
  color: var(--forest);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.scanner-result-copy h2 {
  max-width: 540px;
  margin-bottom: 9px;
  font-size: clamp(31px, 4.3vw, 47px);
  font-weight: 560;
  line-height: 1.04;
  letter-spacing: -0.052em;
}

.scanner-result-copy p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
}

.scanner-result-copy > small {
  padding: 6px 9px;
  border-radius: 100px;
  background: var(--paper-2);
  color: #69746e;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scanner-result-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 30px;
  border-block: 1px solid var(--line);
}

.scanner-result-metrics > div {
  min-height: 112px;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.scanner-result-metrics > div:first-child {
  padding-left: 0;
}

.scanner-result-metrics > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.scanner-result-metrics span {
  max-width: 145px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scanner-result-metrics strong {
  color: var(--forest);
  font-size: 30px;
  font-weight: 570;
  letter-spacing: -0.045em;
}

.scanner-result-metrics strong small {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.scanner-personal-metric strong {
  color: var(--ink);
}

.scanner-profile-result-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.scanner-profile-result-note .ui-icon {
  width: 14px;
  height: 14px;
  color: var(--forest);
}

.scanner-profile-result-note a {
  border-bottom: 1px solid currentColor;
  color: var(--forest);
  font-weight: 700;
}

.scanner-demo-disclosure {
  max-width: 620px;
  margin: 16px auto 0;
  color: #858d89;
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.ingredient-photo-state {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.2fr);
  min-height: 530px;
}

.ingredient-photo-preview {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background: #dce1d8;
}

.ingredient-photo-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(9, 31, 25, 0.45));
}

.ingredient-photo-preview img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
}

.ingredient-photo-preview > span {
  position: absolute;
  z-index: 1;
  left: 20px;
  bottom: 18px;
  color: var(--white);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ingredient-photo-copy {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 42px;
}

.ingredient-photo-copy .scanner-state-code {
  margin: 0 0 13px;
}

.ingredient-photo-copy h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 560;
  line-height: 1.07;
  letter-spacing: -0.045em;
}

.ingredient-photo-copy > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.ocr-pipeline {
  display: grid;
  gap: 0;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.ocr-pipeline li {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 35px;
  color: #89918d;
  font-size: 10px;
}

.ocr-pipeline li span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 8px;
}

.ocr-pipeline li.is-complete {
  color: var(--forest);
  font-weight: 700;
}

.ocr-pipeline li.is-complete span {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--white);
}

.ingredient-photo-copy .scanner-state-actions {
  justify-content: flex-start;
}

.scanner-inci-entry {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 54px 42px;
}

.scanner-inci-entry > .scanner-state-code {
  margin: 0 0 14px;
}

.scanner-inci-entry h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 560;
  letter-spacing: -0.045em;
}

.scanner-inci-entry > p,
.scanner-inci-entry > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.scanner-inci-entry form {
  margin-top: 28px;
}

.scanner-inci-entry label {
  display: block;
  margin-bottom: 9px;
  color: var(--forest);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scanner-inci-entry textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 18px;
  background: #fbfaf5;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.65;
  outline: none;
}

.scanner-inci-entry textarea:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(23, 63, 53, 0.09);
}

.scanner-inci-entry .scanner-state-actions {
  justify-content: flex-start;
}

.scanner-inci-validation {
  margin: 9px 0 0;
  color: #934b3a;
  font-size: 11px;
}

.scanner-general-analysis {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 30px;
  margin-top: 32px;
  border-block: 1px solid var(--line);
  padding: 26px 0;
}

.scanner-score-card {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  min-height: 118px;
  border-radius: 16px;
  padding: 18px;
  background: var(--forest);
  color: var(--white);
}

.scanner-score-card > span,
.scanner-analysis-label,
.scanner-analysis-heading > div > span {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.scanner-score-card strong {
  font-size: 34px;
  font-weight: 570;
  letter-spacing: -0.045em;
}

.scanner-score-card small,
.scanner-analysis-heading strong small {
  font-size: 12px;
  font-weight: 600;
}

.scanner-general-copy {
  align-self: center;
}

.scanner-general-copy h3,
.scanner-analysis-heading h3,
.scanner-profile-cta h3 {
  margin-bottom: 8px;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.scanner-general-copy p,
.scanner-profile-cta p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.scanner-general-copy small {
  display: block;
  margin-top: 9px;
  color: #848c88;
  font-size: 9px;
  line-height: 1.55;
}

.scanner-component-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.scanner-component-grid > section {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  background: #f8f8f2;
}

.scanner-component-grid > section.is-caution {
  background: #fbf7f2;
}

.scanner-analysis-label {
  color: var(--forest);
}

.scanner-component-grid ul,
.scanner-reason-list {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.scanner-component-grid li,
.scanner-reason-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.scanner-component-grid li .ui-icon,
.scanner-reason-list .ui-icon {
  width: 15px;
  height: 15px;
  color: var(--forest);
}

.scanner-component-grid li strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 12px;
}

.scanner-component-grid .is-caution li:not(.is-neutral) .ui-icon {
  color: #9a5b3e;
}

.scanner-personal-analysis,
.scanner-profile-cta {
  margin-top: 22px;
  border-radius: 20px;
  padding: 26px;
  background: #e6efdf;
}

.scanner-analysis-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.scanner-analysis-heading > div > span {
  display: block;
  margin-bottom: 7px;
  color: var(--forest);
}

.scanner-analysis-heading h3 {
  margin: 0;
}

.scanner-analysis-heading > strong {
  color: var(--forest);
  font-size: 44px;
  font-weight: 580;
  letter-spacing: -0.055em;
}

.scanner-reason-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 20px;
  border-top: 1px solid rgba(23, 63, 53, 0.13);
}

.scanner-warning-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.scanner-warning-list p {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  border-radius: 12px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.62);
  color: #704633;
  font-size: 11px;
  line-height: 1.5;
}

.scanner-warning-list .ui-icon {
  width: 17px;
  height: 17px;
}

.scanner-warning-list strong {
  display: block;
  color: #593525;
}

.scanner-edit-profile {
  display: inline-block;
  margin-top: 18px;
  border-bottom: 1px solid currentColor;
  color: var(--forest);
  font-size: 10px;
  font-weight: 750;
}

.scanner-profile-cta {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 18px;
}

.scanner-profile-cta > .ui-icon {
  width: 30px;
  height: 30px;
  color: var(--forest);
}

.scanner-profile-cta h3 {
  margin-bottom: 5px;
  font-size: 18px;
}

.scanner-after {
  width: min(920px, var(--container));
  margin-top: 98px;
}

.scanner-after .section-label {
  margin-bottom: 13px;
}

.scanner-after h2 {
  margin-bottom: 32px;
  font-size: 31px;
  font-weight: 560;
  letter-spacing: -0.045em;
}

.scanner-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.scanner-steps li {
  min-height: 110px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  gap: 15px 12px;
  padding: 22px 22px 22px 0;
}

.scanner-steps li:not(:last-child) {
  margin-right: 22px;
}

.scanner-steps li > span {
  color: #909995;
  font-size: 10px;
  font-weight: 700;
}

.scanner-steps li > i {
  align-self: center;
  height: 1px;
  background: var(--line);
}

.scanner-steps li > strong {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 650;
}

.scanner-footer {
  position: relative;
  z-index: 1;
}

.scanner-announcer {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@keyframes scanner-line {
  0%, 100% { transform: translateY(-64px); opacity: 0.55; }
  50% { transform: translateY(64px); opacity: 1; }
}

@keyframes scanner-progress {
  from { transform: translateX(-110%); }
  to { transform: translateX(340%); }
}

@keyframes scanner-pulse {
  0%, 100% { transform: scale(0.82); opacity: 0.72; }
  50% { transform: scale(1); opacity: 1; }
}

@media (max-width: 900px) {
  .scanner-main {
    padding-top: 116px;
  }

  .scanner-intro {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .scanner-intro-copy {
    max-width: 740px;
  }

  .scanner-profile-note {
    max-width: 520px;
  }

  .scanner-frame {
    inset-inline: 84px;
  }

  .scanner-result-metrics > div {
    padding-inline: 16px;
  }

  .scanner-result-metrics span {
    font-size: 8px;
  }

  .scanner-steps {
    grid-template-columns: 1fr 1fr;
  }

  .scanner-steps li:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .scanner-main {
    padding: 94px 0 72px;
  }

  .scanner-main::before {
    display: none;
  }

  .scanner-page-orb {
    width: 450px;
    height: 450px;
    right: -310px;
    top: 30px;
  }

  .scanner-intro {
    margin-bottom: 27px;
  }

  .scanner-intro .eyebrow {
    margin-bottom: 16px;
    font-size: 9px;
  }

  .scanner-intro h1 {
    margin-bottom: 16px;
    font-size: clamp(37px, 11.4vw, 49px);
  }

  .scanner-intro-copy > p {
    font-size: 14px;
  }

  .scanner-intro-meta {
    font-size: 9px;
  }

  .scanner-profile-note {
    display: none;
  }

  .scanner-tool {
    width: calc(100% - 12px);
  }

  .scanner-workspace {
    border-radius: 29px;
    padding: 8px;
  }

  .workspace-header {
    min-height: 48px;
    gap: 12px;
    padding: 5px 8px 11px;
    font-size: 8px;
  }

  .workspace-status {
    gap: 6px;
  }

  .workspace-surface {
    border-radius: 22px;
  }

  .scanner-camera-viewport {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .scanner-frame {
    inset: 48px 25px 152px;
  }

  .scanner-frame > i {
    width: 36px;
    height: 36px;
  }

  .scanner-frame > span {
    left: 8%;
    right: 8%;
  }

  .scanner-viewport-instruction {
    top: 46%;
    width: calc(100% - 45px);
  }

  .scanner-viewport-instruction strong {
    font-size: 13px;
    white-space: normal;
  }

  .scanner-camera-button {
    width: calc(100% - 40px);
    min-height: 56px;
    bottom: 28px;
  }

  .scanner-alternatives {
    padding: 0 14px 21px;
  }

  .scanner-divider {
    margin-bottom: 12px;
  }

  .scanner-search-control input {
    height: 54px;
    font-size: 13px;
  }

  .scanner-search-control button {
    width: 40px;
    height: 40px;
  }

  .scanner-upload-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    margin-top: 12px;
  }

  .scanner-upload-actions button {
    min-height: 46px;
    border-bottom-color: var(--line);
    padding: 0 4px;
  }

  .scanner-privacy {
    max-width: calc(100% - 30px);
    align-items: flex-start;
    text-align: left;
  }

  .camera-requesting {
    min-height: 500px;
    padding: 28px;
  }

  .camera-requesting h2 {
    font-size: 24px;
  }

  .scanner-camera-actions {
    display: grid;
    grid-template-columns: 0.72fr 1.28fr;
    padding: 12px;
  }

  .scanner-camera-actions .button {
    min-width: 0;
    min-height: 54px;
    padding-inline: 12px;
  }

  .scanner-transition-state,
  .scanner-empty-state,
  .scanner-error-state {
    min-height: 500px;
    padding: 38px 22px;
  }

  .scanner-transition-state h2,
  .scanner-empty-state h2,
  .scanner-error-state h2 {
    font-size: 29px;
  }

  .scanner-state-actions,
  .scanner-result-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .scanner-state-actions .button,
  .scanner-result-actions .button {
    width: 100%;
    min-height: 54px;
  }

  .scanner-result {
    padding: 24px 18px;
  }

  .scanner-result-kicker {
    margin-bottom: 20px;
  }

  .scanner-result-main {
    grid-template-columns: 102px minmax(0, 1fr);
    align-items: center;
    gap: 17px;
  }

  .scanner-result-visual {
    height: 130px;
    border-radius: 16px;
  }

  .scanner-result-placeholder::before {
    width: 110px;
    height: 110px;
  }

  .scanner-package {
    width: 50px;
    height: 84px;
    border-radius: 8px 8px 13px 13px;
  }

  .scanner-package i {
    top: -12px;
    width: 24px;
    height: 14px;
  }

  .scanner-result-copy h2 {
    font-size: clamp(24px, 7.5vw, 32px);
  }

  .scanner-result-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .scanner-result-metrics > div,
  .scanner-result-metrics > div:first-child,
  .scanner-result-metrics > div:last-child {
    min-height: 105px;
    padding: 16px 13px;
  }

  .scanner-result-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .scanner-result-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .scanner-result-metrics strong {
    font-size: 27px;
  }

  .ingredient-photo-state {
    grid-template-columns: 1fr;
  }

  .ingredient-photo-preview {
    min-height: 240px;
  }

  .ingredient-photo-copy {
    padding: 30px 20px 24px;
  }

  .ingredient-photo-copy h2 {
    font-size: 30px;
  }

  .ingredient-photo-copy .scanner-state-actions {
    display: grid;
  }

  .scanner-after {
    margin-top: 70px;
  }

  .scanner-after h2 {
    margin-bottom: 22px;
    font-size: 28px;
  }

  .scanner-steps {
    grid-template-columns: 1fr;
  }

  .scanner-steps li,
  .scanner-steps li:not(:last-child) {
    min-height: 74px;
    margin: 0;
    padding: 17px 0;
    border-bottom: 1px solid var(--line);
  }

  .scanner-steps li:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 480px) {
  .scanner-camera-viewport {
    aspect-ratio: 4 / 5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scanner-frame > span,
  .scanner-progress-line i,
  .scanner-progress-mark i {
    animation: none;
  }
}

@media (max-width: 720px) {
  .scanner-inci-entry {
    padding: 34px 20px;
  }

  .scanner-general-analysis,
  .scanner-component-grid,
  .scanner-reason-list {
    grid-template-columns: 1fr;
  }

  .scanner-score-card {
    min-height: 100px;
  }

  .scanner-profile-cta {
    grid-template-columns: 30px 1fr;
  }

  .scanner-profile-cta .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .scanner-analysis-heading > strong {
    font-size: 38px;
  }
}
