/*
  ForgeTag mobile comfort layer
  Keeps the existing brand system while removing height-driven type compression.
*/

body.forge-page {
  --comfort-gutter: clamp(16px, 4.7vw, 20px);
  --comfort-card-pad: clamp(18px, 5vw, 22px);
  --comfort-section-gap: clamp(22px, 5.8vw, 30px);
  --comfort-control: 52px;
  --comfort-radius: 26px;
  min-width: 0;
  overflow-x: hidden;
  color: var(--ink, #231815);
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

body.forge-page .page {
  width: min(100%, 430px);
  max-width: 430px;
  min-height: 100svh;
  height: auto;
  margin-inline: auto;
  overflow: visible;
  padding:
    max(18px, env(safe-area-inset-top))
    var(--comfort-gutter)
    max(24px, env(safe-area-inset-bottom));
}

body.forge-page .topbar {
  min-height: 44px;
}

body.forge-page .brand-logo,
body.forge-page .brand img {
  width: 125px;
}

body.forge-page .close,
body.forge-page .topbar .help {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
}

body.forge-page h1,
body.forge-page .hero-title {
  text-wrap: balance;
}

body.forge-page .intro,
body.forge-page .hero-copy {
  color: var(--muted, #746b67);
  font-size: 15px;
  line-height: 1.5;
}

body.forge-page .field-label,
body.forge-page .label,
body.forge-page legend,
body.forge-page .otp-label {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.25;
}

body.forge-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.forge-page textarea {
  font-size: 16px;
  scroll-margin-block: 96px 150px;
}

body.forge-page .email-input,
body.forge-page input.control {
  height: var(--comfort-control);
}

body.forge-page textarea.control {
  min-height: 104px;
  padding: 14px;
  line-height: 1.5;
}

body.forge-page .field-help,
body.forge-page .email-help,
body.forge-page .helper,
body.forge-page .field .help,
body.forge-page .field-error,
body.forge-page .terms-error,
body.forge-page .error,
body.forge-page .note,
body.forge-page .step-note {
  font-size: 12px;
  line-height: 1.45;
}

body.forge-page .button,
body.forge-page .primary {
  min-height: 52px;
  font-size: 15px;
  line-height: 1.15;
}

body.forge-page .text-button,
body.forge-page .text-action,
body.forge-page .account-link,
body.forge-page .back-link {
  min-height: 44px;
}

body.forge-page .privacy {
  font-size: 12px;
  line-height: 1.45;
}

body.forge-page :focus-visible {
  outline: 3px solid rgba(230, 0, 18, .22);
  outline-offset: 3px;
}

/* Index */

body.page-index .page {
  display: flex;
  flex-direction: column;
}

body.page-index main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 4.5svh, 42px) 0;
}

body.page-index .hero {
  margin: 0 auto 22px;
}

body.page-index .hero h1 {
  max-width: 390px;
  margin-bottom: 10px;
  font-size: clamp(34px, 9.2vw, 40px);
  line-height: 1.04;
  letter-spacing: -1.4px;
}

body.page-index .intro {
  max-width: 340px;
}

body.page-index .tag-card {
  padding: 22px;
  border-radius: 28px;
}

body.page-index .status {
  font-size: 12px;
  letter-spacing: .7px;
}

body.page-index .tag-id {
  min-height: 84px;
  margin-top: 12px;
  padding: 14px 14px 14px 19px;
}

body.page-index .tag-label {
  margin-bottom: 6px;
  font-size: 11px;
}

body.page-index .tag-code {
  font-size: 31px;
}

body.page-index .scan-icon {
  width: 44px;
  height: 44px;
}

body.page-index .button-primary {
  min-height: 52px;
  font-size: 15px;
}

body.page-index .account-options {
  margin-top: 10px;
}

body.page-index .account-link {
  font-size: 13px;
}

body.page-index .account-prompt {
  font-size: 12px;
}

body.page-index .account-action {
  font-size: 13px;
}

body.page-index .trust-grid {
  margin-top: 14px;
  padding-top: 18px;
}

body.page-index .trust-item {
  gap: 6px;
  font-size: 12px;
  line-height: 1.25;
}

body.page-index .trust-item svg {
  width: 18px;
  height: 18px;
}

/* Login and sign up */

body.page-login .page,
body.page-signup .page {
  display: flex;
  flex-direction: column;
}

body.page-login main,
body.page-signup main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 4.5svh, 42px) 0;
}

