:root {
  color-scheme: dark;
  --guide-bg: var(--bg-primary);
  --guide-surface: var(--bg-secondary);
  --guide-surface-raised: var(--bg-card);
  --guide-line: var(--border);
  --guide-line-strong: var(--toggle-off);
  --guide-text: var(--text-primary);
  --guide-muted: var(--text-secondary);
  --guide-accent: var(--accent);
  --guide-accent-soft: rgba(229, 9, 20, 0.1);
  --guide-success: #43d894;
  --guide-success-soft: #10261d;
  --guide-warning: #ffd36f;
  --guide-warning-soft: #261f10;
  --guide-link: #79baff;
}

* { box-sizing: border-box; }

html { background: var(--guide-bg); }

body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--guide-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

.guide-brand {
  flex: 0 0 auto;
  display: block;
  text-decoration: none;
}

.guide-shell a:focus-visible {
  outline: 2px solid var(--guide-accent);
  outline-offset: 4px;
}

.guide-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--guide-line);
  overflow-x: auto;
  scrollbar-width: none;
}

.guide-nav::-webkit-scrollbar { display: none; }

.guide-nav a {
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--guide-muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.guide-nav a:hover {
  border-color: var(--guide-line);
  background: var(--guide-surface-raised);
  color: var(--guide-text);
}

.guide-nav a[aria-current="page"] {
  border-color: var(--guide-accent);
  background: var(--guide-accent-soft);
  color: #fff;
}

.guide-main {
  width: 100%;
  padding: 24px 0 44px;
}

.guide-article {
  width: min(100%, 900px);
  margin: 0 auto;
}

.guide-heading {
  position: relative;
  margin-bottom: 28px;
  padding-left: 18px;
}

.guide-heading::before {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 4px;
  border-radius: 4px;
  background: var(--guide-accent);
  content: "";
}

.guide-author {
  margin: 0 0 8px;
  color: var(--guide-muted);
  font-size: 14px;
  font-weight: 650;
}

h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.16;
}

.guide-intro {
  margin-bottom: 18px;
  padding: 22px 24px;
  border: 1px solid #504322;
  border-left: 4px solid var(--guide-warning);
  border-radius: 8px;
  background: var(--guide-warning-soft);
}

.guide-intro-copy,
.guide-step-description {
  margin: 0 0 9px;
  font-size: 17px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.guide-intro-copy:last-child,
.guide-step-description:last-child { margin-bottom: 0; }

.guide-intro h2 {
  margin: 0 0 9px;
  color: var(--guide-warning);
  font-size: 18px;
}

.guide-intro-copy span,
.guide-step-description span { display: inline; }

.guide-intro-copy span + span::before,
.guide-step-description span + span::before { content: " "; }

.guide-intro a,
.guide-step-copy a { color: var(--guide-link); }

.guide-intro .guide-warning { color: inherit; font-weight: inherit; }

.guide-steps {
  display: grid;
  gap: 12px;
}

.guide-step-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--guide-line);
  border-radius: 8px;
  background: var(--guide-surface);
}

.guide-step-card:hover { border-color: var(--guide-line-strong); }

.guide-step-number {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--accent-glow);
  border-radius: 8px;
  background: var(--guide-accent-soft);
  color: #ff7c83;
  font-size: 17px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.guide-step-copy { min-width: 0; }

.guide-step-copy h2 {
  margin: 1px 0 12px;
  color: var(--guide-text);
  font-size: 20px;
  line-height: 1.3;
}

.guide-warning { color: var(--guide-warning); font-weight: 750; }
.guide-success { color: var(--guide-success); font-weight: 800; }
.guide-spacer { height: 8px; }

.guide-intro hr,
.guide-step-copy hr {
  height: 1px;
  margin: 17px 0;
  border: 0;
  background: var(--guide-line);
}

.guide-completion {
  margin: 18px 0 0;
  padding: 20px 24px;
  border: 1px solid #286547;
  border-left: 4px solid var(--guide-success);
  border-radius: 8px;
  background: var(--guide-success-soft);
  color: var(--guide-success);
  font-size: 18px;
  font-weight: 800;
}

.guide-support {
  margin-top: 12px;
  padding: 20px 24px;
  border: 1px solid var(--guide-line-strong);
  border-radius: 8px;
  background: var(--guide-surface-raised);
}

.guide-support h2 {
  margin: 0 0 7px;
  font-size: 18px;
}

.guide-support p {
  margin: 0;
  color: var(--guide-muted);
  font-size: 16px;
  line-height: 1.45;
}

.guide-support a {
  color: var(--guide-link);
  font-weight: 750;
}

