/* ========================================
   Strategic Profits — Onboarding Site
   Light, Anthropic-like docs aesthetic
   ======================================== */

/* Self-hosted Inter (latin + latin-ext) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --color-bg: #fafaf9;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #6b6b6b;
  --color-accent: #A8512F;
  --color-accent-light: #f8ece6;
  --color-accent-hover: #8F4528;
  --color-border: #e8e5e1;
  --color-border-light: #f0eeeb;
  --color-warning-bg: #fef7ed;
  --color-warning-border: #f5c97a;
  --color-success: #2d7d46;
  --color-success-bg: #eef7f0;
  --color-fail: #c44536;
  --color-fail-bg: #fef2f0;
  --color-info-bg: #f0f4f8;
  --color-info-border: #a3bfdb;
  --color-tip-bg: #f0f7f4;
  --color-tip-border: #7dc4a5;
  --color-code-bg: #f5f3f0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 720px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* MF-2: Focus styles for keyboard users */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* SF-2: Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 8px 16px;
  background: var(--color-accent);
  color: white;
  border-radius: 0 0 6px 6px;
  z-index: 200;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
  color: white;
}

/* SF-5: Link underline affordance */
a {
  color: var(--color-accent);
  text-decoration-line: underline;
  text-decoration-color: rgba(168, 81, 47, 0.3);
  text-underline-offset: 2px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration-color: currentColor;
}

/* SF-7: Visually hidden utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== Nav ========== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 249, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.nav-scrolled {
  border-bottom-color: var(--color-border);
  background: rgba(255, 255, 255, 0.92);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-brand:hover {
  color: var(--color-text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--color-text);
  text-decoration: none;
}

.nav-cta {
  background: var(--color-accent);
  color: white !important;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 500;
  transition: background 0.15s;
  text-decoration: none !important;
}

.nav-cta:hover {
  background: var(--color-accent-hover);
  color: white !important;
}

.nav-cta:focus-visible {
  outline-color: white;
  outline-offset: 3px;
}

/* ========== Progress Bar ========== */

.progress-bar {
  position: fixed;
  top: 60px;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--color-accent);
  z-index: 101;
  transform: scaleX(0);
  transform-origin: left;
}

/* ========== Hero ========== */

.hero {
  padding: 120px 0 64px;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  color: var(--color-text);
}

.hero-sub {
  font-size: 19px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-bottom: 28px;
}

.hero-callout {
  background: var(--color-surface);
  border: none;
  border-left: 3px solid var(--color-accent);
  padding: 20px 24px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 28px;
}

.hero-callout p {
  margin: 0;
  font-size: 16px;
}

.hero-time {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--color-text-secondary);
  padding: 8px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.hero-time svg {
  color: var(--color-accent);
  flex-shrink: 0;
}

/* ========== Prerequisites / Checklist ========== */

.prereqs {
  padding: 48px 0 64px;
}

.prereqs h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.prereqs-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prereqs-list li {
  font-size: 16px;
  color: var(--color-text);
  padding-left: 28px;
  position: relative;
}

.prereqs-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

.done-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.done-checklist li {
  font-size: 16px;
  padding-left: 28px;
  position: relative;
}

.done-checklist li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

.prereqs-note {
  font-size: 15px;
  color: var(--color-text-secondary);
}

/* ========== Steps Left Nav ========== */

.steps-nav {
  position: sticky;
  top: 72px;
  float: left;
  width: 220px;
  margin-left: -260px;
  padding: 16px 0;
  z-index: 50;
}

.steps-nav nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
}

.steps-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
  color: var(--color-text-secondary);
  transition: background 0.15s, color 0.15s;
}

.steps-nav-item:hover {
  text-decoration: none;
  background: var(--color-border-light);
  color: var(--color-text);
}

.steps-nav-item.active {
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-weight: 600;
}

.steps-nav-item.done {
  color: var(--color-success);
}

.steps-nav-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  flex-shrink: 0;
}

.steps-nav-item.active .steps-nav-num {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.steps-nav-item.done .steps-nav-num {
  background: var(--color-success-bg);
  border-color: var(--color-success);
  color: var(--color-success);
}

/* ========== OS Toggle ========== */

.os-toggle {
  display: inline-flex;
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 3px;
}

.os-btn {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 20px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.os-btn:hover {
  color: var(--color-text);
}

.os-btn.active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.os-win { display: none; }
body[data-os="win"] .os-win { display: block; }
body[data-os="win"] .os-mac { display: none; }

/* ========== Steps ========== */

.steps {
  padding: 32px 0 64px;
}

.step {
  display: flex;
  gap: 28px;
  padding: 40px 0;
  border-top: 1px solid var(--color-border-light);
}

.step:first-of-type {
  border-top: none;
}

.step-number {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: white;
  font-size: 18px;
  font-weight: 700;
  border-radius: 50%;
  margin-top: 2px;
}

.step-content {
  flex: 1;
  min-width: 0;
}

/* MF-3: Step headings are h3 */
.step-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}

.step-content h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0;
}

.step-time {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-code-bg);
  padding: 2px 10px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.step-context {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 14px !important;
}

.substep {
  font-size: 17px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 10px;
  color: var(--color-text);
}

