:root {
  --accent: #004aad;
  --accent-dark: #003884;
  --accent-soft: #e7f0fb;
  --ink: #142033;
  --muted: #526074;
  --line: #d5deea;
  --paper: #f3f6fb;
  --white: #ffffff;
  --shot-bg: #071426;
  --font: "Inter", "Segoe UI", sans-serif;
  --display: "Outfit", "Inter", sans-serif;
  --header-h: 68px;
  --gutter: 24px;
  --tap: 44px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

a { color: var(--accent); }

img, video { max-width: 100%; height: auto; }

.wrap,
.header-inner {
  width: min(1120px, 100% - 2 * var(--gutter));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  background: var(--accent);
  color: var(--white);
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus { top: 12px; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: calc(var(--header-h) - 4px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: var(--tap);
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: block;
  height: 24px;
  width: auto;
  flex: none;
}

.brand-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
  flex: none;
}

.brand-product {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

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

.header-link,
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

.header-link { color: var(--muted); }

.header-link:hover { color: var(--accent); }

.header-cta {
  gap: 8px;
  padding: 0 18px;
  color: var(--accent);
  border: 1px solid #b9cbe6;
  background: var(--white);
}

.header-cta:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.header-cta svg { flex: none; }

/* Page heads */

.hero,
.guide-head {
  padding: 48px 0 8px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.15;
  font-weight: 600;
  margin: 0;
}

h1 {
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3rem);
  letter-spacing: -0.01em;
  max-width: 24ch;
}

.guide-head h1 {
  font-size: clamp(1.625rem, 1.1rem + 2vw, 2.5rem);
  max-width: 30ch;
}

.lede {
  max-width: 38rem;
  color: var(--muted);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  margin: 12px 0 0;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  color: var(--muted);
}

.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-weight: 600;
  text-decoration: none;
}

.crumbs a:hover { text-decoration: underline; }

.crumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: #9aa7b8;
}

/* Panels */

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.video-block,
.guide-card {
  margin: 28px auto 0;
}

.guide-card { margin-bottom: 56px; }

.video-frame {
  aspect-ratio: 16 / 9;
  max-height: calc(100svh - var(--header-h) - 32px);
  background: var(--shot-bg);
}

.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-caption,
.card-body,
.step-copy {
  padding: 20px 24px 24px;
}

.video-caption h2,
.card-body h2 {
  font-size: 1.25rem;
}

.meta {
  color: var(--muted);
  margin: 8px 0 0;
}

.guide-card a.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.guide-card a.card-link:hover h2,
.guide-card a.card-link:focus-visible h2 {
  color: var(--accent);
}

.card-action {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  margin-top: 16px;
  background: var(--accent);
  color: var(--white);
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 600;
}

.guide-card a.card-link:hover .card-action,
.guide-card a.card-link:focus-visible .card-action {
  background: var(--accent-dark);
}

/* Player */

.player {
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin: 28px auto 64px;
}

.step-nav {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
}

.step-nav button {
  width: 100%;
  min-height: var(--tap);
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.3;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.step-nav button:hover { background: var(--paper); }

.step-nav button[aria-current="step"] {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
}

.step-nav .num {
  color: var(--accent);
  font-weight: 700;
}

.stage {
  min-width: 0;
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.progress {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 8px;
}

.step-copy h2 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); }

.step-copy p { margin: 12px 0 0; }

.platform-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  margin-top: 6px;
  font-weight: 600;
}

.platform-link[hidden] { display: none; }

.shot {
  position: relative;
  margin: 0 20px;
  background: var(--shot-bg);
  border-radius: 12px;
  overflow: hidden;
}

.shot img {
  display: block;
  width: 100%;
  transform-origin: 0 0;
  transition: transform 0.35s ease;
}

.shot.is-zoomed img {
  transform: translate(var(--tx, 0%), var(--ty, 0%)) scale(var(--zoom, 1.8));
}

.marker {
  position: absolute;
  width: var(--tap);
  height: var(--tap);
  margin: calc(var(--tap) / -2) 0 0 calc(var(--tap) / -2);
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: left 0.35s ease, top 0.35s ease;
  -webkit-tap-highlight-color: transparent;
}

.marker::before,
.marker::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  border: 3px solid #e23b32;
}

.marker::after {
  animation: pulse 1.6s ease-out infinite;
}

.no-shot {
  margin: 0;
  min-height: 160px;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  color: var(--white);
  text-align: center;
}

.shot-hint {
  margin: 8px 20px 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.shot-hint .touch { display: none; }

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 20px 20px;
}

.controls button {
  font: inherit;
  font-weight: 600;
  min-height: var(--tap);
  border-radius: 999px;
  padding: 0 18px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.controls button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.controls button:hover { border-color: var(--accent); }

.controls button.primary:hover { background: var(--accent-dark); }

.controls button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.controls [data-zoom] { margin-left: auto; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 12px 0 max(28px, env(safe-area-inset-bottom));
  font-size: 0.92rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 24px;
}

.site-footer p { margin: 0; }

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #7eb0ef;
  outline-offset: 3px;
}

@keyframes pulse {
  from { transform: scale(1); opacity: 0.9; }
  to { transform: scale(2.2); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shot img,
  .marker { transition: none; }
  .marker::after { animation: none; }
}

@media (hover: none) {
  .shot-hint .pointer { display: none; }
  .shot-hint .touch { display: inline; }
}

/* iPad portrait and phones: steps become a grid of numbered chips above the stage */
@media (max-width: 1023.98px) {
  .player { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .step-nav {
    position: static;
    max-height: none;
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(13, minmax(0, 1fr));
    gap: 6px;
  }
  .step-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    text-align: center;
    border: 1px solid transparent;
  }
  .step-nav button[aria-current="step"] {
    background: var(--accent);
    color: var(--white);
  }
  .step-nav button[aria-current="step"] .num { color: var(--white); }
  .step-nav .label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  :root { --header-h: 60px; --gutter: 16px; }
  .brand { gap: 10px; }
  .brand-mark { height: 20px; }
  .brand-divider { height: 20px; }
  .brand-product { font-size: 1rem; }
  .header-link { display: none; }
  .header-cta { padding: 0 14px; }
  .hero,
  .guide-head { padding-top: 28px; }
  .panel { border-radius: 14px; }
  .step-nav {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    padding: 6px;
  }
  .video-caption,
  .card-body,
  .step-copy { padding: 16px 16px 18px; }
  .shot { margin: 0 12px; border-radius: 10px; }
  .shot-hint { margin: 8px 12px 0; }
  .controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 14px 12px 16px;
  }
  .controls [data-zoom] { grid-column: 1 / -1; margin-left: 0; }
  .marker::before,
  .marker::after { inset: 11px; }
}

@media (max-width: 380px) {
  .step-nav { grid-template-columns: repeat(auto-fill, minmax(var(--tap), 1fr)); }
  .brand-mark { height: 17px; }
  .brand { gap: 8px; }
  .header-cta { width: var(--tap); padding: 0; }
  .header-cta svg { width: 18px; height: 18px; }
  .cta-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* Phone landscape: keep the header from eating the short viewport */
@media (max-height: 500px) and (orientation: landscape) {
  .site-header { position: static; }
  .stage { scroll-margin-top: 12px; }
  .video-frame { max-height: calc(100svh - 24px); }
}
