/* AckNexa interactive demo (/try/), loaded only on that page after site.css.
   Severity, state and surface colours follow the Web application, darkened
   where needed for text contrast. Icons are drawn with CSS; generated content
   is always empty. Motion stops under prefers-reduced-motion (see site.css). */

.demo-page {
  --app-bg: #f4f6f8;
  --app-surface: #f7f9fb;
  --app-soft: #eef2f5;
  --app-line: #e1e6eb;
  --app-line-strong: #c9d1d9;
  --app-ink: #111a22;
  --app-ink-2: #2f3b46;
  --app-muted: #5c6b78;
  --accent: #0a7658;
  --accent-hover: #08644a;
  --danger: #c62828;
  --danger-ink: #b42323;
  --danger-soft: #fdecec;
  --warn-ink: #9a5a00;
  --warn-soft: #fff4e0;
  --ok-ink: #13753f;
  --ok-soft: #e5f6ec;
  --info: #2466c7;
}

/* ---------- Introduction ---------- */
.demo-intro { max-width: 980px; margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--gutter) 36px; text-align: center; }
.demo-title { margin: 18px 0 20px; font-size: clamp(2.4rem, 1.3rem + 4.4vw, 4.6rem); line-height: 1.04; letter-spacing: -.03em; }
.demo-intro .lead { max-width: 720px; margin: 0 auto 18px; }
.demo-honest { max-width: 680px; margin: 0 auto; color: var(--muted); font-size: 15px; }
.demo-noscript { max-width: 720px; margin: 0 auto 64px; padding: 20px 24px; border-radius: var(--radius-md); background: var(--alt); text-align: center; }
.demo-noscript a { color: var(--green); }

