:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #fbfaf6;
  --ink: #1f2421;
  --ink-soft: #4a524d;
  --ink-mute: #7c847f;
  --line: #e5e2d8;
  --line-soft: #efeee7;
  --accent: #2f6f5e;
  --accent-soft: #e6efe9;
  --warn: #b97448;
  --warn-soft: #f5ebe1;
  --yes: #2f6f5e;
  --no: #8a6a3a;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(31,36,33,0.04), 0 1px 3px rgba(31,36,33,0.03);
  --shadow-md: 0 4px 12px rgba(31,36,33,0.06), 0 1px 3px rgba(31,36,33,0.04);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 32px 96px;
}

/* Header */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.top-bar .eyebrow { margin-bottom: 0; }

.playbook-switcher {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 10px;
}
.pb-pill {
  background: none;
  border: none;
  padding: 8px 16px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mute);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.pb-pill:hover { color: var(--ink-soft); }
.pb-pill.active {
  background: var(--accent);
  color: white;
}

/* Playbook view container */
.playbook-view {
  display: none;
  animation: fadeIn 0.25s ease;
}
.playbook-view.active { display: block; }

.view-header {
  margin-bottom: 32px;
}
.view-header h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--ink);
}
.view-header .subtitle {
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 640px;
  margin: 0;
}

/* Question category for FAQs */
.obj-category.cat-question {
  background: #e8edf2;
  color: #4a607a;
}

/* Workday script card sections */
.script-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
}
.script-section:first-child { padding-top: 0; }
.script-section:last-child { border-bottom: none; padding-bottom: 0; }
.script-section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.script-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.script-section-hint {
  font-size: 12px;
  color: var(--ink-mute);
  font-style: italic;
}

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--ink);
}
.subtitle {
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 640px;
  margin: 0;
}

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap; /* 12-tab playbooks overflow even at desktop width — wrap, never hide */
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}
.tab {
  background: none;
  border: none;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-mute);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tab:hover { color: var(--ink-soft); }
.tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.tab .num {
  font-size: 11px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.tab.active .num { color: var(--accent); }

/* Panel */
.panel {
  display: none;
  animation: fadeIn 0.25s ease;
}
.panel.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-header {
  margin-bottom: 24px;
}
.panel-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}
.panel-desc {
  color: var(--ink-mute);
  font-size: 14px;
  margin: 0;
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card-mute {
  background: var(--surface-2);
}

/* Opener switcher */
.opener-switcher {
  display: flex;
  gap: 6px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 20px;
  width: fit-content;
}
.opener-btn {
  background: none;
  border: none;
  padding: 8px 16px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mute);
  cursor: pointer;
  transition: all 0.15s;
}
.opener-btn:hover { color: var(--ink-soft); }
.opener-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.opener-content { display: none; }
.opener-content.active { display: block; }

.script {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
}
.script p { margin: 0 0 16px; }
.script p:last-child { margin-bottom: 0; }
.var {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.92em;
  font-weight: 500;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.blank {
  display: inline-block;
  min-width: 80px;
  border-bottom: 1.5px dashed var(--ink-mute);
  margin: 0 2px;
}

.opener-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}
.meta-block { }
.meta-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.meta-text {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* Flow / Branching */
.branch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 720px) { .branch { grid-template-columns: 1fr; } }