body.page-login .hero,
body.page-signup .hero {
  margin: 0 auto 24px;
  padding: 0;
}

body.page-login h1,
body.page-signup h1 {
  margin-bottom: 9px;
  font-size: clamp(34px, 9vw, 39px);
  line-height: 1.04;
  letter-spacing: -1.35px;
}

body.page-login .auth-card,
body.page-signup .signup-card {
  padding: 22px;
  border-radius: 28px;
}

body.page-login .tag-context,
body.page-signup .tag-context {
  margin-bottom: 20px;
  font-size: 11px;
  line-height: 1.25;
}

body.page-login .field-help,
body.page-signup .email-help {
  margin: 8px 2px 5px;
  font-size: 12.5px;
}

body.page-login .field-error,
body.page-signup .field-error {
  min-height: 18px;
  margin: 4px 2px 8px;
}

body.page-login .button-primary,
body.page-signup .button-primary {
  width: min(100%, 232px);
  min-height: 52px;
  font-size: 14.5px;
}

body.page-login .signup-row,
body.page-signup .signin-row {
  margin: 20px 0 2px;
  font-size: 13.5px;
  line-height: 1.45;
}

body.page-login .legal-note {
  max-width: 290px;
  margin: 8px auto 0;
  color: var(--muted, #746b67);
  text-align: center;
  font-size: 11.5px;
  line-height: 1.45;
}

body.page-login .legal-note a {
  color: #a9101c;
  font-weight: 700;
  text-underline-offset: 3px;
}

body.page-login .sent-note,
body.page-signup .sent-note {
  margin-bottom: 18px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.45;
}

body.page-login .otp-group,
body.page-signup .otp-group {
  gap: 7px;
}

body.page-login .otp-input,
body.page-signup .otp-input {
  height: 54px;
  border-radius: 13px;
  font-size: 24px;
}

body.page-login .secondary-actions,
body.page-signup .secondary-actions {
  margin-top: 10px;
}

body.page-login .text-button,
body.page-signup .text-button {
  padding-inline: 9px;
  font-size: 12.5px;
}

body.page-login .footer,
body.page-signup .footer {
  margin-top: 32px;
  padding: 0 4px;
  font-size: 10.5px;
  line-height: 1.45;
}

body.page-signup .button-social {
  min-height: 48px;
  font-size: 14px;
}

body.page-signup .divider {
  margin-block: 18px;
  font-size: 11.5px;
}

body.page-signup .social-stack {
  gap: 10px;
}

body.page-signup .terms {
  min-height: 48px;
  margin-top: 12px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.5;
}

body.page-signup .terms input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

/* UID activation entry */

body.page-uid-activate main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 4.5svh, 42px) 0;
}

body.page-uid-activate .hero {
  margin: 0 auto 24px;
}

body.page-uid-activate h1 {
  margin-bottom: 9px;
  font-size: clamp(34px, 8.8vw, 39px);
  line-height: 1.04;
}

body.page-uid-activate .eyebrow,
body.page-uid-activate .guide-label {
  font-size: 11px;
}

body.page-uid-activate .uid-card {
  padding: 22px;
  border-radius: 28px;
}

body.page-uid-activate .tag-guide {
  width: 100%;
  height: 140px;
  margin-bottom: 20px;
  object-fit: contain;
}

body.page-uid-activate .uid-input {
  height: 62px;
  font-size: 26px;
}

body.page-uid-activate .helper {
  margin: 8px 0 12px;
  font-size: 12.5px;
}

body.page-uid-activate .primary {
  width: min(100%, 248px);
  min-height: 52px;
}

body.page-uid-activate .scan-button {
  min-height: 48px;
  font-size: 13px;
}

body.page-uid-activate .trust-grid {
  margin-top: 20px;
}

body.page-uid-activate .trust-item {
  gap: 7px;
  font-size: 12px;
  line-height: 1.3;
}

/* Tag activation */

body.page-activate main {
  padding-top: 24px;
}

body.page-activate .back {
  min-height: 44px;
  margin: 0 0 8px;
  font-size: 13px;
}

body.page-activate .hero {
  margin: 0 auto 24px;
}

body.page-activate .uid-badge {
  margin-bottom: 10px;
  padding: 6px 11px;
  font-size: 11px;
}

