/* ============================================================
   OnTrak Engagement Specialist Guide - Styles
   Bookish palette: plaster / ink / candle flame
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg: #F2EDE6;
  --color-surface: #FFFFFF;
  --color-text: #1A1A2E;
  --color-text-muted: #7A6F63;
  --color-text-light: #9E9287;
  --color-border: #D9D0C4;
  --color-accent: #F5A52A;
  --color-nav: #1A1A2E;
  --top-bar-height: 100px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-tight: 'Inter Tight', 'Inter', -apple-system, sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-bar-height) + 110px); }

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* --- Micro-animations --- */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate .script-section {
  animation: fadeSlideIn 0.3s ease both;
}
.animate .script-section:nth-child(2) { animation-delay: 0.05s; }
.animate .script-section:nth-child(3) { animation-delay: 0.1s; }
.animate .script-section:nth-child(4) { animation-delay: 0.15s; }
.animate .script-section:nth-child(5) { animation-delay: 0.2s; }
.animate .script-section:nth-child(6) { animation-delay: 0.25s; }

/* ============================================================
   HEADER
   ============================================================ */
.top-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--color-nav);
  display: flex;
  flex-direction: column;
}

/* Brand row */
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-tight);
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

.brand-subtext {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.38);
}

.brand-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-condition {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
}

.brand-tag {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Condition tabs row */
.header-tabs {
  display: flex;
  align-items: stretch;
  padding: 0 32px;
  gap: 2px;
  height: 44px;
  flex-shrink: 0;
}

.condition-tab {
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: none;
  border-radius: 6px 6px 0 0;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  font-family: var(--font-tight);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
  margin-top: 6px;
  letter-spacing: -0.01em;
}
.condition-tab:hover {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
}
.condition-tab.active {
  background: var(--color-accent) !important;
  color: var(--color-nav) !important;
  font-weight: 700;
  box-shadow: none;
}

/* ============================================================
   FLOATING TOOL STRIP
   ============================================================ */
.tool-strip {
  position: fixed;
  top: calc(var(--top-bar-height) + 16px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.tool-strip-left { left: 12px; top: calc(var(--top-bar-height) + 20px); }

.strip-label {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-text-light);
  padding: 4px 0 2px;
}

.strip-divider {
  width: 28px;
  height: 1px;
  background: var(--color-border);
  margin: 6px 0;
  border-radius: 1px;
}

.strip-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: var(--color-text-muted);
  position: relative;
}

.strip-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
  transform: scale(1.08);
}

.strip-btn.nav-link::after {
  content: attr(title);
  position: absolute;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--color-nav);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
}

.strip-btn.nav-link:hover::after {
  opacity: 1;
}

.strip-btn.active {
  background: rgba(245,165,42,0.15);
  color: #8B6200;
}

/* --- Hover Popup --- */
.hover-popup {
  display: none;
  position: fixed;
  z-index: 9999;
  width: 360px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 18px 20px;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.06);
  border: 1px solid var(--color-border);
  font-size: 13.5px;
  line-height: 1.6;
}
.hover-popup.visible {
  display: block;
  animation: fadeSlideIn 0.15s ease both;
}
.hover-popup p { margin-bottom: 8px; }
.hover-popup p:last-child { margin-bottom: 0; }

.popup-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.coaching-tip {
  font-style: italic;
  color: var(--color-text-muted);
  font-size: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--color-border);
  margin-top: 8px;
}

.popup-list {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
}
.popup-list li {
  padding: 4px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
}
.popup-list li strong { font-weight: 600; }
.popup-list li .examples { color: var(--color-text-muted); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.content {
  margin-top: var(--top-bar-height);
  padding-top: 96px; /* clears the fixed walkthrough bar at the top */
  min-height: calc(100vh - var(--top-bar-height));
}

.condition-header { display: none; }

.start-about-link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s;
}
.start-about-link:hover { opacity: 0.75; }

/* Two-column layout */
.content-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 28px 40px 80px 100px; /* 100px left clears the fixed tool strip */
}

.content-primary {
  flex: 1;
  min-width: 0;
}

.content-sidebar {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--top-bar-height) + 20px);
}

/* Sidebar cards */
.sidebar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.sidebar-card-dark {
  background: var(--color-nav);
  border: none;
}

.sidebar-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-card-header-light {
  background: #F8F5F0;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-card-title {
  font-family: var(--font-tight);
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
}

.sidebar-card-title-dark {
  color: var(--color-text);
}

.sidebar-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-field-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 4px;
}

.sidebar-field-value {
  font-family: var(--font-sans);
  font-size: 14px;
  color: #FFFFFF;
}

