/* ==========================================================
   Prompting page — editorial precision × computational warmth
   Layered system:
     · HERO       — two-column, demo card mirrors the workspace below
     · WORKSPACE  — atmospheric ground, refined dark surface, slot live-preview
     · SECTIONS   — numbered editorial markers, single-accent rule
     · CLOSING    — staggered formula, italic emphasis
   Brand red is reserved for one thing per surface: action.
   ========================================================== */

/* ─── Page-local tokens ─── */
.chapter-page[data-chapter="prompting"] {
  --p-serif: 'Fraunces', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --p-ink: #0b1226;
  --p-ink-soft: #1a2238;
  --p-paper: #f6f3ec;            /* warm paper, atmospheric only */
  --p-paper-edge: #e8e1d3;
  --p-grid: rgba(15, 23, 41, 0.06);
  --p-rule: rgba(15, 23, 41, 0.10);
  --p-rule-soft: rgba(15, 23, 41, 0.06);
  --p-glow: rgba(230, 30, 40, 0.08);
}

/* =========================================================
   HERO — uses the standard .sub-hero / .sub-hero-inner shell
   from base.css. We only add prompting-specific touches:
   the twin CTA row + the right-side anatomy diagram.
   ========================================================= */

/* Twin CTA row — primary (try) + secondary (read) */
.prompt-hero-cta-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.prompt-hero-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px 12px 24px;
  background: var(--navy);
  color: white;
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  letter-spacing: -.005em;
  border-radius: 100px;
  transition: transform .25s var(--ease-out), box-shadow .25s, background .25s;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 22px -8px rgba(15,23,41,.22);
}
.prompt-hero-cta:hover {
  background: var(--red);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 12px 28px -8px rgba(230,30,40,.32);
}
.prompt-hero-cta svg {
  width: 14px; height: 14px;
  transition: transform .25s var(--ease-spring);
}
.prompt-hero-cta:hover svg { transform: translateY(2px); }

.prompt-hero-cta-alt {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: white;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  transition: border-color .25s var(--ease-out), transform .25s, box-shadow .25s;
}
.prompt-hero-cta-alt:hover {
  border-color: var(--navy-soft);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -8px rgba(15,23,41,.18);
}
.prompt-hero-cta-alt svg {
  width: 15px; height: 15px;
  color: var(--red);
  flex-shrink: 0;
}
.prompt-hero-cta-meta {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
  padding: 3px 8px;
  background: var(--bg-alt);
  border-radius: 100px;
  margin-left: 2px;
}

@media (max-width: 600px) {
  .prompt-hero-cta-row { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   ANATOMY OF A PROMPT — chapter visual on the right of the hero
   Matches the rhythm of the foundations radar / advisor's-day clock:
   a single conceptual diagram that teaches what a prompt is.
   ========================================================= */
.anatomy-wrap {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  perspective: 1200px;
}
.anatomy-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px 22px 18px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 32px 60px -28px rgba(15,23,41,.20),
    0 12px 24px -12px rgba(15,23,41,.10);
  transform: rotate(-.6deg);
  transition: transform .5s var(--ease-out);
  position: relative;
}
.anatomy-card:hover { transform: rotate(0deg); }
.anatomy-card::before {
  /* paper-edge dot, like a stamp on a brief */
  content: '';
  position: absolute;
  top: 14px; right: 14px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(230,30,40,.12);
}

.anatomy-hd {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
  padding-right: 18px; /* breathe past the corner dot */
}
.anatomy-hd-rule {
  flex: 1; height: 1px;
  background: var(--border);
}
.anatomy-hd-rule:first-child { max-width: 18px; }
.anatomy-hd-label {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--slate);
}

.anatomy-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
}
.anatomy-row {
  display: grid;
  grid-template-columns: 28px 86px 1fr;
  align-items: start;
  gap: 12px;
  padding: 11px 4px 11px 12px;
  border-left: 2px solid var(--ar-color, var(--red));
  border-radius: 0 8px 8px 0;
  transition: background .25s var(--ease-out), padding-left .3s var(--ease-out);
  position: relative;
}
.anatomy-row + .anatomy-row { margin-top: 2px; }
.anatomy-row:hover {
  background: var(--bg-alt);
  padding-left: 16px;
}
.anatomy-num {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .12em;
  color: var(--ar-color, var(--red));
  padding-top: 2px;
}
.anatomy-key {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  letter-spacing: -.005em;
  color: var(--navy);
  padding-top: 1px;
}
.anatomy-val {
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--slate);
}

.anatomy-ft {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  font-size: 11.5px;
  color: var(--muted);
  font-style: italic;
}
.anatomy-ft-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

@media (max-width: 880px) {
  .anatomy-wrap { max-width: 100%; }
  .anatomy-row { grid-template-columns: 24px 76px 1fr; gap: 10px; }
  .anatomy-key { font-size: 12.5px; }
  .anatomy-val { font-size: 12px; }
}

/* =========================================================
   SECTION SYSTEM — numbered editorial markers
   ========================================================= */
.p-sec .sec-hd { text-align: left; margin-bottom: 36px; }
.p-sec-hd {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: start;
  padding-right: 0 !important; /* override pb-collapse padding */
}
.p-sec-num {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 700;
  letter-spacing: .14em;
  color: var(--red);
  padding-top: 4px;
  position: relative;
}
.p-sec-num::after {
  content: '';
  display: block;
  margin-top: 8px;
  width: 24px; height: 1px;
  background: var(--p-ink);
  opacity: .25;
}
.p-sec-body { min-width: 0; }
.p-sec-body .sec-label { margin-bottom: 8px; }
.p-sec-body .sec-title { margin-bottom: 8px; font-size: 28px; }
.p-sec-body .sec-desc { margin: 0; max-width: 540px; }