.step-verification {
  background: var(--color-info-bg);
  border-radius: var(--radius);
  padding-left: 24px;
  padding-right: 24px;
  border-top: 2px solid var(--color-info-border);
}

.step-verification .step-number {
  background: var(--color-info-border);
}

.step-content p {
  margin-bottom: 14px;
}

.step-content ol,
.step-content ul {
  margin-bottom: 16px;
  padding-left: 20px;
}

.step-content li {
  margin-bottom: 6px;
}

.step-content li::marker {
  color: var(--color-accent);
  font-weight: 600;
}

/* ========== Callouts (SF-4: unified left-accent pattern) ========== */

.callout {
  padding: 18px 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 18px 0;
  font-size: 15px;
  border: none;
  border-left: 3px solid;
}

.callout p {
  margin-bottom: 8px;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout ul {
  margin-bottom: 10px;
}

.callout-warning {
  background: var(--color-warning-bg);
  border-left-color: var(--color-warning-border);
}

.callout-info {
  background: var(--color-info-bg);
  border-left-color: var(--color-info-border);
}

.callout-tip {
  background: var(--color-tip-bg);
  border-left-color: var(--color-tip-border);
}

/* ========== Code Block ========== */

.code-block {
  position: relative;
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 16px 48px 16px 20px;
  margin: 14px 0;
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.5;
}

.code-block code {
  display: block;
  word-break: break-word;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn:hover {
  color: var(--color-text);
  border-color: var(--color-text-secondary);
}

.copy-btn.copied {
  color: var(--color-success);
  border-color: var(--color-success);
}

/* ========== Result Cards ========== */

.result-grid {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.result-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
}

.result-success {
  background: var(--color-success-bg);
  border: 1px solid #b7ddc2;
}

.result-fail {
  background: var(--color-fail-bg);
  border: 1px solid #eab8b0;
}

.result-icon {
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.result-success .result-icon {
  color: var(--color-success);
}

.result-fail .result-icon {
  color: var(--color-fail);
}

/* ========== Done Section ========== */

.done {
  padding: 48px 0 64px;
}

.done-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px 36px;
}

.done-card h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.done-card > p {
  color: var(--color-text-secondary);
  font-size: 16px;
  margin-bottom: 24px;
}

.done-cta {
  display: inline-block;
  background: var(--color-accent);
  color: white !important;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.15s;
}

.done-cta:hover {
  background: var(--color-accent-hover);
  color: white !important;
}

.done-divider {
  height: 1px;
  background: var(--color-border);
  margin: 32px 0;
}

.done-subhead {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.tips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.tip {
  padding: 20px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
}

.tip h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.tip p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.tip code {
  font-size: 13px;
  background: var(--color-code-bg);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

/* ========== Troubleshooting ========== */

.troubleshooting {
  padding: 48px 0 80px;
}

.troubleshooting h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-item[open] {
  box-shadow: var(--shadow-md);
}

.faq-item summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 20px;
  color: var(--color-text-secondary);
  font-weight: 400;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-body {
  padding: 0 22px 20px;
  font-size: 15px;
  color: var(--color-text-secondary);
}

.faq-body p {
  margin-bottom: 10px;
}

.faq-body p:last-child {
  margin-bottom: 0;
}

.faq-body ol {
  padding-left: 20px;
  margin-bottom: 10px;
}

.faq-body li {
  margin-bottom: 4px;
}

/* ========== Sticky Help ========== */

.sticky-help {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  z-index: 90;
  transition: color 0.15s, box-shadow 0.15s;
}

.sticky-help:hover {
  color: var(--color-accent);
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

/* ========== Footer ========== */

.footer {
  border-top: 1px solid var(--color-border);
  padding: 24px 0;
  text-align: center;
}

.footer p {
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* ========== Keyboard ========== */

kbd {
  display: inline-block;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 2px 7px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--color-border);
  line-height: 1.4;
}

code {
  font-size: 14px;
  background: var(--color-code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
}

strong {
  font-weight: 600;
}

/* ========== Responsive ========== */

@media (max-width: 1100px) {
  .steps-nav {
    position: static;
    float: none;
    width: 100%;
    margin-left: 0;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--color-border-light);
    margin-bottom: 16px;
  }

  .steps-nav nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .steps-nav-item {
    padding: 4px 8px;
    font-size: 12px;
  }

  .steps-nav-item span:not(.steps-nav-num) {
    display: none;
  }
}

@media (max-width: 900px) {
  .tips-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding: 100px 0 48px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero-sub {
    font-size: 17px;
  }

  .steps-nav nav {
    gap: 2px;
  }

  .steps-nav-item {
    font-size: 11px;
    padding: 3px 6px;
  }

  .step-header {
    flex-direction: column;
    gap: 4px;
  }

  .step {
    flex-direction: column;
    gap: 16px;
  }

  .step-number {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .step-verification {
    padding-left: 16px;
    padding-right: 16px;
  }

  .done-card {
    padding: 28px 22px;
  }

  .done-cta {
    display: block;
    text-align: center;
  }

  .sticky-help {
    bottom: 16px;
    right: 16px;
    font-size: 13px;
    padding: 8px 16px;
  }

  .nav-links a {
    display: none;
  }
}

/* SF-3: Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