body.page-activate .hero-title {
  max-width: 380px;
  margin-bottom: 9px;
  font-size: clamp(33px, 8.8vw, 38px);
  line-height: 1.04;
}

body.page-activate .card {
  padding: 22px;
  border-radius: 28px;
}

body.page-activate .step-progress {
  margin-bottom: 22px;
}

body.page-activate .progress-heading {
  margin-bottom: 8px;
  font-size: 12px;
}

body.page-activate .progress-segments {
  height: 5px;
  gap: 7px;
}

body.page-activate .progress-labels {
  margin-top: 8px;
  font-size: 11.5px;
}

body.page-activate .field,
body.page-activate fieldset {
  margin-bottom: 20px;
}

body.page-activate input.control {
  height: 52px;
  padding-inline: 15px;
}

body.page-activate textarea.control {
  min-height: 104px;
}

body.page-activate .choices {
  gap: 9px;
}

body.page-activate .choice label {
  height: 48px;
  padding-inline: 12px;
  border-radius: 13px;
  font-size: 13.5px;
}

body.page-activate .choice-copy {
  gap: 9px;
}

body.page-activate .choice-copy svg {
  width: 18px;
  height: 18px;
}

body.page-activate .upload {
  min-height: 106px;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 13px;
  padding: 13px;
  border-radius: 17px;
}

body.page-activate .preview {
  width: 62px;
  height: 62px;
  border-radius: 15px;
}

body.page-activate .preview svg {
  width: 27px;
  height: 27px;
}

body.page-activate .upload-title {
  font-size: 14px;
}

body.page-activate .upload-sub {
  margin-top: 4px;
  font-size: 12px;
}

body.page-activate .upload-action {
  max-width: 80px;
  font-size: 11px;
  text-transform: none;
}

body.page-activate .upload-action:empty,
body.page-finder-report .upload-action:empty {
  display: none;
}

body.page-activate .field .help {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  display: block;
  white-space: nowrap;
}

body.page-activate .privacy {
  margin: 0 0 18px;
  font-size: 12.5px;
}

body.page-activate .primary {
  width: min(100%, 248px);
  min-height: 52px;
  font-size: 14.5px;
}

body.page-activate .note {
  margin-top: 12px;
  font-size: 12px;
}

body.page-activate .success {
  padding-top: 22px;
}

body.page-activate .check {
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
}

body.page-activate .success-title {
  margin-bottom: 10px;
  font-size: clamp(34px, 8.8vw, 39px);
}

body.page-activate .success-copy {
  max-width: 340px;
  margin-bottom: 9px;
  font-size: 15px;
}

body.page-activate .success-uid {
  margin-bottom: 18px;
  padding: 6px 10px;
  font-size: 11.5px;
}

body.page-activate .text-button {
  font-size: 12.5px;
}

body.page-activate .item-card {
  padding: 22px;
  border-radius: 26px;
}

body.page-activate .item-eyebrow {
  font-size: 11px;
}

body.page-activate .item-name {
  margin-top: 0;
  font-size: 23px;
}

body.page-activate .item-category,
body.page-activate .feature,
body.page-activate .item-foot {
  font-size: 12px;
}

body.page-activate .active {
  font-size: 10.5px;
}

/* Return: identify tag */

body.page-return main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 4.5svh, 42px) 0;
}

body.page-return .hero {
  margin-bottom: 22px;
}

body.page-return .secure-badge,
body.page-finder-report .secure-badge {
  min-height: 30px;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 1.1px;
}

body.page-return h1 {
  font-size: clamp(35px, 9vw, 40px);
  line-height: 1.04;
}

body.page-return .intro {
  max-width: 340px;
  margin: 10px auto 0;
}

body.page-return .progress {
  margin: 0 2px 18px;
}

body.page-return .progress-copy {
  margin-bottom: 8px;
  font-size: 11.5px;
}

body.page-return .progress-track {
  gap: 8px;
}

body.page-return .progress-track span {
  height: 5px;
}

body.page-return .return-card {
  padding: 22px;
  border-radius: 28px;
}

body.page-return .card-title {
  margin-bottom: 16px;
  font-size: 20px;
}

body.page-return .tag-hint {
  min-height: 112px;
  margin-bottom: 20px;
  padding: 10px;
}

body.page-return .tag-hint img {
  height: 88px;
}

body.page-return .hint-copy span {
  font-size: 12px;
}