.p-sec-open {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: white;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--p-ink-soft);
  align-self: center;
  transition: border-color .25s var(--ease-out), color .25s, background .25s, transform .25s;
}
.p-sec-open svg {
  width: 12px; height: 12px;
  transition: transform .35s var(--ease-out);
}
.pb-collapse:not(.is-collapsed) .p-sec-open .p-sec-open-label::before {
  content: 'Close ';
}
.pb-collapse:not(.is-collapsed) .p-sec-open .p-sec-open-label {
  font-size: 0;
}
.pb-collapse:not(.is-collapsed) .p-sec-open .p-sec-open-label::before {
  font-size: 11px;
}
.pb-collapse:not(.is-collapsed) .p-sec-open svg { transform: rotate(180deg); }
.pb-collapse:hover .p-sec-open {
  border-color: var(--red);
  color: var(--red);
  background: white;
}

/* Disable the default base.css chevron on .pb-collapse — we use .p-sec-open instead */
.p-sec.pb-collapse > .container > .sec-hd::after,
.p-sec.pb-collapse.is-collapsed > .container > .sec-hd::after {
  display: none !important;
}

/* The static reference section uses the same marker but no Open pill */
.p-sec-static .p-sec-hd {
  grid-template-columns: auto 1fr;
  margin-bottom: 28px;
}

@media (max-width: 720px) {
  .p-sec-hd {
    grid-template-columns: auto 1fr;
    gap: 16px;
  }
  .p-sec-open {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 8px;
  }
  .p-sec-body .sec-title { font-size: 22px; }
}

/* =========================================================
   INTRO — "What's a prompt?" 60-second teach
   Sits between hero and workspace. Editorial card with
   the 5-ingredients framework on the right.
   ========================================================= */
.p-intro {
  padding: 56px 24px 40px;
  background:
    linear-gradient(180deg, #fdfcf9 0%, #fbf8f1 100%);
  position: relative;
  isolation: isolate;
}
.p-intro::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--p-grid) 1px, transparent 1px);
  background-size: 96px 100%;
  background-position: 50% 0;
  mask-image: linear-gradient(180deg, transparent 0%, black 30%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 30%, black 70%, transparent 100%);
  opacity: .6;
  pointer-events: none;
  z-index: -1;
}
.p-intro .container { max-width: 1180px; }

.p-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.p-intro-mark {
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
}
.p-intro-mark-num {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em;
  color: var(--red);
}
.p-intro-mark-rule {
  display: block; width: 24px; height: 1px;
  background: var(--p-ink); opacity: .35;
}
.p-intro-mark-label {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--p-ink-soft);
}

.p-intro-lede {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.35;
  letter-spacing: -.01em;
  color: var(--p-ink);
  margin: 0 0 18px;
  font-weight: 500;
}
.p-intro-lede em {
  font-family: var(--p-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--red);
}
.p-intro-body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--slate);
  margin: 0 0 22px;
  max-width: 520px;
}
.p-intro-skip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 16px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--p-ink-soft);
  background: white;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all .2s var(--ease-out);
}
.p-intro-skip:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateX(2px);
}
.p-intro-skip svg {
  width: 13px; height: 13px;
  transition: transform .25s var(--ease-spring);
}
.p-intro-skip:hover svg { transform: translateX(3px); }

/* The 5 ingredients — numbered editorial list */
.p-intro-pills {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 56px -32px rgba(15,23,41,.18);
}
.p-intro-pill {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  transition: background .2s, padding-left .25s var(--ease-out);
}
.p-intro-pill:last-child { border-bottom: none; }
.p-intro-pill:hover {
  background: var(--bg-alt);
  padding-left: 24px;
}
.p-intro-pill-num {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em;
  color: var(--muted);
}
.p-intro-pill strong {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  letter-spacing: -.005em;
  color: var(--p-ink);
}
.p-intro-pill em {
  font-family: var(--p-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--slate);
  text-align: right;
  font-weight: 400;
}
.p-intro-pill-accent {
  background: linear-gradient(90deg, transparent 0%, rgba(230,30,40,.04) 100%);
}
.p-intro-pill-accent .p-intro-pill-num { color: var(--red); }
.p-intro-pill-accent strong { color: var(--red); }

@media (max-width: 980px) {
  .p-intro { padding: 44px 20px 32px; }
  .p-intro-grid { grid-template-columns: 1fr; gap: 28px; }
  .p-intro-pill em { display: none; }
  .p-intro-pill { grid-template-columns: 36px 1fr; }
}

/* Reading-time meta on chapter markers */
.p-sec-num-read {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: .12em;
  color: var(--muted);
  margin-left: 2px;
}

/* =========================================================
   QUIET section primitives — keep tighter rhythm
   ========================================================= */
.sec-quiet { padding-top: 64px; padding-bottom: 64px; }

/* =========================================================
   WORKSPACE
   ========================================================= */
.sec-workspace {
  position: relative;
  padding: 24px 24px 88px;
  background: #fdfcf9;
  isolation: isolate;
}
.sec-workspace .container { max-width: 1180px; position: relative; z-index: 1; }
.ws-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 50% 40% at 80% 30%, rgba(230,30,40,.05), transparent 70%),
    radial-gradient(ellipse 60% 50% at 0% 80%, rgba(15,23,41,.04), transparent 70%);
}
.ws-bg::after {
  /* faint dot grid only inside workspace section */
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(15,23,41,.07) 1px, transparent 0);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, black, transparent 92%);
  -webkit-mask-image: linear-gradient(180deg, black, transparent 92%);
  opacity: .6;
}

.ws-eyebrow {
  display: flex; align-items: center; gap: 14px;
  margin: 8px 0 18px;
  padding-bottom: 16px;
}
.ws-eyebrow-num {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--p-ink);
}
.ws-eyebrow-rule {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--p-rule) 0%, transparent 100%);
}
.ws-eyebrow-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--slate);
}
.ws-eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,.18);
  animation: ws-dot-pulse 2.4s ease-in-out infinite;
}
@keyframes ws-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(22,163,74,.16); }
  50%      { box-shadow: 0 0 0 7px rgba(22,163,74,.04); }
}

.ws-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 18px;
}