.sidebar-field-quote {
  font-family: var(--font-sans);
  font-size: 13px;
  font-style: italic;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin: 0;
}

.sidebar-objections {
  display: flex;
  flex-direction: column;
}

/* Each objection is a self-contained card: dark header, body, coaching strip */
.sidebar-objection {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-ask-coach {
  border-top: 3px solid var(--color-bg);
  padding: 14px 16px;
  background: #FFFBF1;
}
.sidebar-ask-coach-label {
  display: inline-block;
  background: #1a1a2e;
  color: #fff;
  font-family: var(--font-tight);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
}
.sidebar-ask-coach-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #2d3748;
}

.sidebar-objection-border {
  border-bottom: 3px solid var(--color-bg);
}

/* Dark trigger bar */
.obj-trigger {
  background: var(--color-nav);
  color: #FFFFFF;
  font-family: var(--font-tight);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  margin: 0;
  letter-spacing: -0.01em;
  position: relative;
}

/* Accordion items only: + when collapsed, nothing when expanded */
.accordion-item .obj-trigger {
  padding-right: 40px;
  cursor: pointer;
  user-select: none;
}

.accordion-item .obj-trigger::after {
  content: "+";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
}

.accordion-item.expanded .obj-trigger::after {
  content: "";
}

/* Response body */
.obj-response {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
  padding: 10px 16px 0;
}
.obj-response:last-of-type { padding-bottom: 12px; }

/* Accordion: hide body by default, show when expanded */
.sidebar-objection .obj-response,
.sidebar-objection .obj-followup,
.sidebar-objection .obj-examples { display: none; }

.sidebar-objection.expanded .obj-response { display: block; }
.sidebar-objection.expanded .obj-followup { display: block; }
.sidebar-objection.expanded .obj-examples { display: flex; }

/* Coaching strip -- instruction to go to open-ended question */
.obj-followup {
  background: #FFF8E8;
  border-top: 1px solid #E8DBBF;
  padding: 8px 16px;
  margin: 0;
  font-family: var(--font-tight);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5C4A1E;
}

/* Open-ended question examples */
.obj-examples {
  list-style: none;
  margin: 0;
  padding: 8px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #FFFDF5;
  border-top: 1px solid #F5E8C0;
}

.obj-example-item {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--color-text);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
}

.obj-example-item::before {
  content: "?";
  position: absolute;
  left: 0;
  font-family: var(--font-tight);
  font-size: 13px;
  font-weight: 800;
  color: var(--color-accent);
}

/* Call flow card (Start Here sidebar) */
.sidebar-flow-list {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-flow-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sidebar-flow-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(245,165,42,0.2);
  border: 1px solid rgba(245,165,42,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-tight);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.sidebar-flow-name {
  font-family: var(--font-tight);
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  display: block;
}

.sidebar-flow-desc {
  font-family: var(--font-sans);
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  line-height: 1.4;
  margin-top: 1px;
  display: block;
}

/* Keep .content-inner as alias so any remaining JS refs still work */
.content-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* --- Script Sections (bordered fieldset-style cards on plaster bg) --- */
.script-section {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-bottom: 32px;
  padding: 22px 20px 18px;
  border: 2px solid #d4cdc1;
  border-radius: 12px;
}

.section-bar { display: none; }

.section-content {
  display: contents; /* flatten wrapper so children render directly */
}

.section-label {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 2px 14px;
  background: var(--color-bg);
  font-family: var(--font-tight);
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1a1a2e;
  white-space: nowrap;
}

/* Keep .section-title as alias for any JS-generated content */
.section-title {
  font-family: var(--font-tight);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-light);
}

.section-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(245,165,42,0.15);
  color: #7A5000;
}

.sub-heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 20px 0 12px;
}

/* --- Script blocks: what the rep says --- */
.script-block {
  background: #FFF8E8;
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  font-size: 15px;
  line-height: 1.72;
  margin-bottom: 12px;
  color: var(--color-text);
}
.script-block p { margin-bottom: 12px; }
.script-block p:last-child { margin-bottom: 0; }

.script-block strong {
  background: rgba(245,165,42,0.2);
  padding: 1px 5px;
  border-radius: 3px;
  color: #6B3D00;
}

/* --- Discovery questions --- */
.discovery-intro { font-size: 15px; font-weight: 500; }

.question-list {
  list-style: none;
  counter-reset: q;
}

.question-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 14.5px;
  line-height: 1.55;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.question-item:last-child {
  border-bottom: none;
}
.question-item::before {
  content: "?";
  flex-shrink: 0;
  font-family: var(--font-tight);
  font-size: 15px;
  font-weight: 800;
  color: var(--color-accent);
  width: 16px;
  text-align: center;
  margin-top: 1px;
}

