/*
Flows Supported: global UI styling, sidebar animations
Inputs: CSS classes and variables
Outputs: themed components with interactive sidebar effects
*/
:root {
  color-scheme: dark;
  --primary-bg: #1d2733;
  --sidebar-bg: #273646;
  --card-bg: #232f3e;
  --text-color: #f1f5f9;
  --command-accent: #00b5d8;
  --command-accent-hover: #0091b2;
  --border-color: #33424e;
  --muted-surface: rgba(15, 23, 42, 0.7);
  --nav-bg: rgba(9, 14, 25, 0.82);
  --tray-bg: rgba(15, 23, 42, 0.82);
  --tray-border: rgba(148, 163, 184, 0.25);
  --sidebar-width: 19.5rem;
  --sidebar-rail-width: 4.75rem;
  --sidebar-gap: clamp(1rem, 2vw, 2rem);
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

body {
  background: var(--primary-bg);
  color: var(--text-color);
  margin: 0;
  width: 100%;
}

body[data-sidebar-enabled="1"] {
  padding-left: calc(var(--sidebar-width) + var(--sidebar-gap));
}

body[data-sidebar-enabled="1"][data-sidebar-rail-collapsed="1"] {
  padding-left: calc(var(--sidebar-rail-width) + var(--sidebar-gap));
}

#sidebar-container {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  height: 100%;
  pointer-events: none;
  transform: translateX(0);
  opacity: 1;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.3s ease;
  z-index: 49;
}

#sidebar-container .sidebar {
  transform: translateX(0);
  opacity: 1;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.3s ease;
  pointer-events: auto;
}

body[data-sidebar-enabled="0"] #sidebar-container {
  pointer-events: none;
}

body[data-sidebar-enabled="0"] #sidebar-container .sidebar {
  transform: translateX(calc(-100% - var(--sidebar-gap)));
  opacity: 0;
}

body[data-sidebar-enabled="1"] #sidebar-container,
body[data-sidebar-enabled="1"] .sidebar {
  width: var(--sidebar-width);
}

body[data-sidebar-enabled="1"][data-sidebar-rail-collapsed="1"] .sidebar {
  width: var(--sidebar-rail-width);
}

body[data-sidebar-enabled="1"] #content {
  padding-inline: clamp(1.25rem, 4vw, 2.5rem) clamp(1.5rem, 5vw, 3rem);
}

body[data-sidebar-enabled="1"] #content > .ml-48,
body[data-sidebar-enabled="1"] > .ml-48 {
  margin-left: 0 !important;
}

#content {
  width: 100%;
  box-sizing: border-box;
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 4rem);
  transition: padding 0.32s ease, margin 0.32s ease;
}

body[data-page-full-width="0"] #content {
  max-width: min(108rem, 100%);
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

body[data-page-full-width="1"] #content > :where(:not(style):not(script)) {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin-inline: auto;
}

body[data-page-full-width="1"] #content
  > :where(:not(style):not(script))
  :where(.mx-auto[class*="max-w-"], .w-full[class*="max-w-"]) {
  max-width: 100%;
  margin-inline: auto;
}

#analysisQueue {
  position: fixed;
  top: calc(1.25rem + 3.5rem);
  right: clamp(1.25rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 80;
  max-width: min(24rem, calc(100vw - 2.5rem));
}

body[data-sidebar-enabled="1"] #analysisQueue {
  left: calc(var(--sidebar-width) + var(--sidebar-gap) + clamp(1rem, 3vw, 2.75rem));
  right: clamp(1.25rem, 4vw, 3rem);
  max-width: min(
    24rem,
    calc(100vw - (var(--sidebar-width) + var(--sidebar-gap)) - clamp(2.25rem, 8vw, 5rem))
  );
}

body[data-sidebar-enabled="1"][data-sidebar-rail-collapsed="1"] #analysisQueue {
  left: calc(var(--sidebar-rail-width) + var(--sidebar-gap) + clamp(1rem, 3vw, 2.75rem));
  max-width: min(
    24rem,
    calc(100vw - (var(--sidebar-rail-width) + var(--sidebar-gap)) - clamp(2.25rem, 8vw, 5rem))
  );
}

@media (max-width: 900px) {
  #analysisQueue {
    top: calc(1.25rem + 4.5rem);
    left: clamp(1rem, 4vw, 2rem);
    right: clamp(1rem, 4vw, 2rem);
    max-width: min(20rem, calc(100vw - 2.5rem));
  }

  body[data-sidebar-enabled="1"] #analysisQueue {
    left: clamp(1rem, 4vw, 2rem);
    right: clamp(1rem, 4vw, 2rem);
  }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 20px;
}

.accent {
  color: var(--command-accent);
}

.neon-border {
  box-shadow: 0 0 10px var(--command-accent), 0 0 20px var(--command-accent);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: grid;
  grid-template-columns:
    var(--sidebar-rail-width)
    minmax(0, calc(var(--sidebar-width) - var(--sidebar-rail-width)));
  width: var(--sidebar-width);
  height: 100vh;
  overflow: visible;
  border-right: 1px solid rgba(51, 65, 85, 0.48);
  background: rgba(7, 12, 24, 0.96);
  color: #f8fafc;
  box-shadow: 0 35px 60px -44px rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(24px);
}

