/* ═══════════ EXAMPLE CARD FRAME ═══════════ */
.ex {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px 28px 20px;
  margin-top: 0;
  margin-bottom: 28px;
}

/* ═══════════ EXAMPLE HEADER ═══════════ */
.ex-header {
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--t3);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--divider);
}

/* ═══════════ SECTION BRIDGE (between example and general pattern) ═══════════ */
.section-bridge {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 20px;
}
.section-bridge::before,
.section-bridge::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--divider);
}
.section-bridge span {
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--t3);
  white-space: nowrap;
}

/* ═══════════ RUNNING EXAMPLE (APPLE-STYLE REDESIGN) ═══════════ */

/* ── Tighter spacing on overview to fit without scroll ── */
#overview .intro-subhead { margin-bottom: 16px; }
#overview .level-ladder { margin-top: 16px; }
#overview .section-bridge {
  margin: 0 0 12px;
  justify-content: flex-start;
  gap: 0;
}
#overview .section-bridge::before,
#overview .section-bridge::after {
  display: none;
}
#overview .intro-problem-card { padding: 16px 24px 14px; margin-bottom: 0; }
#overview .intro-problem-card .intro-subhead { margin-bottom: 10px; }
#overview .intro-rules { margin-bottom: 14px; }
#overview .intro-rules-list { gap: 8px; }
#overview .intro-task { margin-bottom: 0; }

/* Override .intro gray wrapper for #overview */
#overview .intro {
  background: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
}

/* Heading + subhead */
.intro-heading {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -.016em;
  margin-bottom: 8px;
}
.intro-subhead {
  font-size: 1rem;
  color: var(--t2);
  line-height: 1.55;
  margin-bottom: 28px;
}

/* ── Problem card (unified container) ── */
.intro-problem-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px 28px 20px;
  margin-bottom: 20px;
}
.intro-problem-card .intro-subhead {
  margin-bottom: 16px;
}
.intro-problem-card .intro-rules-num {
  background: #fff;
}
.intro-problem-card .intro-task {
  margin-bottom: 0;
}

/* ── File attachment (macOS-style bubble) ── */
.intro-attachment {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 10px;
  border: 0.5px solid rgba(0,0,0,.06);
  box-shadow: 0 0.5px 2px rgba(0,0,0,.05), 0 0 0 0.5px rgba(0,0,0,.03);
  padding: 12px 16px;
  margin-bottom: 16px;
  max-width: 340px;
}
.intro-attachment-icon {
  flex-shrink: 0;
  line-height: 0;
}
.intro-attachment-info {
  min-width: 0;
}
.intro-attachment-name {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--t1);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.intro-attachment-meta {
  font-size: .6875rem;
  color: var(--t3);
  margin-top: 2px;
  letter-spacing: 0.01em;
}

/* ── Rules callout ── */
.intro-rules {
  margin-bottom: 20px;
}
.intro-rules-lead {
  font-size: .875rem;
  color: var(--t2);
  line-height: 1.5;
  margin-bottom: 14px;
}
.intro-rules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.intro-rules-item {
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.intro-rules-num {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--t2);
  font-size: .6875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.intro-rules-item strong {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--t1);
  margin-right: 6px;
}
.intro-rules-item span {
  font-size: .8125rem;
  color: var(--t2);
  line-height: 1.5;
}

/* ── Task/prompt (chat bubble) ── */
.intro-task {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.intro-task-label {
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--t3);
  margin-bottom: 6px;
  align-self: flex-end;
}
.intro-task-bubble {
  background: rgba(0,113,227,.08);
  border: 1px solid rgba(0,113,227,.12);
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
  font-size: .875rem;
  color: var(--t1);
  line-height: 1.55;
  max-width: 88%;
}

/* ── Overview deferred section (waits for nest diagram animation) ── */
.overview-deferred {
  margin-top: 20px;
}
.overview-deferred > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 400ms var(--apple-ease), transform 400ms var(--apple-ease);
}
.overview-deferred.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.overview-deferred.is-visible > :nth-child(1) { transition-delay: 0ms; }
.overview-deferred.is-visible > :nth-child(2) { transition-delay: 120ms; }
.overview-deferred.is-visible > :nth-child(3) { transition-delay: 240ms; }

/* Framing line */
.intro-framing {
  text-align: center;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--t2);
  margin-top: 0;
  padding-top: 0;
}

/* Responsive */
@media (max-width: 640px) {
  .intro-problem-card { padding: 20px 16px 16px; }
  .intro-attachment { padding: 10px 14px; max-width: 100%; }
  .intro-rules-lead { font-size: .875rem; }
}

/* ═══════════ LEVEL TECH SUBTITLE ═══════════ */
.lv-sub {
  font-size: .9375rem;
  color: var(--t3);
  line-height: 1.45;
  margin-bottom: 20px;
  letter-spacing: -.008em;
}

/* ═══════════ LEVEL CONTEXT LINE ═══════════ */
.level-context {
  font-size: 1rem;
  color: var(--t2);
  line-height: 1.55;
  margin-bottom: 24px;
}

