.demo-disclosure {
  position: sticky;
  top: 60px;
  z-index: 1002;
  margin-top: 60px;
  padding: 0.7rem 0;
  border-block: 1px solid rgba(16, 38, 42, 0.18);
  background: #fff8d9;
  color: var(--text-dark);
  font-size: 0.9rem;
  line-height: 1.5;
}

.demo-main {
  overflow: hidden;
}

.demo-intro {
  padding: clamp(3rem, 8vw, 6rem) 0 2.5rem;
  text-align: center;
  background: radial-gradient(circle at top, rgba(0, 233, 176, 0.12), transparent 58%);
}

.demo-narrow {
  max-width: 780px;
}

.demo-eyebrow,
.demo-card-label {
  color: #00795e;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-intro h1 {
  margin: 0.6rem 0 1.25rem;
  font-size: clamp(2.2rem, 7vw, 4.25rem);
  overflow-wrap: anywhere;
}

.demo-intro p:not(.demo-eyebrow) {
  margin: 0.6rem auto;
  color: var(--text-muted);
}

.demo-workspace {
  padding: 4rem 0 5rem;
}

.demo-workspace .section-title {
  margin-bottom: 2.25rem;
}

.demo-layout {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.demo-primary-column,
.demo-secondary-column {
  display: grid;
  align-content: start;
  gap: 1.25rem;
  min-width: 0;
}

.demo-card,
.demo-noscript {
  min-width: 0;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid rgba(16, 38, 42, 0.12);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}

.demo-noscript {
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--primary-dark);
}

.demo-card h3 {
  margin: 0.35rem 0 1rem;
  font-size: 1.35rem;
}

.demo-owner-view,
.demo-measurements,
.demo-task-fields {
  display: grid;
  gap: 0;
}

.demo-owner-view > div,
.demo-measurements > div,
.demo-task-fields > div {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(16, 38, 42, 0.1);
}

.demo-card dt {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.demo-card dd {
  margin: 0;
  font-weight: 600;
}

.demo-task-card:focus {
  outline: none;
}

.demo-task-card:focus-visible,
.demo-controls button:focus-visible {
  outline: 3px solid #00795e;
  outline-offset: 4px;
}

.demo-state-badge {
  display: inline-flex;
  padding: 0.45rem 0.75rem;
  border: 1px solid #00795e;
  border-radius: 999px;
  background: rgba(0, 233, 176, 0.1);
  color: #00674f;
  font-size: 0.82rem;
  font-weight: 700;
}

/* Email-style enquiry card */
.demo-email-subject-label {
  color: var(--text-muted);
  font-weight: 500;
}

.demo-email-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.demo-email-body {
  margin: 0;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid rgba(0, 121, 94, 0.4);
  border-radius: 0 10px 10px 0;
  background: rgba(0, 121, 94, 0.05);
  font-style: italic;
}

.demo-fictional-note {
  color: var(--text-muted);
  font-size: 0.75em;
  font-weight: 500;
  font-style: italic;
}

/* Pain / risk messaging shown while the enquiry sits unanswered */
.demo-pain {
  padding: 1rem 1.25rem;
  border: 1px solid rgba(198, 60, 60, 0.28);
  border-radius: 12px;
  background: rgba(198, 60, 60, 0.06);
}

.demo-pain p {
  margin: 0.3rem 0;
}

.demo-pain-headline {
  font-weight: 700;
  color: #8a2c2c;
}

/* Result: acknowledgement, follow-up task, outcome */
.demo-result {
  display: grid;
  gap: 1.25rem;
}

.demo-pain[hidden],
.demo-result[hidden] {
  display: none;
}

.demo-outcome-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-outcome-list li {
  padding-left: 1.6rem;
  position: relative;
}

.demo-outcome-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #00795e;
  font-weight: 700;
}

/* Secondary, optional detail: metrics and timeline behind a native disclosure */
.demo-details {
  border: 1px solid rgba(16, 38, 42, 0.12);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.demo-details > summary {
  padding: clamp(1.25rem, 4vw, 2rem);
  cursor: pointer;
  font-weight: 700;
  color: #00795e;
  list-style: none;
}

.demo-details > summary::-webkit-details-marker {
  display: none;
}

.demo-details > summary::after {
  content: "+";
  float: right;
  font-weight: 700;
}

.demo-details[open] > summary::after {
  content: "−";
}

.demo-details[open] > summary {
  border-bottom: 1px solid rgba(16, 38, 42, 0.12);
}

.demo-details .demo-card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  border-top: 1px solid rgba(16, 38, 42, 0.12);
}

.demo-details > summary:focus-visible {
  outline: 3px solid #00795e;
  outline-offset: -3px;
}

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.demo-controls button {
  min-height: 44px;
  min-width: 44px;
}

.demo-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.demo-control-note {
  margin-top: -0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.demo-measurements dd {
  font-family: var(--font-heading);
  font-size: 1.12rem;
}

.demo-event-list {
  display: grid;
  gap: 1rem;
  padding-left: 1.25rem;
}

.demo-event-list li {
  padding-left: 0.35rem;
}

.demo-event-list time {
  display: block;
  color: #00795e;
  font-weight: 700;
}

.demo-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;
}

@media (max-width: 420px) {
  .demo-controls,
  .demo-controls .btn {
    width: 100%;
  }
}

@media (min-width: 820px) {
  .demo-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    align-items: start;
  }

  .demo-scenario dl > div,
  .demo-owner-view > div {
    grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr);
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-main *,
  .demo-main *::before,
  .demo-main *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
