/* Shared shell contract. Values are declared in paceout-primitives.css. */

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: calc(var(--po-foundation-nav-height, 68px) + 32px); }
body { min-width: 0; margin: 0; overflow-x: hidden; }
body.paceout-menu-open { overflow: hidden; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 16px; transform: translateY(-160%); padding: 10px 14px; border-radius: 8px; background: var(--po-foundation-orange); color: var(--po-foundation-ink); font-weight: 700; text-decoration: none; transition: transform .2s var(--po-foundation-ease); }
.skip-link:focus { transform: translateY(0); }
.page-wrap,
.wrap,
.po-page-frame { width: min(var(--po-foundation-content-max, 1180px), calc(100% - 64px)); max-width: none; margin-inline: auto; box-sizing: border-box; }

/* Announcement */
.announcement-bar {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  height: auto !important;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  background: var(--po-orange, #ff6b00);
  color: var(--po-ink, #080807);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.25;
}

.announcement-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}
.announcement-bar a:hover { text-decoration: underline; text-underline-offset: 3px; }
.announcement-wide { display: inline; }
.announcement-small { display: none; }

/* Navigation. The homepage and supporting pages retain their existing
   semantic markup but now share one height, logo scale, CTA and menu rhythm. */
.site-nav,
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--po-foundation-nav-height);
  border-bottom: 1px solid var(--po-foundation-border-dark);
  background: color-mix(in srgb, var(--po-foundation-ink) 91%, transparent);
  backdrop-filter: blur(16px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

.site-nav__inner,
.nav__inner {
  width: min(var(--po-foundation-content-max, 1180px), calc(100% - 64px));
  min-height: var(--po-foundation-nav-height);
  margin-inline: auto;
}

.site-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand-lockup { display: inline-flex; align-items: center; gap: 9px; color: var(--po-foundation-white); text-decoration: none; }
.brand-lockup, .nav .brand { flex: 0 0 auto; }
.brand-lockup img:first-child, .nav .brand img:first-child { width: 28px; height: 28px; }
.brand-lockup img:last-child { width: 103px; height: auto; }
.nav .brand img:last-child { width: auto; height: 20px; }
.desktop-nav, .nav__links { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); margin-left: auto; }
.desktop-nav a, .nav__links a, .mobile-menu a:not(.button) { color: var(--po-foundation-dim); font-size: .8rem; font-weight: 700; text-decoration: none; }
.desktop-nav a:hover, .nav__links a:hover, .mobile-menu a:not(.button):hover { color: var(--po-foundation-white); }
.nav__links .mobile-nav-download { display: none; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* Buttons & CTA Controls */
.button, .btn, .po-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: var(--po-foundation-radius-control, 999px);
  padding: 13px 20px;
  font: inherit;
  font-size: .88rem;
  font-weight: 780;
  letter-spacing: -.01em;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  transition: transform .25s var(--po-foundation-ease),
              background-color .25s ease,
              border-color .25s ease,
              box-shadow .25s ease,
              color .25s ease;
}

.button--small, .nav .btn, .po-button--small { min-height: 42px; padding: 11px 16px; font-size: .76rem; }
.button--full, .btn--full, .po-button--full { width: 100%; }

.button--primary, .btn-primary, .po-button--primary {
  background: var(--po-foundation-orange);
  color: var(--po-foundation-ink);
  border-color: transparent;
  box-shadow: 0 11px 26px rgba(255, 107, 0, .22), inset 0 1px rgba(255, 255, 255, .3);
}

.button--primary:hover, .btn-primary:hover, .po-button--primary:hover {
  background: var(--po-foundation-orange-light);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(255, 107, 0, .32), inset 0 1px rgba(255, 255, 255, .4);
}

.button--primary:active, .btn-primary:active, .po-button--primary:active {
  transform: translateY(0);
}

.button--secondary, .btn-secondary, .po-button--secondary {
  border: 1px solid var(--po-foundation-border-dark);
  background: transparent;
  color: var(--po-foundation-white);
  box-shadow: none;
}