/* ═══════════ LEVEL 0 — COLLAPSIBLE PROMPT ═══════════ */
.ex0-prompt {
  background: rgba(0,113,227,.04);
  border: 1px solid rgba(0,113,227,.12);
  border-radius: 16px;
  margin-bottom: 24px;
  overflow: hidden;
}
.ex0-prompt-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  width: 100%;
  padding: 14px 18px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: var(--t1);
  transition: background 150ms var(--apple-ease);
}
.ex0-prompt-header:hover {
  background: rgba(0,113,227,.03);
}
.ex0-prompt-attach {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: .75rem;
  font-weight: 500;
  color: var(--t1);
  flex-shrink: 0;
  white-space: nowrap;
}
.ex0-prompt-attach svg {
  color: var(--blue);
  flex-shrink: 0;
}
.ex0-prompt-attach--pdf svg {
  color: inherit;
}
.ex0-prompt-attach-meta {
  font-size: .625rem;
  font-weight: 400;
  color: var(--t3);
  letter-spacing: 0.01em;
}
.ex0-prompt-chevron {
  flex-shrink: 0;
  order: 2;
  margin-left: auto;
  color: var(--t3);
  transition: transform 300ms var(--apple-ease);
}
.ex0-prompt-preview {
  order: 3;
  flex-basis: 100%;
  font-size: .8125rem;
  color: var(--t2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.ex0-prompt.is-expanded .ex0-prompt-chevron {
  transform: rotate(180deg);
}

/* Collapsible body — grid-template-rows animation */
.ex0-prompt-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 400ms var(--apple-ease);
}
.ex0-prompt.is-expanded .ex0-prompt-body {
  grid-template-rows: 1fr;
}
.ex0-prompt-body-inner {
  overflow: hidden;
}
.ex0-prompt-pre {
  font-family: 'SF Mono', Menlo, 'Courier New', monospace;
  font-size: .8125rem;
  line-height: 1.6;
  color: var(--t1);
  opacity: .85;
  white-space: pre-wrap;
  margin: 0;
  padding: 0 18px 16px;
  background: none;
  border: none;
}

/* Hide preview text when expanded */
.ex0-prompt.is-expanded .ex0-prompt-preview {
  opacity: 0;
  transition: opacity 200ms var(--apple-ease);
}

/* ═══════════ LEVEL 0 — CHAT + ANNOTATIONS WRAPPER ═══════════ */
.ex0-chat-wrap {
  position: relative;
  margin-bottom: 20px;
}

/* Chat container (inset via margins — leaves room for annotations) */
.ex0-chat {
  margin-left: 120px;
  margin-right: 120px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 20px 16px;
}

/* Chat labels */
.ex0-chat-who {
  display: block;
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--t3);
  margin-bottom: 6px;
}

/* User message — right-aligned column */
.ex0-chat-sent {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-bottom: 14px;
}
.ex0-chat-sent .ex0-prompt {
  margin-bottom: 0;
  max-width: 88%;
}

/* AI response */
.ex0-chat-recv {
  display: flex;
  flex-direction: column;
}
.ex0-chat-ai-bubble {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
}
.ex0-chat-ai-bubble p {
  font-size: .875rem;
  line-height: 1.6;
  color: var(--t1);
  margin: 0;
}

/* ═══════════ MAGAZINE ANNOTATIONS ═══════════ */

/* Annotation columns (absolutely positioned in the margin space) */
.ex0-ann-col {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.ex0-ann-col--left {
  left: 0;
  padding-top: 24px;
}
.ex0-ann-col--right {
  right: 0;
}

/* Individual annotation */
.ex0-ann {
  display: flex;
  align-items: center;
  gap: 0;
}

/* Left annotations: text → line (reaching right toward response) */
.ex0-ann--left {
  justify-content: flex-end;
}
.ex0-ann--left .ex0-ann-text {
  text-align: right;
  padding-right: 10px;
}

/* Right annotations: line → text (reaching left toward response) */
.ex0-ann--right .ex0-ann-text {
  text-align: left;
  padding-left: 10px;
}

/* Annotation text */
.ex0-ann-text {
  opacity: 0;
}
.ex0-ann-name {
  display: inline;
  font-size: .6875rem;
  font-weight: 600;
  color: var(--t2);
  white-space: nowrap;
  line-height: 1.35;
}
.ex0-ann-x {
  color: var(--red);
  font-size: .8125rem;
  font-weight: 600;
  margin-right: 3px;
}
.ex0-ann-status {
  display: block;
  font-size: .625rem;
  font-weight: 500;
  color: var(--red);
  font-style: italic;
  opacity: .55;
  line-height: 1.35;
}

/* Connector line — fills gap between text and chat border, crosses over */
.ex0-ann-line {
  flex: 1;
  height: 1px;
  background: var(--t3);
  min-width: 12px;
  transform: scaleX(0);
}
.ex0-ann--left .ex0-ann-line {
  transform-origin: right;
  margin-right: -10px; /* cross over the chat border */
}
.ex0-ann--right .ex0-ann-line {
  transform-origin: left;
  margin-left: -10px; /* cross over the chat border */
}

/* ═══════════ CHAT EXAMPLE — STORY SEQUENCE ═══════════ */

/*
 * Timeline (from is-visible on wrapper):
 *   0–500ms   Chat wrapper slides up (data-reveal transition)
 *   300–600ms Compose bar fades in at bottom of chat
 *   500–750ms File attachment fades in
 *   950–1200ms Prompt text fades in (after file is settled)
 *   1250ms    Send button pulses ("click")
 *   1450ms    Compose fades out + sent message slides in from right
 *   2050ms    AI response slides in from left ("thinking" pause)
 *   2750ms    Annotation 1 — line draws, then text
 *   3200ms    Annotation 2
 *   3650ms    Annotation 3
 *   4150ms    Punchline fades in
 *   4750ms    Reasoning pill appears
 */

/* Chat messages start hidden */
.ex0-chat-sent,
.ex0-chat-recv {
  opacity: 0;
}

/* ── Compose bar (chat input area) ── */
.ex0-compose {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--divider);
  opacity: 0;
}
.ex0-compose-input {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  overflow: hidden;
}
.ex0-compose-attach {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .6875rem;
  font-weight: 500;
  color: var(--t2);
}
.ex0-compose-attach svg {
  color: var(--blue);
}
.ex0-compose-text {
  font-size: .8125rem;
  color: var(--t1);
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ex0-compose-send {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* ── Keyframes ── */
@keyframes chat-msg-right {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes chat-msg-left {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes ann-line-draw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes ann-text-in {
  from { opacity: 0; transform: translateY(3px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes compose-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes compose-content-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes send-click {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.82); }
  100% { transform: scale(1); }
}
@keyframes punchline-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: .7; transform: translateY(0); }
}

/* ── Drag-file element (Level 0 only) ── */
.ex0-drag-file {
  position: absolute;
  bottom: 56px;
  left: 24px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
}
.ex0-drag-file-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.95);
  border: 0.5px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  padding: 6px 12px 6px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
}
.ex0-drag-file-name {
  font-size: .6875rem;
  font-weight: 500;
  color: var(--t1);
  white-space: nowrap;
}
@keyframes drag-file-in {
  0%   { opacity: 0; transform: translate(-20px, -50px) rotate(-3deg) scale(0.95); }
  30%  { opacity: 1; transform: translate(10px, -20px) rotate(-1deg) scale(1); }
  70%  { opacity: 1; transform: translate(5px, -5px) rotate(0deg) scale(1); }
  100% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
}
@keyframes drag-file-land {
  0%   { opacity: 1; transform: scale(1); }
  40%  { transform: scale(0.92); }
  100% { opacity: 0; transform: scale(0.85); }
}
.is-visible .ex0-drag-file {
  animation: drag-file-in 600ms cubic-bezier(0.2, 0, 0.2, 1) 400ms both,
             drag-file-land 250ms var(--apple-ease) 1050ms forwards;
}

/* ── Sequence ── */

/* 1. Compose bar fades in and stays */
.is-visible .ex0-compose {
  animation: compose-in 350ms var(--apple-ease) 300ms both;
}
/* File appears first, then prompt text */
.ex0-compose-attach,
.ex0-compose-text {
  opacity: 0;
}
.is-visible .ex0-compose-attach {
  animation: compose-in 250ms var(--apple-ease) 500ms both,
             compose-content-out 250ms var(--apple-ease) 1450ms forwards;
}
.is-visible .ex0-compose-text {
  animation: compose-in 250ms var(--apple-ease) 950ms both,
             compose-content-out 250ms var(--apple-ease) 1450ms forwards;
}
/* Send button pulses */
.is-visible .ex0-compose-send {
  animation: send-click 200ms var(--apple-ease) 1250ms both;
}
/* 2. Sent message slides in as compose clears */
.is-visible .ex0-chat-sent {
  animation: chat-msg-right 400ms var(--apple-ease) 1500ms both;
}
/* 3. AI response enters from left ("thinking" pause) */
.is-visible .ex0-chat-recv {
  animation: chat-msg-left 400ms var(--apple-ease) 2050ms both;
}
/* 4. Annotations draw sequentially (after reading pause) */
.is-visible [data-ann="1"] .ex0-ann-line { animation: ann-line-draw 300ms var(--apple-ease) 2750ms both; }
.is-visible [data-ann="1"] .ex0-ann-text { animation: ann-text-in 250ms var(--apple-ease) 3000ms both; }
.is-visible [data-ann="2"] .ex0-ann-line { animation: ann-line-draw 300ms var(--apple-ease) 3200ms both; }
.is-visible [data-ann="2"] .ex0-ann-text { animation: ann-text-in 250ms var(--apple-ease) 3450ms both; }
.is-visible [data-ann="3"] .ex0-ann-line { animation: ann-line-draw 300ms var(--apple-ease) 3650ms both; }
.is-visible [data-ann="3"] .ex0-ann-text { animation: ann-text-in 250ms var(--apple-ease) 3900ms both; }

/* ── Level 0 typing animation ── */
.ex0-compose-typing {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 0;
  opacity: 0;
  border-right: 1.5px solid transparent;
}
@keyframes compose-typing {
  0%   { width: 0; opacity: 1; }
  100% { width: 100%; opacity: 1; }
}
@keyframes cursor-blink {
  0%, 100% { border-right-color: rgba(0,0,0,0.45); }
  50%      { border-right-color: transparent; }
}
@keyframes cursor-hide {
  to { border-right-color: transparent; }
}

/* Only L5/L6 need pinning — L0-L4 use center alignment with their own padding overrides */
#level-5 .ex0-ann-col,
#level-6 .ex0-ann-col {
  justify-content: flex-start;
  padding-top: 150px;
}