.sidebar[data-collapsed="1"] {
  grid-template-columns: var(--sidebar-rail-width) 0;
  width: var(--sidebar-rail-width);
  border-right: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.sidebar__rail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 0.65rem;
  border-right: 1px solid rgba(51, 65, 85, 0.48);
  background: rgba(15, 23, 42, 0.98);
}

.sidebar__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 8px;
  border: 1px solid rgba(14, 165, 233, 0.38);
  background: rgba(14, 165, 233, 0.16);
  color: #e0f2fe;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.sidebar__sections,
.sidebar__footer {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 0.55rem;
}

.sidebar__footer {
  margin-top: auto;
}

.sidebar__rail-button,
.sidebar__utility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(71, 85, 105, 0.55);
  background: rgba(30, 41, 59, 0.82);
  color: #94a3b8;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar__rail-button {
  width: 100%;
  min-height: 3.75rem;
  padding: 0.45rem 0.25rem;
  flex-direction: column;
  gap: 0.28rem;
}

.sidebar__collapse {
  min-height: 3.25rem;
}

.sidebar__utility {
  width: 100%;
  height: 2.35rem;
}

.sidebar__rail-button span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.sidebar__rail-button:hover,
.sidebar__rail-button:focus-visible,
.sidebar__utility:hover,
.sidebar__utility:focus-visible {
  border-color: rgba(125, 211, 252, 0.56);
  background: rgba(8, 47, 73, 0.82);
  color: #e0f2fe;
  outline: none;
}

.sidebar__rail-button.is-active[data-accent="sky"],
.sidebar__item.is-active[data-accent="sky"] {
  border-color: rgba(56, 189, 248, 0.62);
  background: rgba(14, 116, 144, 0.74);
  color: #f0f9ff;
}

.sidebar__rail-button.is-active[data-accent="emerald"],
.sidebar__item.is-active[data-accent="emerald"] {
  border-color: rgba(52, 211, 153, 0.58);
  background: rgba(6, 95, 70, 0.68);
  color: #ecfdf5;
}

.sidebar__rail-button.is-active[data-accent="amber"],
.sidebar__item.is-active[data-accent="amber"] {
  border-color: rgba(245, 158, 11, 0.62);
  background: rgba(146, 64, 14, 0.72);
  color: #fffbeb;
}

.sidebar__panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-left: 1px solid rgba(71, 85, 105, 0.34);
  background: rgba(3, 7, 18, 0.94);
  backdrop-filter: blur(18px);
  transition: opacity 0.2s ease, transform 0.22s ease;
}

.sidebar[data-collapsed="1"] .sidebar__panel {
  pointer-events: none;
  opacity: 0;
  transform: translateX(-0.6rem);
}

.sidebar[data-collapsed="1"][data-peek-open="1"] .sidebar__panel {
  position: absolute;
  inset: 0 auto 0 var(--sidebar-rail-width);
  width: calc(var(--sidebar-width) - var(--sidebar-rail-width));
  pointer-events: auto;
  opacity: 1;
  transform: none;
  box-shadow: 24px 0 44px -34px rgba(2, 6, 23, 0.8);
}

.sidebar__panel-section {
  display: none;
  height: 100%;
  min-width: 0;
  padding: 1.05rem 0.95rem 1rem;
}

.sidebar__panel-section.is-active {
  display: flex;
  flex-direction: column;
}

.sidebar__panel-heading {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(71, 85, 105, 0.36);
}

.sidebar__eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(125, 211, 252, 0.9);
}

.sidebar__panel-section[data-accent="emerald"] .sidebar__eyebrow {
  color: rgba(110, 231, 183, 0.9);
}

.sidebar__panel-section[data-accent="amber"] .sidebar__eyebrow {
  color: rgba(251, 191, 36, 0.92);
}

.sidebar__panel-heading h2 {
  margin: 0.3rem 0 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
  color: #f8fafc;
}

.sidebar__panel-heading p:last-child {
  margin: 0.45rem 0 0;
  color: rgba(203, 213, 225, 0.78);
  font-size: 0.78rem;
  line-height: 1.4;
}

.sidebar__items {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 0.55rem;
  overflow-y: auto;
  padding: 0.85rem 0.1rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(71, 85, 105, 0.7) transparent;
}

.sidebar__items::-webkit-scrollbar {
  width: 0.35rem;
}

.sidebar__items::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.72);
}

.sidebar__item {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  align-items: center;
  gap: 0.62rem;
  min-height: 4rem;
  padding: 0.65rem 0.68rem;
  border-radius: 8px;
  border: 1px solid rgba(71, 85, 105, 0.44);
  background: rgba(15, 23, 42, 0.56);
  color: rgba(226, 232, 240, 0.9);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar__item:hover,
.sidebar__item:focus-visible {
  border-color: rgba(125, 211, 252, 0.56);
  background: rgba(15, 23, 42, 0.84);
  color: #f8fafc;
  outline: none;
}

.sidebar__item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  border: 1px solid rgba(71, 85, 105, 0.52);
  background: rgba(30, 41, 59, 0.82);
  color: #94a3b8;
}

.sidebar__item-copy {
  min-width: 0;
}

.sidebar__item-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.sidebar__item-label,
.sidebar__item-description {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__item-label {
  color: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
}

.sidebar__item-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.7);
  padding: 0.12rem 0.42rem;
  color: rgba(203, 213, 225, 0.82);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar__item-description {
  margin-top: 0.25rem;
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.72rem;
}

.sidebar [data-lucide] {
  width: 1rem;
  height: 1rem;
}

