/* Pass 1 — HIG mobile / PIO overlays. Lab only. Does not replace Base. */

/* Dynamic Type path: system body as root, rem children scale */
html {
  font: -apple-system-body;
  font-family: var(--font-sans, "Geist Variable", "Geist", ui-sans-serif, system-ui, sans-serif);
}
@supports (font: -apple-system-body) {
  html {
    font: -apple-system-body;
    font-family: var(--font-sans, "Geist Variable", "Geist", ui-sans-serif, system-ui, sans-serif);
  }
}
body {
  font-size: 1.0625rem; /* ~17px at default */
  line-height: 1.55;
  color: var(--color-fg);
}

/* Contrast: stronger lead / muted stay readable on field + desk */
.lede {
  color: #f3f1ece6;
  font-size: 1.0625rem;
}
html.desk-page .lede,
.page-hero p,
.section .lead {
  color: var(--color-fg-muted);
}
html[data-theme="light"] .lede {
  color: #1a221e;
}

/* Titles always paint — never opacity-0 heroes */
.hero h1,
.page-hero h1,
.caption-end h2,
.section h2 {
  opacity: 1 !important;
}

/* Safe-area + inset primary CTAs (not edge-to-edge) */
.hero {
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
}
.caption-end {
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
}
.hero-actions {
  gap: 12px;
  max-width: 100%;
  padding-inline: 0;
}
.hero-actions .btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0 20px;
  max-width: calc(100vw - 48px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
}
@media (width <= 480px) {
  .hero-actions {
    width: 100%;
    padding-inline: 4px;
  }
  .hero-actions .btn {
    width: auto;
    flex: 0 1 auto;
  }
  .hero-actions .btn-solid,
  .hero-actions .btn-ghost {
    /* inset — never full-bleed edge-to-edge */
    margin-inline: 0;
    width: auto;
    max-width: calc(100% - 8px);
  }
}

/* 44px taps — remaining gaps */
.icon-btn,
.nav-links a,
.nav-drawer a,
.foot-links a,
.seg button,
.btn,
.brand,
.tool-search input,
.cmdk [cmdk-item],
.text-link {
  min-height: 44px;
}
.icon-btn,
.seg button {
  min-width: 44px;
}
.text-link {
  display: inline-flex;
  align-items: center;
  padding-block: 10px;
}

/* Nav drawer as sheet (scrim + dialog + dismiss) */
.nav-drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0, 0, 0, 0.46);
  border: 0;
  -webkit-tap-highlight-color: transparent;
}
.nav-drawer {
  z-index: 50;
}
@media (width <= 860px) {
  .nav-drawer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-width: none;
    border-radius: 20px 20px 0 0;
    padding: 12px 12px calc(16px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.32);
    transform: translateY(0);
  }
  .nav-drawer::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--color-line-strong);
    margin: 4px auto 12px;
  }
  body.nav-open {
    overflow: hidden;
  }
}

/* Field empty / error states */
.field-status {
  z-index: 3;
  position: relative;
  max-width: 28rem;
  margin: 24px 0 0;
  padding: 20px;
  border-radius: var(--radius-xl, 24px);
  border: 1px solid rgba(243, 241, 236, 0.22);
  background: rgba(7, 9, 10, 0.72);
  color: #f3f1ec;
  backdrop-filter: blur(12px);
}
.field-status[hidden] {
  display: none !important;
}
.field-status .fs-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  opacity: 0.85;
}
.field-status h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
  color: #fff;
}
.field-status p {
  margin: 8px 0 0;
  color: rgba(243, 241, 236, 0.85);
  font-size: 1rem;
  line-height: 1.45;
}
.field-status .fs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.field-rm {
  margin-top: 14px;
  font-size: 0.92rem;
  color: rgba(243, 241, 236, 0.78);
  max-width: 34rem;
}

/* Skip link + main safe padding */
.skip {
  top: max(8px, env(safe-area-inset-top, 0px));
  left: max(12px, env(safe-area-inset-left, 0px));
}
.page-hero {
  padding-top: max(28px, env(safe-area-inset-top, 0px));
}
