:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
  background: #f5f5f4;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f5f5f4; }
button, input, a { font: inherit; }
button, .button { min-height: 44px; }

.skip-link {
  position: fixed;
  z-index: 10;
  left: 12px;
  top: 8px;
  transform: translateY(-140%);
  padding: 10px 14px;
  background: #fff;
  color: #111827;
  border: 2px solid #dc2626;
  border-radius: 8px;
}
.skip-link:focus { transform: none; }

.truth-banner {
  position: sticky;
  top: 0;
  z-index: 5;
  pointer-events: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  padding: 10px 20px;
  color: #fff;
  background: #111827;
  font-size: 13px;
}
.truth-banner strong { color: #fecaca; }

.demo-header,
.change-indicator,
.demo-layout {
  width: min(1560px, calc(100% - 32px));
  margin-inline: auto;
}

.demo-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0 22px;
}
.eyebrow,
.sidecar-label {
  margin: 0 0 7px;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
h1 { max-width: 790px; margin-bottom: 9px; font-size: clamp(25px, 3vw, 42px); line-height: 1.08; }
.demo-disclosure { margin: 0; color: #57534e; }
.header-actions,
.tour-actions,
.tour-completion-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid #d6d3d1;
  border-radius: 999px;
  background: #fff;
  color: #1c1917;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.button-primary { border-color: #dc2626; background: #dc2626; color: #fff; }
.button-secondary { background: #fff; }
.button-quiet { border-color: transparent; background: transparent; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button:focus-visible,
.app-frame-scroll:focus-visible { outline: 3px solid #f87171; outline-offset: 2px; }
.full-width { width: 100%; }

.tour-panel,
.tour-completion,
.change-indicator {
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fff7f7;
}
.tour-panel { display: grid; grid-template-columns: 1fr; gap: 14px; width: 100%; margin: 0; }
.tour-panel[hidden], .tour-completion[hidden] { display: none; }
.tour-panel h2, .tour-completion h2 { margin-bottom: 6px; }
.tour-panel p, .tour-completion p { margin-bottom: 5px; }
.tour-status { color: #7f1d1d; font-weight: 750; }
.tour-status.is-complete { color: #166534; }
.tour-progress { min-width: 170px; }
.progress-track { width: 100%; height: 8px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: #e7e5e4; }
.progress-track span { display: block; width: 16.666%; height: 100%; background: #dc2626; transition: width 160ms ease; }
.progress-track[data-step="1"] span { width: 33.333%; }
.progress-track[data-step="2"] span { width: 50%; }
.progress-track[data-step="3"] span { width: 66.666%; }
.progress-track[data-step="4"] span { width: 83.333%; }
.progress-track[data-step="5"] span { width: 100%; }
.tour-actions { grid-column: 1; }

.change-indicator {
  align-items: center;
  display: flex;
  gap: 10px;
  border-color: #d6d3d1;
  background: #fff;
  font-size: 14px;
}
.change-indicator span { color: #78716c; font-weight: 750; }
.compact-guide-button { min-height: 32px; margin-left: auto; padding-block: 4px; }

.demo-layout {
  display: block;
  width: 100vw;
  max-width: none;
  margin-inline: calc(50% - 50vw);
  padding-bottom: 0;
}
.app-frame-shell {
  width: 100vw;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
.app-frame-scroll { width: 100vw; overflow-x: hidden; overscroll-behavior-inline: contain; }
#campaignboss-app-frame {
  display: block;
  width: 100vw;
  min-width: 0;
  height: 100vh;
  border: 0;
  background: #f3f4f6;
}
.mobile-canvas-disclosure {
  display: none;
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid #e7e5e4;
  color: #57534e;
  background: #fafaf9;
  font-size: 13px;
}

.demo-sidecar {
  position: fixed;
  z-index: 30;
  top: 16px;
  right: 16px;
  display: grid;
  align-content: start;
  gap: 12px;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  padding: 14px;
  overflow: auto;
  border: 1px solid #d6d3d1;
  border-radius: 18px;
  background: #fafaf9;
  box-shadow: 0 24px 72px rgba(28, 25, 23, .28);
}
.demo-sidecar[hidden] { display: none; }
.guide-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.guide-header h2 { margin: 0; font-size: 20px; }
.guide-header-actions { display: flex; gap: 4px; }
.sidecar-card { padding: 17px; border: 1px solid #d6d3d1; border-radius: 14px; background: #fff; }
.sidecar-card h2 { margin-bottom: 9px; font-size: 18px; }
.sidecar-card p { color: #57534e; line-height: 1.5; }
.summary-product { display: grid; grid-template-columns: 64px 1fr; gap: 11px; align-items: start; }
.summary-product img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.summary-product p { margin: 5px 0; font-size: 13px; }
.status-chip { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #fef2f2; color: #991b1b; font-size: 12px; font-weight: 750; }
.sidecar-field { display: grid; gap: 5px; margin-bottom: 10px; font-size: 13px; font-weight: 750; }
.sidecar-field input { min-height: 44px; padding: 8px; border: 1px solid #d6d3d1; border-radius: 8px; }
.control-status { display: flex; justify-content: space-between; gap: 10px; margin: 10px 0; }
.control-status span { color: #78716c; }
.control-disclosure { margin: 10px 0 0; font-size: 12px; }
.completion-block { margin-bottom: 12px; padding: 12px; border-radius: 10px; background: #f0fdf4; color: #166534; }
.completion-block p { margin: 5px 0 0; color: #166534; }

[data-tour-highlight] { outline: 4px solid #ef4444; outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.noscript { padding: 20px; text-align: center; }

@media (max-width: 1050px) {
  .demo-header { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 700px) {
  .demo-header, .change-indicator { width: min(100% - 20px, 1560px); }
  .demo-header { padding-top: 20px; }
  .header-actions .button { flex: 1 1 145px; }
  .tour-panel { grid-template-columns: 1fr; }
  .tour-actions, .tour-progress { grid-column: 1; }
  .mobile-canvas-disclosure { display: block; }
  .change-indicator { align-items: flex-start; flex-direction: column; }
  .compact-guide-button { margin-left: 0; }
}

@media (max-width: 1023px) {
  .app-frame-scroll { overflow-x: auto; }
  #campaignboss-app-frame { width: 1180px; min-width: 1180px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