/* ── Left: chat surface ── */
.ws-chat {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 24px 56px -28px rgba(15,23,41,.18),
    0 8px 18px -10px rgba(15,23,41,.10);
  display: flex; flex-direction: column;
  overflow: hidden;
  /* Fixed height so the page below doesn't shift as the thread grows */
  height: 620px;
  min-height: 0;
}
.ws-chat-hd {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, #fdfcf9 0%, white 100%);
}
.ws-chat-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--p-ink);
}
.ws-chat-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(230,30,40,.12);
  animation: ws-chat-pulse 2.6s ease-in-out infinite;
}
@keyframes ws-chat-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(230,30,40,.12); }
  50%      { box-shadow: 0 0 0 6px rgba(230,30,40,.04); }
}
.ws-chat-reset {
  width: 30px; height: 30px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--border); background: white;
  color: var(--slate); cursor: pointer;
  transition: all .2s var(--ease-out);
}

/* Reverse cross-link: from Prompt Coach back to Solution Advisor */
.coach-advisor-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  background: white;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all .2s var(--ease-out);
  white-space: nowrap;
}
.coach-advisor-link svg {
  width: 13px; height: 13px;
  color: var(--red);
  flex-shrink: 0;
}
.coach-advisor-link:hover {
  background: var(--red-light, rgba(230,30,40,.06));
  border-color: var(--red);
  color: var(--navy);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -4px rgba(230,30,40,.25);
}

/* Handoff banner — appears above the chat thread when arriving from Solution Advisor */
.coach-handoff {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 0;
  background: linear-gradient(180deg, rgba(230,30,40,.06) 0%, rgba(230,30,40,.02) 100%);
  border-bottom: 1px solid color-mix(in srgb, var(--red) 18%, transparent);
  border-left: 3px solid var(--red);
  animation: coach-handoff-in .4s ease-out both;
}
@keyframes coach-handoff-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.coach-handoff-icon {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: white;
  border-radius: 8px;
  flex-shrink: 0;
}
.coach-handoff-icon svg { width: 16px; height: 16px; }
.coach-handoff-text { min-width: 0; line-height: 1.4; }
.coach-handoff-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--navy);
  letter-spacing: -.005em;
}
.coach-handoff-title a {
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}
.coach-handoff-title a:hover { border-bottom-style: solid; }
.coach-handoff-sub {
  font-size: 12.5px;
  color: var(--navy-soft);
  margin-top: 2px;
}
.coach-handoff-tool {
  display: inline-block;
  margin-right: 4px;
}
.coach-handoff-tool strong {
  color: var(--navy);
  font-weight: 700;
}
.coach-handoff-dismiss {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all .15s;
}
.coach-handoff-dismiss:hover {
  color: var(--red);
  background: rgba(230,30,40,.08);
}

@media (max-width: 720px) {
  .coach-advisor-link span { display: none; }
  .coach-advisor-link { padding: 7px 10px; }
  .coach-handoff { grid-template-columns: 28px 1fr; gap: 10px; padding: 10px 14px; }
  .coach-handoff-icon { width: 28px; height: 28px; }
  .coach-handoff-icon svg { width: 14px; height: 14px; }
  .coach-handoff-dismiss { grid-column: 2; justify-self: end; }
}

/* ════════════════════════════════════════════════════════════
   Prominent Solution Advisor CTA — below the chat workspace
   Bigger than the small header pill so it actually gets noticed.
   ════════════════════════════════════════════════════════════ */
.p-advisor-cta {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 22px;
  margin: 32px auto 0;
  max-width: 1100px;
  padding: 22px 26px;
  background: linear-gradient(135deg, white 0%, #fdfcf9 100%);
  border: 1px solid color-mix(in srgb, var(--red) 28%, var(--border));
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  isolation: isolate;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,.7) inset,
    0 1px 2px rgba(15,23,42,.04),
    0 14px 36px -18px rgba(15,23,42,.18);
  transition: transform .25s var(--ease-out), box-shadow .3s, border-color .25s;
}
.p-advisor-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--red) 0%, color-mix(in srgb, var(--red) 35%, transparent) 100%);
}
.p-advisor-cta::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(420px 240px at 100% 100%, rgba(230,30,40,.07), transparent 60%);
  pointer-events: none;
  z-index: -1;
}
.p-advisor-cta:hover {
  transform: translateY(-2px);
  border-color: var(--red);
  box-shadow:
    0 1px 0 rgba(255,255,255,.7) inset,
    0 6px 14px rgba(15,23,42,.06),
    0 22px 48px -16px color-mix(in srgb, var(--red) 30%, rgba(15,23,42,.18));
}
.p-advisor-cta-icon {
  width: 64px; height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--red) 0%, color-mix(in srgb, var(--red) 70%, #000) 100%);
  color: white;
  border-radius: 16px;
  box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--red) 60%, transparent);
  flex-shrink: 0;
}
.p-advisor-cta-icon svg { width: 28px; height: 28px; }
.p-advisor-cta-text { min-width: 0; }
.p-advisor-cta-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 4px;
}
.p-advisor-cta-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 6px;
}
.p-advisor-cta-sub {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--navy-soft);
  max-width: 640px;
}
.p-advisor-cta-arrow {
  width: 48px; height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--red);
  flex-shrink: 0;
  transition: transform .3s var(--ease-out), background .25s, border-color .25s;
}
.p-advisor-cta-arrow svg { width: 18px; height: 18px; }
.p-advisor-cta:hover .p-advisor-cta-arrow {
  background: var(--red);
  border-color: var(--red);
  color: white;
  transform: translateX(4px) scale(1.05);
}

@media (max-width: 720px) {
  .p-advisor-cta {
    grid-template-columns: 48px 1fr;
    gap: 14px;
    padding: 18px 18px;
  }
  .p-advisor-cta-icon { width: 48px; height: 48px; }
  .p-advisor-cta-icon svg { width: 22px; height: 22px; }
  .p-advisor-cta-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .p-advisor-cta,
  .p-advisor-cta-arrow { transition: none !important; }
  .p-advisor-cta:hover { transform: none; }
  .p-advisor-cta:hover .p-advisor-cta-arrow { transform: none; }
}
.ws-chat-reset svg { width: 13px; height: 13px; }
.ws-chat-reset:hover { background: var(--bg-alt); color: var(--p-ink); border-color: var(--border); }

