:root {
  color-scheme: dark;
  --paper: #f5f1e8;
  --paper-strong: #fffdf7;
  --black: #030303;
  --panel: #0a0a09;
  --yellow: #f9a800;
  --muted: rgba(245, 241, 232, 0.7);
  --faint: rgba(245, 241, 232, 0.48);
  --line: rgba(245, 241, 232, 0.18);
  --glass: rgba(245, 241, 232, 0.055);
  --glass-line: rgba(245, 241, 232, 0.14);
  --page-gutter: clamp(22px, 3.2vw, 46px);
  --display: "Barlow Condensed", Inter, ui-sans-serif, system-ui, sans-serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: clip;
  background: var(--black);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  color: var(--paper);
  background:
    radial-gradient(circle at 80% 5%, rgba(249, 168, 0, 0.08), transparent 26rem),
    var(--black);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.2) 0 0.6px, transparent 1.2px),
    radial-gradient(circle at 72% 58%, rgba(255, 255, 255, 0.13) 0 0.7px, transparent 1.4px);
  background-size: 7px 7px, 11px 11px;
  content: "";
  opacity: 0.06;
  pointer-events: none;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

a:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--paper);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 9px 13px;
  color: var(--black);
  background: var(--paper);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(100%, 1220px);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: clamp(24px, 3.2vw, 44px);
}

.trackside-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--paper-strong);
  font-family: var(--display);
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 0.9;
  text-decoration: none;
  text-transform: uppercase;
}

.trackside-mark-icon {
  width: 48px;
  height: 48px;
  border-radius: 22%;
  box-shadow: 0 0 0 1px rgba(245, 241, 232, 0.16);
}

.back-link,
.footer-links a {
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
}

.back-link:hover,
.footer-links a:hover {
  color: var(--paper);
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.56fr);
  gap: clamp(48px, 9vw, 136px);
  align-items: end;
  padding-top: clamp(92px, 13vw, 180px);
  padding-bottom: clamp(88px, 11vw, 150px);
}

.eyebrow,
.card-kicker {
  margin: 0 0 18px;
  color: var(--yellow);
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(4.4rem, 9.2vw, 8.6rem);
  letter-spacing: -0.03em;
  line-height: 0.82;
}

.lede {
  max-width: 62ch;
  margin: clamp(28px, 4vw, 44px) 0 0;
  color: rgba(245, 241, 232, 0.8);
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  line-height: 1.75;
}

.before-card {
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--glass-line);
  background: var(--glass);
}

.before-card h2 {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  letter-spacing: -0.015em;
  line-height: 0.92;
}

.before-card ul {
  display: grid;
  gap: 13px;
  padding: 24px 0 0;
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  list-style: none;
}

.before-card li {
  position: relative;
  padding-left: 20px;
}

.before-card li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 8px;
  height: 1px;
  background: var(--yellow);
  content: "";
}

.instructions {
  padding-bottom: clamp(90px, 12vw, 168px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
  gap: clamp(34px, 8vw, 120px);
  align-items: end;
  padding: clamp(68px, 8vw, 104px) 0;
  border-top: 1px solid var(--line);
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -18px;
}

.section-heading h2,
.troubleshooting h2,
.help-callout h2 {
  margin: 0;
  font-size: clamp(3.5rem, 7vw, 6.7rem);
  letter-spacing: -0.025em;
  line-height: 0.85;
}

.section-heading > p:last-child {
  margin: 0;
  color: var(--muted);
}

.step-list {
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 58px);
  padding: clamp(42px, 6vw, 76px) 0;
  border-bottom: 1px solid var(--line);
}

.step-with-visual {
  grid-template-columns: 90px minmax(0, 0.83fr) minmax(300px, 0.72fr);
  align-items: center;
}

.step-number {
  color: var(--yellow);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.step-copy {
  max-width: 690px;
}

.step-copy h3,
.answer-grid h3 {
  margin: 0;
  color: var(--paper-strong);
  font-size: clamp(2.1rem, 4vw, 3.7rem);
  letter-spacing: -0.015em;
  line-height: 0.92;
}

.step-copy p {
  margin: 20px 0 0;
  color: var(--muted);
}

.step-copy strong {
  color: var(--paper);
  font-weight: 600;
}

code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--glass-line);
  color: var(--paper);
  background: rgba(245, 241, 232, 0.06);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.step-note {
  padding-left: 16px;
  border-left: 2px solid var(--yellow);
  color: rgba(245, 241, 232, 0.82) !important;
  font-size: 0.92rem;
}

.catalyst-figure,
.file-figure {
  min-width: 0;
  margin: 0;
}

