:root {
  --ps-ink: #0f172a;
  --ps-body: #334155;
  --ps-muted: #64748b;
  --ps-line: #e2e8f0;
  --ps-paper: #ffffff;
  --ps-card: #ffffff;
  --ps-soft: #f8fafc;
  --ps-radius: 18px;

  /* Default / Hub Theme (Signature Green) */
  --ps-primary: #15803d;
  --ps-primary-dark: #166534;
  --ps-primary-soft: #f0fdf4;
  --ps-primary-border: #bbf7d0;
  --ps-glow: rgba(21, 128, 61, 0.22);
  --ps-shadow: 0 18px 50px rgba(21, 128, 61, .09);
  --ps-hero-panel-bg: #090d16;
  --ps-hero-panel-border: rgba(34, 197, 94, 0.25);
  --ps-hero-panel-kicker: #4ade80;
  --ps-hero-panel-chain: #22c55e;
  --ps-hero-gradient: radial-gradient(circle at 85% 15%, rgba(21, 128, 61, 0.20), transparent 32rem),
                      radial-gradient(circle at 15% 85%, rgba(180, 83, 9, 0.08), transparent 28rem),
                      #ffffff;

  /* Universal Level Badges */
  --ps-green: #15803d;
  --ps-green-dark: #166534;
  --ps-green-soft: #f0fdf4;
  --ps-blue: #1d5f9d;
  --ps-blue-soft: #eaf3fb;
  --ps-amber: #b45309;
  --ps-amber-soft: #fffbeb;
  --ps-red: #a23b3b;
  --ps-red-soft: #fff0ef;

  /* Semantic Callout & Diagram Palette */
  --ps-callout-info-bg: #eff6ff;
  --ps-callout-info-border: #60a5fa;
  --ps-callout-info-text: #1d4ed8;
  --ps-callout-info-title: #1e40af;
  --ps-info-soft: #eff6ff;
  --ps-info-border: #60a5fa;
  --ps-info-text: #1d4ed8;
  --ps-info-title: #1e40af;

  --ps-callout-danger-bg: #fef2f2;
  --ps-callout-danger-border: #f87171;
  --ps-callout-danger-text: #b91c1c;
  --ps-callout-danger-title: #991b1b;
  --ps-danger-soft: #fef2f2;
  --ps-danger-border: #f87171;
  --ps-danger-text: #b91c1c;
  --ps-danger-title: #991b1b;

  --ps-callout-success-bg: #f0fdf4;
  --ps-callout-success-border: #4ade80;
  --ps-callout-success-text: #15803d;
  --ps-callout-success-title: #166534;
  --ps-success-soft: #f0fdf4;
  --ps-success-border: #4ade80;
  --ps-success-text: #15803d;
  --ps-success-title: #166534;

  --ps-callout-warning-bg: #fffbeb;
  --ps-callout-warning-border: #fcd34d;
  --ps-callout-warning-text: #b45309;
  --ps-callout-warning-title: #92400e;
  --ps-warning-soft: #fffbeb;
  --ps-warning-border: #fcd34d;
  --ps-warning-text: #b45309;
  --ps-warning-title: #92400e;

  --ps-callout-purple-bg: #faf5ff;
  --ps-callout-purple-border: #c084fc;
  --ps-callout-purple-text: #7e22ce;
  --ps-callout-purple-title: #6b21a8;
  --ps-purple-soft: #faf5ff;
  --ps-purple-border: #c084fc;
  --ps-purple-text: #7e22ce;
  --ps-purple-title: #6b21a8;
}

:root[data-theme="dark"],
[data-theme="dark"],
html[data-theme="dark"],
body[data-theme="dark"] {
  --ps-ink: #f8fafc;
  --ps-body: #cbd5e1;
  --ps-muted: #94a3b8;
  --ps-line: rgba(255, 255, 255, 0.12);
  --ps-paper: #0f172a;
  --ps-card: #1e293b;
  --ps-soft: rgba(15, 23, 42, 0.6);
  --ps-primary-soft: rgba(167, 139, 250, 0.12);
  --ps-primary-border: rgba(167, 139, 250, 0.3);

  /* Dark Mode Semantic Callout & Diagram Palette */
  --ps-callout-info-bg: #1e3a5f;
  --ps-callout-info-border: rgba(96, 165, 250, 0.50);
  --ps-callout-info-text: #93c5fd;
  --ps-callout-info-title: #bfdbfe;
  --ps-info-soft: #1e3a5f;
  --ps-info-border: rgba(96, 165, 250, 0.50);
  --ps-info-text: #93c5fd;
  --ps-info-title: #bfdbfe;

  --ps-callout-danger-bg: #4a1d1d;
  --ps-callout-danger-border: rgba(248, 113, 113, 0.50);
  --ps-callout-danger-text: #fca5a5;
  --ps-callout-danger-title: #fecaca;
  --ps-danger-soft: #4a1d1d;
  --ps-danger-border: rgba(248, 113, 113, 0.50);
  --ps-danger-text: #fca5a5;
  --ps-danger-title: #fecaca;

  --ps-callout-success-bg: #14532d;
  --ps-callout-success-border: rgba(74, 222, 128, 0.50);
  --ps-callout-success-text: #86efac;
  --ps-callout-success-title: #bbf7d0;
  --ps-success-soft: #14532d;
  --ps-success-border: rgba(74, 222, 128, 0.50);
  --ps-success-text: #86efac;
  --ps-success-title: #bbf7d0;

  --ps-callout-warning-bg: #78350f;
  --ps-callout-warning-border: rgba(251, 191, 36, 0.50);
  --ps-callout-warning-text: #fde047;
  --ps-callout-warning-title: #fef08a;
  --ps-warning-soft: #78350f;
  --ps-warning-border: rgba(251, 191, 36, 0.50);
  --ps-warning-text: #fde047;
  --ps-warning-title: #fef08a;

  --ps-callout-purple-bg: #581c87;
  --ps-callout-purple-border: rgba(192, 132, 252, 0.50);
  --ps-callout-purple-text: #d8b4fe;
  --ps-callout-purple-title: #e9d5ff;
  --ps-purple-soft: #581c87;
  --ps-purple-border: rgba(192, 132, 252, 0.50);
  --ps-purple-text: #d8b4fe;
  --ps-purple-title: #e9d5ff;
}

/* ==========================================================================
   Topic 1: MMMC Theme (Teal / Cyan - 1:1 match with MMMC Guide)
   ========================================================================== */
body[data-topic="mmmc"], [data-topic="mmmc"] {
  --ps-primary: #0f766e;
  --ps-primary-dark: #115e59;
  --ps-primary-soft: #f0fdfa;
  --ps-primary-border: #99f6e4;
  --ps-glow: rgba(15, 118, 110, 0.25);
  --ps-shadow: 0 18px 50px rgba(15, 118, 110, .10);
  --ps-hero-panel-bg: #061e1c;
  --ps-hero-panel-border: rgba(45, 212, 191, 0.28);
  --ps-hero-panel-kicker: #5eead4;
  --ps-hero-panel-chain: #2dd4bf;
  --ps-hero-gradient: radial-gradient(circle at 85% 15%, rgba(15, 118, 110, 0.22), transparent 32rem),
                      radial-gradient(circle at 15% 85%, rgba(13, 148, 136, 0.10), transparent 26rem),
                      #ffffff;
}

/* ==========================================================================
   Topic 2: STA Theme (Signature Forest Green - 1:1 match with STA Guide)
   ========================================================================== */
body[data-topic="sta"], [data-topic="sta"] {
  --ps-primary: #15803d;
  --ps-primary-dark: #166534;
  --ps-primary-soft: #f0fdf4;
  --ps-primary-border: #bbf7d0;
  --ps-glow: rgba(21, 128, 61, 0.22);
  --ps-shadow: 0 18px 50px rgba(21, 128, 61, .09);
  --ps-hero-panel-bg: #090d16;
  --ps-hero-panel-border: rgba(34, 197, 94, 0.25);
  --ps-hero-panel-kicker: #4ade80;
  --ps-hero-panel-chain: #22c55e;
  --ps-hero-gradient: radial-gradient(circle at 85% 15%, rgba(21, 128, 61, 0.20), transparent 32rem),
                      radial-gradient(circle at 15% 85%, rgba(4, 120, 87, 0.08), transparent 28rem),
                      #ffffff;
}

/* ==========================================================================
   Topic 3: Low Power Theme (Electric Amber / Power, Voltage & Energy Domain)
   ========================================================================== */
body[data-topic="lowpower"], body[data-topic="low-power"], [data-topic="lowpower"], [data-topic="low-power"] {
  --ps-primary: #d97706;
  --ps-primary-dark: #b45309;
  --ps-primary-soft: #fffbeb;
  --ps-primary-border: #fde68a;
  --ps-glow: rgba(217, 119, 6, 0.25);
  --ps-shadow: 0 18px 50px rgba(217, 119, 6, .10);
  --ps-hero-panel-bg: #181105;
  --ps-hero-panel-border: rgba(251, 191, 36, 0.28);
  --ps-hero-panel-kicker: #fbbf24;
  --ps-hero-panel-chain: #f59e0b;
  --ps-hero-gradient: radial-gradient(circle at 85% 15%, rgba(217, 119, 6, 0.18), transparent 32rem),
                      radial-gradient(circle at 15% 85%, rgba(180, 83, 9, 0.08), transparent 28rem),
                      #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ps-paper);
  color: var(--ps-body);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  line-height: 1.65;
  overflow-wrap: break-word;
  word-break: normal;
}
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: rgba(21, 128, 61, 0.1); }
:focus-visible { outline: 3px solid var(--ps-primary); outline-offset: 3px; }
.ps-shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.ps-narrow { width: min(820px, calc(100% - 40px)); }