.guide-directory { margin: 30px 0; }
.guide-directory h2 { font-size: 21px; }
.guide-directory a {
  display: block;
  padding: 15px 0;
  border-bottom: 1px solid var(--guide-line);
  color: var(--guide-link);
  font-size: 18px;
  overflow-wrap: anywhere;
}
.guide-document { font-size: 17px; line-height: 1.6; overflow-wrap: anywhere; }
.guide-document a { color: var(--guide-link); }
.guide-document h2 { margin-top: 32px; font-size: 22px; }
.guide-document h3 { margin-top: 28px; font-size: 19px; }
.guide-document p { margin: 12px 0; }
.guide-document blockquote { margin: 20px 0; padding-left: 18px; border-left: 3px solid var(--guide-accent); }
.guide-document figure { margin: 24px 0; }
.guide-document img { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.guide-document figcaption { color: var(--guide-muted); font-size: 14px; }

@media (max-width: 700px) {
  .guide-nav { margin: 0 -3px; }
  .guide-nav a { order: 1; padding: 9px 11px; }
  .guide-nav a[aria-current="page"] { order: 0; }
  .guide-main { padding: 24px 0 14px; }
  .guide-heading { margin-bottom: 22px; padding-left: 14px; }
  h1 { font-size: 29px; }
  .guide-intro { padding: 18px 17px; }
  .guide-intro-copy,
  .guide-step-description { font-size: 16px; line-height: 1.48; }

  .guide-step-card {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 13px;
    padding: 17px 15px;
  }

  .guide-step-number {
    width: 42px;
    height: 42px;
    font-size: 14px;
  }

  .guide-step-copy h2 { margin-top: 0; font-size: 18px; }
  .guide-completion { padding: 18px 17px; font-size: 17px; }
  .guide-support { padding: 18px 17px; }
}

.guide-embedded { background: #0b0c10; }
.guide-embedded .guide-shell { width: 100%; max-width: none; padding: 24px; margin: 0; }
.guide-embedded .guide-main { padding: 0; }
.guide-embedded .guide-author { display: none; }
.guide-embedded h1 { font-size: 28px; line-height: 1.3; overflow-wrap: anywhere; }
.guide-embedded .guide-heading { padding-left: 0; margin-bottom: 24px; }
.guide-embedded .guide-heading::before { display: none; }
@media (max-width: 600px) {
  .guide-embedded .guide-shell { padding: 20px 16px; }
  .guide-embedded h1 { font-size: 23px; }
  .guide-embedded .guide-step-card { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 16px 12px; }
  .guide-embedded .guide-step-number { width: 32px; height: 32px; }
}

@media print {
  @page { size: A4; margin: 13mm; }
  :root { color-scheme: light; }
  html, body { background: #fff; color: #111; }
  .guide-shell > .header, .guide-nav, .hero-bg { display: none; }
  .guide-shell { max-width: none; padding: 0; }
  .guide-main { padding: 0; }
  .guide-article { width: 100%; }
  .guide-heading { margin-bottom: 10px; padding-left: 10px; }
  .guide-heading::before { width: 3px; background: #c81742; }
  .guide-author { margin-bottom: 4px; color: #666; font-size: 10px; }
  h1 { font-size: 23px; }

  .guide-intro {
    margin-bottom: 9px;
    padding: 9px 11px;
    border-color: #d8c68e;
    border-left-color: #b37a00;
    background: #fffaf0;
  }

  .guide-intro-copy,
  .guide-step-description {
    margin-bottom: 4px;
    color: #111;
    font-size: 9.8px;
    line-height: 1.28;
  }

  .guide-intro .guide-warning { color: #744d00; font-size: 10.4px; }
  .guide-intro h2 { margin-bottom: 4px; color: #744d00; font-size: 10.4px; }
  .guide-steps { gap: 7px; }

  .guide-step-card {
    grid-template-columns: 31px minmax(0, 1fr);
    gap: 9px;
    padding: 9px 11px;
    break-inside: avoid;
    border-color: #d8d8df;
    background: #fff;
  }

  .guide-step-number {
    width: 31px;
    height: 31px;
    border-color: #d7a4b0;
    background: #fff1f4;
    color: #a71034;
    font-size: 9px;
  }

  .guide-step-copy h2 {
    margin: 0 0 5px;
    color: #111;
    font-size: 11.3px;
    line-height: 1.2;
  }

  .guide-spacer { height: 2px; }
  .guide-intro hr,
  .guide-step-copy hr { margin: 5px 0; background: #ccc; }

  .guide-completion {
    margin-top: 9px;
    padding: 9px 11px;
    border-color: #9cccb3;
    border-left-color: #087640;
    background: #f0fbf5;
    color: #087640;
    font-size: 10.4px;
  }

  .guide-support {
    margin-top: 7px;
    padding: 8px 10px;
    border-color: #d8d8df;
    background: #f7f7f9;
  }

  .guide-support h2 { margin-bottom: 3px; color: #111; font-size: 10.4px; }
  .guide-support p { color: #444; font-size: 9.8px; line-height: 1.25; }
  .guide-support a { color: #1769aa; }
}