/* ── Level 0 override: annotation position for shorter response ── */
#level-0 .ex0-ann-col--left { padding-top: 72px; }
#level-0 .ex0-ann-col--right { padding-top: 36px; }
@media (max-width: 768px) {
  #level-0 .ex0-ann-col--left,
  #level-0 .ex0-ann-col--right,
  #level-5 .ex0-ann-col,
  #level-6 .ex0-ann-col {
    padding-top: 0;
  }
}

/* ── Level 0 override: delayed sequence for drag-drop ── */
#level-0 .is-visible .ex0-compose-attach {
  animation: compose-in 250ms var(--apple-ease) 1250ms both,
             compose-content-out 250ms var(--apple-ease) 2450ms forwards;
}
#level-0 .is-visible .ex0-compose-text.ex0-compose-typing {
  animation: compose-typing 700ms steps(40, end) 1400ms both,
             cursor-blink 530ms step-end 1400ms 3,
             cursor-hide 1ms linear 2350ms forwards,
             compose-content-out 250ms var(--apple-ease) 2450ms forwards;
}
#level-0 .is-visible .ex0-compose-send {
  animation: send-click 200ms var(--apple-ease) 2350ms both;
}
#level-0 .is-visible .ex0-chat-sent {
  animation: chat-msg-right 400ms var(--apple-ease) 2600ms both;
}
#level-0 .is-visible .ex0-chat-recv {
  animation: chat-msg-left 400ms var(--apple-ease) 3150ms both;
}
#level-0 .is-visible [data-ann="1"] .ex0-ann-line { animation: ann-line-draw 300ms var(--apple-ease) 3850ms both; }
#level-0 .is-visible [data-ann="1"] .ex0-ann-text { animation: ann-text-in 250ms var(--apple-ease) 4100ms both; }
#level-0 .is-visible [data-ann="2"] .ex0-ann-line { animation: ann-line-draw 300ms var(--apple-ease) 4300ms both; }
#level-0 .is-visible [data-ann="2"] .ex0-ann-text { animation: ann-text-in 250ms var(--apple-ease) 4550ms both; }
#level-0 .is-visible [data-ann="3"] .ex0-ann-line { animation: ann-line-draw 300ms var(--apple-ease) 4750ms both; }
#level-0 .is-visible [data-ann="3"] .ex0-ann-text { animation: ann-text-in 250ms var(--apple-ease) 5000ms both; }
#level-0 .ex0-chat-wrap.is-visible ~ .ex0-punchline {
  animation: punchline-in 400ms var(--apple-ease) 5250ms both;
}
#level-0 .ex0-chat-wrap.is-visible ~ .ex0-reasoning-pill {
  animation: pill-fade-in 350ms var(--apple-ease) 5850ms both;
}

