.callout {
  border-left: 4px solid #6b7280;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  background: #f7f7f7;
}
.callout strong {
  color: #111827;
}
pre {
  position: relative;
  overflow: auto;
}
.copy-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  font: inherit;
  padding: 0.2rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  background: #fff;
  cursor: pointer;
}
code,
pre code {
  white-space: pre-wrap;
}
section {
  scroll-margin-top: 5rem;
}
figure svg {
  max-width: 100%;
  height: auto;
}

/* SME DARK CALLOUT */
html[data-theme="dark"] .callout {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: #9ca3af;
}
html[data-theme="light"] .callout {
  background: #f7f7f7;
  border-left-color: #6b7280;
}

:root {
  --sme-accent: #22d3ee;
} /* teal accent */
html[data-theme="dark"] .callout {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: var(--sme-accent);
}
html[data-theme="light"] .callout {
  background: #f7f7f7;
  border-left-color: #6b7280;
}
html[data-theme="dark"] pre {
  background: #0b1220;
  border: 1px solid #1f2937;
}
html[data-theme="dark"] pre code {
  background: transparent;
}
html[data-theme="dark"] code {
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
  border-radius: 4px;
  padding: 0 0.25rem;
}
html[data-theme="dark"] kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #374151;
  color: #e5e7eb;
  border-radius: 4px;
  padding: 0 0.25rem;
}
html[data-theme="dark"] mark {
  background: rgba(34, 211, 238, 0.18);
  color: #e5e7eb;
}
html[data-theme="dark"] .prose code::before,
html[data-theme="dark"] .prose code::after {
  content: "";
}
.copy-btn {
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
html[data-theme="dark"] .copy-btn {
  background: #0b1220;
  border-color: #374151;
  color: #e5e7eb;
}
html[data-theme="dark"] .copy-btn:hover {
  background: #111827;
  border-color: #4b5563;
}
html[data-theme="dark"] details {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #1f2937;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}
html[data-theme="dark"] details > summary {
  cursor: pointer;
}

:root {
  --cdc-bg: #0b1220;
  --cdc-surface: #0f172a;
  --cdc-border: #1f2937;
  --cdc-text: #e5e7eb;
  --cdc-muted: #9ca3af;
  --cdc-accent: #22d3ee; /* teal from overview */
  --cdc-accent-2: #a78bfa; /* purple tags */
}
/* Handoff stepper (uses your theme tokens) */
.handoff {
  margin: 0.75rem 0 1.25rem;
}
.handoff-steps {
  display: grid;
  grid-auto-flow: column;
  align-items: stretch;
  gap: 0.5rem;
}
@media (max-width: 760px) {
  .handoff-steps {
    grid-auto-flow: row;
  }
  .handoff .arrow {
    justify-self: center;
    transform: rotate(90deg);
  }
}
.handoff .stage {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(
    180deg,
    rgba(34, 211, 238, 0.08),
    rgba(167, 139, 250, 0.06)
  );
  border: 1px solid var(--cdc-border);
  border-radius: 0.7rem;
  padding: 0.9rem 0.95rem;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.08) inset;
}
.handoff .stage:hover {
  border-color: color-mix(in oklab, var(--cdc-accent) 35%, var(--cdc-border));
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--cdc-accent) 35%, transparent)
    inset;
}
.handoff .num {
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  line-height: 1.8rem;
  text-align: center;
  font-weight: 700;
  border-radius: 999px;
  background: radial-gradient(
    75% 75% at 30% 30%,
    var(--cdc-accent),
    var(--cdc-accent-2)
  );
  color: #0b1220; /* high contrast badge text */
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.25));
}
.handoff .stage-body {
  text-decoration: none;
  display: grid;
  gap: 0.15rem;
}
.handoff .stage-title {
  font-weight: 600;
  color: var(--cdc-text);
}
.handoff .stage-sub {
  font-size: 0.9rem;
  color: var(--cdc-muted);
}
.handoff .arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
  color: var(--cdc-muted);
}
.handoff-cap {
  color: var(--cdc-muted);
  margin: 0.5rem 0 0;
}
html[data-theme="dark"] body {
  background: var(--cdc-bg);
  color: var(--cdc-text);
}
html[data-theme="dark"] .page-wrap.prose {
  color: var(--cdc-text);
}
html[data-theme="dark"] .prose {
  max-width: 70ch;
}
html[data-theme="dark"] .prose h1,
html[data-theme="dark"] .prose h2,
html[data-theme="dark"] .prose h3 {
  color: var(--cdc-text);
}
html[data-theme="dark"] .prose h2 {
  border-bottom: 1px solid var(--cdc-border);
  padding-bottom: 0.25rem;
  margin-top: 2rem;
}
html[data-theme="dark"] .prose a {
  color: var(--cdc-accent);
}
html[data-theme="dark"] .prose a:hover {
  text-decoration: underline;
}
html[data-theme="dark"] .prose ul > li::marker {
  color: var(--cdc-accent);
}
html[data-theme="dark"] .prose ol > li::marker {
  color: var(--cdc-accent-2);
}
html[data-theme="dark"] .prose li {
  margin-left: 0.15rem;
}
html[data-theme="dark"] details {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--cdc-border);
  border-radius: 0.6rem;
  padding: 0.55rem 0.75rem;
}
html[data-theme="dark"] details > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cdc-surface);
  border: 1px solid var(--cdc-border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--cdc-text);
}
html[data-theme="dark"] details[open] > summary {
  border-color: var(--cdc-accent);
}
html[data-theme="dark"] .callout {
  background: rgba(34, 211, 238, 0.06);
  border-left: 4px solid var(--cdc-accent);
  color: var(--cdc-text);
}
html[data-theme="dark"] .callout strong {
  color: var(--cdc-text);
}
html[data-theme="dark"] pre {
  background: var(--cdc-surface);
  border: 1px solid var(--cdc-border);
  border-radius: 0.6rem;
}
html[data-theme="dark"] code {
  background: rgba(255, 255, 255, 0.06);
  color: var(--cdc-text);
  border-radius: 4px;
  padding: 0 0.25rem;
}
html[data-theme="dark"] .prose code::before,
html[data-theme="dark"] .prose code::after {
  content: "";
}
.copy-btn {
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
html[data-theme="dark"] .copy-btn {
  background: var(--cdc-surface);
  border-color: var(--cdc-border);
  color: var(--cdc-text);
}
html[data-theme="dark"] .copy-btn:hover {
  background: #111827;
  border-color: #4b5563;
}
html[data-theme="dark"] figure figcaption {
  color: var(--cdc-muted);
}
html[data-theme="dark"] blockquote {
  border-left: 3px solid var(--cdc-accent-2);
  background: rgba(167, 139, 250, 0.06);
}

.intro-quick-nav {
  position: sticky;
  top: 5.25rem;
  z-index: 15;
  margin: 0 auto 2rem;
  max-width: 38rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0.35rem 0.5rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}
@media (max-width: 600px) {
  .intro-quick-nav {
    position: static;
    border-radius: 1rem;
  }
}
html[data-theme="dark"] .intro-quick-nav {
  background: rgba(15, 23, 42, 0.85);
  border-color: #1f2937;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.6);
}
.intro-quick-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
}
.intro-quick-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 500;
  color: #036672;
  text-decoration: none;
}
.intro-quick-nav a:hover,
.intro-quick-nav a:focus {
  border-color: rgba(13, 148, 136, 0.4);
  background: rgba(13, 148, 136, 0.08);
}
html[data-theme="dark"] .intro-quick-nav a {
  color: var(--cdc-accent);
}