.question-text { flex: 1; }

.question-note {
  display: block;
  margin-top: 6px;
  padding: 8px 12px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.5;
}

/* --- Tailoring --- */
.tailoring-intro { font-size: 15px; line-height: 1.7; margin-bottom: 16px; }

.tailoring-urgency {
  display: block;
  padding: 12px 18px;
  margin: 16px 0;
  background: #FEF2F2;
  border-left: 4px solid #EF4444;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-weight: 700;
  font-size: 13px;
  color: #991B1B;
  letter-spacing: 0.3px;
}

.tailoring-body { font-size: 15px; line-height: 1.7; }
.tailoring-body p { margin-bottom: 14px; }

.tailoring-hook {
  background: #FFF8E8;
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin: 12px 0;
  font-size: 14.5px;
}

.tailoring-bullets { list-style: none; margin: 12px 0; padding: 0; }
.tailoring-bullets li {
  padding: 5px 0 5px 24px;
  position: relative;
  font-size: 14.5px;
}
.tailoring-bullets li::before {
  content: "-";
  position: absolute;
  left: 8px;
  color: var(--color-text-muted);
  font-weight: 700;
}

.tailoring-extra-dialog {
  margin: 12px 0;
  padding: 14px 18px;
  background: #F8F5F0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}
.tailoring-extra-dialog .label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-light);
  margin-bottom: 8px;
}
.tailoring-extra-dialog ul { list-style: disc; padding-left: 20px; font-size: 13.5px; color: var(--color-text-muted); }
.tailoring-extra-dialog li { margin-bottom: 3px; }

.coaching-note {
  font-style: italic;
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 10px 14px;
  background: #F8F5F0;
  border-radius: var(--radius-sm);
  margin-top: 12px;
}

.opening-tip {
  padding: 14px 18px;
  margin-bottom: 16px;
  background: #FFFDF5;
  border: 1.5px dashed #D4A820;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: #5C4A1E;
  line-height: 1.65;
}
.opening-tip .buy-in {
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.opening-tip p { margin: 0; }
.opening-tip p + p { margin-top: 10px; }

.coaching-callout {
  padding: 12px 16px;
  background: #FFF8E8;
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13.5px;
  font-style: italic;
  color: #5C4A1E;
  margin-bottom: 12px;
}

.example-block {
  background: #F8F5F0;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 12px;
  border: 1px solid var(--color-border);
}
.example-block .example-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.example-block .example-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-text);
  font-style: italic;
}

/* --- Buy-in / TIP markers --- */
.buy-in {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-nav);
  font-family: var(--font-tight);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
}

.buy-in-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  background: #FFFDF5;
  border: 1.5px dashed #D4A820;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 400;
  color: #5C4A1E;
  line-height: 1.6;
}
.buy-in-note .buy-in { flex-shrink: 0; margin-top: 1px; }

/* --- Condition Selection Grid (Start Here) --- */
.condition-columns {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.condition-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
}

.condition-column-header {
  font-family: var(--font-tight);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 10px;
  margin-bottom: 4px;
}

.condition-row {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  padding: 10px 0;
  cursor: pointer;
  transition: all 0.12s;
}

.condition-row:hover {
  padding-left: 8px;
  font-weight: 600;
  color: var(--color-nav);
}

/* Transfer section -- teal accent on the supporting blocks; the script line
   itself uses the default yellow so the actual words to say still pop. */
#transfer .buy-in-note {
  background: #ECFEFF;
  border-color: #67E8F9;
  color: #164E63;
}
#transfer .example-block {
  background: #E0F2FE;
  border-color: #BAE6FD;
}
#transfer .example-block .example-label { color: #0369A1; }
#transfer .example-block .example-text { color: #075985; }

/* Nav hints (Start Here - explains condition navigation) */
.nav-hint-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  background: #FAF7F2;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

.nav-hint {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}

.nav-hint strong {
  color: var(--color-text);
  font-weight: 600;
}

.nav-hint-wellness {
  color: var(--color-text);
}

.nav-hint-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nav-hint-link:hover {
  color: #D4890A;
}

/* --- Extra Objections --- */
.extra-objections-label { margin-top: 8px; }
.extra-objections-label .strip-label { font-size: 7px; }