.ws-chat .coach-thread {
  flex: 1 1 auto;
  /* min-height:0 is required for overflow-y to work inside a flex column parent */
  min-height: 0;
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background:
    linear-gradient(180deg, white 0%, #fdfcf9 100%);
}
.ws-chat .coach-thread::-webkit-scrollbar { width: 6px; }
.ws-chat .coach-thread::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Messages */
.coach-msg {
  display: flex; gap: 12px; align-items: flex-start;
  animation: fadeUp .35s var(--ease-out);
}
.coach-msg-bot { justify-content: flex-start; }
.coach-msg-user { justify-content: flex-end; }
.coach-msg-user .coach-bubble {
  background: var(--p-ink);
  color: white;
  border-color: var(--p-ink);
}
.coach-msg-user .coach-bubble p { color: rgba(255,255,255,.92); }
.coach-msg-user .coach-bubble strong { color: white; }
.coach-msg-user .coach-avatar { display: none; }

.coach-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: var(--red);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid #fecaca;
}
.coach-avatar svg { width: 16px; height: 16px; }

.coach-bubble {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 12px 16px;
  max-width: 78%;
  font-size: 14px;
  line-height: 1.6;
  color: var(--p-ink);
  box-shadow: 0 1px 2px rgba(15,23,41,.04);
}
.coach-bubble p { margin: 0; }
.coach-bubble p + p { margin-top: 6px; }
.coach-bubble strong { color: var(--p-ink); font-weight: 600; }
.coach-bubble .coach-hint { font-size: 12px; color: var(--slate); margin-top: 6px; }
.coach-bubble .coach-parsed {
  font-size: 12px;
  color: var(--slate);
  font-style: italic;
  margin-bottom: 4px;
}
.coach-beta-notice {
  font-size: 12px;
  color: var(--slate);
  font-style: italic;
  margin: 0;
}
.coach-beta-notice a {
  color: inherit;
  text-decoration: underline;
}
.coach-beta-notice a:hover {
  color: var(--p-ink, #1f2937);
}

/* v5: score badge shown above the result panel */
.cr-score-badge {
  border: 1px solid var(--line, #e2e6ec);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0 12px;
  background: var(--surface, #fff);
}
.cr-score-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}
.cr-score-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--p-ink, #1f2937);
}
.cr-score-of {
  font-size: 12px;
  color: var(--slate, #6b7280);
}
.cr-score-label {
  font-size: 13px;
  margin-left: 8px;
  color: var(--slate, #6b7280);
}
.cr-score-missing {
  font-size: 12px;
  color: var(--slate, #6b7280);
}
.cr-score-excellent { border-left: 4px solid #16a34a; }
.cr-score-good      { border-left: 4px solid #2563eb; }
.cr-score-ok        { border-left: 4px solid #d97706; }
.cr-score-weak      { border-left: 4px solid #dc2626; }

.coach-typing {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 0;
}
.coach-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
  animation: coach-typing 1.4s ease-in-out infinite both;
}
.coach-typing span:nth-child(2) { animation-delay: .15s; }
.coach-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes coach-typing {
  0%, 80%, 100% { opacity: .25; transform: scale(.8); }
  40% { opacity: 1; transform: scale(1); }
}

.coach-error { font-size: 12px; color: #dc2626; }

/* Coach feedback bubble — structured "picked / asked / implicit" panel */
.coach-msg-feedback .coach-avatar-fb {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-color: #fcd34d;
  color: #b45309;
}
.coach-bubble-feedback {
  background: linear-gradient(180deg, #fffbeb 0%, #fefce8 100%);
  border: 1px solid #fde68a;
  padding: 14px 16px;
  max-width: 90%;
  display: flex; flex-direction: column; gap: 10px;
}
.coach-fb-title {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: #b45309;
  display: flex; align-items: center; gap: 8px;
}
.coach-fb-title::before {
  content: '';
  width: 14px; height: 1px;
  background: #d97706;
  border-radius: 1px;
}
.coach-fb-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(217,119,6,.18);
  border-radius: 10px;
}
.coach-fb-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: white;
  border: 1px solid currentColor;
}
.coach-fb-icon svg { width: 12px; height: 12px; }
.coach-fb-row > div { min-width: 0; flex: 1; }
.coach-fb-key {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: 2px;
  color: var(--p-ink);
  opacity: .65;
}
.coach-fb-val {
  font-size: 13px;
  color: var(--p-ink);
  line-height: 1.5;
}
.coach-fb-picked .coach-fb-icon { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.coach-fb-picked .coach-fb-icon svg { color: #15803d; }
.coach-fb-asked .coach-fb-icon { color: #b45309; background: #fff7ed; border-color: #fed7aa; }
.coach-fb-asked .coach-fb-icon svg { color: #b45309; }
.coach-fb-implicit .coach-fb-icon { color: var(--slate); background: white; border-color: var(--border); }
.coach-fb-implicit .coach-fb-icon svg { color: var(--slate); }
.coach-fb-implicit { background: rgba(255,255,255,.5); border-color: var(--border-light); }
.coach-fb-implicit .coach-fb-val { color: var(--slate); font-style: italic; font-family: var(--p-serif); font-size: 14px; }

/* Technical-kind feedback tags */
.coach-fb-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px;
}
.coach-fb-tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  background: white;
  border: 1px solid #d97706;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: #b45309;
}

/* Coaching tip row — the "for next time" takeaway */
.coach-fb-tip {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border: 1px solid rgba(230,30,40,.20);
  border-left: 3px solid var(--red);
  border-radius: 10px;
  margin-top: 4px;
}
.coach-fb-tip .coach-fb-icon {
  background: white;
  border-color: var(--red);
  color: var(--red);
}
.coach-fb-tip .coach-fb-icon svg { color: var(--red); }
.coach-fb-tip .coach-fb-key {
  color: var(--red);
  opacity: 1;
}
.coach-fb-tip .coach-fb-val {
  color: var(--p-ink);
  font-family: var(--p-serif);
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.55;
}

/* Starter chips above composer — small icon + label */
.ws-starters {
  display: flex; flex-direction: column; gap: 8px;
  padding: 4px 18px 0;
  background: transparent;
}
.ws-starters-label {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
  padding-left: 2px;
}
.ws-starters-row {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.ws-starter {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px 7px 11px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--p-ink-soft);
  cursor: pointer;
  transition: all .2s var(--ease-out);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset;
}
.ws-starter svg {
  width: 13px; height: 13px;
  color: var(--slate);
  transition: color .2s, transform .25s var(--ease-spring);
}
.ws-starter:hover {
  border-color: var(--p-ink);
  color: var(--p-ink);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -4px rgba(15,23,41,.16);
}
.ws-starter:hover svg { color: var(--red); transform: scale(1.08); }
.ws-starter:active { transform: translateY(0); }

/* Composer */
.ws-chat .coach-composer {
  display: flex; align-items: flex-end; gap: 10px;
  border-top: 1px solid var(--border-light);
  background: white;
  padding: 14px 16px;
  margin-top: 14px;
}
.ws-chat .coach-composer textarea {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  padding: 12px 14px;
  min-height: 48px; max-height: 140px;
  background: #fdfcf9;
  color: var(--p-ink);
  resize: none; outline: none;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.ws-chat .coach-composer textarea::placeholder {
  color: var(--muted);
  font-style: italic;
}
.ws-chat .coach-composer textarea:focus {
  background: white;
  border-color: var(--p-ink);
  box-shadow: 0 0 0 4px rgba(15,23,41,.06);
}
.ws-chat .coach-send {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--p-ink);
  color: white;
  border: none;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .25s var(--ease-out);
}
.ws-chat .coach-send svg {
  width: 16px; height: 16px;
  transition: transform .35s var(--ease-spring);
}
.ws-chat .coach-send:hover {
  background: var(--red);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -6px rgba(230,30,40,.4);
}
.ws-chat .coach-send:hover svg { transform: translate(2px, -2px); }
.ws-chat .coach-send:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Right: live preview (refined dark surface) ── */
.ws-preview {
  position: relative;
  background:
    linear-gradient(180deg, #131c33 0%, #0b1226 60%, #0a0f20 100%);
  border-radius: 20px;
  display: flex; flex-direction: column;
  overflow: hidden;
  /* Match chat height so cards stay aligned */
  height: 620px;
  min-height: 0;
  box-shadow:
    0 1px 0 rgba(255,255,255,.06) inset,
    0 24px 56px -28px rgba(11,18,38,.5),
    0 12px 24px -12px rgba(11,18,38,.3);
  border: 1px solid #161f3a;
}
.ws-preview::before {
  /* subtle scanline atmosphere */
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0px, rgba(255,255,255,.012) 1px, transparent 1px, transparent 3px);
  pointer-events: none;
  opacity: .6;
  mix-blend-mode: overlay;
}
.ws-preview::after {
  /* warm glow */
  content: '';
  position: absolute;
  top: -40%; right: -30%;
  width: 80%; height: 80%;
  background: radial-gradient(circle, rgba(230,30,40,.18), transparent 60%);
  pointer-events: none;
  filter: blur(20px);
}

.ws-preview-hd {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  position: relative;
  z-index: 1;
}
.ws-preview-hd-l {
  display: flex; align-items: center; gap: 14px;
  min-width: 0;
}
.ws-preview-traffic {
  display: inline-flex; align-items: center; gap: 6px;
}
.ws-preview-traffic i {
  width: 10px; height: 10px; border-radius: 50%;
  display: block;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.08);
}
.ws-preview-traffic i:nth-child(1) { background: rgba(255,255,255,.08); }
.ws-preview-status {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: .04em;
  color: rgba(255,255,255,.5);
}
.ws-preview-tabs {
  display: flex; gap: 2px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
  padding: 2px;
}
.ws-preview-tabs[hidden] { display: none; }
.ws-pt {
  padding: 5px 11px;
  background: transparent; border: none;
  font-family: var(--font-body);
  font-size: 11.5px; font-weight: 600;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  border-radius: 6px;
  transition: color .2s, background .2s;
}
.ws-pt:hover { color: white; }
.ws-pt.active {
  color: white;
  background: rgba(255,255,255,.10);
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset;
}

.ws-preview-body {
  flex: 1;
  position: relative; z-index: 1;
  padding: 24px 26px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.85;
  color: rgba(255,255,255,.82);
  white-space: pre-wrap; overflow-y: auto; margin: 0;
  scrollbar-width: thin;
}
.ws-preview-body::-webkit-scrollbar { width: 6px; }
.ws-preview-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }

.ws-preview-body .pv-empty {
  color: rgba(255,255,255,.35); font-style: italic;
  display: block; padding: 6px 0 14px;
}
.ws-preview-body .pv-skeleton {
  display: flex; flex-direction: column;
  gap: 10px;
}
.ws-preview-body .pv-row {
  display: flex; align-items: baseline; gap: 14px;
  padding: 10px 14px;
  border-left: 2px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.025);
  border-radius: 0 8px 8px 0;
  transition: border-color .35s var(--ease-out), background .35s, padding .35s;
}
.ws-preview-body .pv-row.is-filled {
  border-left-color: #4ade80;
  background: rgba(74,222,128,.06);
  box-shadow: -2px 0 12px -4px rgba(74,222,128,.2);
}
.ws-preview-body .pv-row.is-asking {
  border-left-color: #fbbf24;
  background: rgba(251,191,36,.05);
  box-shadow: -2px 0 12px -4px rgba(251,191,36,.2);
}
.ws-preview-body .pv-key {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.45);
  min-width: 96px; flex-shrink: 0;
}
.ws-preview-body .pv-row.is-filled .pv-key { color: #4ade80; }
.ws-preview-body .pv-row.is-asking .pv-key { color: #fbbf24; }
.ws-preview-body .pv-val {
  color: rgba(255,255,255,.88);
  font-family: var(--font-body);
  font-size: 13px; line-height: 1.55;
}
.ws-preview-body .pv-val.placeholder {
  color: rgba(255,255,255,.32);
  font-family: var(--p-serif);
  font-style: italic;
  font-size: 14px;
}
.ws-preview-body .pv-asking-cursor {
  display: inline-block; width: 6px; height: 12px;
  background: #fbbf24; vertical-align: -1px; margin-left: 4px;
  animation: pv-blink 1s steps(2) infinite;
}
@keyframes pv-blink { 50% { opacity: 0; } }

/* Final tinted prompt — restraint on accents */
.ws-preview-body .k-role { color: #f9a8d4; font-weight: 600; }
.ws-preview-body .k-task { color: #5eead4; font-weight: 600; }
.ws-preview-body .k-in   { color: #fdba74; font-weight: 600; }
.ws-preview-body .k-aud  { color: #93c5fd; font-weight: 600; }
.ws-preview-body .k-ctx  { color: #c4b5fd; font-weight: 600; }
.ws-preview-body .k-con  { color: #fcd34d; font-weight: 600; }
.ws-preview-body .k-out  { color: #fca5a5; font-weight: 600; }
.ws-preview-body[contenteditable="true"] {
  outline: 2px solid rgba(255,255,255,.35);
  outline-offset: -2px;
  background: rgba(0,0,0,.18);
}

.ws-preview-ft {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,.07);
  background: rgba(0,0,0,.22);
  backdrop-filter: blur(2px);
}
@media (prefers-reduced-transparency: reduce) {
  .ws-preview-ft { backdrop-filter: none; background: #080c19; }
}
.ws-preview-actions {
  display: flex; gap: 6px;
  padding: 14px 16px;
  flex-wrap: wrap;
}
.ws-preview-actions .cr-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 12.5px; font-weight: 600;
  color: rgba(255,255,255,.85);
  cursor: pointer;
  transition: all .2s;
}
.ws-preview-actions .cr-btn svg { width: 13px; height: 13px; }
.ws-preview-actions .cr-btn:hover:not(:disabled) {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
  color: white;
}
.ws-preview-actions .cr-btn.primary {
  background: var(--red);
  border-color: var(--red);
  color: white;
  box-shadow: 0 6px 18px -8px rgba(230,30,40,.6);
}
.ws-preview-actions .cr-btn.primary:hover:not(:disabled) {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-1px);
}
.ws-preview-actions .cr-btn.copied {
  background: rgba(74,222,128,.18);
  border-color: rgba(74,222,128,.35);
  color: #86efac;
}
.ws-preview-actions .cr-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Next-step strip */
.ws-preview .cr-next {
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; flex-direction: column; gap: 8px;
}
.ws-preview .cr-next[hidden] { display: none; }
.ws-preview .cr-next-label {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.4);
}
.ws-preview .cr-next-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-preview .cr-next-card {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  transition: all .2s var(--ease-out);
}
.ws-preview .cr-next-card:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
  color: white;
  transform: translateY(-1px);
}
.ws-preview .cr-next-card svg { width: 11px; height: 11px; color: var(--red); }
.ws-preview .cr-next-card-meta {
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-left: 2px;
}

@media (max-width: 1080px) {
  .ws-grid { grid-template-columns: 1fr; }
  .ws-preview { height: 480px; }
  .ws-chat { height: 540px; }
}
@media (max-width: 720px) {
  .sec-workspace { padding-bottom: 56px; }
  .ws-grid { gap: 14px; }
  .ws-chat .coach-thread { padding: 16px; }
  .ws-preview-body { padding: 18px 20px; font-size: 12px; }
  .ws-starters { padding: 4px 14px 0; }
  .ws-eyebrow { gap: 10px; }
}

/* =========================================================
   REFERENCE disclosures — neutralised, numbered
   ========================================================= */
.ref-grid {
  max-width: 920px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 8px;
}
.ref-item {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  transition: border-color .25s var(--ease-out), box-shadow .25s;
}
.ref-item[open] {
  border-color: var(--border);
  box-shadow: 0 8px 24px -16px rgba(15,23,41,.18);
}
.ref-item summary {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  cursor: pointer; list-style: none; user-select: none;
  font-size: 14px; color: var(--p-ink-soft);
}
.ref-item summary::-webkit-details-marker { display: none; }
.ref-summary-l {
  display: flex; align-items: center; gap: 12px;
  flex: 1; min-width: 0;
}
.ref-mark {
  font-family: var(--p-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--red);
  font-weight: 500;
  width: 22px; flex-shrink: 0;
  text-align: center;
}
.ref-summary-l strong { color: var(--p-ink); font-weight: 700; }
.ref-chev {
  width: 14px; height: 14px;
  color: var(--muted); flex-shrink: 0;
  transition: transform .3s var(--ease-out);
}
.ref-item[open] .ref-chev { transform: rotate(180deg); color: var(--red); }
.ref-body {
  padding: 8px 20px 20px;
  border-top: 1px solid var(--border-light);
}
.ref-pills {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 14px;
}
.ref-pill {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 13px; color: var(--slate);
  padding: 10px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: 8px;
}
.ref-pill-num {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .1em;
  color: var(--muted);
  flex-shrink: 0;
}
.ref-pill strong { color: var(--p-ink); font-weight: 700; }
.ref-pill-accent { border-left: 2px solid var(--red); }
.ref-pill-accent .ref-pill-num { color: var(--red); }
.ref-note {
  margin-top: 14px;
  font-size: 12.5px;
  font-family: var(--p-serif);
  font-style: italic;
  color: var(--muted);
}
.ref-list {
  list-style: none; padding-top: 14px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px;
}
.ref-list li {
  font-size: 13px; color: var(--p-ink-soft); line-height: 1.55;
  padding-left: 16px; position: relative;
}
.ref-list li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--red);
  opacity: .5;
}
.ref-list li strong { color: var(--p-ink); font-weight: 600; }

@media (max-width: 720px) {
  .ref-pills { grid-template-columns: 1fr; }
  .ref-list { grid-template-columns: 1fr; }
}

/* Quieter pp-card / tr-item shadows when in quiet section */
.sec-quiet .pp-card { box-shadow: none; }
.sec-quiet .pp-card:hover { box-shadow: 0 8px 24px -16px rgba(15,23,41,.18); }
.sec-quiet .tr-item { box-shadow: none; }
.sec-quiet .tr-item[open] { box-shadow: 0 8px 24px -16px rgba(15,23,41,.18); }

/* =========================================================
   COMMON WORKFLOW CARDS (.pp-*)
   ========================================================= */
.pp-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  max-width: 1100px; margin: 0 auto;
}
.pp-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.pp-card:hover {
  border-color: transparent;
  box-shadow: 0 16px 40px -20px rgba(15,23,41,.2);
  transform: translateY(-2px);
}
.pp-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pp-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--red); }
.pp-cat {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--slate);
}
.pp-lift {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: #15803d;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  padding: 3px 8px; border-radius: 100px;
}
.pp-lift svg { width: 10px; height: 10px; }
.pp-card h3 {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  letter-spacing: -.01em;
}
.pp-when { font-size: 13px; color: var(--slate); line-height: 1.55; }
.pp-when strong { color: var(--p-ink); font-weight: 600; }
.pp-preview {
  font-family: var(--font-mono);
  font-size: 11.5px; line-height: 1.55;
  color: var(--p-ink-soft);
  padding: 10px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  max-height: 56px; overflow: hidden;
  position: relative;
}
.pp-preview::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 22px;
  background: linear-gradient(to bottom, transparent, var(--bg-alt));
  pointer-events: none;
}
.pp-actions { display: flex; gap: 8px; align-items: center; margin-top: auto; }
.pp-btn {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600;
  padding: 7px 12px; border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: white; color: var(--p-ink);
  transition: all .2s;
  display: inline-flex; align-items: center; gap: 5px;
}
.pp-btn:hover { border-color: var(--p-ink); background: var(--bg-alt); }
.pp-btn.primary {
  background: var(--p-ink); color: white; border-color: var(--p-ink);
}
.pp-btn.primary:hover { background: var(--red); border-color: var(--red); }
.pp-btn.copied { background: #ecfdf5; color: #15803d; border-color: #bbf7d0; }
.pp-btn svg { width: 12px; height: 12px; }

/* Modal */
.pp-modal {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(15,23,41,.55);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
@media (prefers-reduced-transparency: reduce) {
  .pp-modal { backdrop-filter: none; background: #0f1729; }
}
.pp-modal.open { display: flex; animation: fadeUp .25s var(--ease-out); }
.pp-modal-card {
  background: white;
  border-radius: 18px;
  max-width: 720px; width: 100%; max-height: 86vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-xl);
}
.pp-modal-hd {
  padding: 18px 22px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.pp-modal-hd-l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pp-modal-hd h3 {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
  color: var(--p-ink);
}
.pp-modal-close {
  width: 32px; height: 32px; border-radius: 10px;
  border: 1px solid var(--border); background: white;
  color: var(--slate);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .2s;
}
.pp-modal-close:hover { background: var(--bg-alt); color: var(--p-ink); }
.pp-modal-close svg { width: 14px; height: 14px; }
.pp-modal-body {
  padding: 22px; overflow-y: auto; flex: 1;
  display: flex; flex-direction: column; gap: 16px;
}
.pp-modal-section h4 {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.pp-modal-prompt {
  font-family: var(--font-mono);
  font-size: 12.5px; line-height: 1.85;
  background: var(--p-ink); color: rgba(255,255,255,.85);
  padding: 18px 20px;
  border-radius: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.pp-modal-prompt .role { color: #fca5a5; font-weight: 600; }
.pp-modal-prompt .ctx  { color: #93c5fd; font-weight: 600; }
.pp-modal-prompt .task { color: #5eead4; font-weight: 600; }
.pp-modal-prompt .fmt  { color: #fcd34d; font-weight: 600; }
.pp-modal-prompt .gd   { color: #c4b5fd; font-weight: 600; }
.pp-modal-sample {
  font-size: 13px; color: var(--p-ink-soft); line-height: 1.6;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 16px;
}
.pp-modal-sample ul { list-style: none; display: flex; flex-direction: column; gap: 5px; padding-left: 0; }
.pp-modal-sample li { padding-left: 14px; position: relative; }
.pp-modal-sample li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--p-ink-soft);
}
.pp-modal-ft {
  padding: 14px 22px; border-top: 1px solid var(--border-light);
  display: flex; justify-content: flex-end; gap: 8px;
  background: var(--bg-alt);
}

@media (max-width: 880px) { .pp-grid { grid-template-columns: 1fr; } }

/* =========================================================
   BEFORE / AFTER (.tr-*)
   ========================================================= */
.tr-list {
  max-width: 1000px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px;
}
.tr-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: box-shadow .3s, border-color .3s;
}
.tr-item[open] {
  border-color: transparent;
  box-shadow: 0 16px 40px -20px rgba(15,23,41,.2);
}
.tr-item summary {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none; user-select: none;
}
.tr-item summary::-webkit-details-marker { display: none; }
.tr-pill {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--p-ink); background: var(--bg-alt);
  padding: 4px 10px; border-radius: 100px;
  border: 1px solid var(--border);
}
.tr-title {
  font-family: var(--font-display);
  font-weight: 700; font-size: 15px;
  flex: 1;
  color: var(--p-ink);
}
.tr-lift {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: #15803d;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  padding: 3px 9px; border-radius: 100px;
}
.tr-chev {
  width: 14px; height: 14px;
  color: var(--muted); flex-shrink: 0;
  transition: transform .3s var(--ease-out);
}
.tr-item[open] .tr-chev { transform: rotate(180deg); color: var(--red); }
.tr-body {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 4px 20px 20px;
}
.tr-col {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  background: var(--bg-alt);
}
.tr-col p {
  font-size: 13px; line-height: 1.55;
  color: var(--p-ink-soft);
  margin: 0;
}
.tr-col ul {
  list-style: none;
  display: flex; flex-direction: column; gap: 5px;
}
.tr-col ul li {
  font-size: 12.5px;
  color: var(--p-ink-soft); line-height: 1.45;
  padding-left: 14px; position: relative;
}
.tr-col ul li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 5px; height: 5px; border-radius: 50%;
  background: #16a34a;
}
.tr-col-hd {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: 8px;
}
.tr-weak { background: #faf6ee; border-color: #ece4d2; }
.tr-weak .tr-col-hd { color: var(--slate); }
.tr-weak p { font-family: var(--p-serif); font-style: italic; font-size: 14px; }
.tr-strong { background: #f0f9ff; border-color: #bae6fd; }
.tr-strong .tr-col-hd { color: #0369a1; }
.tr-result { background: #f0fdf4; border-color: #bbf7d0; }
.tr-result .tr-col-hd { color: #15803d; }
.tr-tags {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 10px;
}
.tr-tag {
  font-size: 10px; font-weight: 600; letter-spacing: .04em;
  background: white; color: #0369a1;
  border: 1px solid #bae6fd;
  padding: 2px 8px; border-radius: 100px;
}

@media (max-width: 880px) {
  .tr-body { grid-template-columns: 1fr; }
  .tr-item summary { flex-wrap: wrap; }
  .tr-title { flex-basis: 100%; order: 2; }
  .tr-pill { order: 1; }
  .tr-lift { order: 3; margin-left: auto; }
  .tr-chev { order: 4; }
}

/* =========================================================
   ADVANCED disclosures
   ========================================================= */
.adv-list {
  max-width: 820px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 8px;
}
.adv-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .3s, box-shadow .3s;
}
.adv-item[open] {
  border-color: var(--p-ink);
  box-shadow: 0 8px 24px -16px rgba(15,23,41,.18);
}
.adv-item summary {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none; user-select: none;
}
.adv-item summary::-webkit-details-marker { display: none; }
.adv-item summary h3 {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700;
  flex: 1;
  color: var(--p-ink);
}
.adv-chev {
  width: 14px; height: 14px;
  color: var(--muted); flex-shrink: 0;
  transition: transform .3s var(--ease-out);
}
.adv-item[open] .adv-chev { transform: rotate(180deg); color: var(--red); }
.adv-body {
  padding: 0 20px 18px;
  border-top: 1px solid var(--border-light);
  margin-top: -1px;
}
.adv-body p {
  font-size: 13.5px;
  color: var(--p-ink-soft); line-height: 1.65;
  padding-top: 14px;
}
.adv-body p strong { color: var(--p-ink); font-weight: 600; }

/* =========================================================
   BRIDGE cards
   ========================================================= */
.prompt-bridge-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 1080px; margin: 0 auto;
}
.bridge-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
  transition: all .35s var(--ease-out);
  position: relative; overflow: hidden;
  color: var(--p-ink);
  display: flex; flex-direction: column;
}
.bridge-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--bridge-color, var(--red));
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.bridge-card:hover {
  border-color: transparent;
  box-shadow: 0 16px 40px -20px rgba(15,23,41,.22);
  transform: translateY(-4px);
}
.bridge-card:hover::before { transform: scaleX(1); }

.bridge-step {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  color: var(--bridge-color, var(--red));
  letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: 10px;
}
.bridge-card h3 {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 6px;
}
.bridge-card p {
  font-size: 12.5px; color: var(--slate);
  line-height: 1.55; flex: 1; margin-bottom: 14px;
}
.bridge-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600;
  color: var(--bridge-color, var(--red));
}
.bridge-cta svg {
  width: 13px; height: 13px;
  transition: transform .3s var(--ease-spring);
}
.bridge-card:hover .bridge-cta svg { transform: translateX(4px); }

@media (max-width: 880px) { .prompt-bridge-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .prompt-bridge-grid { grid-template-columns: 1fr; } }

/* =========================================================
   CLOSING — staggered formula
   ========================================================= */
.p-closing {
  position: relative;
  padding: 96px 24px 88px;
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(230,30,40,.18), transparent 60%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(255,255,255,.04), transparent 60%),
    linear-gradient(135deg, var(--p-ink) 0%, #15203d 100%);
  color: white;
  overflow: hidden;
  text-align: left;
}
.p-closing::before {
  /* paper grid */
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  opacity: .6;
}
.p-closing-grid {
  position: relative;
  max-width: 1080px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.p-closing-mark {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.45);
}
.p-closing-mark-num { color: var(--red); }
.p-closing-h {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: white;
  max-width: 920px;
  margin: 0;
}
.p-closing-h em {
  font-family: var(--p-serif);
  font-style: italic;
  font-weight: 500;
  color: #fca5a5;
  letter-spacing: -.005em;
}
.p-closing-formula {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 0;
  margin: 8px 0 0;
  border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.p-closing-formula li {
  display: flex; flex-direction: column;
  gap: 12px;
  padding: 24px 20px 24px 0;
  border-right: 1px solid rgba(255,255,255,.10);
  color: white;
}
.p-closing-formula li:last-child { border-right: none; padding-right: 0; }
.p-closing-formula-num {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em;
  color: rgba(255,255,255,.4);
}
.p-closing-formula li > span:not(.p-closing-formula-num) {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: white;
}
.p-closing-formula li.is-accent .p-closing-formula-num { color: var(--red); }
.p-closing-formula li.is-accent > span:not(.p-closing-formula-num) { color: #fca5a5; }
.p-closing-foot {
  font-family: var(--p-serif);
  font-style: italic;
  font-size: 16px;
  color: rgba(255,255,255,.55);
  max-width: 480px;
  margin: 4px 0 0;
}

@media (max-width: 880px) {
  .p-closing { padding: 64px 24px; }
  .p-closing-formula { grid-template-columns: repeat(2, 1fr); }
  .p-closing-formula li {
    padding: 18px 16px 18px 0;
    border-right: 1px solid rgba(255,255,255,.10);
    border-bottom: 1px solid rgba(255,255,255,.10);
  }
  .p-closing-formula li:nth-child(2n) { border-right: none; }
  .p-closing-formula li:last-child { border-bottom: none; }
}

/* =========================================================
   Reduce-motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .p-demo,
  .p-hero-cta,
  .ws-chat .coach-send,
  .pp-card,
  .bridge-card,
  .ws-starter {
    transition: none !important;
    transform: none !important;
  }
  .ws-chat-dot,
  .ws-eyebrow-dot,
  .pv-asking-cursor,
  .coach-typing span {
    animation: none !important;
  }
}