@media (max-width: 900px) {
  :root {
    --sidebar-rail-width: 4.4rem;
  }

  .sidebar {
    grid-template-columns:
      var(--sidebar-rail-width)
      minmax(0, calc(var(--sidebar-width) - var(--sidebar-rail-width)));
  }

  .sidebar__rail {
    padding-inline: 0.5rem;
  }

  .sidebar[data-collapsed="1"][data-peek-open="1"] .sidebar__panel {
    left: var(--sidebar-rail-width);
    width: calc(var(--sidebar-width) - var(--sidebar-rail-width));
  }
}

.command-sidebar__analysis {
  pointer-events: none;
}

.command-sidebar__analysis > * {
  pointer-events: auto;
}

.command-sidebar__toast {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 1rem;
  padding: 0.85rem;
  box-shadow: 0 25px 55px -35px rgba(56, 189, 248, 0.45);
  color: rgba(226, 232, 240, 0.88);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.command-sidebar__toast button {
  color: rgba(125, 211, 252, 0.95);
}

.command-sidebar__toast button:hover {
  text-decoration: underline;
}

@keyframes sidebarPulse {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* Neon score buttons for the Briefing table */
.score-btn {
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-weight: 600;
  transition: transform 0.2s;
  display: inline-block;
}
.score-btn:hover {
  transform: scale(1.05);
}
.score-btn.pulse {
  animation: neonPulse 2s infinite;
}
.score-great {
  color: #39ff14;
  background: rgba(57, 255, 20, 0.1);
  box-shadow: 0 0 6px #39ff14, 0 0 12px #39ff14;
}
.score-okay {
  color: #ffea00;
  background: rgba(255, 234, 0, 0.1);
  box-shadow: 0 0 6px #ffea00, 0 0 12px #ffea00;
}
.score-poor {
  color: #ff3131;
  background: rgba(255, 49, 49, 0.1);
  box-shadow: 0 0 6px #ff3131, 0 0 12px #ff3131;
}
@keyframes neonPulse {
  0%, 100% { box-shadow: 0 0 6px currentColor, 0 0 12px currentColor; }
  50% { box-shadow: 0 0 12px currentColor, 0 0 24px currentColor; }
}

/* Limit graph canvas dimensions on the Briefing page */
#overview-canvas {
  max-width: 900px;
  max-height: 320px;
}
#pie-canvas {
  max-width: 460px;
  max-height: 320px;
}
#promise-pie {
  max-width: 460px;
  max-height: 320px;
}
#store-hour-canvas,
#mini-chart {
  max-width: 480px;
  max-height: 200px;
}
#detail-canvas {
  max-width: 480px;
  max-height: 200px;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Fallback login sphere when Three.js fails to load */
.fallback-sphere {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--command-accent), var(--card-bg));
  animation: spinFallback 8s linear infinite;
}

@keyframes spinFallback {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Floating login text */
.float-text {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(-5%); }
  50% { transform: translateY(5%); }
}

