/* Shared look for the crawlable guide pages and the home-page summary.
   Scoped to .guide / body.guide-page so it does not restyle the solver. */
.guide,
.guide *,
.guide *::before,
.guide *::after {
  box-sizing: border-box;
}

body.guide-page {
  margin: 0;
  background: #fafafa;
  color: #0f172a;
}

.guide {
  background: #fafafa;
  color: #0f172a;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.guide a {
  color: #2563eb;
}

.guide a:hover {
  color: #1d4ed8;
}

@media (prefers-color-scheme: dark) {
  body.guide-page {
    background: #0b0d10;
    color: #f5f7fa;
  }

  .guide {
    background: #0b0d10;
    color: #f5f7fa;
  }

  .guide a {
    color: #3b82f6;
  }
}

[data-theme="light"] .guide {
  background: #fafafa;
  color: #0f172a;
}

[data-theme="light"] .guide a {
  color: #2563eb;
}

[data-theme="dark"] .guide {
  background: #0b0d10;
  color: #f5f7fa;
}

[data-theme="dark"] .guide a {
  color: #3b82f6;
}

.guide .wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.guide header.site a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
  font-size: 18px;
}

.guide h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 28px 0 8px;
  letter-spacing: -0.02em;
}

.guide h2 {
  font-size: 19px;
  margin: 32px 0 8px;
}

.guide p,
.guide li {
  margin: 0 0 12px;
}

.guide ol,
.guide ul {
  padding-left: 22px;
  margin: 0 0 12px;
}

.guide li {
  margin: 6px 0;
}

.guide .lede {
  font-size: 18px;
  line-height: 1.5;
}

.guide .card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 16px 0;
}

.guide .steps {
  list-style: none;
  padding: 0;
}

.guide .steps li {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 10px;
}

.guide .step-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 4px;
}

.guide code,
.guide pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.guide pre {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  overflow-x: auto;
  margin: 8px 0 12px;
}

.guide .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 16px 0;
}

.guide .button {
  display: inline-block;
  background: #2563eb;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 10px;
  padding: 11px 14px;
}

.guide .button:hover {
  background: #1d4ed8;
  color: #ffffff;
}

.guide .play-badge img {
  display: block;
  height: 60px;
  width: auto;
}

.guide footer.site {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 14px;
}

.guide footer.site a {
  color: #2563eb;
  text-decoration: none;
}

.guide .q {
  font-weight: 650;
  margin: 18px 0 2px;
}

#about .more {
  margin-top: 8px;
  border-top: 1px solid #e5e7eb;
  padding-top: 4px;
}

#about .more summary {
  font-size: 19px;
  font-weight: 650;
  cursor: pointer;
  margin: 16px 0 8px;
}

@media (max-width: 640px) {
  #about .wrap {
    padding: 16px 16px 36px;
  }

  #about h1 {
    font-size: 22px;
    margin-top: 4px;
  }

  #about .lede {
    font-size: 16px;
  }
}

@media (prefers-color-scheme: dark) {
  .guide .card,
  .guide .steps li,
  .guide pre {
    background: #15181d;
    border-color: #252a33;
  }

  .guide .step-label {
    color: #3b82f6;
  }

  .guide footer.site {
    border-top-color: #252a33;
    color: #98a2b3;
  }

  .guide .button {
    background: #3b82f6;
  }

  .guide .button:hover {
    background: #60a5fa;
  }

  #about .more {
    border-top-color: #252a33;
  }
}

[data-theme="dark"] .guide .card,
[data-theme="dark"] .guide .steps li,
[data-theme="dark"] .guide pre {
  background: #15181d;
  border-color: #252a33;
}

[data-theme="dark"] .guide .step-label,
[data-theme="dark"] .guide footer.site a {
  color: #3b82f6;
}

[data-theme="dark"] .guide footer.site {
  border-top-color: #252a33;
  color: #98a2b3;
}

[data-theme="dark"] #about .more {
  border-top-color: #252a33;
}