.intro-playbook {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding: 1.75rem;
  border-radius: 1.25rem;
  border: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #f8fafc, #ffffff 60%);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}
html[data-theme="dark"] .intro-playbook {
  border-color: rgba(34, 211, 238, 0.12);
  background: radial-gradient(
    circle at top,
    rgba(34, 211, 238, 0.08),
    rgba(15, 23, 42, 0.75)
  );
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.65);
}
@media (min-width: 880px) {
  .intro-playbook {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: center;
  }
}
.intro-lede h2 {
  font-size: 1.7rem;
  margin-bottom: 0.75rem;
}
.intro-lede p {
  margin: 0 0 0.85rem;
  color: #1f2937;
}
.intro-lede strong {
  color: #0f172a;
}
html[data-theme="dark"] .intro-lede p {
  color: var(--cdc-text);
}
html[data-theme="dark"] .intro-lede strong {
  color: #ffffff;
}
.intro-lab-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  color: #0f766e;
  text-decoration: none;
}
.intro-lab-link:hover,
.intro-lab-link:focus {
  text-decoration: underline;
}
html[data-theme="dark"] .intro-lab-link {
  color: var(--cdc-accent);
}

.learn-grid {
  list-style: none;
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
@media (min-width: 640px) {
  .learn-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.learn-grid li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(13, 148, 136, 0.18);
  background: rgba(13, 148, 136, 0.05);
}
html[data-theme="dark"] .learn-grid li {
  border-color: rgba(34, 211, 238, 0.25);
  background: rgba(34, 211, 238, 0.08);
}
.learn-grid p {
  margin: 0.35rem 0 0;
  color: #1f2937;
  font-size: 0.95rem;
}
html[data-theme="dark"] .learn-grid p {
  color: var(--cdc-text);
}
.learn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: radial-gradient(circle at top, #0ea5e9, #14b8a6);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 6px 14px rgba(14, 165, 233, 0.28);
}

.preflight-card {
  margin: 3rem 0;
  padding: 2rem;
  border-radius: 1.2rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}
html[data-theme="dark"] .preflight-card {
  border-color: rgba(34, 211, 238, 0.15);
  background: rgba(15, 23, 42, 0.6);
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.65);
}
.preflight-blurb {
  margin: 0 0 1.25rem;
  color: #1f2937;
}
html[data-theme="dark"] .preflight-blurb {
  color: var(--cdc-text);
}
.preflight-details > summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(13, 148, 136, 0.35);
  color: #0f766e;
  font-weight: 600;
  list-style: none;
}
.preflight-details[open] > summary {
  background: rgba(13, 148, 136, 0.08);
}
html[data-theme="dark"] .preflight-details > summary {
  border-color: rgba(34, 211, 238, 0.35);
  color: var(--cdc-accent);
}
.preflight-details > summary::-webkit-details-marker {
  display: none;
}
.preflight-details ul {
  margin: 1.2rem 0 0;
  padding-left: 1.1rem;
}