/* 5. Punchline + reasoning pill — sibling-triggered */
.ex0-punchline {
  text-align: center;
  font-size: .875rem;
  font-weight: 500;
  font-style: italic;
  color: var(--red);
  margin-bottom: 8px;
  padding: 8px 0;
  opacity: 0;
  view-transition-name: none;
}
.ex0-chat-wrap.is-visible ~ .ex0-punchline {
  animation: punchline-in 400ms var(--apple-ease) 4150ms both;
}
.ex0-chat-wrap.is-visible ~ .ex0-reasoning-pill {
  animation: pill-fade-in 350ms var(--apple-ease) 4750ms both;
}

/* ═══════════ CHAT EXAMPLE — REASONING PILL + COLLAPSIBLE ═══════════ */
@keyframes pill-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ex0-reasoning-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 24px auto 0;
  padding: 6px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  opacity: 0;
  view-transition-name: none;
  font-family: inherit;
  font-size: .75rem;
  font-weight: 600;
  color: var(--t2);
  letter-spacing: .03em;
  cursor: pointer;
  transition: background 150ms var(--apple-ease), border-color 150ms var(--apple-ease);
}
.ex0-reasoning-pill:hover {
  background: rgba(0,0,0,.04);
  border-color: var(--t3);
}
.ex0-reasoning-pill svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: var(--t2);
  transition: transform 300ms var(--apple-ease);
}
.ex0-reasoning-pill.is-expanded svg {
  transform: rotate(180deg);
}
.ex0-reasoning-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 500ms var(--apple-ease);
  view-transition-name: none;
}
.ex0-reasoning-body.is-expanded {
  grid-template-rows: 1fr;
}
.ex0-reasoning-body-inner {
  overflow: hidden;
}

/* ── Reasoning body content ── */
.ex0-why {
  font-size: .8125rem;
  color: var(--t2);
  line-height: 1.55;
  text-align: center;
  padding: 20px 8px 0;
  margin: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms var(--apple-ease), transform 400ms var(--apple-ease);
}
.ex0-reasoning-body.is-expanded .ex0-why {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 150ms;
}
.ex0-contrast {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 0 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms var(--apple-ease), transform 400ms var(--apple-ease);
}
.ex0-reasoning-body.is-expanded .ex0-contrast {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 300ms;
}
.ex0-contrast-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  border: 0.5px solid rgba(0,0,0,.06);
  box-shadow: 0 0.5px 2px rgba(0,0,0,.06), 0 0 0 0.5px rgba(0,0,0,.04);
}
.ex0-contrast-card h4 {
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.ex0-contrast-expect h4 { color: var(--green); }
.ex0-contrast-got h4 { color: var(--red); }
.ex0-contrast-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ex0-contrast-card li {
  font-size: .75rem;
  color: var(--t1);
  line-height: 1.5;
  padding: 3px 0 3px 16px;
  position: relative;
}
.ex0-contrast-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--t3);
}
.ex0-contrast-card p {
  font-size: .75rem;
  color: var(--t2);
  line-height: 1.5;
  margin: 0;
  font-style: italic;
}
.ex0-contrast-label {
  display: inline-block;
  font-size: .6875rem;
  color: var(--t3);
  font-weight: 500;
  margin-top: 10px;
}

/* ═══════════ RESPONSIVE — CHAT EXAMPLE ═══════════ */
@media (max-width: 768px) {
  .ex0-chat {
    margin-left: 0;
    margin-right: 0;
    padding: 14px 10px;
  }
  .ex0-chat-sent .ex0-prompt { max-width: 95%; }
  .ex0-prompt-header { padding: 12px 14px; gap: 8px; }
  .ex0-prompt-pre { padding: 0 14px 14px; font-size: .75rem; }
  .ex0-prompt-attach {
    flex-shrink: 1;
    white-space: normal;
    min-width: 0;
  }
  .ex0-prompt-attach-meta {
    display: none;
  }
  .ex0-ann-col {
    position: static;
    width: auto;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    padding: 10px 0;
  }
  .ex0-ann-col--left,
  .ex0-ann-col--right {
    padding-top: 0;
  }
  .ex0-ann-line {
    display: none;
  }
  .ex0-ann--left .ex0-ann-line,
  .ex0-ann--right .ex0-ann-line {
    margin-left: 0;
    margin-right: 0;
  }
  .ex0-ann--left .ex0-ann-text,
  .ex0-ann--right .ex0-ann-text {
    text-align: center;
    padding: 0;
  }
  .ex0-contrast {
    grid-template-columns: 1fr;
  }
}

/* ═══════════ MODEL RESPONSE BLOCK ═══════════ */
.ex-response {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
}
.ex-response-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #7B7FE4 0%, #A78BFA 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.ex-response-body {
  flex: 1;
  min-width: 0;
}
.ex-response-label {
  font-size: .625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--t3);
  margin-bottom: 4px;
}
.ex-response-text {
  font-size: .8125rem;
  line-height: 1.55;
  color: var(--t1);
}
.ex-response-text p {
  margin-bottom: 6px;
  font-size: .8125rem;
}
.ex-response-text p:last-child { margin-bottom: 0; }
.ex-response-faded .ex-response-text {
  opacity: .45;
  font-style: italic;
}
.ex-response-faded .ex-response-icon {
  background: var(--t3);
}

/* ═══════════ ANALYSIS LABEL ═══════════ */
.ex-analysis-label {
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--t3);
  margin-bottom: 10px;
  margin-top: 4px;
}

/* ═══════════ CONTEXT NOTE (L5/L6 framing) ═══════════ */
.ex-context-note {
  font-size: .8125rem;
  line-height: 1.55;
  color: var(--t2);
  margin-bottom: 14px;
  padding: 0;
}
.ex-context-note strong {
  color: var(--t1);
}

/* ═══════════ MISSING LINKS (L2) ═══════════ */
.ex-missing-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.ex-missing-link {
  font-size: .8125rem;
  line-height: 1.45;
  color: var(--orange);
  padding: 8px 14px;
  background: rgba(255,149,0,.05);
  border-left: 3px solid rgba(255,149,0,.3);
  border-radius: 0 8px 8px 0;
}