.extra-objection-note {
  font-size: 12px;
  font-style: italic;
  color: #5C4A1E;
  padding: 8px 10px;
  background: #FFF8E8;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 20px 24px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  background: var(--color-nav);
  letter-spacing: 0.3px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-link {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-weight: 500;
}
.footer-link:hover { color: rgba(255,255,255,0.85); }


/* Pulsing target boxes during demo playback (vivid purple to stand out
   against the warm yellow/orange page palette) */
@keyframes demo-pulse-anim {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.55); }
  50% { box-shadow: 0 0 0 14px rgba(124, 58, 237, 0); }
}
.demo-pulsing {
  position: relative;
  border: 2.5px solid #7c3aed !important;
  background: #faf5ff;
  border-radius: 10px;
  animation: demo-pulse-anim 2s ease-in-out infinite;
  /* Override any overflow:hidden inherited from .sidebar-card so the
     numbered step badge (positioned at top-left, -16px) is not clipped */
  overflow: visible !important;
}
.demo-pulsing::before {
  content: attr(data-step);
  position: absolute;
  top: -16px;
  left: -16px;
  width: 38px;
  height: 38px;
  background: #7c3aed;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  font-family: var(--font-tight);
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  z-index: 3;
}

/* --- Walkthrough tour: launch button, floating bar, highlight --- */

.tour-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  top: calc(var(--top-bar-height) + 12px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 18px;
  background: #1a1a2e;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  font-family: var(--font-base);
  font-size: 14px;
  min-width: 420px;
  max-width: 92vw;
  transition: transform 0.3s ease;
}
.tour-controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.tour-scrubber-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tour-scrubber-row input[type="range"] {
  flex: 1;
  accent-color: #7c3aed;
  height: 4px;
}
.tour-time {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  min-width: 32px;
  text-align: right;
}
.tour-bar-visible { transform: translateX(-50%) translateY(0); }

.tour-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #7c3aed;
  color: #fff;
  border: none;
  font-family: var(--font-tight);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.tour-btn:hover { background: #6d28d9; }
.tour-icon { font-size: 13px; line-height: 1; }
.tour-btn-label { white-space: nowrap; }

.tour-status {
  flex: 1 1 auto;
  color: #cbd5e1;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-volume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
}
.tour-volume input[type="range"] { width: 90px; accent-color: #7c3aed; }

.tour-highlight {
  position: relative;
  border-radius: 10px;
  box-shadow: 0 0 0 3px #7c3aed, 0 0 0 8px rgba(124, 58, 237, 0.25);
  animation: tour-pulse-anim 2s ease-in-out infinite;
  scroll-margin-top: 140px;
}
@keyframes tour-pulse-anim {
  0%, 100% { box-shadow: 0 0 0 3px #7c3aed, 0 0 0 8px rgba(124, 58, 237, 0.25); }
  50%      { box-shadow: 0 0 0 3px #7c3aed, 0 0 0 14px rgba(124, 58, 237, 0); }
}


.brand-tag-link {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  margin-left: 6px;
  transition: color 0.15s ease;
}
.brand-tag-link:hover { color: #f5a52a; }

@keyframes tour-bar-first-pulse {
  0%, 100% { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); }
  50%      { box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.55), 0 12px 32px rgba(0, 0, 0, 0.35); }
}
.tour-bar-first-pulse {
  animation: tour-bar-first-pulse 1.4s ease-in-out 3;
}

.tour-mobile-notice {
  display: none;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

/* --- Responsive (must be last so mobile overrides win the cascade) --- */
@media (max-width: 768px) {
  /* Header */
  .brand-row { padding: 0 12px; }
  .brand-subtext { display: none; }
  .header-condition { display: none; }
  .brand-tag { display: none; }

  /* Tabs: scrollable row instead of overflow-hidden */
  .header-tabs {
    padding: 0 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 2px;
  }
  .header-tabs::-webkit-scrollbar { display: none; }
  .condition-tab { flex-shrink: 0; padding: 0 12px; font-size: 12px; }

  /* Keep header clearance, remove only the extra 96px reserved for tour bar */
  .content {
    margin-top: var(--top-bar-height);
    padding-top: 16px;
  }

  /* Main layout: single column, remove left padding reserved for tool strip */
  .content-layout {
    flex-direction: column;
    padding: 20px 16px 60px 16px;
    gap: 16px;
  }

  /* Sidebar becomes full-width below primary content */
  .content-sidebar {
    width: 100%;
    position: static;
  }

  /* Legacy inner padding selectors */
  .content-inner { padding: 20px 16px 60px; }
  .section-content { padding: 16px; }

  /* Tool strip hidden on mobile */
  .tool-strip { display: none; }

  /* Tour bar and notice: hide bar, show desktop-only nudge */
  .tour-bar { display: none !important; }
  .tour-mobile-notice { display: block; }

  /* Volume slider hidden on mobile to save space */
  .tour-volume { display: none; }
}