body.page-return .hint-copy strong {
  margin-top: 5px;
  font-size: 14px;
}

body.page-return .uid-input {
  height: 62px;
  font-size: 26px;
}

body.page-return .helper {
  margin: 9px 0 13px;
  font-size: 12.5px;
}

body.page-return .primary {
  width: min(100%, 248px);
  min-height: 52px;
}

body.page-return .or {
  margin: 15px 0 5px;
  font-size: 11px;
}

body.page-return .scan-button {
  min-height: 48px;
  font-size: 13.5px;
}

body.page-return .privacy {
  margin-top: 18px;
  font-size: 12.5px;
}

body.page-return .mini-trust {
  margin-top: 8px;
  font-size: 12px;
}

body.page-return .dialog-title {
  font-size: 22px;
}

body.page-return .dialog-copy,
body.page-return .dialog-action {
  font-size: 13px;
}

/* Return details, contact owner and completion */

body.page-finder-report main {
  padding-top: 26px;
}

body.page-finder-report .back-link {
  padding-inline: 12px;
  font-size: 13px;
}

body.page-finder-report .hero {
  margin-bottom: 20px;
}

body.page-finder-report h1 {
  max-width: 390px;
  margin-inline: auto;
  font-size: clamp(33px, 8.5vw, 38px);
  line-height: 1.04;
  letter-spacing: -1.25px;
}

body.page-finder-report .intro {
  max-width: 350px;
  margin-top: 10px;
}

body.page-finder-report .progress {
  margin-bottom: 20px;
}

body.page-finder-report .progress-rail {
  gap: 8px;
}

body.page-finder-report .progress-segment {
  height: 5px;
}

body.page-finder-report .progress-labels {
  margin-top: 8px;
  font-size: 11.5px;
}

body.page-finder-report .passport {
  margin-bottom: 20px;
  padding: 22px;
  border-radius: 28px;
}

body.page-finder-report .passport-main {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
}

body.page-finder-report .passport.compact .passport-main {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
}

body.page-finder-report .item-photo {
  width: 96px;
  height: 116px;
}

body.page-finder-report .passport.compact .item-photo {
  width: 96px;
  height: 116px;
  border-radius: 20px;
}

body.page-finder-report .passport-eyebrow {
  font-size: 11px;
}

body.page-finder-report .passport.compact .passport-eyebrow {
  margin-bottom: 5px;
  font-size: 11px;
}

body.page-finder-report .item-name {
  margin-bottom: 8px;
  font-size: 23px;
}

body.page-finder-report .passport.compact .item-name {
  margin-bottom: 8px;
  font-size: 23px;
}

body.page-finder-report .verified {
  padding: 6px 9px;
  font-size: 10.5px;
}

body.page-finder-report .passport.compact .verified {
  padding: 6px 9px;
  font-size: 10.5px;
}

body.page-finder-report .uid {
  margin-top: 10px;
  font-size: 11.5px;
}

body.page-finder-report .passport.compact .uid {
  display: block;
  margin: 10px 0 0;
  font-size: 11.5px;
}