.ps-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.ps-nav { min-height: 70px; display: flex; align-items: center; gap: 20px; }
.ps-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ps-ink); text-decoration: none; font-family: Outfit, sans-serif; font-weight: 800; }
.ps-brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--ps-primary), var(--ps-primary-dark));
  color: white;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -.03em;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--ps-glow);
}
.ps-product { display: flex; flex-direction: column; padding-left: 20px; border-left: 1px solid var(--ps-line); text-decoration: none; line-height: 1.1; }
.ps-product span { color: var(--ps-ink); font-family: Outfit, sans-serif; font-weight: 800; }
.ps-product small { margin-top: 4px; color: var(--ps-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.ps-nav-links { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.ps-nav-links a { color: var(--ps-body); text-decoration: none; font-size: 14px; font-weight: 650; }
.ps-nav-links a:hover { color: var(--ps-primary); }

.ps-hero, .ps-page-hero {
  background: var(--ps-hero-gradient);
  border-bottom: 1px solid var(--ps-line);
}
.ps-hero { padding: 78px 0 86px; }
.ps-page-hero { padding: 58px 0 64px; }
.ps-mmmc-hero { padding: 24px 0 28px; }
.ps-mmmc-hero .ps-breadcrumbs { margin-bottom: 8px; }
.ps-mmmc-hero h1 { font-size: clamp(1.9rem, 4vw, 3.15rem); }
.ps-mmmc-hero .ps-lead { margin-top: 8px; font-size: clamp(.95rem, 1.6vw, 1.08rem); }
.ps-mmmc-hero .ps-actions { margin-top: 16px; }
.ps-mmmc-hero .ps-button { min-height: 40px; }
.ps-hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); align-items: center; gap: 70px; }
.ps-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ps-primary-soft);
  color: var(--ps-primary);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--ps-primary-border);
}
h1, h2, h3 { color: var(--ps-ink); font-family: Outfit, Inter, sans-serif; line-height: 1.15; overflow-wrap: break-word; }
h1 { margin: 0; font-size: clamp(2.3rem, 5.5vw, 4.6rem); letter-spacing: -.04em; }
h1 span {
  background: linear-gradient(135deg, var(--ps-primary), var(--ps-primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
h2 { margin: 0; font-size: clamp(1.6rem, 3.6vw, 2.5rem); letter-spacing: -.03em; }
h3 { margin: 0; font-size: 1.25rem; }
.ps-page-hero h1 { max-width: 920px; font-size: clamp(2.1rem, 4.8vw, 3.8rem); }
.ps-lead { max-width: 760px; margin: 20px 0 0; color: #475569; font-size: clamp(1.02rem, 1.8vw, 1.18rem); line-height: 1.6; }
.ps-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.ps-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  touch-action: manipulation;
}
.ps-button-primary { background: var(--ps-primary); color: white; box-shadow: 0 8px 22px var(--ps-glow); }
.ps-button-primary:hover { background: var(--ps-primary-dark); transform: translateY(-2px); box-shadow: 0 12px 26px var(--ps-glow); }
.ps-button-ghost { border-color: var(--ps-line); background: var(--ps-card, white); color: var(--ps-ink); }
.ps-button-ghost:hover { border-color: var(--ps-primary); transform: translateY(-2px); }
.ps-free-note { margin: 16px 0 0; color: var(--ps-muted); font-size: 13px; font-weight: 600; }

.ps-hero-panel {
  padding: 30px;
  border: 1px solid var(--ps-hero-panel-border);
  border-radius: 24px;
  background: var(--ps-hero-panel-bg);
  color: white;
  box-shadow: 0 20px 45px rgba(9, 13, 22, 0.35), 0 0 30px var(--ps-glow);
}
.ps-panel-kicker { color: var(--ps-hero-panel-kicker); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ps-chain { margin: 16px 0 26px; font-family: Outfit, sans-serif; font-size: 1.45rem; line-height: 1.5; word-break: break-word; }
.ps-chain b { color: var(--ps-hero-panel-chain); }
.ps-hero-panel dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; }
.ps-hero-panel dl div { padding-top: 16px; border-top: 1px solid rgba(255,255,255,.15); }
.ps-hero-panel dt { font-size: 1.35rem; font-weight: 800; line-height: 1.1; color: #f8fafc; }
.ps-hero-panel dd { margin: 4px 0 0; color: #94a3b8; font-size: 11px; }

.ps-breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 24px; color: var(--ps-muted); font-size: 12px; font-weight: 650; line-height: 1.4; }
/* Padding + inline-block widens the tap target without changing the visible
   text size; negative margin keeps the breadcrumb trail's layout unchanged. */
.ps-breadcrumbs a { display: inline-block; padding: 10px 4px; margin: -10px -4px; color: var(--ps-primary); text-decoration: none; }
.ps-section { padding: 72px 0; }
.ps-section-muted { background: var(--ps-soft); border-block: 1px solid var(--ps-line); }
.ps-section-heading { max-width: 720px; margin-bottom: 34px; }
.ps-section-heading > p:last-child { margin: 14px 0 0; }
.ps-topic-card { border: 1px solid var(--ps-line); border-radius: 24px; background: var(--ps-card, white); box-shadow: var(--ps-shadow); }
.ps-topic-library-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ps-library-topic { display: flex; flex-direction: column; align-items: flex-start; padding: 28px; border-radius: 20px; border: 1px solid var(--ps-line); background: var(--ps-card, white); box-shadow: var(--ps-shadow); }
.ps-library-topic p:not(.ps-eyebrow) { flex: 1; margin: 10px 0 16px; }
.ps-library-topic .ps-button { margin-top: 12px; width: 100%; }
.ps-topic-level-links { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 16px; font-size: .88rem; }
.ps-topic-level-links a {
  color: var(--ps-primary);
  font-weight: 700;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--ps-primary-soft);
  border: 1px solid var(--ps-primary-border);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.ps-topic-level-links a:hover {
  transform: translateY(-1px);
  background: var(--ps-primary-border);
}

/* Landing Page Topic Cards - 1:1 Guide Color Schemes */
.ps-topic-card-mmmc .ps-topic-icon { background: #ccfbf1; color: #0f766e; }
.ps-topic-card-mmmc .ps-eyebrow { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }
.ps-topic-card-mmmc .ps-button-primary { background: #0f766e; box-shadow: 0 8px 22px rgba(15, 118, 110, 0.25); }
.ps-topic-card-mmmc .ps-button-primary:hover { background: #115e59; }
.ps-topic-card-mmmc .ps-topic-level-links a { color: #0f766e; background: #f0fdfa; border-color: #99f6e4; }
.ps-topic-card-mmmc .ps-topic-level-links a:hover { background: #ccfbf1; }

.ps-topic-card-sta .ps-topic-icon { background: #f0fdf4; color: #15803d; }
.ps-topic-card-sta .ps-eyebrow { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.ps-topic-card-sta .ps-button-primary { background: #15803d; box-shadow: 0 8px 22px rgba(21, 128, 61, 0.22); }
.ps-topic-card-sta .ps-button-primary:hover { background: #166534; }
.ps-topic-card-sta .ps-topic-level-links a { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.ps-topic-card-sta .ps-topic-level-links a:hover { background: #dcfce7; }

.ps-topic-card-lowpower .ps-topic-icon { background: #fef3c7; color: #d97706; }
.ps-topic-card-lowpower .ps-eyebrow { background: #fffbeb; color: #d97706; border-color: #fde68a; }
.ps-topic-card-lowpower .ps-button-primary { background: #d97706; box-shadow: 0 8px 22px rgba(217, 119, 6, 0.25); }
.ps-topic-card-lowpower .ps-button-primary:hover { background: #b45309; }
.ps-topic-card-lowpower .ps-topic-level-links a { color: #d97706; background: #fffbeb; border-color: #fde68a; }
.ps-topic-card-lowpower .ps-topic-level-links a:hover { background: #fef3c7; }

.ps-featured { display: grid; grid-template-columns: 1fr 420px; gap: 50px; padding: 42px; }
.ps-featured p { max-width: 620px; }
.ps-topic-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 14px; background: var(--ps-primary-soft); color: var(--ps-primary); font-family: Outfit; font-weight: 800; font-size: 1.25rem; }
.ps-topic-levels { display: grid; gap: 10px; }
.ps-topic-levels > a:not(.ps-button) { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--ps-line); border-radius: 12px; text-decoration: none; transition: border-color 0.15s ease; }
.ps-topic-levels > a:not(.ps-button):hover { border-color: var(--ps-primary); }
.ps-topic-levels span { color: var(--ps-ink); font-weight: 700; }
.ps-topic-levels strong { color: var(--ps-muted); font-size: 12px; }
.ps-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.ps-steps article { padding: 24px; border: 1px solid var(--ps-line); border-radius: 16px; background: var(--ps-card, white); }
.ps-steps article > span { color: var(--ps-primary); font-family: Outfit; font-weight: 800; font-size: 1.1rem; }
.ps-steps h3 { margin-top: 16px; font-size: 1.05rem; }
.ps-steps p { margin-bottom: 0; font-size: 14px; }
.ps-level-chooser {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.ps-level-chooser article {
  padding: 18px 20px;
  border: 1px solid var(--ps-line);
  border-radius: 16px;
  background: var(--ps-paper);
}
.ps-level-chooser h3 { margin: 0 0 4px; font-size: 1.05rem; }
.ps-level-chooser p { margin: 0 0 12px; color: var(--ps-muted); font-size: 13px; }
.ps-level-chooser nav { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-level-chooser a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--ps-primary-soft);
  color: var(--ps-primary-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.ps-related-questions a,
.ps-prev-next a {
  min-width: 0;
}
.ps-related-questions a strong,
.ps-prev-next a strong {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ps-two-column { display: grid; grid-template-columns: 1fr 360px; gap: 70px; align-items: start; }
.ps-answer-framework { padding: 0; list-style: none; counter-reset: framework; }
.ps-answer-framework li { display: grid; grid-template-columns: 34px 1fr; gap: 0 14px; padding: 15px 0; border-bottom: 1px solid var(--ps-line); counter-increment: framework; }
.ps-answer-framework li::before { content: counter(framework); grid-row: span 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--ps-primary-soft); color: var(--ps-primary); font-weight: 800; }
.ps-answer-framework b { color: var(--ps-ink); }
.ps-answer-framework span { font-size: 14px; }
.ps-reasoning-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: 20px;
  background: var(--ps-hero-panel-bg);
  border: 1px solid var(--ps-hero-panel-border);
  color: white;
  box-shadow: 0 16px 36px rgba(9, 13, 22, 0.25);
}
.ps-reasoning-card span { padding: 9px 12px; border: 1px solid rgba(255,255,255,.13); border-radius: 9px; text-align: center; font-size: 13px; font-weight: 700; }
.ps-reasoning-card b { color: var(--ps-hero-panel-chain); text-align: center; }

/* Low Power Library */
.lp-simple-hero { padding-block: 54px 58px; }
.lp-guide-banner {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  overflow: hidden;
  border: 1px solid var(--ps-primary-border);
  border-radius: 22px;
  background: linear-gradient(135deg, #fffdf6, var(--ps-primary-soft));
  color: var(--ps-body);
  text-decoration: none;
  box-shadow: var(--ps-shadow);
}
.lp-guide-banner > div { max-width: 780px; }
.lp-guide-banner .ps-eyebrow { margin-bottom: 3px; font-size: 10px; }
.lp-guide-banner h2 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); }
.lp-guide-banner p:not(.ps-eyebrow) { max-width: 650px; margin: 5px 0 0; font-size: 13px; line-height: 1.45; }
.lp-guide-offer-action { display: flex; flex: 0 0 auto; align-items: center; gap: 22px; }
.lp-guide-price { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.lp-guide-price del { color: var(--ps-muted); font-size: 1.15rem; font-weight: 700; }
.lp-guide-price strong { color: var(--ps-primary-dark); font-size: 1.55rem; }
.lp-guide-banner .lp-guide-coming-line { display: flex; align-items: center; gap: 10px; margin-top: 9px; color: var(--ps-ink); }
.lp-guide-coming-line span { padding: 3px 8px; border: 1px solid var(--ps-primary-border); border-radius: 999px; background: var(--ps-card, white); color: var(--ps-primary-dark); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.lp-guide-coming-line a { color: var(--ps-primary-dark); font-size: 12px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.lp-basics-coming { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 48px; padding: 30px; border: 1px dashed var(--ps-primary-border); border-radius: 18px; background: linear-gradient(135deg, #fffdf6, var(--ps-primary-soft)); }
.lp-basics-coming h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
.lp-basics-coming p:not(.ps-eyebrow) { max-width: 720px; margin-top: 8px; }
.lp-coming-badge { flex: 0 0 auto; padding: 9px 15px; border: 1px solid var(--ps-primary-border); border-radius: 999px; background: var(--ps-card, white); color: var(--ps-primary-dark); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.lp-guide-banner img { width: 100%; border: 1px solid var(--ps-primary-border); border-radius: 15px; box-shadow: 0 16px 32px rgba(120, 53, 15, .14); }
.lp-simple-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 20px; }
.lp-simple-links a { padding: 22px; border: 1px solid var(--ps-line); border-radius: 15px; background: var(--ps-card, white); text-decoration: none; }
.lp-simple-links a:hover { border-color: var(--ps-primary); }
.lp-simple-links strong, .lp-simple-links span { display: block; }
.lp-simple-links strong { color: var(--ps-ink); }
.lp-simple-links span { margin-top: 5px; color: var(--ps-primary-dark); font-size: 13px; font-weight: 700; }
.lp-chapter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.lp-chapter-section { padding-top: 58px; scroll-margin-top: 80px; }
.lp-chapter-card { display: flex; min-height: 620px; overflow: hidden; flex-direction: column; border: 1px solid var(--ps-line); border-radius: 18px; background: var(--ps-card, white); box-shadow: 0 8px 22px rgba(120, 53, 15, .08); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.lp-chapter-card:hover { transform: translateY(-6px); border-color: var(--ps-primary); box-shadow: 0 20px 40px rgba(120, 53, 15, .15); }
.lp-chapter-image { display: flex; height: 250px; align-items: center; justify-content: center; padding: 16px; border-bottom: 1px solid var(--ps-line); background: var(--ps-primary-soft); }
.lp-chapter-image img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; image-rendering: high-quality; filter: contrast(1.03) saturate(1.02); }
.lp-chapter-body { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.lp-chapter-badge { width: fit-content; padding: 4px 11px; border: 1px solid var(--ps-primary-border); border-radius: 999px; background: var(--ps-primary-soft); color: var(--ps-primary-dark); font-size: 11px; font-weight: 800; }
.lp-chapter-card h3 { margin-top: 10px; font-size: 1.12rem; }
.lp-chapter-card p { margin: 8px 0 12px; font-size: 13px; line-height: 1.5; }
.lp-chapter-list { flex: 1; margin: 0 0 15px; padding: 0; list-style: none; }
.lp-chapter-list li { position: relative; padding: 3px 0 3px 18px; color: var(--ps-body); font-size: 12.5px; line-height: 1.45; }
.lp-chapter-list li::before { position: absolute; top: 9px; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--ps-primary); content: ""; }
.lp-chapter-actions { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--ps-line); }
.lp-chapter-card .lp-download-button { width: 100%; padding-top: 11px; padding-bottom: 11px; }
.lp-premium-section { margin-bottom: 60px; padding-bottom: 60px; border-bottom: 1px solid var(--ps-line); scroll-margin-top: 80px; }
.lp-premium-offer { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 28px 30px; border: 1px solid var(--ps-primary-border); border-radius: 20px; background: linear-gradient(135deg, #fff7ed, var(--ps-primary-soft)); box-shadow: 0 14px 34px rgba(120, 53, 15, .1); }
.lp-premium-offer > div:first-child { min-width: 0; max-width: 760px; }
.lp-premium-offer h2 { font-size: clamp(1.5rem, 2.5vw, 2.1rem); }
.lp-premium-offer p:not(.ps-eyebrow) { margin-top: 8px; line-height: 1.6; }
.lp-premium-offer .lp-premium-free-note { margin-top: 13px; color: var(--ps-muted); font-size: 11.5px; line-height: 1.5; }
.lp-premium-free-note strong { color: var(--ps-ink); }
.lp-premium-free-note a { color: var(--ps-primary-dark); font-weight: 850; text-decoration: underline; text-underline-offset: 3px; }
.lp-premium-offer-action { display: flex; flex: 0 0 auto; align-items: center; gap: 20px; }
.lp-premium-offer-action > span { display: flex; flex-direction: column; white-space: nowrap; }
.lp-premium-offer-action del { margin-bottom: 3px; color: var(--ps-muted); font-size: .9rem; font-weight: 750; line-height: 1; }
.lp-premium-offer-action strong { color: var(--ps-primary-dark); font-size: 2rem; line-height: 1; }
.lp-premium-offer-action small { margin-top: 5px; color: var(--ps-muted); font-size: 11px; font-weight: 700; }
.lp-premium-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-top: 32px; }
.lp-premium-card { min-width: 0; min-height: 600px; }
.lp-premium-card h3, .lp-premium-card p, .lp-premium-card li { overflow-wrap: anywhere; }
.lp-premium-card-meta { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; }
.lp-premium-card-meta .lp-chapter-badge { min-width: 0; }
.lp-premium-card-meta > strong { flex: 0 0 auto; color: var(--ps-primary-dark); font-size: 1.15rem; }
.lp-paid-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; }
.lp-paid-actions .ps-button { width: 100%; min-width: 0; padding: 10px 8px; text-align: center; white-space: normal; }

/* Low Power Basics one-minute eBook reader */
body.lp-reader-open { overflow: hidden; }
.lp-pdf-modal[hidden] { display: none; }
.lp-pdf-modal { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; background: rgba(9, 13, 22, .9); opacity: 0; backdrop-filter: blur(10px); transition: opacity .22s ease; }
.lp-pdf-modal.is-active { opacity: 1; }
.lp-pdf-window { position: relative; display: flex; width: min(100%, 940px); height: min(94vh, 900px); min-width: 0; overflow: hidden; flex-direction: column; border: 1px solid #334155; border-radius: 20px; background: #111827; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); transform: scale(.97); transition: transform .22s ease; }
.lp-pdf-modal.is-active .lp-pdf-window { transform: scale(1); }
.lp-pdf-toolbar { display: flex; min-width: 0; min-height: 62px; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 16px; border-bottom: 1px solid #334155; background: #0f172a; color: white; }
.lp-pdf-heading { display: flex; min-width: 0; align-items: center; gap: 12px; }
.lp-pdf-heading > strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.lp-pdf-timer { flex: 0 0 auto; padding: 5px 10px; border: 1px solid rgba(34, 197, 94, .38); border-radius: 999px; background: rgba(34, 197, 94, .15); color: #4ade80; font-size: 11px; font-weight: 800; white-space: nowrap; }
.lp-pdf-timer.is-expired { border-color: rgba(248, 113, 113, .4); background: rgba(239, 68, 68, .15); color: #f87171; }
.lp-pdf-toolbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.lp-pdf-buy { padding: 8px 12px; font-size: 12px; white-space: nowrap; }
.lp-pdf-close { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: white; font: inherit; font-size: 23px; cursor: pointer; }
.lp-pdf-close:hover { background: rgba(255, 255, 255, .2); }
.lp-pdf-pages { position: relative; display: flex; min-width: 0; flex: 1; overflow: auto; flex-direction: column; align-items: center; gap: 22px; padding: 24px 20px 48px; background: #3b3e40; }
.lp-pdf-loading { margin: auto; color: white; font-weight: 750; }
.lp-pdf-sheet { width: min(100%, 820px); flex: 0 0 auto; overflow: hidden; border-radius: 5px; background: white; box-shadow: 0 12px 34px rgba(0, 0, 0, .45); }
.lp-pdf-sheet canvas { display: block; width: 100%; height: auto; }
.lp-pdf-paywall { width: min(100%, 720px); padding: 32px 24px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; background: #0f172a; color: white; text-align: center; box-shadow: 0 18px 42px rgba(0, 0, 0, .4); }
.lp-pdf-paywall h3 { margin: 8px 0; color: white; font-size: 1.45rem; }
.lp-pdf-paywall p { max-width: 500px; margin: 0 auto 20px; color: #cbd5e1; font-size: 13px; line-height: 1.6; }
.lp-pdf-interview { width: min(100%, 720px); padding: 24px; border: 1px solid #fed7aa; border-radius: 16px; background: #fff7ed; color: #431407; box-shadow: 0 12px 30px rgba(0, 0, 0, .22); }
.lp-pdf-interview > span { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: #ffedd5; color: #9a3412; font-size: 10px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.lp-pdf-interview h3 { margin: 12px 0 8px; color: #431407; font-size: 1.15rem; line-height: 1.4; }
.lp-pdf-interview p { margin: 0; color: #7c2d12; font-size: 13px; line-height: 1.65; }
.lp-pdf-window.is-locked .lp-pdf-pages { filter: blur(7px); pointer-events: none; user-select: none; }
.lp-pdf-expired { position: absolute; top: 50%; left: 50%; z-index: 5; width: min(88%, 510px); padding: 30px 24px; border: 1px solid rgba(248, 113, 113, .45); border-radius: 18px; background: rgba(15, 23, 42, .96); color: white; text-align: center; box-shadow: 0 28px 65px rgba(0, 0, 0, .62); transform: translate(-50%, -50%); }
.lp-pdf-expired h3 { margin: 8px 0; color: white; font-size: 1.5rem; }
.lp-pdf-expired p { margin: 0 0 20px; color: #cbd5e1; font-size: 13px; line-height: 1.6; }
.lp-bundle-card { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-top: 24px; padding: 28px; border: 1px solid var(--ps-primary-border); border-radius: 18px; background: linear-gradient(135deg, #fff7ed, #fffbeb); }
.lp-bundle-card p:not(.ps-eyebrow) { max-width: 720px; margin: 10px 0 0; }
.lp-bundle-card .ps-button { flex: 0 0 auto; }
.lp-download-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(15, 23, 42, .72); }
.lp-download-modal[hidden] { display: none; }
.lp-modal-open { overflow: hidden; }
.lp-download-dialog { position: relative; width: min(520px, 100%); padding: 30px; border: 1px solid var(--ps-primary-border); border-radius: 20px; background: var(--ps-card, white); box-shadow: 0 28px 80px rgba(15, 23, 42, .35); }
.lp-download-dialog h2 { font-size: 1.8rem; }
.lp-download-dialog > p:not(.ps-eyebrow) { margin: 10px 0 20px; }
.lp-modal-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 1px solid var(--ps-line); border-radius: 50%; background: var(--ps-card, white); color: var(--ps-ink); font-size: 1.25rem; cursor: pointer; }
.lp-download-dialog label { display: block; margin-bottom: 7px; color: var(--ps-ink); font-size: 13px; font-weight: 800; }
.lp-download-dialog input[type="email"] { width: 100%; min-height: 48px; margin-bottom: 14px; padding: 10px 13px; border: 1px solid var(--ps-line); border-radius: 10px; background: var(--ps-card, white); color: var(--ps-ink); font: inherit; }
.lp-download-dialog input[type="email"]:focus { border-color: var(--ps-primary); outline: 3px solid var(--ps-primary-soft); }
.lp-marketing-consent { display: grid !important; grid-template-columns: 18px 1fr; gap: 9px; align-items: start; margin: 1px 0 15px; color: var(--ps-muted) !important; font-size: 12px !important; font-weight: 600 !important; line-height: 1.45; }
.lp-marketing-consent input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--ps-primary); }
.lp-download-dialog form > .ps-button { width: 100%; }
.lp-privacy-note { margin-top: 12px; color: var(--ps-muted); font-size: 12px; }
.lp-download-status { min-height: 20px; margin-top: 12px; color: var(--ps-primary-dark); font-size: 13px; font-weight: 700; }
.lp-download-dialog button:disabled { cursor: wait; opacity: .7; }
.lp-bundle-suggestion { padding: 20px; border: 1px solid var(--ps-primary-border); border-radius: 14px; background: linear-gradient(135deg, var(--ps-primary-soft), #fff); }
.lp-bundle-suggestion > span { display: inline-block; margin-bottom: 8px; padding: 4px 9px; border-radius: 999px; background: var(--ps-primary); color: white; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.lp-bundle-suggestion h3 { margin: 0; color: var(--ps-ink); font-size: 1.25rem; }
.lp-bundle-suggestion p { margin: 8px 0 16px; color: var(--ps-muted); font-size: 13px; line-height: 1.6; }
.lp-bundle-suggestion .ps-button { width: 100%; }
.lp-chapter-continue { display: block; width: 100%; margin-top: 10px; padding: 9px; border: 0; background: transparent; color: var(--ps-muted); font: inherit; font-size: 12px; font-weight: 750; text-decoration: underline; cursor: pointer; }
.lp-chapter-continue:hover { color: var(--ps-primary); }
.lp-library-hero { padding-block: 68px 76px; }
.lp-library-hero .ps-breadcrumbs { margin-bottom: 18px; }
.lp-track-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lp-track-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--ps-line);
  border-top: 4px solid var(--ps-primary);
  border-radius: 18px;
  background: var(--ps-card, white);
  color: var(--ps-body);
  text-decoration: none;
  box-shadow: var(--ps-shadow);
  transition: transform .18s ease, border-color .18s ease;
}
.lp-track-card:hover { transform: translateY(-3px); border-color: var(--ps-primary); }
.lp-track-card > span { color: var(--ps-primary); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lp-track-card h3 { margin-top: 14px; font-size: 1.45rem; }
.lp-track-card p { flex: 1; margin: 12px 0 22px; }
.lp-track-card strong { color: var(--ps-primary-dark); font-size: 13px; }
.lp-section-intro { display: grid; grid-template-columns: minmax(0, .85fr) minmax(320px, 1.15fr); gap: 64px; align-items: end; margin-bottom: 34px; }
.lp-section-intro > p { margin: 0; }
.lp-tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lp-tool-card { position: relative; padding: 26px 22px 24px; overflow: hidden; border: 1px solid var(--ps-primary-border); border-radius: 18px; background: var(--ps-card, white); }
.lp-tool-card > span { display: inline-grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: var(--ps-primary-soft); color: var(--ps-primary); font-family: Outfit, sans-serif; font-weight: 800; }
.lp-tool-card h3 { margin-top: 22px; font-size: 1.12rem; }
.lp-tool-card p { min-height: 110px; margin: 10px 0 18px; font-size: 14px; }
.lp-tool-card a { color: var(--ps-primary-dark); font-size: 13px; font-weight: 800; text-decoration: none; }
.lp-tool-card a:hover { text-decoration: underline; }
.lp-tool-footer { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 22px; padding: 24px 26px; border: 1px solid var(--ps-primary-border); border-radius: 18px; background: var(--ps-primary-soft); }
.lp-tool-footer strong { color: var(--ps-ink); font-family: Outfit, sans-serif; font-size: 1.08rem; }
.lp-tool-footer p { margin: 4px 0 0; font-size: 13px; }
.ps-level-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ps-level-card { padding: 28px; border: 1px solid var(--ps-line); border-top: 4px solid var(--ps-primary); border-radius: 16px; background: var(--ps-card, white); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.ps-level-card:hover { transform: translateY(-3px); box-shadow: var(--ps-shadow); }
.ps-level-card > span { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ps-level-card h3 { margin-top: 10px; font-size: 1.5rem; }
.ps-level-card p { font-size: 14px; }
.ps-level-card strong { color: var(--ps-primary); font-size: 13px; }
.ps-level-blue { border-top-color: var(--ps-blue); }
.ps-level-blue > span, .ps-level-blue strong { color: var(--ps-blue); }
.ps-level-amber { border-top-color: var(--ps-amber); }
.ps-level-amber > span, .ps-level-amber strong { color: var(--ps-amber); }

.ps-filter { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin-bottom: 20px; }
.ps-filter label { width: 100%; }
.ps-filter label span { display: block; margin-bottom: 6px; color: var(--ps-ink); font-size: 12px; font-weight: 750; }
.ps-filter input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--ps-line);
  border-radius: 10px;
  color: var(--ps-ink);
  background: var(--ps-card, white);
  font-size: 14px;
  -webkit-appearance: none;
}
.ps-filter input:focus { border-color: var(--ps-primary); outline: none; box-shadow: 0 0 0 3px var(--ps-glow); }
.ps-filter-buttons {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--ps-line);
  border-radius: 10px;
  background: var(--ps-card, white);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ps-filter-buttons::-webkit-scrollbar { display: none; }
.ps-filter-buttons button {
  padding: 6px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ps-body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.ps-filter-buttons button.is-active { background: var(--ps-primary); color: white; }

.ps-pillar-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 10px 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--ps-soft);
  border: 1px solid var(--ps-primary-border);
  font-size: 13px;
}
.ps-pillar-strip-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ps-pillar-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--ps-primary);
  color: white;
  font-size: 11.5px;
  font-weight: 800;
}
.ps-pillar-strip strong {
  color: var(--ps-ink);
  font-size: 12.5px;
}
.ps-pillar-strip-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ps-pillar-strip-links a {
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--ps-card, white);
  border: 1px solid var(--ps-line);
  color: var(--ps-primary);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  transition: all 0.15s ease;
}
.ps-pillar-strip-links a:hover {
  border-color: var(--ps-primary);
  background: var(--ps-primary-soft);
}

.ps-guide-toolbar {
  margin-bottom: 14px;
  padding: 12px 16px;
  border: 1px solid var(--ps-line);
  border-radius: 14px;
  background: var(--ps-soft);
}
.ps-guide-toolbar .ps-filter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 0;
}
.ps-guide-toolbar .ps-filter label {
  width: 100%;
}
.ps-guide-toolbar .ps-filter label span {
  display: none;
}
.ps-guide-toolbar .ps-filter input {
  min-height: 40px;
}
.ps-filter-subtopics {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--ps-line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
}
.ps-filter-subtopics .ps-filter-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--ps-muted);
  margin-right: 2px;
}
.ps-subtopic-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ps-subtopic-buttons button {
  padding: 4px 10px;
  border: 1px solid var(--ps-line);
  border-radius: 6px;
  background: var(--ps-card, white);
  color: var(--ps-body);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  transition: all 0.15s ease;
}
.ps-subtopic-buttons button:hover {
  border-color: var(--ps-primary);
  background: var(--ps-primary-soft);
  color: var(--ps-primary);
}
.ps-subtopic-buttons button.is-active {
  background: var(--ps-primary);
  color: white;
  border-color: var(--ps-primary);
}
.ps-subtopic-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--ps-primary-soft);
  color: var(--ps-primary);
  font-size: 10.5px;
  font-weight: 750;
  border: 1px solid var(--ps-primary-border);
}
.ps-prep-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--ps-line);
}
.ps-prep-links span {
  color: var(--ps-muted);
  font-size: 12px;
  font-weight: 800;
}
.ps-prep-links a {
  color: var(--ps-primary);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}
.ps-prep-links a:hover {
  text-decoration: underline;
}

.ps-question-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ps-line); }
.ps-question-row[hidden] { display: none; }
.ps-question-list .ps-question-row a {
  display: grid;
  grid-template-columns: 46px 1fr 24px;
  gap: 18px;
  align-items: start;
  padding: 18px 10px;
  border-bottom: 1px solid var(--ps-line);
  text-decoration: none;
  touch-action: manipulation;
  transition: background-color 0.15s ease;
}
.ps-question-list .ps-question-row a:hover { background: var(--ps-primary-soft); }
.ps-question-number { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--ps-primary-soft); color: var(--ps-primary); font-size: 12px; font-weight: 800; flex-shrink: 0; }
.ps-question-list .ps-question-row strong { display: block; color: var(--ps-ink); line-height: 1.4; font-size: 15px; }
.ps-question-list .ps-question-row small { display: -webkit-box; margin-top: 6px; overflow: hidden; color: var(--ps-muted); font-size: 13px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ps-arrow { color: var(--ps-primary); font-weight: 800; align-self: center; }
.ps-empty { padding: 28px; border: 1px dashed var(--ps-line); border-radius: 14px; text-align: center; }

.ps-guide-level { scroll-margin-top: 80px; }
.ps-guide-level + .ps-guide-level { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--ps-line); }
.ps-guide-level[hidden] { display: none; }
.ps-guide-level-heading { max-width: 720px; margin-bottom: 12px; }
.ps-guide-level-heading h2 { font-size: 1.25rem; margin: 2px 0 0; }
.ps-level-index-link { color: var(--ps-primary); font-size: 12px; font-weight: 750; }

.ps-answer-guide { display: grid; gap: 12px; }
.ps-guide-question {
  scroll-margin-top: 80px;
  padding: 16px 20px;
  border: 1px solid var(--ps-line);
  border-radius: 12px;
  background: var(--ps-card, white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.ps-guide-question:hover {
  border-color: var(--ps-primary);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}
.ps-guide-question[hidden] { display: none; }
.ps-guide-question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-right: 0;
}
.ps-guide-question-header .ps-question-meta {
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.ps-q-order {
  font-size: 11px;
  font-weight: 800;
  color: var(--ps-muted);
  background: var(--ps-soft);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--ps-line);
}
.ps-guide-question h2,
.ps-guide-question .ps-question-title {
  margin: 0 0 6px;
  font-size: 1.12rem;
  line-height: 1.35;
  font-weight: 700;
}
.ps-guide-question h2 a,
.ps-guide-question .ps-question-title a { color: var(--ps-ink); text-decoration: none; }
.ps-guide-question h2 a:hover,
.ps-guide-question .ps-question-title a:hover { color: var(--ps-primary); text-decoration: underline; }
.ps-question-excerpt {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ps-muted);
}
.ps-question-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.ps-guide-question .ps-button {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 6px;
}
.ps-permalink {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ps-primary);
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--ps-primary-soft);
  border: 1px solid var(--ps-primary-border);
  white-space: nowrap;
  transition: all 0.15s ease;
}
.ps-permalink:hover {
  background: var(--ps-primary-border);
  transform: translateY(-1px);
}
.ps-guide-answer {
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid var(--ps-line);
  border-left-width: 5px;
  border-radius: 12px;
}
.ps-guide-answer h3 { margin-bottom: 8px; font-size: 1rem; }
.ps-guide-answer p { margin: 0; white-space: pre-line; line-height: 1.6; }
.ps-guide-answer p + p { margin-top: 10px; }
.ps-guide-answer ul, .ps-guide-answer ol { margin: 10px 0; padding-left: 24px; line-height: 1.6; }
.ps-guide-answer li + li { margin-top: 6px; }
.ps-comparison-table { width: 100%; margin: 10px 0; border-collapse: collapse; font-size: 14px; }
.ps-comparison-table th, .ps-comparison-table td { padding: 8px 12px; border: 1px solid var(--ps-line); text-align: left; vertical-align: top; }
.ps-comparison-table th { background: var(--ps-soft); font-weight: 700; }
.ps-comparison-table tr:nth-child(even) td { background: var(--ps-soft); }
@media (max-width: 640px) { .ps-comparison-table { display: block; overflow-x: auto; } }
.ps-guide-answer .ps-code-block,
.ps-guide-answer pre,
.ps-guide-answer > code {
  display: block;
  max-width: 100%;
  padding: 13px 16px;
  margin: 12px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 9px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a7f3d0;
  font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre;
  word-break: normal;
}
.ps-guide-answer li code,
.ps-guide-answer p code {
  display: inline;
  padding: 2px 7px;
  border-radius: 5px;
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: normal;
  word-break: break-word;
}
.ps-guide-answer pre code {
  display: block;
  color: inherit;
  font: inherit;
  background: transparent;
  padding: 0;
  border: none;
}
.ps-guide-takeaways { border-left-color: var(--ps-primary); background: var(--ps-soft, #fcfdfd); }
.ps-guide-question .ps-complete { margin-top: 18px; }
.ps-guide-section { padding-top: 10px; }
.ps-guide-main { min-width: 0; }
.ps-guide-toolbar { margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--ps-line); border-radius: 16px; background: var(--ps-soft); }
.ps-guide-toolbar .ps-filter { margin-bottom: 10px; }
.ps-prep-links { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding-top: 14px; border-top: 1px solid var(--ps-line); }
.ps-prep-links span { color: var(--ps-ink); font-size: 12px; font-weight: 800; }
.ps-prep-links a { color: var(--ps-primary); font-size: 12px; font-weight: 750; }
.ps-related-topics, .ps-related-questions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ps-related-topics a, .ps-related-questions a { padding: 20px; border: 1px solid var(--ps-line); border-radius: 14px; background: var(--ps-card, white); text-decoration: none; transition: border-color 0.15s ease; }
.ps-related-topics a:hover, .ps-related-questions a:hover { border-color: var(--ps-primary); }
.ps-related-topics strong, .ps-related-questions strong { display: block; color: var(--ps-ink); font-size: 14px; }
.ps-related-topics span, .ps-related-questions span { color: var(--ps-muted); font-size: 12px; }

.ps-progress { max-width: 560px; margin-top: 28px; }
.ps-progress span { font-size: 13px; font-weight: 650; }
.ps-progress > div { height: 8px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: #dce8e2; }
.ps-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--ps-primary); transition: width .25s ease; }
.ps-level-intro { margin-bottom: 32px; padding: 22px 24px; border-left: 4px solid var(--ps-primary); background: var(--ps-primary-soft); border-radius: 0 12px 12px 0; }
.ps-level-intro h2 { font-size: 1.35rem; }
.ps-level-intro p { margin-bottom: 0; font-size: 14.5px; }
.ps-level-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.ps-level-nav a { padding: 9px 14px; border: 1px solid var(--ps-line); border-radius: 9px; color: var(--ps-primary); text-decoration: none; font-size: 13px; font-weight: 700; background: var(--ps-card, white); }
.ps-level-nav a:hover { border-color: var(--ps-primary); background: var(--ps-primary-soft); }

.ps-question-hero { padding: 46px 0 40px; border-bottom: 1px solid var(--ps-line); background: var(--ps-primary-soft); }
.ps-question-hero h1 { font-size: clamp(1.85rem, 4.2vw, 3.25rem); }
.ps-question-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 16px; color: var(--ps-muted); font-size: 12px; font-weight: 700; }
.ps-level-pill { padding: 4px 10px; border-radius: 99px; background: var(--ps-green-soft); color: var(--ps-green); font-size: 11.5px; font-weight: 800; letter-spacing: 0.02em; }
.ps-level-pill.ps-level-blue { background: var(--ps-blue-soft); color: var(--ps-blue); }
.ps-level-red { border-top-color: #b42318; }
.ps-level-red > span, .ps-level-red strong { color: #b42318; }
.ps-level-pill.ps-level-red { background: #fff0ee; color: #9f1f17; }
.ps-level-pill.ps-level-amber { background: var(--ps-amber-soft); color: var(--ps-amber); }
.ps-source-line { margin: 16px 0 0; color: var(--ps-muted); font-size: 12px; }
.ps-article-layout { display: grid; grid-template-columns: minmax(0, 760px) 260px; justify-content: center; gap: 40px; padding-block: 48px; }
.ps-article-main { min-width: 0; }
.ps-answer-card { margin-bottom: 18px; padding: 26px; border: 1px solid var(--ps-line); border-radius: var(--ps-radius); background: var(--ps-card, white); }
.ps-answer-card h2 { margin-bottom: 12px; font-size: 1.15rem; }
.ps-answer-card p { margin: 0; white-space: pre-line; line-height: 1.6; }
.ps-answer-card ul { margin: 8px 0 0; padding-left: 20px; }
.ps-answer-card li + li { margin-top: 4px; }

/* STA concept schematics and timing waveforms */
.ps-sta-visual { margin: 22px 0; overflow-x: auto; border: 1px solid var(--ps-primary-border); border-radius: var(--ps-radius); background: linear-gradient(180deg, var(--ps-primary-soft), var(--ps-paper, #fff) 34%); box-shadow: 0 12px 34px rgba(15, 23, 42, .07); }
.ps-article-main { min-width: 0; }
.ps-sta-visual figcaption { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; min-width: 0; padding: 16px 20px 0; }
.ps-sta-visual figcaption span { color: var(--ps-primary); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ps-sta-visual figcaption strong { min-width: 0; overflow-wrap: anywhere; color: var(--ps-ink); font-family: Outfit, sans-serif; font-size: 1rem; }
.ps-sta-visual svg { display: block; width: 100%; height: auto; padding: 4px 12px 12px; }
.ps-source-diagram { overflow: hidden; background: var(--ps-paper, #fff); }
.ps-diagram-open { display: grid; width: 100%; padding: 12px 16px 16px; border: 0; background: var(--ps-paper, #fff); color: var(--ps-primary); cursor: zoom-in; text-align: center; }
.ps-diagram-open img { display: block; max-width: 100%; width: auto; height: auto; margin: 0 auto; object-fit: contain; }
.ps-diagram-open span { margin-top: 10px; font-size: 12px; font-weight: 800; }
.ps-diagram-open:focus-visible, .ps-diagram-lightbox button:focus-visible { outline: 3px solid var(--ps-blue); outline-offset: 3px; }
.ps-diagram-lightbox { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px; background: rgba(8, 19, 31, .88); }
.ps-diagram-lightbox[hidden] { display: none; }
.ps-diagram-lightbox-panel { display: flex; width: min(96vw, 1500px); height: min(94vh, 1100px); flex-direction: column; overflow: hidden; background: var(--ps-paper, #fff); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.ps-diagram-lightbox-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; border-bottom: 1px solid var(--ps-line); }
.ps-diagram-lightbox-toolbar h2 { margin: 0; font-size: 1rem; }
.ps-diagram-lightbox-toolbar button { min-width: 72px; min-height: 48px; border: 1px solid var(--ps-primary); background: var(--ps-card, #fff); color: var(--ps-primary); font-weight: 800; cursor: pointer; }
.ps-diagram-lightbox-scroll { flex: 1; overflow: auto; overscroll-behavior: contain; touch-action: pinch-zoom; }
.ps-diagram-lightbox-scroll img { display: block; width: auto; max-width: none; height: auto; min-width: 100%; object-fit: contain; }
body.ps-diagram-modal-open { overflow: hidden; }
.ps-sta-continue,
.ps-paid-guide-cta {
  margin-top: 28px;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--ps-primary-border);
  background: var(--ps-primary-soft);
}
.ps-sta-continue h2,
.ps-paid-guide-cta h2 {
  margin: 4px 0 10px;
  font-size: 1.25rem;
  color: var(--ps-ink);
}
.ps-paid-guide-cta p {
  margin-bottom: 14px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ps-body);
}
.ps-paid-guide-cta-compact {
  margin-top: 20px;
  padding: 16px;
}
.ps-paid-guide-cta-compact h2 {
  font-size: 1rem;
  margin: 4px 0 12px;
}
.ps-paid-guide-cta-compact .ps-paid-cta-actions .ps-button {
  width: 100%;
  justify-content: center;
  font-size: 13px;
  padding: 10px 12px;
}
.ps-paid-cta-actions,
.ps-sta-continue > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.ps-author-byline {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--ps-muted);
}
.ps-author-byline a {
  color: var(--ps-ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ps-author-byline a:hover {
  color: var(--ps-primary);
}
.ps-trademark-note { padding-block: 14px; border-top: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.72); font-size: 11px; line-height: 1.55; }
.ps-sta-visual text { font-family: Inter, sans-serif; }
.ps-viz-title { fill: var(--ps-ink); font-size: 14px; font-weight: 750; }
.ps-viz-label { fill: var(--ps-body); font-size: 12px; font-weight: 650; }
.ps-viz-note { fill: var(--ps-muted); font-size: 12px; font-weight: 600; }
.ps-viz-left { text-anchor: start !important; }
.ps-viz-node { fill: var(--ps-paper, #fff); stroke: var(--ps-primary); stroke-width: 2; }
.ps-viz-node-accent { fill: var(--ps-primary-soft); }
.ps-viz-buffer { fill: var(--ps-primary-soft); stroke: var(--ps-primary); stroke-width: 1.6; }
.ps-viz-port { fill: var(--ps-primary); stroke: var(--ps-primary-dark); stroke-width: 2; }
.ps-viz-signal, .ps-viz-measure, .ps-viz-axis { fill: none; stroke: var(--ps-primary); stroke-width: 2.5; }
.ps-viz-measure { stroke-width: 1.6; }
.ps-viz-axis { stroke: var(--ps-muted); stroke-width: 1.5; }
.ps-viz-arrow { fill: var(--ps-primary); }
.ps-viz-wave, .ps-viz-clock { fill: none; stroke: var(--ps-primary-dark); stroke-width: 3; stroke-linejoin: round; }
.ps-viz-data { fill: none; stroke: var(--ps-blue); stroke-width: 3; stroke-linejoin: round; }
.ps-viz-guide { stroke: var(--ps-muted); stroke-width: 1.2; stroke-dasharray: 5 5; }
.ps-viz-capture { stroke: var(--ps-primary); stroke-width: 2.2; }
.ps-viz-arrival { stroke: var(--ps-blue); stroke-width: 2.2; }
.ps-viz-window { fill: var(--ps-amber-soft); stroke: var(--ps-amber); stroke-width: 1.2; stroke-dasharray: 4 3; opacity: .78; }
.ps-viz-dot { fill: var(--ps-blue); }
.ps-viz-dot-alt { fill: var(--ps-primary); }
.ps-card-short { border-left: 5px solid var(--ps-primary); background: var(--ps-primary-soft); }
.ps-card-mentor { border-left: 5px solid var(--ps-blue); }
.ps-card-example { border-left: 5px solid #7c3aed; background: #fbf9ff; }
.ps-card-trap { border-left: 5px solid var(--ps-amber); background: #fffcf8; }
.ps-card-tool { border-left: 5px solid #475569; background: #f8fafc; }
.ps-card-verification { border-left: 5px solid #0284c7; background: #f0f9ff; }

/* ==========================================================================
   Dark Mode System & Topic Adaptations
   ========================================================================== */
[data-theme="dark"], html[data-theme="dark"] body {
  --ps-ink: #f8fafc;
  --ps-body: #cbd5e1;
  --ps-muted: #94a3b8;
  --ps-line: rgba(255, 255, 255, 0.12);
  --ps-paper: #0f172a;
  --ps-soft: #1e293b;
  --ps-card: #1e293b;
}

[data-theme="dark"] body[data-topic="lowpower"],
[data-theme="dark"] body[data-topic="low-power"],
[data-theme="dark"] [data-topic="lowpower"],
[data-theme="dark"] [data-topic="low-power"] {
  --ps-primary-soft: rgba(217, 119, 6, 0.15);
  --ps-primary-border: rgba(245, 158, 11, 0.35);
  --ps-hero-panel-bg: #181105;
  --ps-hero-gradient: radial-gradient(circle at 85% 15%, rgba(217, 119, 6, 0.18), transparent 32rem),
                      radial-gradient(circle at 15% 85%, rgba(180, 83, 9, 0.10), transparent 28rem),
                      #0f172a;
}

[data-theme="dark"] body[data-topic="mmmc"],
[data-theme="dark"] [data-topic="mmmc"] {
  --ps-primary-soft: rgba(15, 118, 110, 0.18);
  --ps-primary-border: rgba(45, 212, 191, 0.35);
  --ps-hero-panel-bg: #061e1c;
  --ps-hero-gradient: radial-gradient(circle at 85% 15%, rgba(15, 118, 110, 0.22), transparent 32rem),
                      radial-gradient(circle at 15% 85%, rgba(13, 148, 136, 0.10), transparent 26rem),
                      #0f172a;
}

[data-theme="dark"] body[data-topic="sta"],
[data-theme="dark"] [data-topic="sta"] {
  --ps-primary-soft: rgba(21, 128, 61, 0.18);
  --ps-primary-border: rgba(34, 197, 94, 0.35);
  --ps-hero-panel-bg: #090d16;
  --ps-hero-gradient: radial-gradient(circle at 85% 15%, rgba(21, 128, 61, 0.20), transparent 32rem),
                      radial-gradient(circle at 15% 85%, rgba(4, 120, 87, 0.08), transparent 28rem),
                      #0f172a;
}

[data-theme="dark"] body[data-topic="pnr"],
[data-theme="dark"] [data-topic="pnr"] {
  --ps-primary-soft: rgba(99, 102, 241, 0.18);
  --ps-primary-border: rgba(129, 140, 248, 0.35);
  --ps-hero-panel-bg: #0d0e24;
  --ps-hero-gradient: radial-gradient(circle at 85% 15%, rgba(99, 102, 241, 0.18), transparent 32rem),
                      radial-gradient(circle at 15% 85%, rgba(79, 70, 229, 0.10), transparent 28rem),
                      #0f172a;
}

[data-theme="dark"] .ps-answer-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

[data-theme="dark"] .ps-answer-card h2,
[data-theme="dark"] .ps-answer-card h3 {
  color: #f8fafc;
}

[data-theme="dark"] .ps-question-hero {
  background: var(--ps-primary-soft);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .ps-question-hero h1 {
  color: #f8fafc;
}

[data-theme="dark"] .ps-card-short {
  background: var(--ps-primary-soft);
  color: #f8fafc;
}

[data-theme="dark"] .ps-card-mentor {
  background: rgba(29, 95, 157, 0.12);
}

[data-theme="dark"] .ps-card-example {
  background: rgba(124, 58, 237, 0.12);
}

[data-theme="dark"] .ps-card-trap {
  background: rgba(180, 83, 9, 0.12);
}

[data-theme="dark"] .ps-card-tool {
  background: rgba(71, 85, 105, 0.2);
}

[data-theme="dark"] .ps-card-verification {
  background: rgba(2, 132, 199, 0.12);
  border-left-color: #38bdf8;
}

[data-theme="dark"] .ps-guide-takeaways {
  background: #1e293b;
}

[data-theme="dark"] .ps-related-topics a,
[data-theme="dark"] .ps-related-questions a,
[data-theme="dark"] .ps-prev-next a,
[data-theme="dark"] .ps-guide-question,
[data-theme="dark"] .ps-sticky-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .ps-level-nav a,
[data-theme="dark"] .ps-copy,
[data-theme="dark"] .ps-share a {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .ps-button-ghost {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

[data-theme="dark"] .ps-button-ghost:hover {
  background: var(--ps-primary-soft);
  border-color: var(--ps-primary);
  color: var(--ps-ink);
}

[data-theme="dark"] .ps-topic-card,
[data-theme="dark"] .ps-library-topic,
[data-theme="dark"] .ps-steps article,
[data-theme="dark"] .ps-level-card,
[data-theme="dark"] .lp-chapter-card,
[data-theme="dark"] .lp-track-card,
[data-theme="dark"] .lp-tool-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

[data-theme="dark"] .ps-topic-card h2,
[data-theme="dark"] .ps-topic-card h3,
[data-theme="dark"] .ps-library-topic h3,
[data-theme="dark"] .ps-steps article h3,
[data-theme="dark"] .ps-level-card h3,
[data-theme="dark"] .lp-chapter-card h3,
[data-theme="dark"] .lp-track-card h3,
[data-theme="dark"] .lp-tool-card h3 {
  color: #f8fafc;
}

[data-theme="dark"] .lp-simple-links a {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

[data-theme="dark"] .lp-guide-coming-line span,
[data-theme="dark"] .lp-coming-badge {
  background: #1e293b;
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .lp-basics-coming,
[data-theme="dark"] .lp-premium-offer {
  background: linear-gradient(135deg, #181105, rgba(217, 119, 6, 0.15));
  border-color: rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .lp-download-dialog {
  background: #1e293b;
  border-color: rgba(245, 158, 11, 0.35);
  color: #f8fafc;
}

[data-theme="dark"] .lp-download-dialog label {
  color: #f8fafc;
}

[data-theme="dark"] .lp-download-dialog input[type="email"],
[data-theme="dark"] .ps-question-resource input[type="email"],
[data-theme="dark"] .ps-filter input {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.18);
  color: #f8fafc;
}

[data-theme="dark"] .lp-modal-close {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

[data-theme="dark"] .lp-tool-footer {
  background: rgba(217, 119, 6, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .lp-tool-footer strong {
  color: #f8fafc;
}

[data-theme="dark"] .ps-filter-buttons {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .ps-filter-buttons button {
  color: #cbd5e1;
}

[data-theme="dark"] .ps-filter-buttons button.is-active {
  background: var(--ps-primary);
  color: #ffffff;
}

[data-theme="dark"] .ps-subtopic-buttons button {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

[data-theme="dark"] .ps-subtopic-buttons button:hover {
  background: var(--ps-primary-soft);
  color: var(--ps-primary);
  border-color: var(--ps-primary);
}

[data-theme="dark"] .ps-subtopic-buttons button.is-active {
  background: var(--ps-primary);
  color: #ffffff;
  border-color: var(--ps-primary);
}

[data-theme="dark"] .ps-pillar-strip-links a {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ps-primary);
}

[data-theme="dark"] .ps-topic-card-mmmc .ps-eyebrow,
[data-theme="dark"] .ps-topic-card-mmmc .ps-topic-level-links a {
  background: rgba(15, 118, 110, 0.2);
  color: #2dd4bf;
  border-color: rgba(45, 212, 191, 0.35);
}
[data-theme="dark"] .ps-topic-card-mmmc .ps-topic-level-links a:hover {
  background: rgba(15, 118, 110, 0.35);
}

[data-theme="dark"] .ps-topic-card-sta .ps-eyebrow,
[data-theme="dark"] .ps-topic-card-sta .ps-topic-level-links a {
  background: rgba(21, 128, 61, 0.2);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.35);
}
[data-theme="dark"] .ps-topic-card-sta .ps-topic-level-links a:hover {
  background: rgba(21, 128, 61, 0.35);
}

[data-theme="dark"] .ps-topic-card-lowpower .ps-eyebrow,
[data-theme="dark"] .ps-topic-card-lowpower .ps-topic-level-links a {
  background: rgba(217, 119, 6, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}
[data-theme="dark"] .ps-topic-card-lowpower .ps-topic-level-links a:hover {
  background: rgba(217, 119, 6, 0.35);
}

[data-theme="dark"] .ps-guide-toolbar {
  background: #1e293b;
}

/* Dark Mode Diagrams & SVGs */
[data-theme="dark"] .ps-sta-visual {
  background: #0f172a;
  border-color: var(--ps-primary-border);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
}

/* PnR's generated diagrams (.ps-source-diagram) are static bright-theme SVGs,
   not theme-reactive inline SVGs like STA/MMMC's -- the general dark-mode
   figure background above leaves a dark frame around their permanently
   white diagram card. Keep the frame white to match. */
[data-theme="dark"] .ps-sta-visual.ps-source-diagram {
  background: #ffffff;
}

[data-theme="dark"] .ps-sta-visual.ps-source-diagram figcaption strong {
  color: #0f172a;
}

[data-theme="dark"] .ps-sta-visual figcaption strong {
  color: #f8fafc;
}

[data-theme="dark"] .ps-viz-node {
  fill: #1e293b;
  stroke: var(--ps-primary);
}

[data-theme="dark"] .ps-viz-node-accent {
  fill: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .ps-viz-title {
  fill: #f8fafc;
}

[data-theme="dark"] .ps-viz-label {
  fill: #cbd5e1;
}

[data-theme="dark"] .ps-viz-note {
  fill: #94a3b8;
}

/* Dark mode semantic box fills */
[data-theme="dark"] rect[fill="#fef2f2"],
[data-theme="dark"] rect[fill="#fee2e2"],
[data-theme="dark"] .ps-sta-visual rect[fill="#fef2f2"],
[data-theme="dark"] .ps-sta-visual rect[fill="#fee2e2"] {
  fill: var(--ps-callout-danger-bg) !important;
  stroke: var(--ps-callout-danger-border) !important;
}

[data-theme="dark"] rect[fill="#eff6ff"],
[data-theme="dark"] rect[fill="#dbeafe"],
[data-theme="dark"] .ps-sta-visual rect[fill="#eff6ff"],
[data-theme="dark"] .ps-sta-visual rect[fill="#dbeafe"] {
  fill: var(--ps-callout-info-bg) !important;
  stroke: var(--ps-callout-info-border) !important;
}

[data-theme="dark"] rect[fill="#f0fdf4"],
[data-theme="dark"] rect[fill="#dcfce7"],
[data-theme="dark"] .ps-sta-visual rect[fill="#f0fdf4"],
[data-theme="dark"] .ps-sta-visual rect[fill="#dcfce7"] {
  fill: var(--ps-callout-success-bg) !important;
  stroke: var(--ps-callout-success-border) !important;
}

[data-theme="dark"] rect[fill="#fffbeb"],
[data-theme="dark"] rect[fill="#fef3c7"],
[data-theme="dark"] .ps-sta-visual rect[fill="#fffbeb"],
[data-theme="dark"] .ps-sta-visual rect[fill="#fef3c7"] {
  fill: var(--ps-callout-warning-bg) !important;
  stroke: var(--ps-callout-warning-border) !important;
}

[data-theme="dark"] rect[fill="#faf5ff"],
[data-theme="dark"] rect[fill="#f5f3ff"],
[data-theme="dark"] .ps-sta-visual rect[fill="#faf5ff"],
[data-theme="dark"] .ps-sta-visual rect[fill="#f5f3ff"] {
  fill: var(--ps-callout-purple-bg) !important;
  stroke: var(--ps-callout-purple-border) !important;
}

/* Dark mode semantic text fills */
[data-theme="dark"] text[fill="#991b1b"],
[data-theme="dark"] text[fill="#b91c1c"],
[data-theme="dark"] text[fill="#dc2626"],
[data-theme="dark"] text[fill="#ef4444"],
[data-theme="dark"] text[fill="#f87171"],
[data-theme="dark"] .ps-sta-visual text[fill="#991b1b"],
[data-theme="dark"] .ps-sta-visual text[fill="#b91c1c"],
[data-theme="dark"] .ps-sta-visual text[fill="#dc2626"],
[data-theme="dark"] .ps-sta-visual text[fill="#ef4444"],
[data-theme="dark"] .ps-sta-visual text[fill="#f87171"] {
  fill: var(--ps-callout-danger-text) !important;
}

[data-theme="dark"] text[fill="#1e40af"],
[data-theme="dark"] text[fill="#1d4ed8"],
[data-theme="dark"] text[fill="#2563eb"],
[data-theme="dark"] text[fill="#3b82f6"],
[data-theme="dark"] text[fill="#60a5fa"],
[data-theme="dark"] .ps-sta-visual text[fill="#1e40af"],
[data-theme="dark"] .ps-sta-visual text[fill="#1d4ed8"],
[data-theme="dark"] .ps-sta-visual text[fill="#2563eb"],
[data-theme="dark"] .ps-sta-visual text[fill="#3b82f6"],
[data-theme="dark"] .ps-sta-visual text[fill="#60a5fa"] {
  fill: var(--ps-callout-info-text) !important;
}

[data-theme="dark"] text[fill="#166534"],
[data-theme="dark"] text[fill="#15803d"],
[data-theme="dark"] text[fill="#16a34a"],
[data-theme="dark"] text[fill="#22c55e"],
[data-theme="dark"] text[fill="#4ade80"],
[data-theme="dark"] .ps-sta-visual text[fill="#166534"],
[data-theme="dark"] .ps-sta-visual text[fill="#15803d"],
[data-theme="dark"] .ps-sta-visual text[fill="#16a34a"],
[data-theme="dark"] .ps-sta-visual text[fill="#22c55e"],
[data-theme="dark"] .ps-sta-visual text[fill="#4ade80"] {
  fill: var(--ps-callout-success-text) !important;
}

[data-theme="dark"] text[fill="#92400e"],
[data-theme="dark"] text[fill="#b45309"],
[data-theme="dark"] text[fill="#d97706"],
[data-theme="dark"] text[fill="#f59e0b"],
[data-theme="dark"] text[fill="#fbbf24"],
[data-theme="dark"] .ps-sta-visual text[fill="#92400e"],
[data-theme="dark"] .ps-sta-visual text[fill="#b45309"],
[data-theme="dark"] .ps-sta-visual text[fill="#d97706"],
[data-theme="dark"] .ps-sta-visual text[fill="#f59e0b"],
[data-theme="dark"] .ps-sta-visual text[fill="#fbbf24"] {
  fill: var(--ps-callout-warning-text) !important;
}

[data-theme="dark"] text[fill="#6b21a8"],
[data-theme="dark"] text[fill="#6d28d9"],
[data-theme="dark"] text[fill="#7e22ce"],
[data-theme="dark"] text[fill="#8b5cf6"],
[data-theme="dark"] text[fill="#a855f7"],
[data-theme="dark"] .ps-sta-visual text[fill="#6b21a8"],
[data-theme="dark"] .ps-sta-visual text[fill="#6d28d9"],
[data-theme="dark"] .ps-sta-visual text[fill="#7e22ce"],
[data-theme="dark"] .ps-sta-visual text[fill="#8b5cf6"],
[data-theme="dark"] .ps-sta-visual text[fill="#a855f7"] {
  fill: var(--ps-callout-purple-text) !important;
}

[data-theme="dark"] .ps-source-diagram {
  background: #1e293b;
}

[data-theme="dark"] .ps-source-diagram .ps-diagram-scroll {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
.ps-answer-footer {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--ps-line);
}
.ps-answer-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.ps-action-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ps-copy { padding: 7px 12px; border: 1px solid var(--ps-primary-border); border-radius: 8px; background: var(--ps-paper, white); color: var(--ps-primary); font-size: 11px; font-weight: 750; cursor: pointer; touch-action: manipulation; }
.ps-copy:active { background: var(--ps-primary-soft); }
.ps-share { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--ps-line); border-radius: 12px; background: var(--ps-soft); }
.ps-share > span { margin-right: 2px; color: var(--ps-muted); font-size: 12px; font-weight: 750; }
.ps-share a { padding: 7px 12px; border: 1px solid var(--ps-primary-border); border-radius: 8px; background: var(--ps-paper, white); color: var(--ps-primary); font-size: 11px; font-weight: 750; text-decoration: none; }
.ps-share a:hover { background: var(--ps-primary-soft); }
.ps-permalink { color: var(--ps-muted); font-size: 12px; text-decoration: none; }
.ps-permalink:hover { color: var(--ps-primary); }
.ps-tool-check + .ps-tool-check { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--ps-line); }
.ps-tool-check strong { display: block; margin-bottom: 8px; color: var(--ps-ink); font-size: 13px; }
.ps-tool-check code {
  display: block;
  max-width: 100%;
  padding: 13px 15px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 9px;
  background: #0f172a;
  color: #a7f3d0;
  font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.ps-tool-check p { margin-top: 8px; color: var(--ps-muted); font-size: 12px; }
.ps-self-check { margin: 24px 0; border: 1px solid var(--ps-line); border-radius: 14px; background: var(--ps-soft); }
.ps-self-check summary { padding: 16px 18px; color: var(--ps-ink); font-weight: 750; cursor: pointer; touch-action: manipulation; }
.ps-self-check div { padding: 0 18px 16px; }
.ps-complete {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--ps-primary-border);
  border-radius: 12px;
  background: var(--ps-primary-soft);
  color: var(--ps-primary-dark);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.ps-complete input { width: 20px; height: 20px; accent-color: var(--ps-primary); cursor: pointer; }
.ps-sticky-card { position: sticky; top: 96px; padding: 22px; border: 1px solid var(--ps-line); border-radius: 16px; background: var(--ps-soft); }
.ps-sticky-card ol { padding-left: 22px; font-size: 13px; }
.ps-sticky-card a { display: block; margin-top: 10px; color: var(--ps-primary); font-size: 12px; font-weight: 700; }
.ps-module-card {
  display: block;
  margin: 0 0 16px;
  border: 1px solid var(--ps-line);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--ps-card, #fff);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ps-module-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, .12); }
.ps-module-card:focus-visible { outline: 3px solid var(--ps-primary); outline-offset: 2px; }
.ps-module-card img { display: block; width: 100%; height: auto; }
.ps-module-card-caption { display: block; padding: 10px 12px 12px; }
.ps-module-eyebrow { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ps-primary); }
.ps-module-desc { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: var(--ps-text-muted, #64748b); }
.ps-module-card-mobile { display: none; margin-top: 20px; max-width: 320px; }
@media (max-width: 960px) {
  .ps-module-card-mobile { display: block; }
}
.ps-question-resource {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr);
  gap: 28px;
  align-items: center;
  width: min(820px, calc(100% - 40px));
  margin: 0 auto 28px;
  padding: 28px;
  border: 1px solid var(--ps-primary-border);
  border-radius: 18px;
  background: var(--ps-primary-soft);
}
.ps-question-resource h2 { margin: 4px 0 8px; color: var(--ps-ink); font-size: clamp(22px, 3vw, 30px); }
.ps-question-resource p { margin: 0; color: var(--ps-muted); line-height: 1.6; }
.ps-question-resource form { display: grid; gap: 10px; }
.ps-question-resource form > label:first-child { color: var(--ps-ink); font-size: 13px; font-weight: 750; }
.ps-question-resource input[type="email"] { min-height: 46px; padding: 10px 13px; border: 1px solid var(--ps-line); border-radius: 10px; background: var(--ps-card, white); color: var(--ps-ink); font: inherit; }
.ps-resource-consent { display: flex; gap: 9px; align-items: flex-start; color: var(--ps-muted); font-size: 12px; line-height: 1.45; }
.ps-resource-consent input { flex: 0 0 auto; margin-top: 3px; accent-color: var(--ps-primary); }
.ps-question-resource [data-question-resource-status]:not(:empty) { color: var(--ps-primary-dark); font-size: 13px; font-weight: 700; }
.ps-prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-bottom: 52px; }
.ps-prev-next a { padding: 18px; border: 1px solid var(--ps-line); border-radius: 14px; text-decoration: none; background: var(--ps-paper, white); transition: border-color 0.15s ease; }
.ps-prev-next a:hover { border-color: var(--ps-primary); }
.ps-prev-next a:last-child { text-align: right; }
.ps-prev-next span { display: block; color: var(--ps-primary); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.ps-prev-next strong { display: block; margin-top: 5px; color: var(--ps-ink); font-size: 13px; line-height: 1.4; }

.ps-footer { padding: 64px 0 32px; border-top: 1px solid #1e293b; background: #090d16; color: #94a3b8; }
.ps-footer .ps-brand { color: white; }
.ps-footer a { color: #94a3b8; text-decoration: none; }
.ps-footer a:hover { color: white; }
.ps-footer p { max-width: 520px; margin: 14px 0 0; color: #94a3b8; font-size: 14px; }
.ps-footer-grid { display: grid; grid-template-columns: 1.4fr .8fr 1fr; gap: 48px; }
.ps-footer nav { display: flex; align-items: flex-start; flex-direction: column; gap: 10px; }
.ps-footer nav h2 { margin-bottom: 6px; color: white; font-size: 15px; }
.ps-footer nav a { color: #94a3b8; font-size: 14px; font-weight: 500; }
.ps-footer-brand { color: white !important; }
.ps-footer-support a { color: #4ade80 !important; font-weight: 700; }
.ps-footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid #1e293b; color: #94a3b8; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media (max-width: 960px) {
  .ps-hero-grid, .ps-featured, .ps-two-column, .ps-article-layout { grid-template-columns: 1fr; }
  .ps-hero-grid { gap: 36px; }
  .ps-featured { gap: 28px; }
  .ps-steps { grid-template-columns: repeat(2, 1fr); }
  .ps-level-chooser { grid-template-columns: 1fr; }
  .ps-article-aside { display: none; }
  .ps-level-grid, .ps-related-topics, .ps-topic-library-grid { grid-template-columns: 1fr; }
  .lp-track-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-tool-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-guide-banner { align-items: flex-start; flex-direction: column; }
  .lp-guide-offer-action { width: 100%; justify-content: space-between; }
  .lp-basics-coming { align-items: flex-start; flex-direction: column; }
  .lp-chapter-grid, .lp-premium-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-premium-offer { align-items: flex-start; flex-direction: column; }
  .lp-premium-offer-action { width: 100%; justify-content: space-between; }
  .lp-bundle-card { align-items: flex-start; flex-direction: column; }
  .lp-section-intro { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 680px) {
  .ps-question-resource { grid-template-columns: 1fr; width: min(100% - 24px, 820px); padding: 20px; }
  .ps-shell, .ps-narrow { width: min(100% - 24px, 1160px); }
  .ps-nav { min-height: 58px; gap: 10px; }
  .ps-brand span:last-child { font-size: 1.1rem; }
  .ps-brand-mark { width: 30px; height: 30px; font-size: 12px; border-radius: 8px; }
  .ps-product { padding-left: 10px; }
  .ps-product span { font-size: 13px; }
  .ps-product small { display: none; }
  
  .ps-hero { padding: 42px 0 48px; }
  .ps-page-hero { padding: 34px 0 38px; }
  .ps-page-hero.ps-mmmc-hero { padding: 16px 0 20px; }
  .ps-page-hero h1 { font-size: clamp(1.75rem, 6.5vw, 2.4rem); }
  
  .ps-section { padding: 44px 0; }
  .ps-hero-panel { padding: 20px 18px; border-radius: 18px; }
  .ps-chain { font-size: 1.15rem; margin: 12px 0 18px; }
  .ps-hero-panel dl { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .ps-hero-panel dt { font-size: 1.15rem; }
  .ps-hero-panel dd { font-size: 10px; }
  
  .ps-featured { padding: 20px; }
  .ps-library-topic { padding: 22px 18px; border-radius: 16px; }
  .lp-library-hero { padding-block: 42px 48px; }
  .lp-simple-hero { padding-block: 34px 38px; }
  .lp-guide-banner { gap: 24px; padding: 20px 18px; border-radius: 17px; }
  .lp-guide-offer-action { align-items: stretch; flex-direction: column; gap: 14px; }
  .lp-guide-offer-action .ps-button { width: 100%; }
  .lp-simple-links, .lp-chapter-grid, .lp-premium-grid { grid-template-columns: minmax(0, 1fr); }
  .lp-chapter-card { min-height: 0; }
  .lp-premium-section { margin-bottom: 44px; padding-bottom: 44px; }
  .lp-premium-offer { gap: 22px; padding: 22px 18px; }
  .lp-premium-offer-action { align-items: stretch; flex-direction: column; }
  .lp-premium-offer-action .ps-button { width: 100%; }
  .lp-pdf-modal { padding: 0; }
  .lp-pdf-window { width: 100%; height: 100dvh; border-radius: 0; }
  .lp-pdf-toolbar { min-height: 68px; padding: 8px 10px; }
  .lp-pdf-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .lp-pdf-heading > strong { max-width: 175px; }
  .lp-pdf-buy { display: none; }
  .lp-pdf-pages { gap: 14px; padding: 14px 10px 34px; }
  .lp-bundle-card { padding: 22px 18px; }
  .lp-bundle-card .ps-button { width: 100%; }
  .lp-download-dialog { padding: 26px 18px 22px; }
  .lp-track-grid, .lp-tool-grid { grid-template-columns: 1fr; }
  .lp-track-card { min-height: 0; padding: 22px 18px; }
  .lp-tool-card p { min-height: 0; }
  .lp-tool-footer { align-items: stretch; flex-direction: column; padding: 20px 18px; }
  .lp-tool-footer .ps-button { width: 100%; }
  .ps-steps, .ps-level-chooser, .ps-related-questions, .ps-related-topics { grid-template-columns: 1fr; }
  
  .ps-filter { grid-template-columns: 1fr; gap: 12px; margin-bottom: 18px; }
  .ps-filter input { min-height: 46px; font-size: 16px; }
  .ps-filter-buttons { width: 100%; justify-content: flex-start; }
  .ps-filter-buttons button { flex: 1 0 auto; text-align: center; padding: 8px 11px; font-size: 12px; }
  
  .ps-question-list .ps-question-row a { grid-template-columns: 34px 1fr 14px; gap: 10px; padding: 14px 4px; }
  .ps-question-number { width: 34px; height: 34px; font-size: 11px; border-radius: 8px; }
  .ps-question-list .ps-question-row strong { font-size: 14px; }
  .ps-question-list .ps-question-row small { font-size: 12px; }
  
  .ps-guide-level + .ps-guide-level { margin-top: 40px; padding-top: 36px; }
  .ps-guide-question { padding: 18px 16px; border-radius: 16px; }
  .ps-guide-question-header { padding-right: 0; margin-bottom: 16px; }
  .ps-permalink { position: static; display: inline-block; margin-top: 10px; }
  .ps-guide-answer { padding: 14px 15px; border-left-width: 4px; border-radius: 10px; }
  .ps-guide-answer h3 { font-size: 0.95rem; }
  .ps-guide-answer p { font-size: 13.5px; }
  .ps-guide-answer > code { padding: 11px 13px; font-size: 11.5px; }
  .ps-guide-answer li code, .ps-guide-answer p code { padding: 1.5px 6px; font-size: 11.5px; }
  .ps-guide-toolbar { padding: 12px; }
  
  .ps-question-hero { padding: 32px 0 28px; }
  .ps-question-hero h1 { font-size: clamp(1.45rem, 5.5vw, 2.1rem); }
  .ps-article-layout { padding-block: 30px; gap: 24px; }
  .ps-answer-card { padding: 18px 16px; border-radius: 14px; margin-bottom: 14px; }
  .ps-answer-card h2 { font-size: 1.05rem; }
  .ps-answer-card p { font-size: 13.5px; }
  .ps-tool-check code { padding: 11px 13px; font-size: 11.5px; }
  
  .ps-self-check summary { padding: 14px 16px; font-size: 13.5px; }
  .ps-self-check div { padding: 0 16px 14px; font-size: 13.5px; }
  .ps-complete { padding: 14px 16px; font-size: 13px; border-radius: 10px; }
  
  .ps-prev-next { grid-template-columns: 1fr; gap: 10px; padding-bottom: 38px; }
  .ps-prev-next a { padding: 14px 16px; border-radius: 12px; }
  .ps-prev-next a:last-child { text-align: left; }
  
  .ps-footer { padding: 36px 0 28px; }
  .ps-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .ps-footer-bottom { align-items: flex-start; flex-direction: column; margin-top: 34px; }
}

@media (max-width: 420px) {
  .ps-hero-panel dl { grid-template-columns: 1fr; gap: 10px; }
  .ps-hero-panel dl div { padding-top: 10px; }
  .ps-actions .ps-button { width: 100%; }
}

.ps-bundle-offer {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at 50% 30%, rgba(239, 68, 68, .18), transparent 42%), rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 180ms ease;
}
.ps-bundle-offer[hidden] { display: none; }
.ps-bundle-offer.is-open { opacity: 1; }
.ps-bundle-offer-open { overflow: hidden; }
.ps-bundle-offer-card {
  position: relative;
  width: min(100%, 560px);
  padding: 32px 38px 28px;
  max-height: calc(100dvh - 40px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(251, 146, 60, 0.38);
  border-radius: 28px;
  background: radial-gradient(circle at 85% 0%, rgba(239, 68, 68, .18), transparent 34%), linear-gradient(155deg, #111827, #070b14 72%);
  box-shadow: 0 34px 100px rgba(0, 0, 0, .62), 0 0 56px rgba(239, 68, 68, .12);
  color: #f8fafc;
  text-align: center;
  transform: translateY(16px) scale(0.98);
  transition: transform 180ms ease;
}
.ps-bundle-offer-card::before { position: absolute; top: 0; left: 10%; width: 80%; height: 2px; background: linear-gradient(90deg, transparent, #fb923c, #ef4444, transparent); content: ""; }
.ps-bundle-offer.is-open .ps-bundle-offer-card { transform: translateY(0) scale(1); }
.ps-bundle-offer-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  color: #94a3b8;
  font: 500 26px/1 sans-serif;
  cursor: pointer;
}
.ps-bundle-offer-close:hover, .ps-bundle-offer-close:focus-visible { background: rgba(255,255,255,.12); color: #fff; }
.ps-bundle-offer-signal { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 14px; padding: 6px 11px; border: 1px solid rgba(251,146,60,.34); border-radius: 999px; background: rgba(251,146,60,.09); color: #fdba74; font-size: 10px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.ps-bundle-offer-signal span { width: 7px; height: 7px; border-radius: 50%; background: #f97316; box-shadow: 0 0 0 5px rgba(249,115,22,.12), 0 0 16px #f97316; animation: ps-offer-pulse 1.6s ease-in-out infinite; }
@keyframes ps-offer-pulse { 50% { opacity: .45; transform: scale(.8); } }
.ps-bundle-offer-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 19px;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 14px 34px rgba(220, 38, 38, .3);
  color: #fff;
  font: 800 16px/1 'Outfit', sans-serif;
}
.ps-bundle-offer-kicker { margin: 0 0 5px; color: #94a3b8; font-size: 11px; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
.ps-bundle-offer-card h2 { margin: 5px 0 13px; color: #fff; font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -.045em; line-height: .98; text-transform: uppercase; }
.ps-bundle-offer-card h2 em { color: #fb923c; font-style: normal; text-shadow: 0 0 28px rgba(249,115,22,.2); }
.ps-bundle-offer-card > p:not(.ps-bundle-offer-kicker) { margin: 0 auto; max-width: 49ch; color: #cbd5e1; font-size: 14px; line-height: 1.62; }
.ps-bundle-offer-outcomes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.ps-bundle-offer-outcomes li { padding: 6px 9px; border: 1px solid rgba(255,255,255,.1); border-radius: 7px; background: rgba(255,255,255,.045); color: #e2e8f0; font-size: 11px; font-weight: 700; }
.ps-bundle-offer-outcomes li::before { margin-right: 6px; color: #fb923c; content: "✓"; }
.ps-bundle-offer-price { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 18px 0; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.09); }
.ps-bundle-offer-price strong { color: #fdba74; font: 800 1.65rem/1 'Outfit', sans-serif; }
.ps-bundle-offer-price span { max-width: 230px; color: #94a3b8; font-size: 12px; text-align: left; }
.ps-bundle-offer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ps-bundle-offer-actions .ps-button-primary { border: 0; background: linear-gradient(135deg, #f97316, #dc2626); box-shadow: 0 10px 28px rgba(220,38,38,.25); }
.ps-bundle-offer-actions .ps-button-primary:hover { background: linear-gradient(135deg, #fb923c, #ef4444); }
.ps-bundle-offer-actions .ps-bundle-details { border-color: #fff; background: #fff; color: #111827; box-shadow: 0 8px 22px rgba(0,0,0,.2); }
.ps-bundle-offer-actions .ps-bundle-details:hover { border-color: #fed7aa; background: #fff7ed; color: #9a3412; transform: translateY(-1px); }
.ps-bundle-offer-later { margin-top: 14px; border: 0; background: transparent; color: #64748b; font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 540px) {
  .ps-bundle-offer { place-items: end center; padding: 0; }
  .ps-bundle-offer-card { width: 100%; max-height: 92dvh; padding: 27px 17px max(21px, env(safe-area-inset-bottom)); border-right: 0; border-bottom: 0; border-left: 0; border-radius: 24px 24px 0 0; transform: translateY(28px); }
  .ps-bundle-offer-actions { grid-template-columns: 1fr; }
  .ps-bundle-offer-price { align-items: flex-start; flex-direction: column; gap: 4px; padding-left: 4px; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-bundle-offer, .ps-bundle-offer-card { transition: none; }
  .ps-bundle-offer-signal span { animation: none; }
}

@media print {
  .ps-header, .ps-footer, .ps-copy, .ps-share, .ps-complete, .ps-article-aside, .ps-prev-next, .ps-related-questions, .ps-filter, .ps-permalink, .ps-bundle-offer { display: none !important; }
  body { color: #000; }
  .ps-question-hero, .ps-section-muted { background: white; }
  .ps-article-layout { display: block; padding: 20px 0; }
  .ps-answer-card, .ps-guide-question { break-inside: avoid; box-shadow: none; }
}

/* Free Q&A pages: bundle banner, full box and weekly-question signup (scripts/build-prepsprint.js) */
.ps-qa-cta-top { border-block: 1px solid var(--ps-primary-border); background: var(--ps-primary-soft); }
.ps-qa-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-block: 12px; }
.ps-qa-cta-row p { margin: 0; font-weight: 600; color: var(--ps-ink); }
.ps-qa-link { color: var(--ps-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ps-qa-cta-bottom { margin-top: 32px; padding-block: 28px; border-top: 1px solid var(--ps-primary-border); background: var(--ps-primary-soft); }
.ps-qa-cta-bottom h2 { margin: 0 0 12px; font-size: 1.35rem; color: var(--ps-ink); }
.ps-qa-cta-bottom ul { margin: 0 0 16px; padding-left: 1.2em; color: var(--ps-body); line-height: 1.55; }
.ps-qa-signup { margin-top: 22px; display: grid; gap: 10px; max-width: 560px; }
.ps-qa-signup[hidden] { display: none; }
.ps-qa-signup label { color: var(--ps-ink); }
.ps-qa-signup-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-qa-signup-row input { flex: 1 1 220px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--ps-line); border-radius: 8px; background: var(--ps-card, #fff); color: var(--ps-ink); font: inherit; }
.ps-qa-signup-row input:focus-visible, .ps-qa-consent input:focus-visible { outline: 2px solid var(--ps-primary); outline-offset: 2px; }
.ps-qa-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 0.875rem; line-height: 1.45; color: var(--ps-body); }
.ps-qa-consent input { margin-top: 3px; }
.ps-qa-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ps-qa-status { margin: 0; min-height: 1.3em; font-size: 0.9rem; color: var(--ps-body); }
.ps-qa-status.is-error { color: #b91c1c; }
.ps-qa-signup-only { margin-top: 16px; }
.pdv-qa-form-in-view .pdv-promo-widget, .pdv-qa-form-in-view .pdv-promo-widget-close { opacity: 0; pointer-events: none; transition: opacity .2s ease; }
