:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: #121722;
  --panel-2: #191f2b;
  --line: #31394a;
  --line-soft: rgba(255, 255, 255, .09);
  --text: #f6f7fb;
  --muted: #aab2c2;
  --red: #d71920;
  --red-bright: #ef2a34;
  --gold: #f5d21f;
  --blue: #1599dc;
  --green: #48d987;
  --shadow: 0 28px 90px rgba(0, 0, 0, .68);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; }
html { background: var(--bg); }
body {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(215, 25, 32, .19), transparent 30rem),
    radial-gradient(circle at 84% 12%, rgba(21, 153, 220, .15), transparent 30rem),
    linear-gradient(180deg, #0d1119 0%, #05070b 100%);
}

a { color: inherit; }
button, select { font: inherit; }
button { color: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 200; padding: .75rem 1rem; border-radius: .6rem; background: #fff; color: #000; }
.skip-link:focus { top: 1rem; }

/* Matches the current My Pit Stop public/member navigation language. */
.member-top {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 34px);
  min-height: 72px;
  padding: 10px clamp(20px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(9, 12, 18, .95);
  backdrop-filter: blur(14px);
}
.member-brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; color: #fff; text-decoration: none; font-weight: 900; white-space: nowrap; }
.member-brand img { width: 46px; height: 46px; object-fit: contain; }
.member-nav { display: flex; align-items: center; flex: 1; min-width: 0; gap: 12px; color: var(--muted); }
.member-nav-primary, .member-nav-account { display: flex; align-items: center; gap: 8px; min-width: 0; }
.member-nav-primary { justify-content: flex-start; }
.member-nav-account { margin-left: auto; justify-content: flex-end; flex: 0 0 auto; }
.member-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #cbd4e4;
  background: transparent;
  text-decoration: none;
  font-weight: 850;
  white-space: nowrap;
}
.member-nav-link:hover, .member-nav-link:focus-visible, .member-nav-link.is-active { color: #fff; background: #191f2b; border-color: #354055; outline: none; }
.member-logout { border-color: #4a2830; }
.button-link { cursor: pointer; }

.guide-backdrop {
  height: calc(100dvh - 72px);
  min-height: 0;
  display: grid;
  place-items: center;
  padding: clamp(10px, 1.8vh, 18px) clamp(10px, 1.5vw, 22px);
  overflow: hidden;
  background: rgba(2, 5, 9, .46);
  backdrop-filter: blur(4px);
}
.guide-dialog {
  width: min(1700px, 100%);
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #3b465a;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(18, 24, 35, .985), rgba(8, 12, 19, .99));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.guide-dialog-header {
  display: grid;
  grid-template-columns: minmax(190px, .7fr) minmax(240px, 1.65fr) minmax(210px, .72fr);
  align-items: center;
  gap: clamp(12px, 1.6vw, 24px);
  min-height: 74px;
  padding: 11px clamp(14px, 1.7vw, 26px);
  border-bottom: 1px solid var(--line);
  background: rgba(16, 22, 33, .96);
}
.progress-copy { min-width: 0; display: grid; gap: 2px; }
.progress-copy span { color: var(--gold); font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.progress-copy strong { overflow: hidden; color: #fff; font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
.progress-track { height: 9px; overflow: hidden; border: 1px solid #2d384b; border-radius: 99px; background: #05080d; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--red), #ff6c43, var(--gold)); transition: width .22s ease; }
.step-jump-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.step-jump { width: 100%; min-height: 42px; padding: .5rem .72rem; border: 1px solid #3a465b; border-radius: 11px; background: #090d14; color: var(--text); }
.step-jump:focus-visible { outline: 2px solid #5db8e8; outline-offset: 2px; }

.step-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(360px, .78fr) minmax(500px, 1.22fr);
  gap: clamp(10px, 1.15vw, 18px);
  padding: clamp(10px, 1.35vw, 20px);
  overflow: hidden;
}
.step-copy, .media-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(23, 31, 45, .98), rgba(10, 15, 24, .98));
}
.step-copy {
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 2.1vw, 34px);
}
.eyebrow { margin: 0 0 .42rem; color: var(--gold); font-size: .7rem; font-weight: 900; letter-spacing: .15em; }
h1 { margin: 0; max-width: 17ch; font-size: clamp(2rem, 3.2vw, 3.45rem); line-height: .96; letter-spacing: -.045em; }
.step-intro { margin: .68rem 0 .78rem; color: #d2d9e5; font-size: clamp(.91rem, 1.12vw, 1.08rem); line-height: 1.38; }
.instruction-list { display: grid; gap: clamp(.42rem, .72vh, .7rem); margin: 0; padding: 0; list-style: none; counter-reset: step-instruction; }
.instruction-list li { counter-increment: step-instruction; display: grid; grid-template-columns: 30px 1fr; gap: .62rem; align-items: start; color: #edf1f7; font-size: clamp(.83rem, .88vw, .98rem); line-height: 1.34; }
.instruction-list li::before { content: counter(step-instruction); display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #3a485d; border-radius: 9px; background: #1b2637; color: var(--gold); font-size: .78rem; font-weight: 900; }
.callout { margin-top: auto; padding: .72rem .82rem .72rem .95rem; border: 1px solid #3a4960; border-left: 4px solid var(--blue); border-radius: 12px; background: rgba(34, 61, 91, .25); }
.callout[data-type="warning"] { border-left-color: var(--gold); background: rgba(89, 61, 13, .25); }
.callout[data-type="important"] { border-left-color: var(--red); background: rgba(91, 24, 31, .25); }
.callout[data-type="success"] { border-left-color: var(--green); background: rgba(20, 84, 52, .25); }
.callout strong { display: block; margin-bottom: .2rem; font-size: .86rem; }
.callout p { margin: 0; color: #d7deea; font-size: clamp(.77rem, .78vw, .9rem); line-height: 1.32; }

.media-panel { display: grid; grid-template-rows: minmax(0, 1fr) auto; padding: 10px; }
.main-figure { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; margin: 0; }
.image-button { min-height: 0; display: grid; place-items: center; width: 100%; padding: 0; overflow: hidden; border: 1px solid #35435a; border-radius: 14px; background: #020306; cursor: zoom-in; }
.image-button img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; background: #020306; }
figcaption { display: flex; justify-content: space-between; gap: .45rem .8rem; min-height: 29px; padding: .42rem .15rem 0; overflow: hidden; color: var(--muted); font-size: .75rem; line-height: 1.28; }
figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
figcaption a { flex: 0 0 auto; color: #82c8ff; text-decoration: none; white-space: nowrap; }
.thumbnail-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(86px, 1fr); gap: 7px; min-height: 0; margin-top: 7px; }
.thumbnail { height: clamp(54px, 8.5vh, 76px); padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 10px; background: #020306; cursor: pointer; }
.thumbnail[aria-current="true"] { border-color: var(--red-bright); }
.thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }

.guide-dialog-footer {
  display: grid;
  grid-template-columns: minmax(120px, .48fr) minmax(150px, 1fr) minmax(150px, .55fr);
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 9px clamp(12px, 1.5vw, 22px);
  border-top: 1px solid var(--line);
  background: rgba(8, 12, 19, .96);
}
.nav-button { min-height: 46px; padding: .66rem 1rem; border-radius: 12px; cursor: pointer; font-weight: 850; }
.nav-button.secondary { border: 1px solid #3a465a; background: #151d2a; }
.nav-button.primary { border: 1px solid #ff4652; background: linear-gradient(180deg, #ef2634, #b90f1b); }
.nav-button:disabled { opacity: .42; cursor: not-allowed; }
.nav-button:hover:not(:disabled), .nav-button:focus-visible:not(:disabled) { filter: brightness(1.09); outline: none; transform: translateY(-1px); }
.step-status { display: grid; gap: 1px; color: #e4e9f2; text-align: center; font-weight: 850; }
.step-status small { color: #7f8ba0; font-size: .68rem; font-weight: 650; }

/* Content-density adjustments keep every desktop step within the fixed dialog. */
body.is-compact h1 { font-size: clamp(1.76rem, 2.65vw, 2.9rem); }
body.is-compact .step-copy { padding: clamp(14px, 1.55vw, 25px); }
body.is-compact .step-intro { margin: .5rem 0 .58rem; font-size: clamp(.84rem, .96vw, .98rem); line-height: 1.3; }
body.is-compact .instruction-list { gap: .4rem; }
body.is-compact .instruction-list li { font-size: clamp(.78rem, .8vw, .9rem); line-height: 1.27; }
body.is-compact .callout { padding: .58rem .72rem .58rem .82rem; }
body.is-compact .callout p { font-size: clamp(.72rem, .72vw, .82rem); line-height: 1.25; }
body.is-dense h1 { font-size: clamp(1.58rem, 2.35vw, 2.55rem); }
body.is-dense .eyebrow { margin-bottom: .3rem; }
body.is-dense .step-copy { padding: clamp(12px, 1.2vw, 20px); }
body.is-dense .step-intro { margin: .38rem 0 .48rem; font-size: clamp(.78rem, .82vw, .89rem); line-height: 1.25; }
body.is-dense .instruction-list { gap: .28rem; }
body.is-dense .instruction-list li { grid-template-columns: 25px 1fr; gap: .48rem; font-size: clamp(.72rem, .72vw, .82rem); line-height: 1.2; }
body.is-dense .instruction-list li::before { width: 24px; height: 24px; border-radius: 8px; font-size: .7rem; }
body.is-dense .callout { padding: .48rem .62rem .48rem .72rem; }
body.is-dense .callout strong { font-size: .75rem; }
body.is-dense .callout p { font-size: clamp(.66rem, .66vw, .75rem); line-height: 1.18; }
body.short-viewport .guide-dialog-header { min-height: 62px; padding-top: 7px; padding-bottom: 7px; }
body.short-viewport .guide-dialog-footer { min-height: 58px; padding-top: 6px; padding-bottom: 6px; }
body.short-viewport .nav-button { min-height: 42px; }
body.short-viewport .step-layout { padding-top: 8px; padding-bottom: 8px; }
body.short-viewport figcaption { display: none; }
body.short-viewport .thumbnail { height: 48px; }

body.is-embedded .guide-site-header { display: none; }
body.is-embedded .guide-backdrop { height: 100dvh; padding: 0; background: transparent; backdrop-filter: none; }
body.is-embedded .guide-dialog { width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
body.is-embedded .guide-dialog-header { padding-right: 62px; }

.lightbox { width: min(96vw, 1700px); max-height: 94vh; padding: 1rem; border: 1px solid #46546b; border-radius: 18px; color: var(--text); background: #05080d; box-shadow: 0 30px 90px rgba(0, 0, 0, .75); }
.lightbox::backdrop { background: rgba(0, 0, 0, .82); backdrop-filter: blur(8px); }
.lightbox img { display: block; width: 100%; max-height: 82vh; object-fit: contain; }
.lightbox p { margin: .7rem 3.2rem 0 .2rem; color: var(--muted); }
.lightbox-close { position: absolute; top: .6rem; right: .75rem; width: 44px; height: 44px; border: 1px solid #58667b; border-radius: 99px; background: #101722; font-size: 1.8rem; cursor: pointer; }

@media (max-width: 980px) {
  body { height: auto; min-height: 100dvh; overflow: auto; }
  .guide-site-header { align-items: flex-start; flex-direction: column; min-height: 0; }
  .member-nav { width: 100%; flex-wrap: wrap; }
  .member-nav-account { margin-left: 0; }
  .guide-backdrop { height: auto; min-height: calc(100dvh - 126px); overflow: visible; }
  .guide-dialog { height: auto; min-height: calc(100dvh - 150px); overflow: visible; }
  .step-layout { grid-template-columns: 1fr; grid-template-rows: auto minmax(300px, 46vh); overflow: visible; }
  .step-copy, .media-panel { overflow: visible; }
  h1 { max-width: none; }
  body.is-embedded { height: 100dvh; overflow: hidden; }
  body.is-embedded .guide-backdrop, body.is-embedded .guide-dialog { height: 100dvh; min-height: 0; overflow: hidden; }
  body.is-embedded .step-layout { grid-template-rows: max-content minmax(260px, 42vh); overflow-x: hidden; overflow-y: auto; }
  body.is-embedded .step-copy, body.is-embedded .media-panel { overflow: visible; }
}

@media (max-width: 680px) {
  .member-nav-primary { flex-wrap: wrap; }
  .guide-header-actions { width: 100%; flex-wrap: wrap; }
  .guide-dialog { border-radius: 17px; }
  .guide-dialog-header { grid-template-columns: 1fr auto; min-height: 68px; }
  .progress-track { grid-column: 1 / -1; grid-row: 2; }
  .progress-title { display: none; }
  .step-jump { max-width: 180px; }
  .step-layout { padding: 7px; gap: 7px; }
  .step-copy { padding: 13px; }
  .media-panel { padding: 6px; }
  .guide-dialog-footer { grid-template-columns: 1fr 1fr; gap: 7px; padding: 7px; }
  .step-status { grid-column: 1 / -1; grid-row: 1; }
  .step-status small { display: none; }
  body.is-embedded .guide-dialog-header { grid-template-columns: minmax(0, 1fr) minmax(130px, .62fr); }
}

@media print {
  html, body { height: auto; overflow: visible; background: #fff; color: #000; }
  .guide-site-header, .guide-dialog-header, .guide-dialog-footer, .thumbnail-strip, .lightbox { display: none !important; }
  .guide-backdrop, .guide-dialog, .step-layout { display: block; height: auto; padding: 0; overflow: visible; background: #fff; }
  .guide-dialog { border: 0; box-shadow: none; }
  .step-copy, .media-panel { color: #000; background: #fff; border: 0; box-shadow: none; overflow: visible; }
  .step-copy { padding: 0 0 .2in; }
  .media-panel { padding: 0; }
  .image-button { border: 0; }
  .image-button img { max-height: 7in; }
  .eyebrow { color: #8b5a00; }
  .step-intro, .instruction-list li, figcaption, .callout p { color: #000; }
}