.branch-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.branch-card.yes { border-top: 3px solid var(--yes); }
.branch-card.no { border-top: 3px solid var(--no); }
.branch-head {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.branch-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  border-radius: 20px;
}
.yes .branch-badge { background: var(--accent-soft); color: var(--yes); }
.no .branch-badge { background: var(--warn-soft); color: var(--no); }
.branch-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.branch-body {
  padding: 0 20px 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.branch-body p { margin: 0 0 12px; }
.branch-body p:last-child { margin-bottom: 0; }
.branch-body strong { color: var(--ink); font-weight: 600; }

.pivot {
  background: var(--accent-soft);
  color: var(--yes);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 10px;
}
.no .pivot { background: var(--warn-soft); color: var(--no); }

/* Discovery */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}
.checklist li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.checklist li:hover { background: var(--surface-2); }
.checklist li.checked {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.checklist li.checked .check-q {
  text-decoration: line-through;
  color: var(--ink-mute);
}

/* Sub-tabs (within a panel) */
.subtabs {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.subtab {
  background: none;
  border: none;
  padding: 8px 14px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mute);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.subtab:hover { color: var(--ink-soft); }
.subtab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* Category content blocks within Discovery */
.category-view {
  display: none;
  animation: fadeIn 0.2s ease;
}
.category-view.active { display: block; }

.category-intro {
  margin-bottom: 16px;
  padding: 10px 16px;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* Discovery question item (enriched) */
.disco-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.disco-item:hover { background: var(--surface-2); }
.disco-item.checked {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.disco-item .check-box {
  margin-top: 2px;
}

.disco-q-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.disco-q {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  font-style: italic;
  margin-bottom: 14px;
}
.disco-item.checked .disco-q {
  color: var(--ink-mute);
}
.disco-meta {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.disco-meta-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.disco-meta-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 3px;
}
.disco-meta-row strong {
  color: var(--ink);
  font-weight: 600;
}

/* Persona category */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}
.persona-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.persona-card h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 4px;
  color: var(--ink);
}
.persona-focus {
  font-size: 12px;
  color: var(--ink-mute);
  font-style: italic;
  margin-bottom: 14px;
}
.persona-questions {
  list-style: none;
  padding: 0;
  margin: 0;
}
.persona-questions li {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  font-style: italic;
  padding-left: 16px;
  position: relative;
  margin-bottom: 10px;
}
.persona-questions li:last-child { margin-bottom: 0; }
.persona-questions li::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -2px;
  color: var(--accent);
  font-size: 20px;
  font-weight: 600;
}

/* Cheat sheet */
.cheat-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.cheat-table th, .cheat-table td {
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}
.cheat-table th {
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.cheat-table td {
  font-size: 14px;
  color: var(--ink-soft);
}
.cheat-table td:first-child {
  font-weight: 600;
  color: var(--accent);
  width: 40px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.cheat-table td:nth-child(2) {
  font-weight: 600;
  color: var(--ink);
}
.cheat-table tr:last-child td { border-bottom: none; }
.check-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--ink-mute);
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.checked .check-box {
  background: var(--accent);
  border-color: var(--accent);
}
.check-box svg {
  opacity: 0;
  transition: opacity 0.15s;
}
.checked .check-box svg { opacity: 1; }
.check-q {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.5;
}

/* Objections */
.obj-category {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  display: inline-block;
  text-transform: uppercase;
}
.obj-category.cat-objection { background: var(--accent-soft); color: var(--accent); }
.obj-category.cat-deflection { background: var(--warn-soft); color: var(--warn); }
.obj-category.cat-gatekeeper { background: #e6edf0; color: #4a6878; }
.obj-text { flex: 1; }

.objection {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.objection.open { box-shadow: var(--shadow-md); }
.obj-head {
  padding: 18px 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  user-select: none;
}
.obj-head:hover { background: var(--surface-2); }
.obj-quote {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  font-style: italic;
  flex: 1;
}
.obj-toggle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s, background 0.15s;
}
.objection.open .obj-toggle {
  transform: rotate(45deg);
  background: var(--accent-soft);
  border-color: var(--accent);
}
.obj-toggle::before, .obj-toggle::after {
  content: '';
  position: absolute;
  background: var(--ink-soft);
  border-radius: 2px;
}
.obj-toggle::before { width: 12px; height: 1.5px; }
.obj-toggle::after { width: 1.5px; height: 12px; }
.objection.open .obj-toggle::before,
.objection.open .obj-toggle::after { background: var(--accent); }

.obj-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.objection.open .obj-body { max-height: 600px; }
.obj-content {
  padding: 0 22px 22px;
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
}
.obj-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.obj-response {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.obj-response p { margin: 0 0 12px; }
.obj-response p:last-child { margin-bottom: 0; }
.obj-response strong { color: var(--ink); font-weight: 600; }

/* Value props */
.vp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.vp-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  align-items: start;
}
.vp-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 18px;
}
.vp-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}
.vp-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

.vp-content { min-width: 0; }

.vp-headline {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.55;
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.vp-headline strong {
  font-weight: 700;
  color: var(--ink);
}

.vp-subsection {
  margin-bottom: 14px;
}
.vp-subsection-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.vp-subsection ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.vp-subsection ul li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 5px;
}
.vp-subsection ul li:last-child { margin-bottom: 0; }
.vp-subsection ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.vp-subsection ul li strong {
  color: var(--ink);
  font-weight: 600;
}

.vp-usewhen {
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-left: 3px solid var(--ink-mute);
  border-radius: 4px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.vp-usewhen-label {
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-right: 6px;
}

.closer-card {
  margin-top: 20px;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.closer-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.closer-quote {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
}

/* Footer progress */
.progress {
  margin-top: 32px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-mute);
}
.progress strong { color: var(--ink); font-weight: 600; }
.reset-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.reset-btn:hover { background: var(--surface-2); color: var(--ink); }

/* Industry selector for V3 */
.industry-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}
.industry-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.industry-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.industry-hint {
  font-size: 12px;
  color: var(--ink-mute);
  font-style: italic;
}
.industry-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover {
  background: var(--surface-2);
  border-color: var(--ink-mute);
  color: var(--ink);
}
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Filled-in script variables */
.filled {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 500;
  font-style: normal;
}

/* Supplier intel panel */
.intel {
  margin-top: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: none;
}
.intel.visible { display: block; animation: fadeIn 0.25s ease; }
.intel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 16px;
  flex-wrap: wrap;
}
.intel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.intel-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 6px;
}
.intel-stat-val {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.intel-stat-label {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
}
.intel-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.supplier-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.supplier-tag {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12.5px;
  padding: 4px 10px;
  border-radius: 5px;
}
.supplier-tag.headline {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  font-weight: 500;
}
.intel-empty {
  color: var(--ink-mute);
  font-size: 13px;
  font-style: italic;
}



/* ============ Global search ============ */
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 220px;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-icon { color: var(--ink-mute); flex-shrink: 0; }
.search-wrap:focus-within .search-icon { color: var(--accent); }
#globalSearch {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  min-width: 0;
}
#globalSearch::placeholder { color: var(--ink-mute); }
#globalSearch::-webkit-search-cancel-button { cursor: pointer; }
.search-kbd {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-mute);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  flex-shrink: 0;
}
.search-wrap:focus-within .search-kbd { display: none; }