.button--secondary:hover, .btn-secondary:hover, .po-button--secondary:hover {
  border-color: rgba(255, 253, 248, .45);
  background: rgba(255, 253, 248, .07);
  transform: translateY(-2px);
}

.button--secondary:active, .btn-secondary:active, .po-button--secondary:active {
  transform: translateY(0);
}

/* Explicit surface variants. A secondary control on paper is still a
   readable dark control, never a white ghost button. */
.button--quiet,
.btn-quiet,
.po-button--quiet {
  min-height: 44px;
  padding: 10px 16px;
  border-color: transparent;
  background: transparent;
  color: var(--po-foundation-muted);
  box-shadow: none;
}

.button--on-paper,
.btn-on-paper,
.po-button--on-paper,
.section-band--paper .button--secondary,
.section-band--warm .button--secondary {
  border-color: var(--po-border-paper-strong);
  background: rgba(25, 25, 22, .04);
  color: var(--po-paper-text);
  box-shadow: none;
}

.button--on-paper:hover,
.btn-on-paper:hover,
.po-button--on-paper:hover,
.section-band--paper .button--secondary:hover,
.section-band--warm .button--secondary:hover {
  border-color: var(--po-paper-text);
  background: rgba(25, 25, 22, .08);
  color: var(--po-paper-text);
}

.button--on-dark,
.btn-on-dark,
.po-button--on-dark {
  border-color: var(--po-border-dark-strong);
  background: transparent;
  color: var(--po-white);
}

.apple-glyph, .app-store-badge__mark { flex: 0 0 auto; fill: currentColor; }
.apple-glyph { width: 17px; height: 17px; }

/* Canonical App Store Download Badge. The SVG is Apple-provided artwork and
   must remain unmodified; this rule only controls placement and focus. */
.app-store-badge {
  display: inline-flex;
  width: 120px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-decoration: none;
  box-sizing: border-box;
  transition: transform .25s var(--po-foundation-ease, cubic-bezier(.16, 1, .3, 1));
}

.app-store-badge:hover {
  transform: translateY(-2px);
}

.app-store-badge img {
  display: block;
  width: 120px;
  height: 40px;
  max-width: none;
}

.analytics-consent {
  position: fixed;
  z-index: var(--po-z-sticky, 40);
  right: 20px;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 760px;
  margin-inline: auto;
  padding: 18px 20px;
  border: 1px solid rgba(255, 253, 248, .18);
  border-radius: 18px;
  background: rgba(20, 20, 22, .97);
  color: var(--po-foundation-white);
  box-shadow: 0 20px 55px rgba(0, 0, 0, .35);
  backdrop-filter: blur(18px);
}

.analytics-consent strong { display: block; margin-bottom: 4px; font-size: .9rem; }
.analytics-consent p { max-width: 480px; margin: 0; color: var(--po-foundation-muted); font-size: .76rem; line-height: 1.45; }
.analytics-consent__actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.analytics-consent button { min-height: 40px; padding: 9px 13px; border: 1px solid rgba(255, 253, 248, .22); border-radius: 999px; background: transparent; color: var(--po-foundation-white); font: inherit; font-size: .74rem; font-weight: 750; cursor: pointer; }
.analytics-consent button:first-child { border-color: var(--po-foundation-orange); background: var(--po-foundation-orange); color: var(--po-foundation-ink); }
.analytics-consent button:focus-visible { outline: 2px solid var(--po-foundation-orange-light); outline-offset: 3px; }

/* Status Chips & Badges */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 253, 248, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: var(--po-foundation-muted, #c4c1b9);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
  text-decoration: none;
}

