.demo-main {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.demo-heading {
  max-width: 55rem;
}

.demo-heading h1 {
  max-width: 16ch;
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
}

.demo-heading .lede {
  max-width: 43rem;
}

.demo-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(340px, 1.28fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.demo-controls {
  padding-top: 0.5rem;
}

.demo-controls h2,
.demo-notes h2 {
  font-size: clamp(1.55rem, 2.5vw, 2rem);
}

.demo-controls > p,
.demo-notes p {
  color: var(--ink-soft);
  margin: 0.9rem 0 0;
}

.scenario-buttons {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.scenario-buttons .button {
  width: 100%;
  text-align: center;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.scenario-buttons .button-quiet {
  border-color: var(--blue);
}

.scenario-buttons button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.reset-button {
  justify-self: start;
  min-height: 44px;
  padding: 0.4rem 0.25rem;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.demo-caveat {
  margin-top: 2.2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.demo-caveat h3 {
  font-size: 1.05rem;
}

.demo-caveat p {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.app-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 20px 50px -36px rgba(11, 31, 51, 0.55);
}

.app-bar {
  min-height: 58px;
  padding: 0.7rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
}

.app-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.demo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hivis);
}

.app-content {
  padding: clamp(1rem, 3vw, 1.7rem);
  background: #f7fafc;
}

.app-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.app-kicker {
  margin: 0 0 0.35rem;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.app-topline h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
}

.app-topline time {
  padding-top: 0.15rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

.app-status {
  margin: 1.15rem 0 0;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--sky);
  background: #eaf3fa;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.notification-list {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.notification {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: start;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  animation: arrive 0.28s ease-out both;
}

.notification-symbol {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wash);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.notification[data-kind="urgent"] .notification-symbol {
  background: #fff2d1;
  color: #654500;
}

.notification h3 {
  font-size: 1rem;
  line-height: 1.25;
}

.notification p {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.notification time {
  color: var(--ink-soft);
  font-size: 0.78rem;
  white-space: nowrap;
}

.preview-footnote {
  margin: 1.1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.demo-notes {
  max-width: 50rem;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: 1.7rem;
  border-top: 1px solid var(--line);
}

.demo-footer {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem !important;
}

.demo-footer p {
  margin: 0;
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .demo-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .demo-controls {
    max-width: 40rem;
  }

  .scenario-buttons {
    max-width: 24rem;
  }
}

@media (max-width: 560px) {
  .app-bar {
    padding-inline: 0.8rem;
  }

  .app-content {
    padding: 1rem 0.8rem;
  }

  .notification {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.65rem;
  }

  .notification-symbol {
    width: 2rem;
    height: 2rem;
  }

  .notification time {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: -0.2rem;
  }
}

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