/* How-to guide — product page; uses themes.css variables */

.site-header .howto-header-back {
  margin: 0;
}

/* Hash links: small offset so headings aren’t flush under the fixed header */
.howto-page section[id] {
  scroll-margin-top: 0.75rem;
}

.howto-page {
  max-width: min(1100px, 100% - 2rem);
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
  line-height: 1.68;
}

.howto-page .howto-hero {
  margin: 0 0 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 0.5px solid var(--border-tile);
}

.howto-page .howto-hero h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.25;
}

.howto-section {
  padding-block: 2.25rem;
  border-top: 0.5px solid var(--border-subtle);
}

.howto-section:first-of-type,
.howto-section--intro {
  border-top: none;
  padding-top: 0.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 0.5px solid var(--border-subtle);
}

.howto-section--intro + .howto-section {
  border-top: none;
}

.howto-section--final {
  padding-bottom: 0;
}

.howto-section h2 {
  margin: 0 0 0.85rem;
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.3;
}

.howto-section h3 {
  margin: 1.35rem 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.howto-section h3:first-child {
  margin-top: 0;
}

.howto-page p {
  margin: 0 0 0.9rem;
  color: var(--text-secondary);
}

.howto-page ul,
.howto-page ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--text-secondary);
}

.howto-page li {
  margin-bottom: 0.4rem;
}

.howto-page li strong {
  color: var(--text-primary);
}

.howto-lead {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--text-primary);
  font-weight: 500;
  margin: 0 0 0.85rem;
}

.howto-pullquote {
  margin: 1rem 0 1rem;
  padding: 1rem 1.125rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  background: var(--bg-tile);
  border: 0.5px solid var(--border-tile);
  border-radius: 0.5rem;
  border-left-width: var(--signal-banner-border-width, 3px);
  border-left-color: var(--chart-line);
}

.howto-muted {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 0.75rem;
}

.howto-support {
  font-size: 0.8125rem;
  color: var(--text-muted-2);
}

/* Spotlight: “Read this in 10 seconds” */
.howto-spotlight-card {
  background: var(--bg-tile);
  border: 0.5px solid var(--border-tile);
  border-radius: 0.5rem;
  padding: 1.25rem 1.35rem 1.35rem;
  border-left-width: var(--signal-banner-border-width, 3px);
  border-left-color: var(--chart-line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

html[data-theme='light'] .howto-spotlight-card {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.howto-spotlight-card__title {
  margin: 0 0 0.85rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.howto-spotlight-card ul {
  margin: 0;
  padding-left: 1.2rem;
}

.howto-spotlight-card li {
  margin-bottom: 0.35rem;
}

/* Stance cards: green / amber / red left border */
.howto-stance-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.25rem 0 1rem;
}

.howto-stance-card {
  margin: 0;
  padding: 1rem 1.125rem;
  background: var(--bg-tile);
  border: 0.5px solid var(--border-tile);
  border-radius: 0.5rem;
  border-left-width: var(--signal-banner-border-width, 3px);
}

.howto-stance-card--on {
  border-left-color: var(--accent-on);
  background: linear-gradient(
    90deg,
    rgba(34, 197, 94, 0.08) 0%,
    var(--bg-tile) 12rem
  );
}

.howto-stance-card--mixed {
  border-left-color: var(--accent-mixed);
  background: linear-gradient(
    90deg,
    rgba(217, 119, 6, 0.1) 0%,
    var(--bg-tile) 12rem
  );
}

.howto-stance-card--off {
  border-left-color: var(--accent-off);
  background: linear-gradient(
    90deg,
    rgba(239, 68, 68, 0.08) 0%,
    var(--bg-tile) 12rem
  );
}

html[data-theme='light'] .howto-stance-card--on {
  background: linear-gradient(
    90deg,
    rgba(22, 163, 74, 0.12) 0%,
    var(--bg-tile) 12rem
  );
}

html[data-theme='light'] .howto-stance-card--mixed {
  background: linear-gradient(
    90deg,
    rgba(180, 83, 9, 0.1) 0%,
    var(--bg-tile) 12rem
  );
}

html[data-theme='light'] .howto-stance-card--off {
  background: linear-gradient(
    90deg,
    rgba(220, 38, 38, 0.08) 0%,
    var(--bg-tile) 12rem
  );
}

.howto-stance-card__title {
  margin: 0 0 0.45rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.howto-stance-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.howto-playbook-list {
  list-style: disc;
}

.howto-workflow {
  counter-reset: howto-step;
  list-style: none;
  padding-left: 0;
}

.howto-workflow li {
  position: relative;
  padding-left: 0;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 0.5px solid var(--border-subtle);
}

.howto-workflow li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Scenario cards */
.howto-scenario-card {
  margin: 1.25rem 0 0;
  padding: 1.15rem 1.25rem;
  background: var(--bg-tile);
  border: 0.5px solid var(--border-tile);
  border-radius: 0.5rem;
  border-left-width: var(--signal-banner-border-width, 3px);
  border-left-color: var(--signal-neutral-border);
}

.howto-scenario-card:first-of-type {
  margin-top: 0.75rem;
}

.howto-scenario-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.howto-scenario-card__label {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.howto-scenario-card ul {
  margin: 0 0 0.85rem;
}

.howto-scenario-card p {
  margin: 0 0 0.65rem;
  font-size: 0.875rem;
}

.howto-scenario-card p:last-child {
  margin-bottom: 0;
}

/* Pill hints (match dashboard) */
.howto-pill-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
  margin-right: 0.35rem;
}

.howto-pill-hint.on {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-on);
}

.howto-pill-hint.off {
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-off);
}

html[data-theme='light'] .howto-pill-hint.on {
  background: rgba(22, 163, 74, 0.12);
}

html[data-theme='light'] .howto-pill-hint.off {
  background: rgba(220, 38, 38, 0.1);
}