.chip--orange,
.badge--orange {
  border-color: rgba(255, 107, 0, .32);
  background: rgba(255, 107, 0, .1);
  color: var(--po-foundation-orange-light, #ff8c3a);
}

.chip--green {
  border-color: rgba(89, 216, 135, .32);
  background: rgba(89, 216, 135, .1);
  color: var(--po-foundation-green, #59d887);
}

.chip--amber {
  border-color: rgba(242, 183, 79, .32);
  background: rgba(242, 183, 79, .1);
  color: var(--po-foundation-amber, #f2b74f);
}

.step-badge,
.badge--number {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 107, 0, .12);
  border: 1px solid rgba(255, 107, 0, .3);
  color: var(--po-foundation-orange-light, #ff8c3a);
  font-size: .85rem;
  font-weight: 800;
  flex: 0 0 auto;
}

/* Mobile Nav Toggle & Screen-Reader Primitives */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--po-foundation-border-dark);
  border-radius: 50%;
  background: rgba(255, 253, 248, .035);
  color: var(--po-foundation-white);
  cursor: pointer;
  padding: 10px;
  font: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  z-index: 50;
}

.menu-toggle span {
  pointer-events: none;
}

.sr-only, .menu-toggle .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-nav .menu-toggle span:not(.sr-only) { display: block; width: 16px; height: 1px; margin: 0; background: currentColor; transition: transform .2s var(--po-foundation-ease), opacity .2s ease; }
.site-nav.menu-open .menu-toggle span:not(.sr-only):nth-child(2) { transform: translateY(5px) rotate(45deg); }
.site-nav.menu-open .menu-toggle span:not(.sr-only):nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.announcement-bar ~ .nav { top: 0 !important; }
.mobile-menu { display: none; }

/* ==========================================================================
   CANONICAL APPLE DEVICE PRIMITIVE SYSTEM (Shared Shell Foundation)
   Asset: /assets/devices/apple/iphone-17-bezel.png (1350 × 2760)
   Aspect Ratio: 1350 / 2760 (~0.48913, exact 45 / 92)
   Screen insets: X: 3.35%, Y: 1.25%, Radius: 12.5%
   ========================================================================== */
.apple-device {
  --apple-screen-inset-x: 3.35%;
  --apple-screen-inset-y: 1.25%;
  --apple-screen-radius: 12.5%;
  --device-width: 232px;
  position: relative;
  display: block;
  width: var(--device-width);
  max-width: 100%;
  aspect-ratio: 1350 / 2760;
  margin: 0;
  box-sizing: border-box;
  isolation: isolate;
}

/* Screen viewport container */
.apple-device__screen {
  position: absolute;
  z-index: 0;
  inset: var(--apple-screen-inset-y) var(--apple-screen-inset-x);
  overflow: hidden;
  border-radius: var(--apple-screen-radius);
  background: #050606;
}

/* Screen screenshot imagery: full bleed, auto-fitted */
.apple-device__screen img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: top center;
  border-radius: 0;
}

/* Official iPhone 17 hardware bezel overlay */
.apple-device__bezel {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  pointer-events: none;
  user-select: none;
  object-fit: fill;
  border-radius: 0;
}

/* Captions and overlay badges */
.apple-device > figcaption {
  position: relative;
  z-index: 3;
}

/* Variant Modifiers */
.apple-device--upright {
  transform: none;
}

.apple-device--hero {
  --device-width: min(100%, 335px);
  filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.5));
}

.apple-device--supporting,
.content-device {
  --device-width: min(100%, 280px);
  margin-inline: auto;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.45)) drop-shadow(0 4px 14px rgba(255, 107, 0, 0.08));
}

.apple-device--compact {
  --device-width: 180px;
  --apple-screen-inset-x: 3.35%;
  --apple-screen-inset-y: 1.25%;
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.4));
}

.apple-device--angled-left {
  transform: perspective(1400px) rotateY(-3deg) rotateZ(-2.5deg);
}

.apple-device--angled-right {
  transform: perspective(1400px) rotateY(3deg) rotateZ(2.5deg);
}

.apple-device--partial {
  overflow: hidden;
}

.feature-showcase-box .content-device,
.feature-showcase-box .apple-device {
  --device-width: 260px;
}

