.demo-hero { padding-bottom: 48px; }
.demo-hero .container { max-width: 900px; }
.demo-hero p { max-width: 72ch; }
.demo-disclaimer { padding: 16px 20px; border-left: 4px solid var(--color-accent); background: #fff5df; border-radius: 0 10px 10px 0; color: #523712; font-size: .9375rem; }
.demo-section { padding-top: 0; }
.demo-app { background: #0b1220; color: #e9f0fa; border-radius: 24px; padding: 32px; box-shadow: 0 20px 50px rgba(15,23,42,.16); }
.demo-app h2, .demo-app h3 { color: #f8fafc; }
.demo-app p, .demo-app small { color: #adbed1; }
.demo-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.demo-toolbar h2 { margin-bottom: 4px; }
.demo-kicker { color: #fbbf24 !important; font-size: .7rem; font-weight: 700; letter-spacing: .15em; margin-bottom: 8px; }
.demo-kicker span { padding: 0 4px; }
.demo-toolbar-sub { margin-bottom: 0; font-size: .875rem; }
.demo-periods { display: inline-flex; border: 1px solid #34465d; border-radius: 10px; padding: 4px; gap: 4px; flex-shrink: 0; }
.demo-periods button { border: 0; border-radius: 7px; color: #c5d1e2; background: transparent; padding: 8px 14px; font-size: .875rem; font-weight: 700; }
.demo-periods button[aria-pressed="true"] { background: #f59e0b; color: #101827; }
.demo-periods button:hover:not([aria-pressed="true"]) { background: #243348; }
.demo-periods button:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }
.demo-period-caption { border-top: 1px solid #253247; margin: 24px 0; padding-top: 18px; font-size: .875rem; }
.demo-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.demo-metric, .demo-panel { border: 1px solid #2d3b50; background: #141e2d; border-radius: 14px; }
.demo-metric { padding: 20px; }
.demo-metric span { display: block; color: #b9c9db; font-size: .875rem; margin-bottom: 8px; }
.demo-metric strong { display: block; color: #fff; font: 600 clamp(1.5rem, 2.5vw, 2rem) var(--font-heading); line-height: 1.2; font-variant-numeric: tabular-nums; }
.demo-metric small { display: block; margin-top: 8px; font-size: .75rem; }
.demo-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.demo-panel { padding: 24px; }
.demo-panel-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 20px; }
.demo-panel-head h3 { font-size: 1.125rem; margin-bottom: 0; }
.demo-panel-head > span { font-size: .75rem; color: #98aac0; text-align: right; }
.demo-panel-head p { margin: 4px 0 0; font-size: .875rem; }
.demo-funnel { display: grid; gap: 17px; }
.demo-funnel-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: .875rem; }
.demo-track { background: #26354a; border-radius: 20px; height: 10px; overflow: hidden; }
.demo-track span { display: block; height: 100%; border-radius: inherit; background: #f59e0b; }
.demo-funnel > div:nth-child(2) .demo-track span { background: #60a5fa; }
.demo-funnel > div:nth-child(3) .demo-track span { background: #34d399; }
.demo-funnel-panel > p { margin: 20px 0 0; font-size: .8125rem; }
.demo-margin-list { margin: 0 0 12px; }
.demo-margin-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; }
.demo-margin-list dt { color: #b9c9db; }
.demo-margin-list dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.demo-margin-total { border-top: 1px solid #34465d; margin-top: 4px; padding-top: 16px !important; }
.demo-margin-total dd { color: #86efac; }
.demo-margin-panel > p { margin: 0 0 8px; font-size: .875rem; }
.demo-app .demo-smallprint { color: #adbed1; font-size: .8rem; line-height: 1.55; margin: 12px 0 0; max-width: none; }
.demo-app .demo-smallprint strong { color: #f8fafc; }
.demo-sources, .demo-jobs { margin-top: 16px; }
.demo-table-scroll { overflow-x: auto; }
.demo-table-scroll:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.demo-table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: .875rem; font-variant-numeric: tabular-nums; }
.demo-table th, .demo-table td { border-bottom: 1px solid #2c3b4e; padding: 12px 10px; text-align: right; }
.demo-table th:first-child, .demo-table td:first-child { text-align: left; padding-left: 0; }
.demo-table thead th { color: #b9c9db; font-weight: 600; }
.demo-table tbody th { color: #edf4fc; }
.demo-table tfoot th, .demo-table tfoot td { border-bottom: 0; color: #fbbf24; font-weight: 700; }
.demo-next { background: #eef3f8; text-align: center; }
.demo-next .container { max-width: 800px; }
.demo-next p { margin-left: auto; margin-right: auto; }
.demo-noscript { padding: 16px; border: 1px solid #e2e8f0; border-radius: 10px; }

@media (max-width: 950px) {
  .demo-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .demo-panels { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .demo-app { padding: 16px; border-radius: 16px; }
  .demo-toolbar { align-items: flex-start; flex-direction: column; }
  .demo-metrics { gap: 8px; }
  .demo-metric { padding: 14px; }
  .demo-metric strong { font-size: 1.4rem; }
  .demo-panel { padding: 16px; }
  .demo-panel-head { flex-direction: column; gap: 6px; }
  .demo-panel-head > span { text-align: left; }
}