/* Polished action buttons used on the Unresolved Promises page */
.action-btn {
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: transform 0.2s, opacity 0.2s;
}
.action-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.action-sms { background: linear-gradient(90deg,#3b82f6,#2563eb); }
.action-alert { background: linear-gradient(90deg,#facc15,#eab308); }
.action-callback { background: linear-gradient(90deg,#10b981,#059669); }

/* Highlight target column when dragging */
.drop-highlight {
  background: rgba(59, 130, 246, 0.3);
}

/* Data bus visuals on dashboard */
.bus-line {
  position: relative;
  flex: 1;
  height: 4px;
  background: linear-gradient(to right, var(--command-accent) 0%, transparent 100%);
  overflow: hidden;
  border-radius: 2px;
}

.bit {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: var(--command-accent);
  opacity: 0;
  animation: bit-move 1s linear infinite;
}

.chip {
  background: var(--card-bg);
  border: 1px solid var(--command-accent);
  box-shadow: 0 0 10px var(--command-accent);
}

.token-pill {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(71, 85, 105, 0.55);
  color: rgba(226, 232, 240, 0.9);
  box-shadow: 0 14px 34px -26px rgba(15, 23, 42, 0.4);
}

.site-stack {
  display: grid;
  grid-template-columns: repeat(auto-fill, 8px);
  grid-auto-rows: 6px;
  gap: 2px;
  margin-right: 8px;
}

.site-box {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  position: relative;
}

.site-box::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 16px;
  height: 1px;
  background: currentColor;
}

.site-box.active {
  background: #22c55e;
  z-index: 1;
}

.site-box.inactive {
  background: #dc2626;
  opacity: 0.4;
}

@keyframes bit-move {
  0% { transform: translateX(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

/* Funnel DataBus styles */
.data-funnel {
  position: relative;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.ai-chip {
  position: absolute;
  width: 150px;
  height: 150px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #111;
  color: #fff;
  border: 2px solid #00ffe1;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px #00ffe1;
  animation: ai-pulse 4s ease-in-out infinite, scanline 1.5s linear infinite;
  overflow: hidden;
}

.ai-chip .contact-pulse {
  position: absolute;
  left: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-50%);
  background: #00ffe1;
  border-radius: 50%;
  box-shadow: 0 0 6px #00ffe1;
  animation: contactPulse 3s ease-in-out infinite;
}

.ai-chip .wire {
  position: absolute;
  background: #00ffe1;
  box-shadow: 0 0 4px #00ffe1;
}
.ai-chip .wire-top,
.ai-chip .wire-bottom {
  width: 40px;
  height: 2px;
  left: 50%;
  transform: translateX(-50%);
}
.ai-chip .wire-top {
  top: -22px;
  box-shadow: 6px 0 #00ffe1, -6px 0 #00ffe1;
}
.ai-chip .wire-bottom {
  bottom: -22px;
  box-shadow: 6px 0 #00ffe1, -6px 0 #00ffe1;
}
.ai-chip .wire-left,
.ai-chip .wire-right {
  width: 2px;
  height: 40px;
  top: 50%;
  transform: translateY(-50%);
}
.ai-chip .wire-left {
  left: -22px;
  box-shadow: 0 6px #00ffe1, 0 -6px #00ffe1;
}
.ai-chip .wire-right {
  right: -22px;
  box-shadow: 0 6px #00ffe1, 0 -6px #00ffe1;
}

/* Collection channel entry nodes on the left edge of the AI chip */
.port {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ffe1;
  box-shadow: 0 0 4px #00ffe1;
}

.ai-chip::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(0,255,225,0.2) 50%, transparent 100%);
  animation: shimmer 3s linear infinite;
}

@keyframes ai-pulse {
  0%, 100% { box-shadow: 0 0 20px #00ffe1; }
  50% { box-shadow: 0 0 30px #00ffe1; }
}

@keyframes scanline {
  0% { background-position: 0 0; }
  100% { background-position: 100% 0; }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes contactPulse {
  0%, 100% { box-shadow: 0 0 6px #00ffe1; opacity: 1; }
  50% { box-shadow: 0 0 12px #00ffe1; opacity: 0.6; }
}

.funnel-path {
  filter: drop-shadow(0 0 4px #00ffe1);
  stroke-linecap: round;
  opacity: 0.4;
}
.funnel-path.animate {
  stroke-dasharray: 5 5;
  animation: line-move 6s linear infinite;
}

@keyframes line-move { to { stroke-dashoffset: -100; } }

@keyframes dot-breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.8; }
}

.site-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  box-shadow: 0 0 4px currentColor;
  animation: dot-breathe 3.5s ease-in-out infinite;
}
.site-dot.active { background: #22c55e; }
.site-dot.offline { background: #dc2626; opacity: 0.7; }

.output-panels {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.output-card {
  width: 120px;
  padding: 10px;
  color: #fff;
  font-size: 12px;
  text-align: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateX(-20px);
  animation: card-in 0.6s ease forwards, card-pulse 10s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.output-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(0,255,225,0.4);
}

@keyframes card-in {
  to { opacity: 1; transform: translateX(0); }
}

@keyframes card-pulse {
  0%, 100% { box-shadow: 0 0 4px rgba(0,255,225,0.3); }
  50% { box-shadow: 0 0 12px rgba(0,255,225,0.6); }
}

.flash-highlight { animation: flash-highlight 2s ease; }
@keyframes flash-highlight { from { background: rgba(0,181,216,0.3); } to { background: transparent; } }

.viewer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.875rem;
  line-height: 1;
  border-radius: 9999px;
  margin-right: 0.25rem;
}

.floating-viewers {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  transform: scale(1.5);
  transform-origin: top right;
}

.floating-clock {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  padding: 0.25rem 0.75rem;
  z-index: 60;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.floating-actions {
  position: fixed;
  top: 6rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 60;
}

.alert-arrow {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  animation: arrow-bounce 1s infinite;
}

@keyframes arrow-bounce {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-50%) translateX(4px); }
}

.pulse-ring {
  position: relative;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    outline: 2px solid rgba(255, 0, 0, 0.6);
    outline-offset: 0;
  }
  70% {
    outline: 2px solid rgba(255, 0, 0, 0);
    outline-offset: 6px;
  }
  100% {
    outline: 2px solid rgba(255, 0, 0, 0);
    outline-offset: 0;
  }
}

.score-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #e2e8f0;
  box-shadow: 0 20px 45px -20px rgba(15, 23, 42, 0.8);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.score-card:hover {
  border-color: rgba(14, 165, 233, 0.8);
  transform: translateY(-1px);
}

.champion-card {
  position: relative;
  border: 1px solid rgba(14, 165, 233, 0.7);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.3), 0 16px 40px -18px rgba(14, 165, 233, 0.5);
}
.champion-card::after {
  content: "\1F3C6";
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
}

.urgent-stat {
  background: rgba(56, 189, 248, 0.1);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.35);
}

/* Compact button used for call detail links */
.view-detail-btn {
  display: inline-block;
  border-radius: 9999px;
  padding: 0.25rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: transform 0.2s, opacity 0.2s;
}
.view-detail-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.outcome-form {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 320px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 60;
}

.outcome-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.outcome-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

[data-outcome-form]:not(.hidden) {
  position: relative;
  z-index: 50;
}

.call-detail-controls {
  z-index: 70;
}

/*
Flows Supported: SI sphere launcher & global chat overlay
Inputs: sidebar layout, body[data-si-chat-open]
Outputs: immersive, animated launcher with slide-out iframe workspace
*/

.si-sphere-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 1.75rem;
  border: 1px solid rgba(71, 85, 105, 0.55);
  background: linear-gradient(165deg, rgba(7, 12, 24, 0.92), rgba(12, 20, 34, 0.82));
  box-shadow: 0 24px 55px -35px rgba(15, 23, 42, 0.85), inset 0 0 0 1px rgba(56, 189, 248, 0.08);
  backdrop-filter: blur(24px);
}

.si-sphere-card__visual {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: radial-gradient(circle at 30% 25%, rgba(56, 189, 248, 0.2), transparent 65%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(8, 15, 35, 0.9));
  box-shadow: inset 0 0 25px -18px rgba(56, 189, 248, 0.5);
}

.si-sphere-card__cta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 0 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.si-sphere-card__cta:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.75);
  outline-offset: 4px;
}

.si-sphere-card__copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.si-sphere-card__label {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(224, 242, 254, 0.88);
}

.si-sphere-card__subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.85);
}

.si-sphere-card__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.3), rgba(129, 140, 248, 0.28));
  color: rgba(226, 232, 240, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 18px 32px -24px rgba(56, 189, 248, 0.55);
}