/* Search mode: hide playbooks, show results (rule order matters — keep after .playbook-view.active) */
.playbook-view.search-hidden { display: none; }

.search-view { animation: fadeIn 0.2s ease; }
.search-meta {
  font-size: 13px;
  color: var(--ink-mute);
  margin-bottom: 20px;
  padding: 10px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.search-meta strong { color: var(--ink); font-weight: 600; }
.search-meta kbd {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 5px;
}

.search-hit {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-hit:hover, .search-hit:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  outline: none;
}
.search-hit-crumb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.search-hit-crumb .open-hint {
  color: var(--ink-mute);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 11px;
}
.search-hit-body {
  padding: 16px 18px;
  pointer-events: none; /* clones are visual previews; the card itself is the click target */
}
.search-hit-body > ul.checklist { margin: 0; }
.search-hit-body .objection { margin-bottom: 0; border: none; }
.search-hit-body .obj-body { max-height: none; }
.search-hit-body .disco-item,
.search-hit-body .vp-card,
.search-hit-body .persona-card,
.search-hit-body .branch-card { border: none; margin-bottom: 0; }
.search-hit-body .checklist li { border: none; margin-bottom: 0; }

mark.search-mark {
  background: #f6e7b3;
  color: var(--ink);
  border-radius: 3px;
  padding: 0 2px;
}

.search-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--ink-mute);
  font-size: 14px;
}
.search-empty .big {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

/* Flash highlight when jumping to a search result's home */
@keyframes flashPulse {
  0%   { box-shadow: 0 0 0 3px var(--accent); }
  100% { box-shadow: 0 0 0 3px transparent; }
}
.flash { animation: flashPulse 1.6s ease-out 2; border-radius: var(--radius); }

/* ============ Narrow-viewport layout ============ */
@media (max-width: 720px) {
  .container { padding: 24px 16px 72px; }
  .view-header h1 { font-size: 28px; }

  /* Tabs become tappable pills — no underline row, bigger touch targets */
  .tabs {
    border-bottom: none;
    gap: 6px;
    margin-bottom: 28px;
  }
  .tab {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 10px 14px;
    margin-bottom: 0;
    white-space: normal;
    text-align: left;
  }
  .tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
  }
  .tab.active .num { color: rgba(255, 255, 255, 0.75); }

  /* Top bar stacks: title, switcher, then full-width search */
  .top-bar { gap: 12px; }
  .search-wrap { order: 3; flex-basis: 100%; max-width: none; }
  .playbook-switcher { flex-wrap: wrap; }
  .opener-switcher { flex-wrap: wrap; width: auto; }

  .opener-meta { grid-template-columns: 1fr; }
  .disco-meta-row { grid-template-columns: 64px 1fr; gap: 8px; }
  .cheat-table { display: block; overflow-x: auto; }
}

/* ============ Keyboard focus ============ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.search-hit:focus-visible { outline-offset: 0; }

/* ============ Cross-reference jump buttons ============ */
.xref {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 7px 13px;
  background: var(--accent-soft);
  color: var(--accent);
  border: none;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.xref:hover {
  background: var(--accent);
  color: white;
}