.catalyst-screen {
  overflow: hidden;
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  background:
    linear-gradient(130deg, transparent 0 28%, rgba(255, 255, 255, 0.045) 28% 40%, transparent 40% 67%, rgba(255, 255, 255, 0.035) 67% 80%, transparent 80%),
    #070707;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.screen-status {
  display: flex;
  height: 58px;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(245, 241, 232, 0.12);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.settings-cog {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--yellow);
  background: rgba(249, 168, 0, 0.12);
  box-shadow: 0 0 0 5px rgba(249, 168, 0, 0.06);
}

.settings-cog svg {
  width: 22px;
  fill: var(--paper);
}

.screen-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 32px 28px;
}

.screen-actions span {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid rgba(245, 241, 232, 0.7);
  border-radius: 50%;
  background: rgba(245, 241, 232, 0.03);
}

.screen-actions b,
.screen-footer {
  font-family: var(--display);
  font-size: 0.88rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.screen-footer {
  display: flex;
  justify-content: space-between;
  padding: 13px 20px;
  color: #111;
  background: var(--yellow);
  font-size: 0.68rem;
  font-weight: 600;
}

figcaption {
  margin-top: 12px;
  color: var(--faint);
  font-size: 0.76rem;
  text-align: center;
}

.status-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  color: var(--paper);
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-flow span:not(.flow-arrow) {
  padding: 9px 12px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
}

.status-flow .status-success {
  border-color: rgba(249, 168, 0, 0.55);
  color: var(--yellow);
}

.flow-arrow {
  color: var(--faint);
}

.file-window {
  overflow: hidden;
  padding-bottom: 10px;
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  background: #11110f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.window-title {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--glass-line);
  background: rgba(245, 241, 232, 0.045);
}

.window-title span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
}

.window-title b {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
}

.file-row + .file-row {
  border-top: 1px solid rgba(245, 241, 232, 0.06);
}

.file-row i {
  width: 14px;
  height: 17px;
  flex: 0 0 auto;
  border: 1px solid var(--yellow);
  border-radius: 2px;
  background: rgba(249, 168, 0, 0.08);
}

.file-row code {
  min-width: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: none;
  font-size: clamp(0.64rem, 1.3vw, 0.78rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.troubleshooting {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1fr);
  gap: clamp(48px, 9vw, 136px);
  padding-top: clamp(84px, 10vw, 140px);
  padding-bottom: clamp(84px, 10vw, 140px);
  border-top: 1px solid var(--line);
}

.troubleshooting h2 {
  max-width: 8ch;
  font-size: clamp(3.3rem, 6vw, 5.8rem);
}

.answer-grid {
  border-top: 1px solid var(--line);
}

.answer-grid article {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.answer-grid h3 {
  font-size: clamp(1.65rem, 2.8vw, 2.5rem);
}

.answer-grid p {
  margin: 14px 0 0;
  color: var(--muted);
}

.help-callout {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  padding-top: clamp(54px, 7vw, 86px);
  padding-bottom: clamp(54px, 7vw, 86px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.help-callout h2 {
  max-width: 10ch;
  font-size: clamp(3rem, 6vw, 5.5rem);
}

.help-callout a {
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--yellow);
  color: var(--yellow);
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease, background 160ms ease;
}

.help-callout a:hover {
  color: var(--black);
  background: var(--yellow);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-top: 38px;
  padding-bottom: 54px;
  color: var(--faint);
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 22px;
}

@media (max-width: 900px) {
  .guide-hero,
  .section-heading,
  .troubleshooting {
    grid-template-columns: 1fr;
  }

  .guide-intro,
  .section-heading h2,
  .section-heading > p:last-child {
    max-width: 760px;
  }

  .step-with-visual {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .step-with-visual figure {
    width: min(100%, 520px);
    grid-column: 2;
    margin-top: 14px;
  }

  .troubleshooting-heading {
    max-width: 600px;
  }

  .answer-grid {
    max-width: 760px;
  }
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
  }

  .trackside-mark-icon {
    width: 42px;
    height: 42px;
  }

  .back-link {
    max-width: 78px;
    text-align: right;
  }

  .guide-hero {
    padding-top: 76px;
  }

  h1 {
    font-size: clamp(4rem, 20vw, 5.3rem);
  }

  .section-heading {
    padding-block: 62px;
  }

  .section-heading .eyebrow {
    margin-bottom: -10px;
  }

  .step,
  .step-with-visual {
    grid-template-columns: 1fr;
  }

  .step-number {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
  }

  .step-with-visual figure {
    grid-column: 1;
  }

  .screen-actions {
    padding-inline: 22px;
  }

  .status-flow {
    align-items: stretch;
    flex-direction: column;
  }

  .status-flow span:not(.flow-arrow) {
    text-align: center;
  }

  .flow-arrow {
    align-self: center;
    transform: rotate(90deg);
  }

  .help-callout,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