.si-sphere-card__chevron svg {
  width: 20px;
  height: 20px;
}

.si-sphere-card__cta:hover .si-sphere-card__chevron,
.si-sphere-card__cta:focus-visible .si-sphere-card__chevron {
  transform: translateX(4px);
  box-shadow: 0 24px 40px -20px rgba(56, 189, 248, 0.75);
}

.si-sphere-caption {
  margin-top: 1rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.72);
}

.si-chat-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 120;
}

.si-chat-overlay[data-state='open'] {
  pointer-events: auto;
  opacity: 1;
}

.si-chat-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.35), rgba(15, 23, 42, 0.92));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.si-chat-overlay[data-state='open'] .si-chat-overlay__backdrop {
  opacity: 0.85;
}

.si-chat-overlay__panel {
  position: relative;
  width: min(1040px, 92vw);
  height: min(760px, 92vh);
  margin-right: clamp(1.5rem, 4vw, 3rem);
  border-radius: 2rem;
  border: 1px solid rgba(94, 234, 212, 0.25);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 45px 90px -50px rgba(14, 116, 144, 0.75);
  backdrop-filter: blur(24px);
  overflow: hidden;
  transform: translate3d(32px, 0, 0);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.45s ease;
  display: flex;
  flex-direction: column;
}

.si-chat-overlay[data-state='open'] .si-chat-overlay__panel {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

.si-chat-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid rgba(71, 85, 105, 0.35);
}

.si-chat-overlay__heading {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.si-chat-overlay__glyph {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.75), rgba(168, 85, 247, 0.55));
  box-shadow: 0 20px 35px -22px rgba(56, 189, 248, 0.55);
  overflow: hidden;
}

.si-chat-overlay__glyph-core {
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  background: #fff;
  opacity: 0.85;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.75);
  animation: si-sphere-pulse 2.6s ease-in-out infinite;
}

.si-chat-overlay__glyph-ring {
  position: absolute;
  inset: 8px;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  animation: si-sphere-rotate 14s linear infinite;
}

.si-chat-overlay__glyph-ring--two {
  inset: 4px;
  animation-duration: 9s;
  animation-direction: reverse;
}

.si-chat-overlay__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.si-chat-overlay__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #f8fafc;
}

.si-chat-overlay__subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(203, 213, 225, 0.85);
}

.si-chat-overlay__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.75);
  color: rgba(226, 232, 240, 0.85);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.si-chat-overlay__close:hover,
.si-chat-overlay__close:focus-visible {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
  transform: scale(1.05);
}

.si-chat-overlay__close:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.6);
  outline-offset: 3px;
}

.si-chat-overlay__body {
  position: relative;
  flex: 1;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
}

.si-chat-overlay__body iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  border-top: 1px solid rgba(71, 85, 105, 0.35);
}

.si-chat-overlay__loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.8);
  background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.92));
  transition: opacity 0.35s ease;
  z-index: 2;
  pointer-events: none;
}

.si-chat-overlay__loading[data-state='ready'] {
  opacity: 0;
  pointer-events: none;
}