@media (max-width: 768px) {
  .apple-device--supporting,
  .content-device {
    --device-width: min(72vw, 280px);
  }
  .feature-showcase-box .content-device,
  .feature-showcase-box .apple-device {
    --device-width: min(68vw, 260px);
  }
}

@media (max-width: 480px) {
  .apple-device--supporting,
  .content-device {
    --device-width: min(76vw, 250px);
  }
}

.story-screen:not(.story-screen--ring):not(.story-screen--pair) { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.story-screen:not(.story-screen--ring):not(.story-screen--pair)::before, .story-screen:not(.story-screen--ring):not(.story-screen--pair)::after { display: none; content: none; }

/* Footer contract */
.po-footer { background: var(--po-foundation-ink) !important; border-top-color: var(--po-foundation-border-dark) !important; }
.po-footer__inner { width: min(var(--po-foundation-content-max, 1180px), calc(100% - 64px)) !important; }
.po-footer__group a, .po-footer__company a { min-height: 40px; }
.po-footer__group a:hover, .po-footer__company a:hover { color: var(--po-foundation-white); }

/* Shared focus and reduced-motion contract */
.site-nav a:focus-visible, .nav a:focus-visible, .po-footer a:focus-visible, .button:focus-visible, .btn:focus-visible, .po-button:focus-visible, .menu-toggle:focus-visible, .app-store-badge:focus-visible {
  outline: 2px solid var(--po-foundation-orange-light);
  outline-offset: 4px;
}

@media (max-width: 820px) {
  .page-wrap, .wrap, .po-page-frame, .site-nav__inner, .nav__inner { width: min(100% - 40px, 620px); min-height: 68px; }
  .announcement-wide { display: none; }
  .announcement-small { display: inline; }
  .desktop-nav, .nav-download { display: none !important; }
  .site-nav .menu-toggle, .nav .menu-toggle { display: inline-flex !important; }
  .site-nav.menu-open .mobile-menu { display: grid; gap: 0; padding: 14px 0 22px; border-top: 1px solid var(--po-foundation-border-dark); }
  .site-nav .mobile-menu[hidden] { display: none; }
  .site-nav .mobile-menu a:not(.button) { min-height: 44px; padding: 12px 0; border-bottom: 1px solid rgba(255, 253, 248, .09); line-height: 1.55; }
  .site-nav .mobile-menu .button { margin-top: 15px; }
  .nav__links { display: none !important; }
  .nav.menu-open .nav__links { position: absolute; top: 68px; right: 0; left: 0; display: grid !important; gap: 0; width: 100%; margin: 0; padding: 12px max(20px, calc((100% - 620px) / 2)) 20px; border-top: 1px solid var(--po-foundation-border-dark); border-bottom: 1px solid var(--po-foundation-border-dark); background: rgba(8, 8, 7, .98); box-shadow: 0 24px 60px rgba(0, 0, 0, .32); }
  .nav.menu-open .nav__links a { display: flex !important; min-height: 44px; align-items: center; border-bottom: 1px solid rgba(255, 253, 248, .09); }
  .nav.menu-open .nav__links a:last-child { border-bottom: 0; }
  .nav .btn { min-height: 42px; padding-inline: 13px; font-size: .74rem; }
  .nav__inner > .btn { display: none !important; }
  .nav.menu-open .nav__links .mobile-nav-download { display: inline-flex !important; margin-top: 15px; border-bottom: 0; }
  .po-footer__inner { width: min(100% - 40px, 620px) !important; }
}

@media (max-width: 480px) {
  .page-wrap, .wrap, .po-page-frame, .site-nav__inner, .nav__inner { width: calc(100% - 32px); }
  .po-footer__inner { width: calc(100% - 32px) !important; }
}

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

/* The approval lab uses its own section composition but the same foundation
   palette and control language. */
.phase-a-lab { --lab-ink: var(--po-foundation-ink); --lab-paper: var(--po-foundation-paper); --lab-orange: var(--po-foundation-orange); --lab-line: var(--po-foundation-border-dark); }