/* ═══════════ INSIGHT STRIP ═══════════ */
.ex-insight {
  font-size: .8125rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 20px;
  margin-top: 16px;
  text-align: center;
  line-height: 1.4;
}
.ex-insight-red    { background: rgba(255,59,48,.06);  color: var(--red); }
.ex-insight-blue   { background: rgba(0,113,227,.06);  color: var(--blue); }
.ex-insight-orange { background: rgba(255,149,0,.07);  color: var(--orange); }
.ex-insight-green  { background: rgba(52,199,89,.06);  color: var(--green); }
.ex-insight-purple { background: rgba(88,86,214,.06);  color: var(--purple); }

/* ═══════════ L0 — FADED OUTPUT + RULE INDICATORS ═══════════ */
.ex-output {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
}
.ex-output-label {
  font-size: .6875rem;
  font-weight: 600;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.ex-output-faded p {
  opacity: .4;
  font-style: italic;
  font-size: .875rem;
  color: var(--t2);
  margin-bottom: 6px;
  line-height: 1.5;
}
.ex-output-faded p:last-child { margin-bottom: 0; }

.ex-rules {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}
.ex-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8125rem;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(0,0,0,.018);
}
.ex-rule-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ex-rule-off .ex-rule-dot {
  border: 1.5px solid var(--t3);
  background: transparent;
}
.ex-rule-off {
  color: var(--t3);
}
.ex-rule-status {
  margin-left: auto;
  font-size: .6875rem;
  font-weight: 500;
  color: var(--t3);
  font-style: italic;
}

/* ═══════════ L1 — RULE STRIPS + EMPTY SCHEDULE ═══════════ */
.ex-strips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ex-strip {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: rgba(0,113,227,.05);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .8125rem;
  color: var(--t1);
  line-height: 1.45;
}
.ex-strip-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,113,227,.1);
  color: var(--blue);
  font-size: .6875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ex-no-schedule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding: 18px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  color: var(--t3);
}
.ex-no-schedule-icon {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--t3);
}
.ex-no-schedule-text {
  font-size: .8125rem;
  font-weight: 500;
}

/* ═══════════ L2 — INSIGHT ISLANDS ═══════════ */
.ex-islands {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
}
.ex-island {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
}
.ex-island-name {
  font-size: .8125rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.ex-island-insight {
  font-size: .75rem;
  color: var(--t1);
  line-height: 1.45;
  margin-bottom: 10px;
}
.ex-island-check {
  font-size: .75rem;
  font-weight: 500;
  color: var(--green);
}
.ex-island-check::before {
  content: "\25CF";
  margin-right: 4px;
  font-size: .6rem;
}
.ex-island-gap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.ex-gap-q {
  font-size: 1rem;
  font-weight: 700;
  color: var(--orange);
}

/* ═══════════ L3/L4 — KITCHEN TIMELINE ═══════════ */
.ex-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Time axis row */
.ex-tl-axis {
  display: grid;
  grid-template-columns: 90px 1fr;
  margin-bottom: 4px;
}
.ex-tl-spacer {
  /* empty label column */
}
.ex-tl-times {
  display: flex;
  justify-content: space-between;
  font-size: .625rem;
  font-weight: 500;
  color: var(--t3);
  padding: 0 2px;
}

/* Lane rows */
.ex-tl-lane {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  margin-bottom: 6px;
}
.ex-tl-label {
  font-size: .6875rem;
  font-weight: 500;
  color: var(--t2);
  text-align: right;
  padding-right: 12px;
  line-height: 1.25;
}
.ex-tl-track {
  position: relative;
  height: 32px;
  background: rgba(0,0,0,.018);
  border-radius: 8px;
}
/* gridlines at 25/50/75 */
.ex-tl-track::before {
  content: "";
  position: absolute;
  top: 0;
  left: 25%;
  width: 1px;
  height: 100%;
  background: var(--divider);
}
.ex-tl-track::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  background: var(--divider);
}
/* third gridline via box-shadow on a pseudo — use a wrapper instead */
.ex-tl-track-grid {
  position: absolute;
  top: 0;
  left: 75%;
  width: 1px;
  height: 100%;
  background: var(--divider);
  pointer-events: none;
}

.ex-tl-track-double {
  height: 60px;
}

/* Timeline bars */
.ex-tl-bar {
  position: absolute;
  top: 2px;
  height: calc(100% - 4px);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: .6875rem;
  font-weight: 500;
  padding: 0 8px;
  overflow: hidden;
  white-space: nowrap;
}
.ex-bar-name {
  font-weight: 600;
}
.ex-bar-tag {
  font-size: .5625rem;
  opacity: .7;
}

/* Nut dish bars (blue tint, matching .cw-a) */
.ex-bar-nut {
  background: rgba(0,113,227,.12);
  border: 1px solid rgba(0,113,227,.25);
  color: rgba(0,113,227,.75);
}

/* Hot dish bars — BROKEN (orange/danger, L3) */
.ex-bar-hot {
  background: rgba(255,149,0,.15);
  border: 1px solid rgba(255,149,0,.3);
  color: rgba(255,149,0,.85);
}

/* Hot dish bars — CORRECT (green, L4) */
.ex-bar-hot-ok {
  background: rgba(52,199,89,.15);
  border: 1px solid rgba(52,199,89,.3);
  color: rgba(52,199,89,.85);
}

/* Second row in double-height track */
.ex-bar-row2 {
  top: auto;
  bottom: 2px;
  height: calc(50% - 4px);
}
.ex-tl-track-double .ex-tl-bar:not(.ex-bar-row2) {
  height: calc(50% - 4px);
}

/* Convergence line (L4) */
.ex-tl-converge {
  display: grid;
  grid-template-columns: 90px 1fr;
  margin-top: 2px;
}
.ex-tl-converge-line {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.ex-tl-converge-line::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--green);
  border-radius: 1px;
}
.ex-converge-label {
  font-size: .6875rem;
  font-weight: 600;
  color: var(--green);
  padding-right: 10px;
}

/* ═══════════ VIOLATION INDICATOR (L3) ═══════════ */
.ex-violation {
  margin: 12px 0 4px;
  text-align: center;
}
.ex-violation-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 6px;
}
.ex-vio-dot {
  font-size: .6875rem;
  font-weight: 500;
  color: var(--red);
  padding: 3px 10px;
  background: rgba(255,59,48,.05);
  border-radius: 10px;
}
.ex-vio-gap {
  font-size: .6875rem;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  padding: 3px 12px;
  border-radius: 10px;
  margin: 0 4px;
}
.ex-violation-msg {
  font-size: .75rem;
  font-weight: 500;
  color: var(--red);
}