.si-chat-hub__list,
.si-chat-panel__messages {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.si-chat-hub__list::-webkit-scrollbar,
.si-chat-panel__messages::-webkit-scrollbar {
  display: none;
}

.si-chat-overlay__spinner {
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  border: 3px solid rgba(56, 189, 248, 0.3);
  border-top-color: rgba(168, 85, 247, 0.85);
  animation: si-spinner 1s linear infinite;
}

@keyframes si-spinner {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

body[data-si-chat-open='1'] {
  overflow: hidden;
}

.si-briefing-inspector-overlay {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.si-briefing-inspector-overlay::-webkit-scrollbar {
  display: none;
}

@media (max-width: 1024px) {
  .si-sphere-card {
    padding: 1.25rem;
  }

  .si-sphere-card__visual {
    height: 200px;
  }

  .si-chat-overlay__panel {
    width: min(960px, 96vw);
    margin-right: clamp(1rem, 5vw, 2rem);
    border-radius: 1.5rem;
  }
}

/* Briefing custom range date input overrides */
.briefing-date-input::-webkit-calendar-picker-indicator,
.briefing-date-input::-webkit-clear-button,
.briefing-date-input::-webkit-inner-spin-button {
  opacity: 0;
  display: none;
}

.briefing-date-input::-moz-focus-inner {
  border: 0;
}

/* Guided sales demo experience */
body[data-demo-guide='1'] #content {
  padding-top: 84px;
}

.demo-guide {
  --demo-progress: 0%;
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.96);
  border-bottom: 1px solid rgba(56, 189, 248, 0.24);
  box-shadow: 0 16px 45px rgba(2, 6, 23, 0.4);
  backdrop-filter: blur(18px);
}

.demo-guide__progress {
  height: 3px;
  background: linear-gradient(
    90deg,
    #38bdf8 0,
    #8b5cf6 var(--demo-progress),
    rgba(51, 65, 85, 0.7) var(--demo-progress),
    rgba(51, 65, 85, 0.7) 100%
  );
}

.demo-guide__main {
  min-height: 80px;
  display: grid;
  grid-template-columns: auto minmax(190px, 0.7fr) minmax(360px, 1.6fr) auto;
  align-items: center;
  gap: 18px;
  padding: 10px clamp(16px, 2.4vw, 36px);
}

.demo-guide__home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.demo-guide__home span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: #020617;
  background: linear-gradient(135deg, #38bdf8, #a78bfa);
  box-shadow: 0 9px 25px rgba(56, 189, 248, 0.25);
}

.demo-guide__story {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.demo-guide__story span {
  color: #7dd3fc;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.demo-guide__story strong {
  overflow: hidden;
  color: #f8fafc;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-guide__steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.demo-guide__step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  transition: 160ms ease;
}

.demo-guide__step span:first-child {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.72);
  color: #cbd5e1;
}

.demo-guide__step:hover,
.demo-guide__step:focus-visible {
  color: #e2e8f0;
  border-color: rgba(56, 189, 248, 0.35);
}

.demo-guide__step.is-complete {
  color: #94a3b8;
}

.demo-guide__step.is-complete span:first-child {
  color: #052e16;
  background: #6ee7b7;
}

.demo-guide__step.is-current {
  color: #e0f2fe;
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(14, 116, 144, 0.18);
}

.demo-guide__step.is-current span:first-child {
  color: #020617;
  background: #38bdf8;
}

.demo-guide__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.demo-guide__actions a,
.demo-guide__actions button,
.demo-guide__notes button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(71, 85, 105, 0.8);
  border-radius: 10px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.78);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.demo-guide__actions .demo-guide__next {
  color: #020617;
  border-color: transparent;
  background: linear-gradient(135deg, #38bdf8, #a78bfa);
}

.demo-guide__notes {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(20px, 3vw, 44px) 17px;
  border-top: 1px solid rgba(51, 65, 85, 0.7);
  background: rgba(15, 23, 42, 0.9);
}

.demo-guide__notes[hidden] {
  display: none;
}

.demo-guide__notes span {
  color: #7dd3fc;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.demo-guide__notes p {
  margin: 3px 0 0;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.45;
}

.demo-guide__restore {
  display: none;
  position: fixed;
  top: 12px;
  right: 14px;
  padding: 9px 13px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(2, 6, 23, 0.92);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.demo-guide[data-audience-view='1'] {
  height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.demo-guide[data-audience-view='1'] .demo-guide__progress,
.demo-guide[data-audience-view='1'] .demo-guide__main,
.demo-guide[data-audience-view='1'] .demo-guide__notes {
  display: none;
}

.demo-guide[data-audience-view='1'] .demo-guide__restore {
  display: block;
}

body[data-demo-guide='1'][data-demo-audience-view='1'] #content {
  padding-top: 0;
}

.demo-action-toast {
  position: fixed;
  right: 22px;
  top: 104px;
  z-index: 1100;
  display: flex;
  max-width: min(390px, calc(100vw - 32px));
  align-items: flex-start;
  gap: 12px;
  padding: 15px 17px;
  border: 1px solid rgba(52, 211, 153, 0.42);
  border-radius: 16px;
  color: #d1fae5;
  background: rgba(2, 44, 34, 0.95);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.46);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(16px);
}

.demo-action-toast[hidden] {
  display: none;
}

.demo-action-toast[data-visible='1'] {
  opacity: 1;
  transform: translateY(0);
}

.demo-action-toast > span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  color: #022c22;
  background: #6ee7b7;
  font-weight: 900;
}

.demo-action-toast strong {
  display: block;
  color: #ecfdf5;
  font-size: 13px;
}

.demo-action-toast p {
  margin: 3px 0 0;
  color: #a7f3d0;
  font-size: 12px;
  line-height: 1.4;
}

.demo-home {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(28px, 5vw, 72px);
  color: #e2e8f0;
  background:
    radial-gradient(circle at 10% 5%, rgba(14, 165, 233, 0.13), transparent 35%),
    radial-gradient(circle at 90% 0%, rgba(139, 92, 246, 0.13), transparent 34%),
    #020617;
}

.demo-home__glow {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.14;
  pointer-events: none;
}

.demo-home__glow--one {
  top: 18%;
  left: -180px;
  background: #38bdf8;
}

.demo-home__glow--two {
  right: -200px;
  bottom: 4%;
  background: #8b5cf6;
}

.demo-home__header,
.demo-home__stories,
.demo-home__footer {
  position: relative;
  z-index: 1;
  width: min(1240px, 100%);
  margin-inline: auto;
}

.demo-home__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: end;
  gap: 48px;
}

.demo-home__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.demo-home__brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  color: #020617;
  background: linear-gradient(135deg, #38bdf8, #a78bfa);
  box-shadow: 0 16px 32px rgba(56, 189, 248, 0.22);
}

