/* CrossScan demo: the product's own look, reproduced for the embedded demo.
 *
 * Loaded on the CrossScan product page after legacy.css. Every rule is under
 * .demo-scope and keyed to .cs-app, so nothing here reaches another product's
 * demo or the rest of the page. Colours follow the product's theme
 * (app/ui/theme.py): the navy rail, the #0e6d80 primary, and the confidence
 * colours, darkened where the product's own shade fails contrast on white.
 */

.demo-scope .cs-app {
  --cs-primary: #0e6d80;
  --cs-primary-d: #0b5766;
  --cs-text: #141922;
  --cs-muted: #515a66;
  --cs-faint: #5b6470;
  --cs-line: #e1e6ec;
  --cs-line-s: #c6cdd6;
  --cs-panel2: #fbfcfd;
  --cs-zebra: #f7f9fb;
  --cs-hover: #eef1f5;
  grid-template-columns: 208px minmax(0, 1fr);
  height: 780px;
  min-height: 0;
  background: #f5f6f8;
  color: var(--cs-text);
  font-size: 13px;
  line-height: 1.45;
}
.demo-scope .cs-app .app-main {
  background: #f5f6f8; padding: 16px 18px 28px; overflow: auto; min-width: 0;
  position: relative;
}
.demo-scope .cs-app .app-nav { overflow-y: auto; padding: 14px 8px 18px; }
.demo-scope .cs-app .app-nav .an-brand .by { font-size: 10px; color: #aebfdb; margin-top: -2px; }
.demo-scope .cs-app .app-nav .an-brand .by b { color: #fff; font-weight: 600; }
.demo-scope .cs-app .app-nav .an-brand .ver { font-size: 8px; color: #aebfdb; opacity: .6; letter-spacing: .08em; }
.demo-scope .cs-app .app-nav .an-grp { border-top: 1px solid rgba(255,255,255,.14); margin-top: 6px; padding-top: 9px; }
.demo-scope .cs-app .app-nav .an-item:focus-visible { outline: 3px solid #5cc8dd; outline-offset: 1px; }
.demo-scope .cs-app .app-hd { gap: 9px; flex-wrap: nowrap; min-width: 0; }
.demo-scope .cs-app .app-hd .hd-tag { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.demo-scope .cs-app .app-hd .hd-badge { margin-left: auto; background: #ff9800; color: #1f1400; }
.demo-scope .cs-app .app-hd .hd-badge.cs-nobadge { background: #9e9e9e; color: #111; }
.demo-scope .cs-app .cs-ver { font-size: 11px; opacity: .6; font-variant-numeric: tabular-nums; }
.demo-scope .cs-app .cs-menu {
  display: none; width: 30px; height: 30px; padding: 5px; border: 1px solid rgba(255,255,255,.3);
  background: transparent; color: #eef4f8; border-radius: 6px; cursor: pointer; flex: none;
}
.demo-scope .cs-app .cs-menu svg { width: 18px; height: 18px; display: block; }
.demo-scope .cs-app .cs-menu:focus-visible { outline: 2px solid #5cc8dd; outline-offset: 1px; }

/* Layout pieces */
.demo-scope .cs-col { display: flex; flex-direction: column; gap: 12px; max-width: 1060px; }
.demo-scope .cs-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.demo-scope .cs-row.cs-c { align-items: center; }
.demo-scope .cs-row.cs-between { justify-content: space-between; align-items: center; }
.demo-scope .cs-grow { flex: 1 1 200px; min-width: 0; }
.demo-scope .cs-mt { margin-top: 10px; }
.demo-scope .cs-mt2 { margin-top: 16px; }
.demo-scope .cs-ind { padding-left: 26px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.demo-scope .cs-card {
  background: #fff; border: 1px solid var(--cs-line); border-radius: 6px;
  padding: 12px 14px; box-shadow: 0 1px 2px rgba(20,25,34,.05); min-width: 0;
}
.demo-scope .cs-card + .cs-card { margin-top: 8px; }
.demo-scope .cs-col > .cs-card + .cs-card { margin-top: 0; }
.demo-scope .cs-hero { background: var(--cs-panel2); border-left: 4px solid var(--cs-primary); }
.demo-scope .cs-edge { border-left-width: 6px; border-left-style: solid; }
.demo-scope .cs-click { cursor: pointer; }
.demo-scope .cs-click:hover { background: var(--cs-hover); }
.demo-scope .cs-click:focus-visible, .demo-scope .cs-app [tabindex="0"]:focus-visible,
.demo-scope .cs-app button:focus-visible, .demo-scope .cs-app summary:focus-visible,
.demo-scope .cs-app a:focus-visible, .demo-scope .cs-app input:focus-visible,
.demo-scope .cs-app select:focus-visible, .demo-scope .cs-app textarea:focus-visible {
  outline: 2px solid var(--cs-primary); outline-offset: 2px;
}
.demo-scope .cs-h { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin: 0 0 4px; color: var(--cs-text); }
.demo-scope .cs-h2 { font-size: 14.5px; font-weight: 700; margin: 0 0 8px; color: var(--cs-text); }
.demo-scope .cs-h3 { font-size: 13px; font-weight: 700; margin: 0; color: var(--cs-text); }
.demo-scope .cs-sec { font-size: 13px; font-weight: 700; margin: 16px 0 4px; color: var(--cs-text); }
.demo-scope .cs-muted { color: var(--cs-muted); font-size: 13px; margin: 0; }
.demo-scope .cs-small { font-size: 12px; color: var(--cs-muted); margin: 2px 0; }
.demo-scope .cs-tiny { font-size: 11px; color: var(--cs-faint); margin: 2px 0; }
.demo-scope .cs-hint { font-size: 12px; color: #4b5563; margin: 2px 0; }
.demo-scope .cs-blue { color: #1e3a8a; font-size: 13px; margin: 6px 0 0; }
.demo-scope .cs-lbl { font-size: 13px; font-weight: 600; margin: 10px 0 4px; display: flex; gap: 8px; align-items: center; }
.demo-scope .cs-req { color: #dc2626; font-size: 11px; font-weight: 600; }
.demo-scope .cs-num {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-width: 20px; height: 20px; border-radius: 999px; border: 1px solid #60a5fa;
  color: #1d4ed8; font-size: 11px; font-weight: 600;
}
.demo-scope .cs-step { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: #1e3a8a; margin: 4px 0; }
.demo-scope .cs-mono { font-family: var(--mono); font-size: 11.5px; }
.demo-scope .cs-pre {
  font-family: var(--mono); font-size: 11.5px; white-space: pre-wrap; word-break: break-word;
  background: #f3f5f8; border: 1px solid var(--cs-line); border-radius: 6px; padding: 10px 12px; margin: 8px 0;
  color: var(--cs-text); max-width: 100%; overflow-x: auto;
}
.demo-scope .cs-code { background: #0f172a; color: #e2e8f0; border-color: #0f172a; }
.demo-scope .cs-t-amber { color: #7c2d12; }
.demo-scope .cs-t-red { color: #991b1b; }
.demo-scope .cs-t-teal { color: #115e59; }
.demo-scope .cs-t-green { color: #166534; }
.demo-scope .cs-t-orange { color: #9a3412; }
.demo-scope .cs-t-blue { color: #1e3a8a; }
.demo-scope .cs-t-grey { color: #4b5563; }
.demo-scope .cs-t-purple { color: #6b21a8; }
.demo-scope .cs-amber { background: #fffbeb; border-color: #fcd34d; }
.demo-scope .cs-teal { background: #f0fdfa; border-color: #5eead4; }
.demo-scope .cs-bluebg { background: #eff6ff; border-color: #bfdbfe; }
.demo-scope .cs-redbg { background: #fef2f2; border-color: #fca5a5; }
.demo-scope .cs-greenbg { background: #f0fdf4; border-color: #86efac; }
.demo-scope .cs-orangebg { background: #fff7ed; border-color: #fdba74; }
.demo-scope .cs-greybg { background: #f9fafb; border-color: #d1d5db; }
.demo-scope .cs-indigo { background: #eef2ff; border-color: #c7d2fe; }
.demo-scope .cs-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.demo-scope .cs-list { margin: 4px 0; padding-left: 0; list-style: none; }
.demo-scope .cs-list li { font-size: 12px; color: #374151; padding: 1px 0; }
.demo-scope .cs-list li::before { content: "\2022  "; }

/* Badges: solid and outline, in the product's colour names */
.demo-scope .cs-b {
  display: inline-block; font-size: 11px; font-weight: 600; line-height: 1.35; padding: 1px 7px;
  border-radius: 4px; background: #616161; color: #fff; border: 1px solid transparent; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}
.demo-scope .cs-b.o { background: #fff; }
.demo-scope .cs-b.round { border-radius: 999px; }
.demo-scope .cs-b.c-green { background: #2e7d32; } .demo-scope .cs-b.o.c-green { color: #2e7d32; border-color: #2e7d32; background: #fff; }
.demo-scope .cs-b.c-teal { background: #0e6d80; } .demo-scope .cs-b.o.c-teal { color: #0b5766; border-color: #0e6d80; background: #fff; }
.demo-scope .cs-b.c-blue { background: #1565c0; } .demo-scope .cs-b.o.c-blue { color: #1565c0; border-color: #1565c0; background: #fff; }
.demo-scope .cs-b.c-orange { background: #b45309; } .demo-scope .cs-b.o.c-orange { color: #9a3412; border-color: #c2410c; background: #fff; }
.demo-scope .cs-b.c-grey { background: #616161; } .demo-scope .cs-b.o.c-grey { color: #4b5563; border-color: #9e9e9e; background: #fff; }
.demo-scope .cs-b.c-red { background: #c62828; } .demo-scope .cs-b.o.c-red { color: #b91c1c; border-color: #d32f2f; background: #fff; }
.demo-scope .cs-b.c-purple { background: #7b1fa2; } .demo-scope .cs-b.o.c-purple { color: #6a1b9a; border-color: #8e24aa; background: #fff; }
.demo-scope .cs-b.c-dpurple { background: #5e35b1; } .demo-scope .cs-b.o.c-dpurple { color: #4527a0; border-color: #5e35b1; background: #fff; }
.demo-scope .cs-b.c-bgrey { background: #546e7a; } .demo-scope .cs-b.o.c-bgrey { color: #455a64; border-color: #78909c; background: #fff; }
.demo-scope .cs-b.c-amber { background: #b45309; } .demo-scope .cs-b.o.c-amber { color: #92400e; border-color: #d97706; background: #fff; }
.demo-scope .cs-b.c-indigo { background: #3949ab; } .demo-scope .cs-b.o.c-indigo { color: #283593; border-color: #3949ab; background: #fff; }
.demo-scope .cs-b.c-mock { background: #ff9800; color: #1f1400; }
.demo-scope .ct-green { color: #15803d; } .demo-scope .ct-teal { color: #0b5766; }
.demo-scope .ct-blue { color: #1d4ed8; } .demo-scope .ct-orange { color: #c2410c; }
.demo-scope .ct-grey { color: #616161; } .demo-scope .ct-red { color: #b91c1c; }
.demo-scope .ct-purple { color: #7e22ce; } .demo-scope .ct-dpurple { color: #5b21b6; }
.demo-scope .ct-bgrey { color: #475569; } .demo-scope .ct-amber { color: #92400e; } .demo-scope .ct-indigo { color: #3730a3; }

/* KPI tiles */
.demo-scope .cs-tiles { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0; }
.demo-scope .cs-tile {
  background: #fff; border: 1px solid var(--cs-line); border-radius: 6px; padding: 10px 14px;
  min-width: 132px; text-align: center; box-shadow: 0 1px 2px rgba(20,25,34,.05);
}
.demo-scope .cs-tile b { display: block; font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--cs-text); }
.demo-scope .cs-tile span { font-size: 11.5px; color: #4b5563; white-space: nowrap; }
.demo-scope .cs-tile.left { text-align: left; }
.demo-scope .cs-tile.left small { display: block; font-size: 10.5px; color: var(--cs-faint); white-space: normal; max-width: 180px; }
.demo-scope button.cs-tile { font: inherit; cursor: pointer; }
.demo-scope button.cs-tile:hover { border-color: var(--cs-primary); }

/* Buttons and fields */
.demo-scope .cs-btn {
  font: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  border-radius: 4px; padding: 6px 12px; cursor: pointer; border: 1px solid transparent;
  background: #fff; color: var(--cs-primary); display: inline-flex; align-items: center; gap: 6px;
  min-height: 30px; line-height: 1.2; text-align: left;
}
.demo-scope .cs-btn.cs-primary { background: var(--cs-primary); color: #fff; }
.demo-scope .cs-btn.cs-primary:hover { background: var(--cs-primary-d); }
.demo-scope .cs-btn.cs-outline { border-color: var(--cs-primary); }
.demo-scope .cs-btn.cs-outline:hover, .demo-scope .cs-btn.cs-flat:hover { background: #e6f2f4; }
.demo-scope .cs-btn.cs-flat { background: transparent; }
.demo-scope .cs-btn.cs-deep { background: #d84315; color: #fff; }
.demo-scope .cs-btn.cs-red { background: #c10015; color: #fff; }
.demo-scope .cs-btn.cs-redflat { background: transparent; color: #b91c1c; }
.demo-scope .cs-btn.cs-indigo-b { background: #3949ab; color: #fff; }
.demo-scope .cs-btn.cs-sm { font-size: 11.5px; padding: 3px 9px; min-height: 26px; }
.demo-scope .cs-btn[disabled] { opacity: .5; cursor: default; }
.demo-scope .cs-btn .cs-cnt { background: var(--cs-primary); color: #fff; border-radius: 999px; font-size: 10px; padding: 0 6px; }
.demo-scope .cs-fld { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: #4b5563; min-width: 0; }
.demo-scope .cs-fld > span { display: flex; gap: 6px; align-items: center; }
.demo-scope .cs-in {
  font: inherit; font-size: 13px; color: var(--cs-text); background: #fff;
  border: 1px solid var(--cs-line-s); border-radius: 4px; padding: 6px 9px; min-height: 32px;
  width: 100%; max-width: 100%;
}
.demo-scope textarea.cs-in { min-height: 70px; font-family: var(--mono); font-size: 12px; }
.demo-scope .cs-w8 { width: 8.5em; }
.demo-scope .cs-w24 { max-width: 24rem; }
.demo-scope .cs-chk, .demo-scope .cs-switch { display: inline-flex; gap: 7px; align-items: center; font-size: 13px; color: var(--cs-text); cursor: pointer; }
.demo-scope .cs-chk input, .demo-scope .cs-switch input, .demo-scope .cs-radio input { accent-color: var(--cs-primary); width: 15px; height: 15px; }
.demo-scope .cs-radio { display: flex; gap: 16px; font-size: 13px; }
.demo-scope .cs-radio label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.demo-scope .cs-rng { display: flex; gap: 6px; align-items: flex-end; }
.demo-scope .cs-seg { display: inline-flex; border: 1px solid var(--cs-primary); border-radius: 4px; overflow: hidden; flex-wrap: wrap; }
.demo-scope .cs-seg button {
  font: inherit; font-size: 12.5px; font-weight: 600; padding: 5px 12px; border: 0; background: #fff;
  color: var(--cs-primary); cursor: pointer; border-right: 1px solid var(--cs-line);
}
.demo-scope .cs-seg button:last-child { border-right: 0; }
.demo-scope .cs-seg button[aria-pressed="true"] { background: var(--cs-primary); color: #fff; }

/* Expansions */
.demo-scope .cs-exp { background: #fff; border: 1px solid var(--cs-line); border-radius: 6px; margin-top: 8px; }
.demo-scope .cs-exp > summary {
  cursor: pointer; padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--cs-text);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.demo-scope .cs-exp > summary::-webkit-details-marker { display: none; }
.demo-scope .cs-exp > summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid #6b7280; border-bottom: 2px solid #6b7280; transform: rotate(45deg); transition: transform .15s; flex: none; }
.demo-scope .cs-exp[open] > summary::after { transform: rotate(-135deg); }
.demo-scope .cs-exp-b { padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.demo-scope .cs-exp-plain { background: transparent; border-color: #fcd34d; }

/* Tables */
.demo-scope .cs-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--cs-line); border-radius: 6px; background: #fff; }
.demo-scope .cs-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.demo-scope .cs-tbl th {
  text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--cs-muted); padding: 7px 10px; border-bottom: 1px solid var(--cs-line); white-space: nowrap;
  background: #fff; position: sticky; top: 0; z-index: 1;
}
.demo-scope .cs-tbl th button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; letter-spacing: inherit; text-transform: inherit; display: inline-flex; gap: 4px; align-items: center; }
.demo-scope .cs-tbl th .cs-arrow { font-size: 10px; opacity: .8; }
.demo-scope .cs-tbl td { padding: 6px 10px; border-bottom: 1px solid #eef1f4; vertical-align: top; color: var(--cs-text); }
.demo-scope .cs-tbl tbody tr:nth-child(even) td { background: var(--cs-zebra); }
.demo-scope .cs-tbl tr.cs-r { cursor: pointer; }
.demo-scope .cs-tbl tr.cs-r:hover td { background: var(--cs-hover); }
.demo-scope .cs-tbl tr.cs-r:focus-visible { outline: 2px solid var(--cs-primary); outline-offset: -2px; }
.demo-scope .cs-tbl .r { text-align: right; }
.demo-scope .cs-tbl .cs-sub { display: block; font-size: 11px; color: #6b7280; }
.demo-scope .cs-tbl .cs-subm { display: block; font-size: 11px; color: #6b7280; font-family: var(--mono); }
.demo-scope .cs-tbl .cs-ell { max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-scope .cs-tbl .cs-wrap { white-space: normal; min-width: 180px; }
.demo-scope .cs-tbl td.cs-why { font-size: 11.5px; color: var(--cs-muted); padding-top: 0; }
.demo-scope .cs-tbl.cs-wide { min-width: 900px; }
.demo-scope .cs-pag { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 11.5px; color: #4b5563; padding: 6px 8px; border-top: 1px solid var(--cs-line); flex-wrap: wrap; }
.demo-scope .cs-pag button { font: inherit; border: 1px solid var(--cs-line-s); background: #fff; border-radius: 4px; width: 28px; height: 26px; cursor: pointer; }
.demo-scope .cs-pag button[disabled] { opacity: .4; cursor: default; }
.demo-scope .cs-pag select { font: inherit; font-size: 11.5px; border: 1px solid var(--cs-line-s); border-radius: 4px; padding: 2px; }
.demo-scope .cs-ic { display: inline-flex; width: 15px; height: 15px; vertical-align: -3px; }
.demo-scope .cs-ic svg { width: 15px; height: 15px; }

/* Popover menus (Filters, Columns) */
.demo-scope .cs-pop { position: relative; display: inline-block; }
.demo-scope .cs-menu-p {
  position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; background: #fff; border: 1px solid var(--cs-line-s);
  border-radius: 6px; box-shadow: 0 10px 28px rgba(15,23,42,.18); padding: 12px; width: min(560px, 86vw);
  max-height: 60vh; overflow: auto; display: flex; flex-direction: column; gap: 10px;
}
.demo-scope .cs-menu-p[hidden] { display: none; }
.demo-scope .cs-menu-p.narrow { width: min(340px, 86vw); }
.demo-scope .cs-colgrp { font-size: 10px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; }

/* Dialogs */
.demo-scope .cs-app .cs-overlay { z-index: 30; padding: 16px; background: rgba(15,26,40,.5); }
.demo-scope .cs-app .ev-dlg.cs-dlg { max-width: 860px; padding: 16px 18px 18px; margin-bottom: 16px; }
.demo-scope .cs-app .ev-dlg.cs-dlg.narrow { max-width: 560px; }
.demo-scope .cs-dlg-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.demo-scope .cs-dlg-top .cs-dlg-t { flex: 1; font-size: 16px; font-weight: 700; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.demo-scope .cs-app .ev-close {
  font: inherit; font-size: 12.5px; font-weight: 600; border: 1px solid var(--cs-line-s); background: #fff; color: var(--cs-text);
  border-radius: 4px; padding: 5px 12px; cursor: pointer; flex: none;
}
.demo-scope .cs-kv { display: grid; grid-template-columns: minmax(120px, 11rem) 1fr; gap: 2px 10px; font-size: 12px; }
.demo-scope .cs-kv dt { color: #6b7280; }
.demo-scope .cs-kv dd { margin: 0; overflow-wrap: anywhere; }
.demo-scope .cs-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.demo-scope .cs-ev { list-style: none; margin: 4px 0 0; padding: 0; }
.demo-scope .cs-ev li { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px solid #eef1f4; font-size: 12px; }
.demo-scope .cs-ev .pts { width: 3rem; flex: none; font-family: var(--mono); font-size: 11.5px; }
.demo-scope .cs-ev .raw { display: block; font-family: var(--mono); font-size: 10.5px; color: #6b7280; overflow-wrap: anywhere; }
.demo-scope .cs-marks .mk { display: flex; gap: 10px; padding: 5px 0; }
.demo-scope .cs-marks .mk-ic { flex: none; width: 18px; height: 18px; margin-top: 2px; }

/* Notifications, bottom of the application as the product's are */
.demo-scope .cs-app .cs-notes {
  position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 40;
  display: flex; flex-direction: column; gap: 6px; align-items: center; width: min(560px, 92%); pointer-events: none;
}
.demo-scope .cs-note {
  pointer-events: auto; background: #323232; color: #fff; font-size: 13px; padding: 9px 14px; border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); width: 100%; line-height: 1.4;
}
.demo-scope .cs-note.t-positive { background: #0b5766; }
.demo-scope .cs-note.t-negative { background: #b71c1c; }
.demo-scope .cs-note.t-warning { background: #f2c037; color: #1f1400; }
.demo-scope .cs-note.t-info { background: #1d4ed8; }

/* Scan progress */
.demo-scope .cs-bar { height: 4px; background: #e5e7eb; border-radius: 2px; overflow: hidden; margin: 8px 0; }
.demo-scope .cs-bar i { display: block; height: 100%; width: 0; background: var(--cs-primary); transition: width .2s linear; }
.demo-scope .cs-log {
  font-family: var(--mono); font-size: 11.5px; background: #fff; border: 1px solid var(--cs-line);
  border-radius: 4px; padding: 8px 10px; height: 190px; overflow: auto; white-space: pre-wrap; margin: 8px 0 0; color: #1f2937;
}
.demo-scope .cs-log .w { color: #9a3412; }

/* Maps and charts */
.demo-scope .cs-map { overflow: auto; border: 1px solid var(--cs-line); border-radius: 6px; background: #fbfcfe; max-height: 560px; }
.demo-scope .cs-map svg { display: block; max-width: none; height: auto; }
.demo-scope .cs-map.fit svg { max-width: 100%; }
.demo-scope .cs-gauge { background: #fff; display: inline-flex; flex-direction: column; align-items: center; cursor: pointer; font: inherit; }
.demo-scope .cs-gauge svg { width: 200px; height: auto; }
.demo-scope .cs-spark { width: 120px; height: 28px; flex: none; }
.demo-scope .cs-grid { display: grid; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.demo-scope .cs-cell {
  height: 64px; border-radius: 9px; display: flex; align-items: center; justify-content: center; position: relative;
  font: inherit; font-size: 18px; font-weight: 750; cursor: pointer; border: 1.5px solid transparent; min-width: 52px;
}
.demo-scope .cs-cell.empty { background: #f8fafc; border: 1px solid #eef2f6; cursor: default; }
.demo-scope .cs-cell .obs { position: absolute; top: 6px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: #7c2d92; border: 1.5px solid #fff; }
.demo-scope .cs-rlab { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; text-align: right; padding-right: 6px; }
.demo-scope .cs-rlab b { font-size: 13px; }
.demo-scope .cs-rlab span { font-size: 11px; color: #64748b; }
.demo-scope .cs-clab { font-size: 11.5px; font-weight: 700; color: #0f172a; text-align: center; align-self: end; overflow-wrap: anywhere; }
.demo-scope .cs-key { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; color: #334155; margin-right: 12px; }
.demo-scope .cs-key i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.demo-scope .cs-flat-banner { background: #fef2f2; border: 1px solid #dc2626; border-radius: 10px; padding: 8px 12px; color: #991b1b; font-weight: 600; font-size: 13px; }

/* Calendar */
.demo-scope .cs-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.demo-scope .cs-cal .dh { font-size: 11px; font-weight: 700; color: #6b7280; text-align: center; }
.demo-scope .cs-cal .dc { border: 1px solid #e2e5e9; border-radius: 6px; min-height: 64px; padding: 3px 4px; background: #fff; font-size: 10px; overflow: hidden; }
.demo-scope .cs-cal .dc.we { background: #f7f8fa; }
.demo-scope .cs-cal .dc.out { background: #fafbfc; opacity: .45; }
.demo-scope .cs-cal .dn { font-size: 11px; color: #6b7280; }
.demo-scope .cs-cal .today .dn { display: inline-block; width: 20px; height: 20px; border-radius: 50%; background: #0f766e; color: #fff; text-align: center; line-height: 20px; }
.demo-scope .cs-cal .run { color: #115e59; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-scope .cs-cal .blocked { color: #6b7280; text-decoration: line-through; }

/* Tabs */
.demo-scope .cs-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--cs-line); overflow-x: auto; margin-top: 12px; }
.demo-scope .cs-tabs button {
  font: inherit; font-size: 12.5px; font-weight: 600; padding: 8px 12px; border: 0; background: none; color: var(--cs-muted);
  border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
}
.demo-scope .cs-tabs button[aria-selected="true"] { color: var(--cs-primary); border-bottom-color: var(--cs-primary); }
.demo-scope .cs-tabpanel { padding-top: 6px; }

/* Narrow screens: the rail becomes a menu behind the header button */
@media (max-width: 760px) {
  .demo-scope .cs-app { height: 82vh; min-height: 520px; grid-template-columns: minmax(0, 1fr); }
  .demo-scope .cs-app .cs-menu { display: block; }
  .demo-scope .cs-app .app-hd .hd-tag, .demo-scope .cs-app .cs-ver { display: none; }
  .demo-scope .cs-app.nav-open .app-nav {
    display: block; position: absolute; z-index: 25; left: 0; top: 48px; bottom: 0; width: min(260px, 80%);
    box-shadow: 6px 0 18px rgba(0,0,0,.3);
  }
  .demo-scope .cs-app .app-main { padding: 12px 10px 24px; }
  .demo-scope .cs-2col { grid-template-columns: 1fr; }
  .demo-scope .cs-tile { min-width: calc(50% - 4px); flex: 1 1 calc(50% - 4px); }
  .demo-scope .cs-ind { padding-left: 0; }
  .demo-scope .cs-kv { grid-template-columns: 1fr; }
  .demo-scope .cs-kv dt { margin-top: 4px; }
  .demo-scope .cs-cal .dc { min-height: 44px; }
  .demo-scope .cs-cal .run { display: none; }
  .demo-scope .cs-cal .has::after { content: ""; display: block; width: 6px; height: 6px; border-radius: 50%; background: #0f766e; margin-top: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-scope .cs-bar i, .demo-scope .cs-exp > summary::after { transition: none; }
}