/* ═══════════ CONSTRAINT CHECKS (L3/L4) ═══════════ */
.ex-checks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 0 4px;
  flex-wrap: wrap;
}
.ex-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
}
.ex-check::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ex-check-pass {
  color: var(--green);
  background: rgba(52,199,89,.06);
}
.ex-check-pass::before {
  background: var(--green);
}
.ex-check-warn {
  color: var(--orange);
  background: rgba(255,159,10,.06);
}
.ex-check-warn::before {
  background: var(--orange);
}
.ex-check-fail {
  color: var(--red);
  font-weight: 600;
  background: rgba(255,59,48,.06);
}
.ex-check-fail::before {
  background: var(--red);
}
.ex-check-pass-all {
  color: var(--green);
  font-weight: 600;
  background: rgba(52,199,89,.1);
  box-shadow: 0 0 0 1px rgba(52,199,89,.2);
}
.ex-check-pass-all::before {
  background: var(--green);
}

/* ═══════════ STILL MISSING (L4) ═══════════ */
.ex-still-missing {
  font-size: .75rem;
  color: var(--t2);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

/* ═══════════ L5 — DISCOVERY FLOW ═══════════ */
.ex-discovery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.ex-disc-logs {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  width: 100%;
  max-width: 360px;
}
.ex-disc-label {
  font-size: .6875rem;
  font-weight: 600;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.ex-log-line {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: .6875rem;
  color: var(--t2);
  line-height: 1.7;
}
.ex-log-fade {
  opacity: .45;
}
.ex-disc-arrow {
  color: var(--purple);
  font-size: 1rem;
  padding: 8px 0;
  text-align: center;
  line-height: 1.3;
}
.ex-disc-arrow span {
  font-size: .625rem;
  font-weight: 500;
}
.ex-disc-rules {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 420px;
}
.ex-disc-rule {
  background: rgba(88,86,214,.04);
  border: 1px solid rgba(88,86,214,.15);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: .8125rem;
  color: var(--purple);
  line-height: 1.4;
}

/* ═══════════ L6 — CROSS-DOMAIN TRANSFER ═══════════ */
.ex-transfer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.ex-transfer-source {
  background: #fff;
  border: 1.5px solid rgba(88,86,214,.3);
  border-radius: 12px;
  padding: 14px 22px;
  text-align: center;
  width: 80%;
  max-width: 380px;
}
.ex-transfer-label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 4px;
}
.ex-transfer-desc {
  font-size: .75rem;
  color: var(--t2);
  line-height: 1.4;
}
.ex-transfer-arrows {
  color: var(--purple);
  font-size: 1rem;
  padding: 8px 0;
  letter-spacing: 8px;
}
.ex-transfer-targets {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  width: 100%;
}
.ex-transfer-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
}
.ex-tc-name {
  font-size: .8125rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.ex-tc-map {
  font-size: .6875rem;
  color: var(--t2);
  line-height: 1.5;
}

/* ═══════════ TIMELINE BAR GROWTH ANIMATION ═══════════ */
@keyframes tl-bar-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.ex-tl-bar {
  transform: scaleX(0);
  transform-origin: left;
}
.is-visible .ex-tl-bar {
  animation: tl-bar-grow 400ms var(--apple-ease) both;
}
/* Stagger delays */
.is-visible .ex-tl-bar:nth-child(1) { animation-delay: 200ms; }
.is-visible .ex-tl-bar:nth-child(2) { animation-delay: 500ms; }
/* Main kitchen bars use data attribute approach — handled via nth-child on the lane */
.ex-tl-track-double .ex-tl-bar:nth-child(1) { animation-delay: 800ms; }
.ex-tl-track-double .ex-tl-bar:nth-child(2) { animation-delay: 900ms; }

/* ═══════════ VIOLATION PULSE (L3) ═══════════ */
@keyframes vio-pulse {
  0%, 100% { opacity: .7; }
  50% { opacity: 1; }
}
.is-visible .ex-violation {
  animation: vio-pulse 1.5s ease-in-out 1.2s 2;
}

/* ═══════════ RULE / ISLAND / STRIP STAGGER ═══════════ */
@keyframes ex-item-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.ex-rule,
.ex-strip,
.ex-island,
.ex-disc-rule,
.ex-transfer-card {
  opacity: 0;
}
.is-visible .ex-rule,
.is-visible .ex-strip,
.is-visible .ex-island,
.is-visible .ex-disc-rule,
.is-visible .ex-transfer-card {
  animation: ex-item-in 300ms var(--apple-ease) both;
}
.is-visible .ex-rule:nth-child(1),
.is-visible .ex-strip:nth-child(1),
.is-visible .ex-island:nth-child(1),
.is-visible .ex-disc-rule:nth-child(1),
.is-visible .ex-transfer-card:nth-child(1) { animation-delay: 120ms; }
.is-visible .ex-rule:nth-child(2),
.is-visible .ex-strip:nth-child(2),
.is-visible .ex-island:nth-child(2),
.is-visible .ex-disc-rule:nth-child(2),
.is-visible .ex-transfer-card:nth-child(2) { animation-delay: 240ms; }
.is-visible .ex-rule:nth-child(3),
.is-visible .ex-strip:nth-child(3),
.is-visible .ex-island:nth-child(3),
.is-visible .ex-disc-rule:nth-child(3),
.is-visible .ex-transfer-card:nth-child(3) { animation-delay: 360ms; }
/* L2 island gaps (4th, 6th children in grid) don't animate */

/* ═══════════ CONSTRAINT CHECK STAGGER ═══════════ */
.ex-check {
  opacity: 0;
}
.is-visible .ex-check {
  animation: ex-item-in 250ms var(--apple-ease) both;
}
.is-visible .ex-check:nth-child(1) { animation-delay: 600ms; }
.is-visible .ex-check:nth-child(2) { animation-delay: 700ms; }
.is-visible .ex-check:nth-child(3) { animation-delay: 800ms; }
.is-visible .ex-check:nth-child(4) { animation-delay: 900ms; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 640px) {
  .ex { padding: 20px 16px 16px; }
  .ex-tl-lane { grid-template-columns: 60px 1fr; }
  .ex-tl-axis { grid-template-columns: 60px 1fr; }
  .ex-tl-converge { grid-template-columns: 60px 1fr; }
  .ex-tl-label { font-size: .6875rem; padding-right: 8px; }
  .ex-islands { grid-template-columns: 1fr; gap: 8px; }
  .ex-island-gap { display: none; }
  .ex-transfer-targets { grid-template-columns: 1fr; }
  .ex-checks { gap: 8px; }
  .ex-violation-line { flex-wrap: wrap; gap: 4px; }
}

/* ═══════════ REDUCED MOTION ═══════════ */
@media (prefers-reduced-motion: reduce) {
  .ex-tl-bar {
    transform: scaleX(1) !important;
    animation: none !important;
  }
  .ex-rule,
  .ex-strip,
  .ex-island,
  .ex-disc-rule,
  .ex-transfer-card,
  .ex-check {
    opacity: 1 !important;
    animation: none !important;
  }
  .ex0-chat-sent,
  .ex0-chat-recv {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .ex0-compose {
    display: none !important;
  }
  .ex0-punchline {
    opacity: .7 !important;
    animation: none !important;
  }
  .ex0-reasoning-pill {
    opacity: 1 !important;
    animation: none !important;
  }
  .ex0-reasoning-pill svg {
    transition: none !important;
  }
  .ex0-reasoning-body {
    transition: none !important;
  }
  .ex0-why,
  .ex0-contrast {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .ex0-ann-line {
    transform: scaleX(1) !important;
    animation: none !important;
  }
  .ex0-ann-text {
    opacity: 1 !important;
    animation: none !important;
  }
  .ex0-prompt-body {
    transition: none !important;
  }
  .ex0-prompt-chevron {
    transition: none !important;
  }
  .is-visible .ex-violation {
    animation: none !important;
  }
  .nest {
    animation: none !important;
  }
  .nest[data-level="0"] { border-color: rgba(255,59,48,.18) !important; }
  .nest[data-level="1"] { border-color: rgba(0,113,227,.18) !important; }
  .nest[data-level="2"] { border-color: rgba(255,149,0,.18) !important; }
  .nest[data-level="3"] { border-color: rgba(255,59,48,.18) !important; }
  .nest[data-level="4"] { border-color: rgba(52,199,89,.18) !important; }
  .nest[data-level="5"] { border-color: rgba(88,86,214,.18) !important; }
  .nest[data-level="6"] { border-color: rgba(88,86,214,.18) !important; }
  .nest-head, .nest-desc, .nest-chips, .nest-shift {
    opacity: 1 !important;
    animation: none !important;
  }
  .quad-dot, .quad-cell {
    opacity: 1 !important;
    animation: none !important;
  }
  .overview-deferred > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ═══════════ LEVEL LADDER (growing bar — macOS native) ═══════════ */
.level-ladder {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* ── Row ── */
.ladder-row {
  display: grid;
  grid-template-columns: 22px 136px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background-color 180ms cubic-bezier(.25,.1,.25,1);
  -webkit-user-select: none;
  user-select: none;
}
.ladder-row:hover {
  background: rgba(0,0,0,.035);
}
.ladder-row:active {
  background: rgba(0,0,0,.06);
  transition-duration: 40ms;
}

/* ── Number ── */
.ladder-num {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  font-size: .75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(0,0,0,.33);
  text-align: center;
  line-height: 1;
}

/* ── Label ── */
.ladder-label {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  font-size: .8125rem;
  font-weight: 500;
  color: rgba(0,0,0,.52);
  letter-spacing: -.008em;
  white-space: nowrap;
  transition: color 180ms cubic-bezier(.25,.1,.25,1);
}
.ladder-row:hover .ladder-label {
  color: rgba(0,0,0,.72);
}

/* ── Track + bar ── */
.ladder-track {
  height: 4px;
  background: rgba(0,0,0,.04);
  border-radius: 2px;
  overflow: hidden;
}
.ladder-bar {
  height: 100%;
  width: 0%;
  background: rgba(0,0,0,.12);
  transition: width 500ms cubic-bezier(.4, 0, .2, 1);
}
.is-visible .ladder-bar {
  width: var(--bar-width, 0%);
}
.ladder-row:hover .ladder-bar {
  background: rgba(0,0,0,.18);
}

/* Staggered reveal — each row 60ms apart */
.ladder-row[data-level="0"] .ladder-bar { transition-delay: 80ms; }
.ladder-row[data-level="1"] .ladder-bar { transition-delay: 140ms; }
.ladder-row[data-level="2"] .ladder-bar { transition-delay: 200ms; }
.ladder-row[data-level="3"] .ladder-bar { transition-delay: 260ms; }
.ladder-row[data-level="4"] .ladder-bar { transition-delay: 320ms; }
.ladder-row[data-level="5"] .ladder-bar { transition-delay: 460ms; }
.ladder-row[data-level="6"] .ladder-bar { transition-delay: 520ms; }

/* ── Frontier badge ── */
.ladder-row-frontier {
  position: relative;
}
.ladder-frontier {
  position: absolute;
  right: 10px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  font-size: .5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: rgba(0,0,0,.28);
  background: var(--bg, #fff);
  box-shadow: 0 0 0 4px var(--bg, #fff);
  padding: 2px 7px;
  border-radius: 4px;
}

/* ── Divider ── */
.ladder-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background-color 180ms cubic-bezier(.25,.1,.25,1);
}
.ladder-divider:hover {
  background: rgba(0,0,0,.035);
}
.ladder-divider:active {
  background: rgba(0,0,0,.06);
  transition-duration: 40ms;
}
.ladder-divider-top {
  cursor: default;
}
.ladder-divider-top:hover {
  background: transparent;
}
.ladder-divider::before,
.ladder-divider::after {
  content: "";
  flex: 1;
  height: 0;
  border-top: 0.5px solid rgba(0,0,0,.08);
}
.ladder-divider span {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  font-size: .5625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: rgba(0,0,0,.25);
  white-space: nowrap;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .ladder-row {
    grid-template-columns: 18px 108px 1fr;
    gap: 8px;
    padding: 7px 8px;
  }
  .ladder-num { font-size: .6875rem; }
  .ladder-label { font-size: .75rem; }
  .ladder-track { height: 3px; }
  .ladder-frontier { font-size: .625rem; padding: 1px 6px; right: 8px; }
  .ladder-divider { padding: 4px 8px; }
  .ladder-divider span { font-size: .625rem; }
}

/* ═══════════ QUADRANT DIAGRAM ═══════════ */
.quad-sub {
  font-size: .9375rem;
  color: var(--t2);
  line-height: 1.5;
  margin-top: 4px;
  margin-bottom: 0;
}
.quad-diagram {
  margin-top: 28px;
  display: flex;
  gap: 0;
}
.quad-y-label {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 0;
  margin-right: 10px;
  flex-shrink: 0;
}
.quad-y-label span {
  font-size: .6875rem;
  font-weight: 500;
  color: var(--t2);
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  letter-spacing: .02em;
  cursor: help;
  transition: color 150ms ease;
}
.quad-y-label span:hover {
  color: var(--t1);
}
.quad-main {
  flex: 1;
  min-width: 0;
}
.quad-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.quad-cell {
  background: #fff;
  padding: 24px;
  opacity: 0;
}
.quad-cell-name {
  font-size: .75rem;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: .02em;
  margin-bottom: 6px;
}
.quad-cell-name-muted {
  color: var(--t3);
}
.quad-cell-desc {
  font-size: .6875rem;
  font-weight: 400;
  color: var(--t2);
  line-height: 1.45;
  margin-bottom: 14px;
}
.quad-dots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.quad-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--qd-color, var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--qd-color, var(--t2));
  background: var(--qd-bg, var(--surface));
  opacity: 0;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.quad-dot:hover {
  background: var(--qd-hover, var(--border));
  transform: scale(1.1);
}
.quad-dot:active {
  transform: scale(0.95);
}
/* Per-level accent colors (matching tech map) */
.quad-dot[data-level="0"] { --qd-color: #FF3B30; --qd-bg: rgba(255,59,48,.06);  --qd-hover: rgba(255,59,48,.14); }
.quad-dot[data-level="1"] { --qd-color: #0071E3; --qd-bg: rgba(0,113,227,.05);  --qd-hover: rgba(0,113,227,.12); }
.quad-dot[data-level="2"] { --qd-color: #FF9500; --qd-bg: rgba(255,149,0,.06);   --qd-hover: rgba(255,149,0,.14); }
.quad-dot[data-level="3"] { --qd-color: #FF3B30; --qd-bg: rgba(255,59,48,.06);  --qd-hover: rgba(255,59,48,.14); }
.quad-dot[data-level="4"] { --qd-color: #34C759; --qd-bg: rgba(52,199,89,.06);  --qd-hover: rgba(52,199,89,.14); }
.quad-dot[data-level="5"] { --qd-color: #5856D6; --qd-bg: rgba(88,86,214,.06);  --qd-hover: rgba(88,86,214,.14); }
.quad-dot[data-level="6"] { --qd-color: #5856D6; --qd-bg: rgba(88,86,214,.06);  --qd-hover: rgba(88,86,214,.14); }
.quad-cell-empty {
  font-size: .75rem;
  font-weight: 400;
  color: var(--t3);
  font-style: italic;
}
.quad-br {
  background: var(--surface);
}
.quad-x-label {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
  margin-top: 8px;
}
.quad-x-label span {
  font-size: .6875rem;
  font-weight: 500;
  color: var(--t2);
  letter-spacing: .02em;
  cursor: help;
  transition: color 150ms ease;
}
.quad-x-label span:hover {
  color: var(--t1);
}

/* ---- narrative entrance: foundation → application → discovery → unknown ---- */
@keyframes quad-cell-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes quad-dot-in {
  from { opacity: 0; transform: scale(0.35); }
  to   { opacity: 1; transform: scale(1); }
}

/* cells appear in narrative order */
.is-visible .quad-cell {
  animation: quad-cell-in 300ms var(--apple-ease) both;
}
.is-visible .quad-bl { animation-delay: 150ms; }
.is-visible .quad-tl { animation-delay: 400ms; }
.is-visible .quad-tr { animation-delay: 750ms; }
.is-visible .quad-br { animation-delay: 950ms; }

/* dots count 0 → 6, with a pause at the paradigm shift */
.is-visible .quad-dot {
  animation: quad-dot-in 350ms var(--apple-ease) both;
}
.is-visible .quad-dot[data-level="0"] { animation-delay: 300ms; }
.is-visible .quad-dot[data-level="1"] { animation-delay: 400ms; }
.is-visible .quad-dot[data-level="2"] { animation-delay: 500ms; }
.is-visible .quad-dot[data-level="3"] { animation-delay: 650ms; }
.is-visible .quad-dot[data-level="4"] { animation-delay: 780ms; }
/* ——— paradigm shift gap ——— */
.is-visible .quad-dot[data-level="5"] { animation-delay: 1000ms; }
.is-visible .quad-dot[data-level="6"] { animation-delay: 1120ms; }

@media (max-width: 640px) {
  .quad-cell { padding: 16px; }
  .quad-dot { width: 44px; height: 44px; font-size: .8125rem; }
  .quad-y-label span { font-size: .625rem; }
  .quad-x-label span { font-size: .625rem; }
}

/* ═══════════ TOUCH DEVICE RESETS ═══════════ */
@media (hover: none) {
  .ex0-prompt-header:hover { background: none; }
  .ex0-reasoning-pill:hover {
    background: var(--surface);
    border-color: var(--border);
  }
  .quad-dot:hover {
    background: var(--surface);
    border-color: var(--border);
    transform: none;
  }
  .ladder-row:hover { background: transparent; }
  .ladder-row:hover .ladder-label { color: rgba(0,0,0,.52); }
  .ladder-row:hover .ladder-bar { background: rgba(0,0,0,.12); }
  .ladder-divider:hover { background: transparent; }
  .quad-y-label span:hover { color: var(--t3); }
  .quad-x-label span:hover { color: var(--t3); }

  .quad-dot, .ladder-row, .ex0-prompt-header, .ex0-reasoning-pill { touch-action: manipulation; }
}