.demo-home__eyebrow {
  margin: 54px 0 12px;
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.demo-home h1 {
  max-width: 850px;
  margin: 0;
  color: #f8fafc;
  font-size: clamp(38px, 5.6vw, 74px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.demo-home__lede {
  max-width: 760px;
  margin: 22px 0 0;
  color: #94a3b8;
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.6;
}

.demo-home__preflight {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.28);
}

.demo-home__status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.1);
}

.demo-home__preflight[data-state='ready'] .demo-home__status-dot {
  background: #34d399;
  box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.1);
}

.demo-home__preflight strong,
.demo-home__preflight span {
  display: block;
}

.demo-home__preflight strong {
  color: #f8fafc;
  font-size: 13px;
}

.demo-home__preflight span {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.4;
}

.demo-home__preflight button {
  padding: 7px 9px;
  border: 1px solid rgba(71, 85, 105, 0.8);
  border-radius: 9px;
  color: #cbd5e1;
  background: #0f172a;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.demo-home__stories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 58px;
}

.demo-story-card {
  position: relative;
  display: flex;
  min-height: 490px;
  flex-direction: column;
  overflow: hidden;
  padding: 26px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 26px;
  background: linear-gradient(150deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.86));
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
  transition: transform 180ms ease, border-color 180ms ease;
}

.demo-story-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
}

.demo-story-card--amber::before {
  background: linear-gradient(90deg, #fbbf24, #fb7185);
}

.demo-story-card--violet::before {
  background: linear-gradient(90deg, #a78bfa, #f472b6);
}

.demo-story-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.45);
}

.demo-story-card__topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.demo-story-card h2 {
  margin: 28px 0 10px;
  color: #f8fafc;
  font-size: 26px;
  line-height: 1.12;
}

.demo-story-card > p {
  min-height: 78px;
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.55;
}

.demo-story-card__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.demo-story-card__steps li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.demo-story-card__steps li span:first-child {
  color: #7dd3fc;
}

.demo-story-card__notes {
  margin-top: 22px;
  color: #94a3b8;
  font-size: 12px;
}

.demo-story-card__notes summary {
  color: #cbd5e1;
  font-weight: 700;
  cursor: pointer;
}

.demo-story-card__notes blockquote {
  margin: 10px 0 0;
  padding-left: 12px;
  border-left: 2px solid rgba(56, 189, 248, 0.45);
  line-height: 1.55;
}

.demo-story-card form {
  margin-top: auto;
  padding-top: 24px;
}

.demo-story-card__start {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border: 0;
  border-radius: 13px;
  color: #020617;
  background: linear-gradient(135deg, #38bdf8, #a78bfa);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.demo-home__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
  padding: 20px 0;
  color: #64748b;
  font-size: 12px;
}

.demo-home__footer strong,
.demo-home__footer span {
  display: block;
}

.demo-home__footer strong {
  color: #cbd5e1;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-home__footer a,
.demo-home__footer button {
  color: #94a3b8;
}

.demo-home__footer button {
  padding: 9px 12px;
  border: 1px solid rgba(71, 85, 105, 0.8);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.75);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 1480px) {
  .demo-guide__main {
    grid-template-columns: auto minmax(190px, 0.8fr) auto auto;
    gap: 12px;
  }

  .demo-guide__steps {
    gap: 3px;
  }

  .demo-guide__step {
    padding: 6px;
  }

  .demo-guide__step span:last-child {
    display: none;
  }
}

@media (max-width: 1100px) {
  .demo-guide__main {
    grid-template-columns: auto 1fr auto;
  }

  .demo-guide__steps {
    display: none;
  }

  .demo-home__stories {
    grid-template-columns: 1fr;
  }

  .demo-story-card {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  body[data-demo-guide='1'] #content {
    padding-top: 74px;
  }

  .demo-guide__main {
    min-height: 70px;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding-inline: 12px;
  }

  .demo-guide__home > span:last-child,
  .demo-guide__actions button,
  .demo-guide__actions > a:not(.demo-guide__next) {
    display: none;
  }

  .demo-guide__notes {
    grid-template-columns: 1fr;
  }

  .demo-home {
    padding: 24px 18px;
  }

  .demo-home__header {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .demo-home__eyebrow {
    margin-top: 38px;
  }

  .demo-home__stories {
    margin-top: 36px;
  }

  .demo-home__footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Self-evident demo flow */
body[data-demo-guide='1'] #content {
  padding-top: 72px;
}

.demo-guide {
  border-bottom-color: rgba(125, 211, 252, 0.2);
  background: rgba(2, 6, 23, 0.97);
}

.demo-guide__progress {
  height: 3px;
  background: linear-gradient(
    90deg,
    #38bdf8 0,
    #8b5cf6 var(--demo-progress),
    rgba(51, 65, 85, 0.64) var(--demo-progress),
    rgba(51, 65, 85, 0.64) 100%
  );
}

.demo-guide__main {
  min-height: 69px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 8px clamp(12px, 2.4vw, 32px);
}

.demo-guide__exit {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 7px 13px 7px 8px;
  border: 1px solid rgba(251, 113, 133, 0.62);
  border-radius: 12px;
  color: #fff1f2;
  background: rgba(159, 18, 57, 0.24);
  box-shadow: 0 8px 24px rgba(136, 19, 55, 0.16);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.demo-guide__exit:hover,
.demo-guide__exit:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(253, 164, 175, 0.92);
  background: rgba(190, 18, 60, 0.38);
}

.demo-guide__exit span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  color: #fecdd3;
  background: rgba(225, 29, 72, 0.26);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.demo-guide__exit strong {
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.01em;
}

.demo-guide__story {
  gap: 3px;
}

.demo-guide__story strong {
  color: #f8fafc;
  font-size: 14px;
  line-height: 1.2;
}

.demo-guide__story span {
  overflow: hidden;
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.demo-guide__actions {
  gap: 9px;
}

.demo-guide__actions a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border: 1px solid rgba(71, 85, 105, 0.78);
  border-radius: 11px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.82);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
}

.demo-guide__actions .demo-guide__next {
  min-width: 176px;
  padding-inline: 17px;
  color: #020617;
  border-color: transparent;
  background: linear-gradient(135deg, #38bdf8, #a78bfa);
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.18);
}

.demo-action-toast {
  top: 88px;
  align-items: center;
  padding: 12px 14px;
}

.demo-action-toast strong {
  font-size: 12px;
}

.demo-home {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: clamp(20px, 3.5vw, 46px);
}

.demo-home__topbar,
.demo-home__stage,
.demo-home__exit {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin-inline: auto;
}

.demo-home__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.demo-home__preflight {
  display: flex;
  width: auto;
  grid-template-columns: none;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 999px;
  box-shadow: none;
}

.demo-home__preflight strong {
  font-size: 11px;
  white-space: nowrap;
}

.demo-home__preflight button {
  padding: 4px 8px;
}

.demo-home__status-dot {
  width: 8px;
  height: 8px;
  margin: 0;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.1);
}