body.page-finder-report .passport-detail,
body.page-finder-report .passport.compact .passport-detail {
  margin-top: 18px;
  padding-top: 17px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

body.page-finder-report .detail-label {
  margin-bottom: 6px;
  font-size: 11px;
}

body.page-finder-report .detail-copy {
  font-size: 13px;
  line-height: 1.55;
}

body.page-finder-report .passport.compact .detail-copy {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  font-size: 13px;
  line-height: 1.55;
}

body.page-finder-report .owner-message,
body.page-finder-report .passport.compact .owner-message {
  display: block;
  overflow: visible;
  margin: 0;
  padding: 14px 15px 14px 17px;
  -webkit-line-clamp: unset;
  font-size: 13.5px;
  line-height: 1.55;
}

body.page-finder-report .form-card,
body.page-finder-report .form-card.step-card {
  padding: 22px;
  border-radius: 28px;
}

body.page-finder-report .card-title {
  font-size: 20px;
}

body.page-finder-report .card-copy {
  margin-bottom: 20px;
  font-size: 13.5px;
}

body.page-finder-report .field {
  margin-bottom: 20px;
}

body.page-finder-report .field-label {
  font-size: 13px;
  letter-spacing: .45px;
}

body.page-finder-report .step-card textarea.control {
  min-height: 112px;
}

body.page-finder-report .error,
body.page-finder-report .contact-card .error {
  min-height: 18px;
  margin-top: 4px;
  font-size: 12px;
}

body.page-finder-report .quick-head {
  margin: 4px 0 12px;
}

body.page-finder-report .quick-title {
  margin-bottom: 4px;
  font-size: 15px;
}

body.page-finder-report .quick-meta {
  font-size: 11px;
}

body.page-finder-report .quick-copy {
  font-size: 12.5px;
  line-height: 1.5;
}

body.page-finder-report .quick-list {
  gap: 9px;
  margin-bottom: 22px;
}

body.page-finder-report .quick-message {
  min-height: 54px;
  padding: 12px 13px;
  border-radius: 13px;
  font-size: 12.5px;
  line-height: 1.45;
}

body.page-finder-report .upload,
body.page-finder-report .step-card .upload {
  min-height: 98px;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 13px;
  padding: 13px;
}

body.page-finder-report .upload-preview {
  width: 58px;
  height: 58px;
}

body.page-finder-report .upload-title {
  font-size: 13.5px;
}

body.page-finder-report .upload-sub {
  font-size: 12px;
}

body.page-finder-report .upload-action {
  font-size: 11px;
  text-transform: none;
}

body.page-finder-report .photo-tools {
  min-height: 0;
  margin-top: 0;
}

body.page-finder-report .remove-photo {
  min-height: 44px;
  font-size: 12px;
}

body.page-finder-report .primary {
  width: min(100%, 248px);
  min-height: 52px;
  font-size: 14.5px;
}

body.page-finder-report .step-note {
  margin-top: 12px;
  font-size: 12px;
}

body.page-finder-report .return-summary {
  min-height: 76px;
  margin-bottom: 18px;
  padding: 12px 14px;
}

body.page-finder-report .return-summary img {
  width: 50px;
  height: 56px;
}

body.page-finder-report .summary-title {
  font-size: 16px;
}

body.page-finder-report .summary-meta {
  font-size: 12px;
}

body.page-finder-report .inline-privacy {
  margin: 2px 0 20px;
  justify-content: flex-start;
  font-size: 12.5px;
}

body.page-finder-report .contact-card .primary {
  margin-top: 0;
}

body.page-finder-report .success-view {
  padding-top: 30px;
}

body.page-finder-report .success-mark {
  width: 68px;
  height: 68px;
  margin-bottom: 20px;
}

body.page-finder-report .success-copy {
  max-width: 350px;
  margin: 10px auto 20px;
  font-size: 15px;
  line-height: 1.55;
}

body.page-finder-report .success-card {
  padding: 22px;
}

body.page-finder-report .success-item-meta {
  font-size: 12px;
}

body.page-finder-report .text-action {
  font-size: 12.5px;
}

@media (max-width: 339px) {
  body.forge-page {
    --comfort-gutter: 12px;
    --comfort-card-pad: 16px;
  }

  body.forge-page .page {
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  body.forge-page .brand-logo,
  body.forge-page .brand img {
    width: 118px;
  }

  body.page-index main,
  body.page-login main,
  body.page-signup main,
  body.page-uid-activate main,
  body.page-return main,
  body.page-finder-report main {
    padding-top: 28px;
  }

  body.page-index .tag-card,
  body.page-login .auth-card,
  body.page-signup .signup-card,
  body.page-uid-activate .uid-card,
  body.page-activate .card,
  body.page-return .return-card,
  body.page-finder-report .passport,
  body.page-finder-report .form-card,
  body.page-finder-report .form-card.step-card,
  body.page-finder-report .success-card {
    padding: 18px 16px;
    border-radius: 25px;
  }

  body.page-activate .choices {
    grid-template-columns: 1fr;
  }

  body.page-activate .upload,
  body.page-finder-report .upload,
  body.page-finder-report .step-card .upload {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  body.page-activate .upload-action,
  body.page-finder-report .upload-action {
    grid-column: 2;
    max-width: none;
    text-align: left;
  }

  body.page-finder-report .passport-main {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  body.page-finder-report .passport.compact .passport-main {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  body.page-finder-report .item-photo {
    width: 84px;
    height: 102px;
  }

  body.page-finder-report .passport.compact .item-photo {
    width: 84px;
    height: 102px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.forge-page *,
  body.forge-page *::before,
  body.forge-page *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