/* ---------- Frame ---------- */
.demo[hidden] { display: none; }
.demo { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0 0 20px; padding: 10px 12px 10px 14px; border-radius: 28px; background: var(--forest); color: var(--on-dark); font-size: 14.5px; }
.demo-bar p { margin: 0; }
.demo-sim { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.demo-sim-tag { padding: 3px 10px; border-radius: 999px; background: var(--lime); color: var(--forest); font-size: 12.5px; font-weight: 700; }
.demo-actor { color: var(--on-dark-muted); }
.demo-bar .dbtn { margin-left: auto; border-color: rgb(222 237 181 / .55); background: transparent; color: var(--lime); }
.demo-bar .dbtn:hover { background: rgb(222 237 181 / .12); }
.demo-jump { display: none; }
.demo-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.demo-col { display: grid; gap: 20px; min-width: 0; }
.demo-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.demo-card.app { border-color: var(--app-line); color: var(--app-ink); }
.demo-h { margin: 0 0 6px; font-size: 20px; letter-spacing: -.016em; }
.demo-note { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.app .demo-note { color: var(--app-muted); }
.app-eyebrow { margin: 0 0 4px; color: var(--app-muted); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.app-h { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.empty { margin: 0; padding: 22px 4px; color: var(--app-muted); font-size: 15px; }
[tabindex="-1"]:focus { outline: none; }
[tabindex="-1"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ---------- Controls ---------- */
.dbtn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--app-line-strong); border-radius: 10px; background: #fff; color: var(--app-ink); font-size: 14px; font-weight: 600; line-height: 1.2; text-align: center; transition: background-color .15s, border-color .15s; }
.dbtn:hover:not(:disabled) { background: var(--app-soft); }
.dbtn:disabled { opacity: .42; }
.dbtn-primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.dbtn-primary:hover:not(:disabled) { border-color: var(--accent-hover); background: var(--accent-hover); }
.dbtn-sm { min-height: 30px; padding: 4px 12px; font-size: 13px; }
.dbtn-block { width: 100%; }
.dlabel { display: block; margin: 12px 0 6px; color: var(--app-ink); font-size: 14px; font-weight: 600; }
.dinput { width: 100%; padding: 9px 12px; border: 1px solid var(--app-line-strong); border-radius: 10px; background: #fff; color: var(--app-ink); font: inherit; font-size: 15px; line-height: 1.4; }
textarea.dinput { min-height: 64px; resize: vertical; }
.dinput[aria-invalid="true"] { border-color: var(--danger); }
.derror { margin: 6px 0 0; color: var(--danger-ink); font-size: 13.5px; font-weight: 600; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 0 12px; }

/* Severity chips and state pills, as in the Web application */
.sev { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 7px; border-radius: 6px; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0; }
.sev-P1 { background: #c62828; }
.sev-P2 { background: #b4540f; }
.sev-P3 { background: #e3b21c; color: #2d2300; }
.sev-P4 { background: #2f6fca; }
.sev-P5 { background: #66727d; }
.num { color: var(--app-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .05em; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-triggered { background: var(--danger-soft); color: var(--danger-ink); }
.pill-triggered::before { animation: demo-pulse 1.4s ease-in-out infinite; }
.pill-acknowledged { background: var(--warn-soft); color: var(--warn-ink); }
.pill-resolved { background: var(--ok-soft); color: var(--ok-ink); }
.tag { padding: 2px 8px; border-radius: 6px; background: var(--app-soft); color: var(--app-ink-2); font-size: 12.5px; }
.tag-dedup { background: #e7f0fc; color: #1d55a8; }

/* ---------- Try this ---------- */
.checklist { margin: 10px 0 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: 12px; margin: 0; padding: 9px 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 14.5px; line-height: 1.4; }
.check-box { position: relative; flex: none; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid var(--line-strong); border-radius: 6px; background: #fff; transition: background-color .2s, border-color .2s; }
.checklist .done { color: var(--muted); }
.checklist .done > span:nth-child(2) { text-decoration: line-through; text-decoration-color: rgb(86 100 92 / .5); }
.checklist .done .check-box { border-color: var(--green); background: var(--green); }
.checklist .done .check-box::after { content: ""; position: absolute; top: 2px; left: 6px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ---------- Monitoring ---------- */
.mon-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.mon { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--alt); transition: background-color .2s, border-color .2s; }
.mon.is-firing { border-color: #f1c4c4; background: #fff6f6; }
.mon-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.mon-tool { color: var(--ink-soft); font-weight: 650; }
.mon-state { margin-left: auto; color: var(--muted); font-size: 12.5px; font-weight: 650; }
.is-firing .mon-state { color: var(--danger-ink); }
.mon-title { margin: 8px 0 2px; font-size: 15px; font-weight: 650; line-height: 1.3; }
.mon-where { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.mon-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.maint { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.maint-title { margin: 0 0 4px; font-size: 15px; font-weight: 650; }
.maint .dbtn { margin-top: 10px; }

/* ---------- Incidents ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0 12px; padding: 4px; border-radius: 12px; background: var(--app-soft); }
.tabs button { padding: 7px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--app-ink-2); font-size: 14px; font-weight: 600; }
.tabs button:hover { background: rgb(255 255 255 / .6); }
.tabs button[aria-pressed="true"] { background: #fff; color: var(--app-ink); box-shadow: var(--shadow-sm); }
.tab-count { margin-left: 3px; color: var(--app-muted); font-weight: 500; }
.incident-list { margin: 0 -22px -22px; padding: 0; list-style: none; border-top: 1px solid var(--app-line); }
.row { display: grid; gap: 7px; margin: 0; padding: 14px 22px; border-bottom: 1px solid var(--app-line); }
.row:last-child { border-bottom: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.row.is-selected { background: #f1f8f5; box-shadow: inset 3px 0 0 var(--accent); }
.row.is-new { animation: demo-flash 2.4s var(--ease); }
.row-top { display: flex; align-items: center; gap: 10px; }
.age { margin-left: auto; color: var(--app-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.row-title { justify-self: start; padding: 0; border: 0; background: none; color: var(--app-ink); font-size: 16px; font-weight: 650; line-height: 1.3; text-align: left; }
.row-title:hover { text-decoration: underline; text-underline-offset: .2em; }
.row-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.row-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.assignee { color: var(--app-muted); font-size: 13.5px; }
.row-foot .dbtn { margin-left: auto; }

/* ---------- Incident detail ---------- */
.detail-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.detail-title { margin: 12px 0 6px; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; }
.detail-meta { margin: 0; color: var(--app-muted); font-size: 14px; }
.hold { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #e7f0fc; color: #1d4f99; font-size: 14px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding-bottom: 16px; border-bottom: 1px solid var(--app-line); }
.reassign { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--app-surface); }
.dlabel-inline { color: var(--app-muted); font-size: 13.5px; font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 16px 0 0; }
.facts dt { color: var(--app-muted); font-size: 12.5px; }
.facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.dsec { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--app-line); }
.dsec h3 { margin: 0 0 8px; color: var(--app-muted); font-size: 12.5px; font-weight: 700; letter-spacing: .1em; line-height: 1.3; text-transform: uppercase; }
.dsec > .dbtn { margin-top: 10px; }
.cards { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.cards li { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 12px; border: 1px solid var(--app-line); border-radius: 12px; background: var(--app-surface); }
.card-name { display: block; font-size: 14px; font-weight: 650; }
.card-text { display: block; color: var(--app-muted); font-size: 12.5px; overflow-wrap: anywhere; }
.badge { flex: none; padding: 3px 10px; border: 1px solid var(--app-line); border-radius: 999px; background: #fff; color: var(--app-muted); font-size: 12px; font-weight: 650; }
.badge-done { border-color: transparent; background: var(--ok-soft); color: var(--ok-ink); }
.badge-next { border-color: transparent; background: var(--warn-soft); color: var(--warn-ink); }
.badge-firing { border-color: transparent; background: var(--danger-soft); color: var(--danger-ink); }
.timeline { position: relative; margin: 12px 0 0; padding: 0 0 0 22px; list-style: none; }
.timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 4px; width: 2px; background: var(--app-line); }
.timeline li { position: relative; margin: 0 0 14px; }
.timeline li::before { content: ""; position: absolute; top: 6px; left: -22px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px #fff; }
.timeline p { margin: 0; }
.tl-text { font-size: 14.5px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.tl-by { color: var(--app-muted); font-weight: 500; }
.tl-detail { color: var(--app-ink-2); font-size: 13.5px; }
.tl-time { color: var(--app-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tl-bubble { padding: 10px 12px; border: 1px solid var(--app-line); border-radius: 12px; background: var(--app-surface); }
.tl-body { font-size: 15px; overflow-wrap: anywhere; white-space: pre-wrap; }

/* Postmortem preview */
.pm { margin-top: 16px; padding: 18px; border: 1px solid var(--app-line); border-radius: 16px; background: var(--app-bg); }
.pm-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 8px; font-size: 21px; }
.pm .facts { margin-bottom: 4px; }
.pm-sections { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff; color: var(--app-ink-2); font-size: 14px; }
.pm-timeline { margin: 0 0 12px; padding: 0; list-style: none; font-size: 13.5px; }
.pm-timeline li { margin: 0; padding: 6px 0; border-bottom: 1px solid var(--app-line); overflow-wrap: anywhere; }

/* ---------- Phone ---------- */
.phone-figure { margin: 0; text-align: center; }
.phone-figure figcaption { max-width: 320px; margin: 14px auto 0; color: var(--muted); font-size: 13.5px; }
.phone-figure figcaption strong { color: var(--ink); }
.dphone { position: relative; width: min(296px, 100%); margin: 0 auto; padding: 11px; border-radius: 50px; background: #121614; box-shadow: inset 0 0 0 2px #333a36, var(--shadow-lg); }
.dphone::before { content: ""; position: absolute; z-index: 2; top: 20px; left: 50%; width: 78px; height: 22px; transform: translateX(-50%); border-radius: 999px; background: #050706; }
.dphone-screen { position: relative; height: 560px; overflow-y: auto; padding: 12px 12px 18px; border-radius: 40px; background: radial-gradient(120% 60% at 20% 0%, #2f6352, #10241d 72%); color: #fff; text-align: left; scrollbar-width: none; }
.dphone-screen.is-app { background: var(--app-bg); color: var(--app-ink); }
.ph-bar { display: flex; align-items: center; justify-content: space-between; height: 24px; padding: 0 14px; font-size: 13px; font-weight: 650; }
.ph-battery { position: relative; width: 22px; height: 11px; border: 1.5px solid currentColor; border-radius: 3px; opacity: .9; }
.ph-battery::before { content: ""; position: absolute; inset: 1.5px 5px 1.5px 1.5px; border-radius: 1px; background: currentColor; }
.ph-time { margin: 26px 0 0; font-size: 58px; font-weight: 600; letter-spacing: -.02em; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.ph-date { margin: 6px 0 20px; font-size: 15px; font-weight: 500; text-align: center; opacity: .85; }
.ph-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ph-list li { margin: 0; }
.push { display: grid; gap: 2px; width: 100%; padding: 10px 12px 11px; border: 0; border-radius: 18px; background: rgb(255 255 255 / .9); color: #111; text-align: left; transition: background-color .15s; }
.push:hover { background: #fff; }
.push.is-new { animation: demo-in .45s var(--ease); }
.push-head { display: flex; align-items: center; gap: 7px; margin-bottom: 2px; font-size: 12px; color: #4a5560; }
.push-icon { width: 18px; height: 18px; flex: none; }
.push-app { font-weight: 650; letter-spacing: .02em; text-transform: uppercase; font-size: 11.5px; }
.push-age { margin-left: auto; }
.push-title { font-size: 14px; font-weight: 700; line-height: 1.3; }
.push-body { color: #2f3b46; font-size: 13px; line-height: 1.3; }
.ph-empty { margin: 40px 18px 0; color: rgb(255 255 255 / .82); font-size: 14px; text-align: center; }
.ph-app { display: grid; justify-items: start; gap: 10px; padding: 8px 6px; }
.ph-back { padding: 4px 0; border: 0; background: none; color: var(--accent); font-size: 15px; font-weight: 600; }
.ph-title { margin: 0; font-size: 20px; line-height: 1.2; }
.ph-meta { margin: 0; color: var(--app-muted); font-size: 13.5px; }
.ph-actions { display: grid; gap: 8px; width: 100%; margin-top: 6px; }
.ph-actions .dbtn { min-height: 44px; font-size: 15px; }

/* ---------- Status page preview ---------- */
/* A demo note, not part of the public page: an open incident with no update yet */
.sp-pending { margin-top: 14px; padding: 14px 16px; border: 1px solid #efc56a; border-radius: 14px; background: var(--warn-soft); color: var(--app-ink); font-size: 14px; line-height: 1.45; }
.sp-pending p { margin: 0 0 10px; }
.sp-pending .sp-pending-label { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--warn-ink); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sp-pending-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: demo-pulse 1.4s ease-in-out infinite; }
.sp-services li.is-changed { animation: demo-flash 2.4s var(--ease); }
.sp-banner.is-changed { animation: demo-ring 1.6s var(--ease); }
.dsec.flash { border-radius: 12px; animation: demo-glow 2.4s var(--ease); }
.sp { margin-top: 14px; padding: 16px; border-radius: 14px; background: var(--app-bg); color: var(--app-ink); font-size: 14px; }
.sp p { margin: 0; }
.sp-name { margin: 0 0 12px; font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.sp .sp-banner { margin: 0 0 12px; padding: 12px 14px; border-radius: 10px; color: #fff; font-size: 15px; font-weight: 700; transition: background-color .3s; }
.sp-operational { background: var(--ok-ink); }
.sp-degraded { background: var(--warn-ink); }
.sp-major_outage { background: var(--danger); }
.sp-maintenance { background: var(--info); }
.sp-services { margin: 0; padding: 0; list-style: none; border: 1px solid var(--app-line); border-radius: 10px; background: #fff; }
.sp-services li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0; padding: 10px 12px; }
.sp-services li + li { border-top: 1px solid var(--app-line); }
.sp-state { font-weight: 650; }
.sp-state-operational { color: var(--ok-ink); }
.sp-state-degraded { color: var(--warn-ink); }
.sp-state-major_outage { color: var(--danger); }
.sp-state-maintenance { color: var(--info); }
.sp-block { margin-top: 16px; }
.sp-block h4 { margin: 0 0 8px; font-size: 15px; }
.sp-incident { margin-top: 10px; padding-left: 12px; border-left: 3px solid var(--danger); }
.sp-incident.is-resolved { border-color: var(--ok-ink); }
.sp-incident-title { font-weight: 700; overflow-wrap: anywhere; }
.sp-meta { color: var(--app-muted); font-size: 13px; }
.sp-update { margin-top: 8px; overflow-wrap: anywhere; }

/* ---------- Views: Respond and Reports ---------- */
.demo-reports-link { margin-top: 10px; }
.demo-reports-link a { color: var(--green); font-weight: 600; }
.demo-views { display: inline-flex; gap: 4px; margin: 0 0 20px; padding: 4px; border-radius: 999px; background: var(--alt-2); }
.demo-views button { min-height: 40px; padding: 8px 24px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); font-size: 15px; font-weight: 650; }
.demo-views button:hover { background: rgb(255 255 255 / .7); }
.demo-views button[aria-selected="true"] { background: var(--forest); color: var(--lime); box-shadow: var(--shadow-sm); }
.demo-view[hidden] { display: none; }
/* A link to #reports scrolls far enough to show the tabs above the panel. */
.demo-view { scroll-margin-top: 76px; }

/* ---------- Reports, as in the Web application ---------- */
.rep-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; color: var(--app-ink); }
.rep-sample { margin: 0; padding: 6px 14px; border-radius: 14px; background: var(--lime); color: var(--forest); font-size: 14px; font-weight: 650; }
.rep-who { max-width: 860px; margin: 10px 0 0; }
.rep-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 14px 0 18px; }
.rep-toolbar .tabs { margin: 0; }
.rep-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.rep-stat { position: relative; overflow: hidden; min-width: 0; padding: 16px 18px 16px 20px; border: 1px solid var(--app-line); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-sm); }
.rep-stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: currentColor; }
.rep-stat span, .rep-stat small { display: block; color: var(--app-muted); font-size: 13px; font-weight: 600; line-height: 1.35; }
.rep-stat strong { display: block; margin: 6px 0 4px; color: var(--app-ink); font-size: 30px; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rep-blue { color: var(--info); }
.rep-amber { color: #b86e00; }
.rep-green { color: var(--ok-ink); }
.rep-red { color: var(--danger); }
.rep-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.rep-col { display: grid; gap: 20px; min-width: 0; }
.rep-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.rep-panel h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.012em; line-height: 1.25; }
.rep-panel .demo-note:empty { display: none; }
/* Positioned, so visually hidden text in a wide table scrolls with it instead of widening the page. */
.rep-scroll { position: relative; overflow-x: auto; }
.rep-table { width: 100%; border-collapse: collapse; color: var(--app-ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.rep-table th, .rep-table td { padding: 9px 10px; border-bottom: 1px solid var(--app-line); text-align: left; vertical-align: middle; white-space: nowrap; }
.rep-table thead th { color: var(--app-muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rep-table tbody th { font-weight: 650; }
.rep-table tbody tr:last-child > * { border-bottom: 0; }
.rep-table .empty { padding: 18px 10px; white-space: normal; }
.rep-meta { margin-top: 4px; font-weight: 400; }
.bar-cell { display: flex; align-items: center; gap: 10px; }
.bar-cell span { min-width: 2ch; }
.rep-bar { flex: none; width: 110px; height: 8px; }
.rep-bar-track { fill: var(--app-soft); }
.rep-bar-fill { fill: var(--info); }
.rep-bar.high .rep-bar-fill { fill: var(--danger); }
.pct { padding: 2px 8px; border-radius: 10px; font-weight: 700; }
.pct-good { background: var(--ok-soft); color: var(--ok-ink); }
.pct-ok { background: var(--warn-soft); color: var(--warn-ink); }
.pct-bad { background: var(--danger-soft); color: var(--danger-ink); }
.rep-bars { display: block; width: 100%; height: 120px; }
.rep-bars rect { fill: var(--forest); opacity: .85; }
.rep-bars rect.night { fill: #c2610f; }
.rep-bars rect.zero { opacity: .2; }
.rep-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--app-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.rep-data { margin-top: 10px; font-size: 14px; }
.rep-data summary { width: max-content; color: var(--green); font-weight: 600; cursor: pointer; }
.rep-data .rep-scroll { max-height: 280px; margin-top: 8px; overflow-y: auto; border: 1px solid var(--app-line); border-radius: 10px; }
.rep-data .rep-table th, .rep-data .rep-table td { padding: 6px 10px; }
.sev-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.sev-row li { display: grid; justify-items: center; gap: 6px; margin: 0; padding: 12px 4px; border: 1px solid var(--app-line); border-radius: 12px; }
.sev-row strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.heat th.week { font-size: 11.5px; text-align: center; }
.heat td.cell { padding: 5px 3px; text-align: center; }
.heat-cell { display: inline-block; min-width: 32px; padding: 4px 6px; border-radius: 6px; font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.heat-1 { background: #eef5dc; }
.heat-2 { background: var(--lime); }
.heat-3 { background: #b3d282; }
.heat-4 { background: #3b6e56; color: #fff; }
.heat-5 { background: var(--forest); color: var(--lime); }

/* ---------- Setup ---------- */
.demo-setup { max-width: 1440px; margin: 0 auto; padding: clamp(48px, 6vw, 72px) var(--gutter) clamp(72px, 9vw, 120px); }
.demo-setup > h2 { margin: 0 0 8px; font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); }
.setup-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.setup-card { padding: 22px; border-radius: var(--radius-lg); background: var(--alt); color: var(--ink-soft); font-size: 15px; line-height: 1.5; }
.setup-card h3 { margin: 0 0 10px; color: var(--ink); font-size: 17px; line-height: 1.3; }
.setup-card h3:not(:first-child) { margin-top: 18px; }
.setup-card p { margin: 0 0 10px; }
.setup-card ul, .setup-card ol { margin: 0; padding-left: 1.2rem; }
.setup-card li + li { margin-top: 8px; }
.setup-card code { padding: 1px 5px; border-radius: 5px; background: var(--alt-2); font-family: var(--mono); font-size: .86em; }
.setup-card .demo-note { margin-top: 12px; }
.setup-limits { margin-top: 16px; background: #fff; border: 1px solid var(--line); }
.setup-limits ul { columns: 2 320px; column-gap: 40px; }
.setup-limits li { break-inside: avoid; margin: 0 0 8px; }
.setup-limits li + li { margin-top: 0; }
.demo-more { margin: 26px 0 0; color: var(--muted); font-size: 15px; }
.demo-more a { color: var(--green); }

/* ---------- Motion (stopped by the reduced-motion rule in site.css) ---------- */
@keyframes demo-pulse { 50% { opacity: .3; } }
@keyframes demo-flash { from { background-color: #fff1cc; } }
@keyframes demo-in { from { opacity: 0; transform: translateY(-12px); } }
@keyframes demo-ring { from { box-shadow: 0 0 0 6px #ffd98a; } }
@keyframes demo-glow { from { background-color: #fff1cc; box-shadow: 0 0 0 12px #fff1cc; } }

/* ---------- Responsive ---------- */
@media (max-width: 1260px) {
  .demo-grid { grid-template-columns: 280px minmax(0, 1fr); }
  .demo-col:last-child { grid-column: 1 / -1; grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
  .setup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rep-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 880px) {
  .demo-grid, .demo-col:last-child { grid-template-columns: minmax(0, 1fr); }
  /* The columns stack, so offer a way to jump between them. */
  .demo-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 16px; }
  .demo-jump a { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--forest); font-size: 14px; font-weight: 600; text-decoration: none; }
  .demo-jump a:hover { background: var(--alt); }
}

@media (max-width: 734px) {
  .demo-bar { border-radius: 18px; padding: 12px 14px; }
  .demo-bar .dbtn { margin-left: 0; }
  .demo-grid, .demo-col { gap: 16px; }
  .demo-card { padding: 16px; border-radius: 18px; }
  .incident-list { margin: 0 -16px -16px; }
  .row { padding: 14px 16px; }
  .row:last-child { border-radius: 0 0 18px 18px; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .setup-grid { grid-template-columns: minmax(0, 1fr); }
  .setup-card { padding: 18px; }
  .detail-title { font-size: 21px; }
  .demo-views { display: flex; }
  .demo-views button { flex: 1; }
  .rep-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rep-stat { padding: 12px 12px 12px 16px; }
  .rep-stat strong { font-size: 24px; }
  .rep-grid, .rep-col { gap: 16px; }
  .rep-bar { width: 60px; }
  .sev-row { gap: 6px; }
}