.demo-home__preflight[data-state='ready'] .demo-home__status-dot {
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1);
}

.demo-home__stage {
  display: grid;
  gap: clamp(28px, 5vh, 48px);
  margin-top: clamp(38px, 7vh, 74px);
}

.demo-feature {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 5vw, 62px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: clamp(24px, 3vw, 36px);
  background:
    linear-gradient(125deg, rgba(14, 116, 144, 0.18), rgba(76, 29, 149, 0.12) 62%, transparent),
    rgba(15, 23, 42, 0.7);
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.44);
}

.demo-feature::after {
  content: '';
  position: absolute;
  top: -180px;
  right: -130px;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.12);
  filter: blur(14px);
  pointer-events: none;
}

.demo-feature__label,
.demo-home__alternatives-label {
  display: block;
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.demo-feature h1 {
  position: relative;
  z-index: 1;
  max-width: 850px;
  margin: 14px 0 0;
  color: #f8fafc;
  font-size: clamp(42px, 6.2vw, 82px);
  font-weight: 680;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.demo-feature p {
  position: relative;
  z-index: 1;
  margin: 20px 0 0;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 520;
  letter-spacing: -0.015em;
}

.demo-feature form {
  position: relative;
  z-index: 1;
  margin-top: 30px;
}

.demo-feature__start {
  display: inline-flex;
  min-width: 210px;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  color: #020617;
  background: linear-gradient(135deg, #38bdf8, #a78bfa);
  box-shadow: 0 16px 42px rgba(56, 189, 248, 0.22);
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.demo-feature__start:hover,
.demo-feature__start:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 19px 48px rgba(56, 189, 248, 0.3);
}

.demo-home__alternatives {
  display: grid;
  gap: 12px;
}

.demo-home__alternatives-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.demo-quickstart button {
  display: flex;
  width: 100%;
  min-height: 112px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid rgba(51, 65, 85, 0.78);
  border-radius: 20px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.58);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.demo-quickstart button:hover,
.demo-quickstart button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.42);
  background: rgba(15, 23, 42, 0.86);
}

.demo-quickstart strong,
.demo-quickstart small {
  display: block;
}

.demo-quickstart strong {
  font-size: 17px;
}

.demo-quickstart small {
  margin-top: 5px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.4;
}

.demo-quickstart button > span:last-child {
  color: #7dd3fc;
  font-size: 22px;
}

.demo-quickstart--amber button > span:last-child {
  color: #fbbf24;
}

.demo-quickstart--violet button > span:last-child {
  color: #c4b5fd;
}

.demo-home__exit {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 24px;
}

.demo-home__exit button {
  border: 0;
  color: #64748b;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

@media (max-width: 700px) {
  body[data-demo-guide='1'] #content {
    padding-top: 68px;
  }

  .demo-guide__main {
    min-height: 65px;
    gap: 9px;
    padding-inline: 10px;
  }

  .demo-guide__story strong {
    font-size: 12px;
  }

  .demo-guide__story span {
    font-size: 10px;
  }

  .demo-guide__back {
    display: none !important;
  }

  .demo-guide__actions .demo-guide__next {
    min-width: 0;
    max-width: 174px;
    padding-inline: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .demo-home__brand-mark {
    width: 36px;
    height: 36px;
  }

  .demo-home__preflight {
    padding: 8px 10px;
  }

  .demo-feature {
    padding: 28px 24px;
  }

  .demo-feature h1 {
    font-size: clamp(40px, 12vw, 58px);
  }

  .demo-home__alternatives-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .demo-guide__exit {
    gap: 7px;
    padding-right: 10px;
  }

  .demo-guide__exit span {
    width: 26px;
    height: 26px;
  }

  .demo-guide__exit strong {
    font-size: 11px;
  }

  .demo-guide__story strong {
    display: none;
  }

  .demo-guide__actions .demo-guide__next {
    max-width: 150px;
  }

  .demo-home__brand > span:last-child {
    display: none;
  }

  .demo-home__preflight strong {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