.intro-compare {
  margin: 3rem 0;
}
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}
.compare-table th,
.compare-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}
.compare-table thead th {
  text-align: left;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}
.compare-table tbody th {
  font-weight: 600;
  color: #0f172a;
  width: 18%;
}
html[data-theme="dark"] .compare-table th,
html[data-theme="dark"] .compare-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}
html[data-theme="dark"] .compare-table thead th {
  color: var(--cdc-muted);
}
html[data-theme="dark"] .compare-table tbody th {
  color: var(--cdc-text);
}

.handoff-timeline {
  margin: 2.5rem 0 3rem;
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 880px) {
  .handoff-timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.timeline-item {
  height: 100%;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 1rem;
  padding: 1.25rem;
  background: rgba(248, 250, 252, 0.75);
  display: grid;
  gap: 0.75rem;
}
.timeline-item h3 {
  font-size: 1.1rem;
  margin: 0;
  color: #0f172a;
}
.timeline-item p {
  margin: 0;
  color: #1f2937;
}
.timeline-item ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #334155;
}
html[data-theme="dark"] .timeline-item {
  border-color: rgba(34, 211, 238, 0.18);
  background: rgba(15, 23, 42, 0.7);
}
html[data-theme="dark"] .timeline-item h3 {
  color: var(--cdc-text);
}
html[data-theme="dark"] .timeline-item p,
html[data-theme="dark"] .timeline-item ul {
  color: var(--cdc-muted);
}

.perdb-recipes {
  margin: 3rem 0;
}
.perdb-recipes > p {
  max-width: 60ch;
  color: #1f2937;
}
html[data-theme="dark"] .perdb-recipes > p {
  color: var(--cdc-text);
}
.perdb-grid {
  display: grid;
  gap: 1.25rem;
  margin: 2rem 0;
}
@media (min-width: 880px) {
  .perdb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.perdb-grid details {
  padding: 1rem 1.25rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(248, 250, 252, 0.85);
}
.perdb-grid summary {
  font-weight: 600;
  cursor: pointer;
  color: #0f172a;
}
html[data-theme="dark"] .perdb-grid details {
  border-color: rgba(34, 211, 238, 0.2);
  background: rgba(15, 23, 42, 0.6);
}
html[data-theme="dark"] .perdb-grid summary {
  color: var(--cdc-text);
}
.perdb-cheatsheet {
  border: 1px dashed rgba(148, 163, 184, 0.6);
  border-radius: 0.9rem;
  padding: 1rem 1.25rem;
}
.perdb-cheatsheet summary {
  cursor: pointer;
  font-weight: 600;
}
html[data-theme="dark"] .perdb-cheatsheet {
  border-color: rgba(34, 211, 238, 0.28);
}

.handoff .stage-body:focus {
  outline: none;
}
.handoff .stage-body:focus-visible {
  outline: 2px solid var(--cdc-accent);
  outline-offset: 4px;
}
.handoff .stage:hover .stage-title,
.handoff .stage-body:focus .stage-title {
  color: var(--cdc-accent);
}
