/* =========================================================================
   CCO homepage: interactive three-hub product demonstration
   Builds on the product UI system in cco.css (.app, .rot, cards, chips,
   pills). Loaded on the homepage only, with assets/js/cco-demo.js.
   ========================================================================= */

/* ---------- Static preview (before the script runs, or without it) ---------- */
.demo__notice { display: flex; align-items: flex-start; gap: 9px; margin: 14px 0 0; font-size: 12.5px; line-height: 1.45; color: rgba(255,255,255,.66); }
.demo__notice-i { flex: 0 0 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(200,161,74,.6); color: var(--gold-light); font: 700 10.5px/1 var(--sans); margin-top: 0; font-style: normal; }
.demo__links a { padding: 4px 0; }
.demo__links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 12px 0 0; font-size: 14px; }
.demo__links .link-arrow { color: var(--gold-light); font-weight: 600; }
.demo__links .link-arrow:hover { color: #fff; }
.demo__book { color: rgba(255,255,255,.78); text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 3px; }
.demo__book:hover { color: #fff; text-decoration-color: var(--gold); }

/* ---------- Toolbar: hub tabs, pause, reset ---------- */
.demo__top { flex-wrap: nowrap; }
.demo__tab { flex-direction: row; gap: 8px; padding: 6px 14px; }
.demo__tab-v { font-size: 11px; font-weight: 500; color: rgba(255,255,255,.5); letter-spacing: .02em; }
.demo__tab[aria-selected="true"] .demo__tab-v { color: var(--tone); }
.demo__tab:focus-visible, .demo__reset:focus-visible, .rot__pause:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.demo__ctl { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.demo__reset { flex-shrink: 0; margin-left: auto; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: rgba(255,255,255,.78); font: 600 12.5px/1 var(--sans); cursor: pointer; transition: border-color .2s var(--ease), color .2s var(--ease); }
.demo__reset:hover { border-color: rgba(255,255,255,.4); color: #fff; }
.demo__reset span[aria-hidden] { font-size: 15px; line-height: 1; }

/* ---------- Stage and hub frames ---------- */
.demo .rot__panel { display: flex; flex-direction: column; }
.demo-app { flex: 1; display: flex; flex-direction: column; min-height: 520px; }
.demo-app > .app__body { flex: 1; align-content: start; }
.demo-app .app__head { align-items: flex-start; }

/* Buttons rendered as product cards and rows */
.demo-card, .demo-res, .demo-signal, .demo-trace, .demo-tool, .demo-tb, .demo-item, .demo-rec {
  font: inherit; color: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.demo-card { display: block; width: 100%; }
.demo-card > span { display: block; }
.demo-card .app-card__label { display: flex; }
.demo-card .health { display: flex; }
.demo-card .health > span { display: grid; gap: 4px; min-width: 0; }
.demo-card:hover, .demo-tool:hover, .demo-tb:hover, .demo-item:hover, .demo-signal:hover, .demo-trace:hover { border-color: color-mix(in srgb, var(--tone, var(--app-green)) 55%, transparent); }
.demo-card:active, .demo-tool:active, .demo-tb:active, .demo-item:active, .demo-trace:active { transform: translateY(0) scale(.995); }
.demo-app :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.demo-more { color: var(--tone, var(--app-muted)); font-size: 15px; line-height: .8; font-weight: 400; letter-spacing: 0; }

.demo-reslist { gap: 2px; }
.demo-res { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) 30px; min-height: 32px; padding: 4px 6px; margin: 0 -6px; width: calc(100% + 12px); border: 1px solid transparent; border-radius: 8px; background: transparent; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.demo-res:hover { background: rgba(255,255,255,.04); }
.demo-res[aria-pressed="true"] { background: rgba(60,199,156,.08); border-color: rgba(60,199,156,.35); }

.demo-stack { display: grid; gap: 8px; }
.demo-signal { width: 100%; align-items: center; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.demo-signal:hover { background: rgba(240,164,58,.11); }
.demo-signal__txt { flex: 1; min-width: 0; font-size: 12.5px; color: var(--app-text); }
.demo-signal__txt small { display: block; color: var(--app-muted); font-size: 11.5px; margin-top: 2px; }
.demo-signal .demo-more { color: var(--app-amber); }
.demo-signal--mine { border-style: dashed; }
.demo-empty { margin: 0; padding: 10px 12px; border: 1px dashed var(--app-line); border-radius: 10px; color: var(--app-muted); font-size: 12px; }

.demo-trace { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--app-line); border-radius: 10px; background: var(--app-surface); font-size: 12.5px; font-weight: 600; color: var(--app-text); transition: border-color .2s var(--ease); }
.demo-trace > span:not(.pill):not(.demo-more) { flex: 1; min-width: 0; }
.demo-trace .staff-tool__ico, .demo-tb .staff-tool__ico, .demo-tool .staff-tool__ico { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: var(--tone); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* Staff Hub */
.demo-quick { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: stretch; }
.demo-rec { min-height: 44px; cursor: pointer; transition: filter .2s var(--ease), transform .2s var(--ease); }
.demo-rec:hover { filter: brightness(1.08); }
.demo-rec.is-done { border-color: rgba(60,199,156,.5); color: var(--app-green); }
.demo-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.demo-tool { min-height: 44px; }
.demo-tool__txt { display: grid; min-width: 0; }
.demo-tool__txt > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-tool__txt small { color: var(--app-muted); font-size: 10.5px; }
.demo-new { animation: settle .45s var(--ease) both; }
.demo-new .staff-act__e { color: var(--app-amber); }

/* Manager Hub */
.demo-toolbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.demo-tb { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--app-line); border-radius: 10px; background: var(--app-surface); color: var(--app-text); font-size: 12px; font-weight: 600; line-height: 1.2; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.demo-tb:hover { background: rgba(106,163,242,.08); }
.demo-item { width: 100%; transition: border-color .2s var(--ease); }
.demo-item--mine { border-color: rgba(240,164,58,.45); box-shadow: inset 3px 0 0 var(--app-amber); }
.demo-mine { color: var(--app-amber); font-weight: 600; }

/* ---------- Detail panel (drawer inside the hub frame) ---------- */
.demo-panel {
  position: absolute; z-index: 3; top: 43px; right: 0; bottom: 0; width: min(100%, 440px);
  display: flex; flex-direction: column;
  background: #142039; border-left: 1px solid rgba(255,255,255,.1);
  box-shadow: -24px 0 48px -16px rgba(0,0,0,.55);
  animation: demoDrawer .32s var(--ease) both;
}
.demo-app.has-panel > .app__body { opacity: .38; transition: opacity .25s var(--ease); }
@keyframes demoDrawer { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.demo-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--app-line); }
.demo-panel__title { margin: 0; font-family: var(--app-serif); font-size: 18px; font-weight: 600; line-height: 1.25; color: #fff; letter-spacing: -.01em; }
.demo-panel__title:focus { outline: none; }
.demo-panel__title { scroll-margin-top: 140px; }
.demo-panel__title:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.demo-panel__close { flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--app-line); background: transparent; color: var(--app-text); font-size: 20px; line-height: 1; cursor: pointer; transition: border-color .2s var(--ease); }
.demo-panel__close:hover { border-color: rgba(255,255,255,.35); }
.demo-panel__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 18px 20px; display: grid; gap: 12px; align-content: start; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.demo-p { margin: 0; color: var(--app-text); font-size: 12.5px; line-height: 1.55; }
.demo-fine { margin: 0; color: var(--app-muted); font-size: 11.5px; line-height: 1.45; }
.demo-fine--top { padding: 8px 10px; border-radius: 8px; background: rgba(200,161,74,.08); border: 1px solid rgba(200,161,74,.28); color: #E2D3AE; }
.demo-label { margin: 4px 0 -4px; }
.demo-sub { padding: 10px 12px; }
.demo-hint { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--app-muted); font-size: 12px; }
.demo-list { gap: 6px; }
.demo-list .item { background: var(--app-surface); }
.demo-list > li { min-width: 0; }

.demo-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.22); background: transparent; color: var(--app-text); font: 600 12.5px/1.2 var(--sans); cursor: pointer; transition: background-color .2s var(--ease), border-color .2s var(--ease), filter .2s var(--ease); }
.demo-btn:hover { border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.04); }
.demo-btn--solid { background: var(--tone, var(--app-amber)); border-color: var(--tone, var(--app-amber)); color: #0B1426; }
.demo-btn--solid:hover { background: var(--tone, var(--app-amber)); filter: brightness(1.08); }
.demo-btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.demo-link { display: inline; padding: 2px 0; border: 0; background: none; color: var(--tone, var(--app-blue)); font: 600 12px/1.4 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.demo-link:hover { color: #fff; }
.app-card__label .demo-link { font-size: 11px; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-tag { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 4px; background: rgba(255,255,255,.07); color: var(--app-muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; vertical-align: 1px; }

.demo-why { padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(200,161,74,.28); background: linear-gradient(180deg, rgba(200,161,74,.08), rgba(200,161,74,.03)); }
.demo-why__k { margin: 0 0 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); }
.demo-why p:last-child { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--app-text); }

/* Structured record, form fields */
.demo-record { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.demo-field { display: grid; gap: 3px; padding: 8px 10px; border: 1px solid var(--app-line); border-radius: 8px; background: var(--app-bg); min-width: 0; }
.demo-field--block { grid-column: 1 / -1; }
.demo-field__l { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--app-muted); }
.demo-field__v { color: var(--app-text); font-size: 12.5px; }
.demo-quote { margin: 0; color: var(--app-text); font-size: 12.5px; line-height: 1.55; }
.demo-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-form { display: grid; gap: 6px; }
.demo-select { width: 100%; min-height: 40px; padding: 8px 34px 8px 11px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: var(--app-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2393A0B7' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center; color: var(--app-text); font: 500 13px/1.3 var(--sans); appearance: none; cursor: pointer; }
.demo-select:hover { border-color: rgba(255,255,255,.35); }
.demo-fs { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 6px; }
.demo-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-opt { position: relative; display: inline-flex; cursor: pointer; }
.demo-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.demo-opt > span { display: grid; min-height: 40px; align-content: center; padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.16); background: var(--app-bg); color: var(--app-text); font-size: 12.5px; font-weight: 600; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.demo-opt > span small { font-size: 10.5px; font-weight: 500; color: var(--app-muted); }
.demo-opt:hover > span { border-color: rgba(255,255,255,.35); }
.demo-opt input:checked + span { border-color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, var(--app-bg)); box-shadow: inset 0 0 0 1px var(--tone); }
.demo-opt input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Checklist */
.demo-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.demo-checkrow { position: relative; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 12px; border: 1px solid var(--app-line); border-radius: 8px; background: var(--app-surface); color: var(--app-text); font-size: 12.5px; cursor: pointer; transition: border-color .2s var(--ease); }
.demo-checkrow:hover { border-color: rgba(255,255,255,.22); }
.demo-checkrow input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.demo-box { flex: 0 0 18px; height: 18px; border-radius: 5px; border: 1.5px solid rgba(255,255,255,.35); display: grid; place-items: center; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.demo-checkrow input:checked + .demo-box { background: var(--app-green); border-color: var(--app-green); }
.demo-checkrow input:checked + .demo-box::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #0B1426; border-bottom: 2px solid #0B1426; transform: rotate(-45deg) translate(1px, -1px); }
.demo-checkrow input:checked ~ span:last-child { color: var(--app-muted); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.3); }
.demo-checkrow input:focus-visible + .demo-box { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Shift notes */
.demo-det { display: block; padding: 0; }
.demo-det summary { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 12px; min-height: 44px; cursor: pointer; list-style: none; }
.demo-det summary::-webkit-details-marker { display: none; }
.demo-det summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 9px; }
.demo-det[open] summary { border-bottom: 1px solid var(--app-line); }
.demo-det__b { margin: 0; padding: 10px 12px 12px; font-size: 12.5px; line-height: 1.5; color: var(--app-text); }

/* Handover */
.demo-hand { padding: 10px 12px; border: 1px solid var(--app-line); border-radius: 10px; background: var(--app-surface); }
.demo-hand .app-card__label { margin-bottom: 6px; }
.demo-bul { margin: 0; padding-left: 16px; display: grid; gap: 4px; font-size: 12.5px; color: var(--app-text); }
.demo-bul b { color: #fff; font-weight: 600; }
.demo-bul li::marker { color: var(--app-amber); }

/* Factor bars */
.demo-factors { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.demo-factors li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 28px; gap: 2px 10px; align-items: center; font-size: 12.5px; }
.demo-factors__n { color: var(--app-text); }
.demo-factors .num { text-align: right; color: #fff; font-weight: 600; }
.demo-factors__d { grid-column: 1 / -1; color: var(--app-muted); font-size: 11.5px; }

/* Confirmations */
.demo-ok { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(60,199,156,.38); background: rgba(60,199,156,.08); }
.demo-ok p { margin: 0; font-size: 12.5px; color: var(--app-text); }
.demo-ok p + p { margin-top: 3px; color: var(--app-muted); }
.demo-ok--sm { align-items: center; font-size: 12.5px; color: var(--app-green); margin: 0; }
.demo-check { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; background: var(--app-green); position: relative; display: inline-block; }
.demo-check::after { content: ""; position: absolute; left: 5px; top: 5.5px; width: 7px; height: 4px; border-left: 2px solid #0B1426; border-bottom: 2px solid #0B1426; transform: rotate(-45deg); }
.demo-rec .demo-check { flex-basis: 16px; width: 16px; height: 16px; }
.demo-rec .demo-check::after { left: 4px; top: 4.5px; }
.demo-toast { position: absolute; z-index: 5; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 28px); padding: 10px 14px; border-radius: 10px; background: #0B1426; border: 1px solid rgba(60,199,156,.45); box-shadow: 0 12px 30px -8px rgba(0,0,0,.6); color: var(--app-text); font-size: 12.5px; line-height: 1.4; animation: demoToast .3s var(--ease) both; transition: opacity .3s var(--ease); pointer-events: none; }
.demo-toast.is-out { opacity: 0; }
@keyframes demoToast { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Timeline */
.demo-tl { list-style: none; margin: 0; padding: 0; display: grid; }
.demo-tl__step { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; padding: 0 0 14px; }
.demo-tl__step::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--app-line); }
.demo-tl__step:last-child { padding-bottom: 0; }
.demo-tl__step:last-child::before { display: none; }
.demo-tl__step.is-done::before { background: color-mix(in srgb, var(--tone) 55%, transparent); }
.demo-tl__dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); background: var(--app-bg); margin-top: 1px; }
.demo-tl__step.is-done .demo-tl__dot { border-color: var(--tone); background: var(--tone); box-shadow: inset 0 0 0 3px var(--app-bg); }
.demo-tl__step.is-current .demo-tl__dot { border-color: var(--tone); border-style: dashed; }
.demo-tl__txt { display: grid; gap: 1px; font-size: 12.5px; }
.demo-tl__txt b { color: #fff; font-weight: 600; }
.demo-tl__step:not(.is-done) .demo-tl__txt b { color: var(--app-muted); }
.demo-tl__hub { color: var(--tone); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.demo-tl__d { color: var(--app-muted); font-size: 11.5px; }

/* ---------- Guided demo: compact full-width progress indicator ---------- */
.demo__intro { margin: 0 0 10px; font-size: 13.5px; line-height: 1.4; color: rgba(255,255,255,.74); }
.demo-guide { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 12px; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: var(--grid-surface); }
.demo-guide__steps-wrap { flex: 0 1 auto; min-width: 0; }
.demo-guide__k { margin: 0 0 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-light); }
.demo-guide__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: rgba(255,255,255,.55); }
.demo-guide__steps li { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.demo-guide__arrow { color: rgba(255,255,255,.3); }
.demo-guide__n { min-width: 24px; height: 22px; padding: 0 5px; flex-shrink: 0; display: grid; place-items: center; border-radius: 11px; border: 1px solid rgba(255,255,255,.25); font-size: 10.5px; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.demo-guide__steps li.is-next { color: #fff; font-weight: 600; }
.demo-guide__steps li.is-next .demo-guide__n { border-color: var(--gold); background: var(--gold); color: var(--navy-deep); }
.demo-guide__steps li.is-done { color: rgba(255,255,255,.85); }
.demo-guide__steps li.is-done .demo-guide__n { border-color: var(--app-green); background: var(--app-green); color: #0B1426; }
.demo-guide__next, .demo-guide__done { flex: 1 1 200px; min-width: 0; margin: 0; font-size: 13.5px; line-height: 1.4; color: rgba(255,255,255,.88); }
.demo-guide__done { display: flex; align-items: center; gap: 9px; color: var(--app-green); }
.demo-guide__act { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-left: auto; }
.demo-guide__go { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--gold); background: var(--gold); color: var(--navy-deep); font: 700 13px/1.2 var(--sans); white-space: nowrap; cursor: pointer; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.demo-guide__go:hover { background: var(--gold-light); border-color: var(--gold-light); }
.demo-guide__go:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.demo-guide .demo__reset { min-height: 44px; padding: 0 8px; font-size: 12.5px; margin: 0; border: 0; border-radius: 6px; color: rgba(255,255,255,.6); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); text-underline-offset: 3px; white-space: nowrap; }
.demo-guide .demo__reset:hover { color: #fff; }
.demo-guide.is-complete .demo__reset { border: 1px solid rgba(255,255,255,.3); padding: 0 16px; text-decoration: none; color: #fff; border-radius: 999px; }
.demo-guide__m, .demo-guide__bar { display: none; }
.demo-guide__bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.demo-guide__bar span { display: block; height: 100%; background: var(--gold); transition: width .3s var(--ease); }
.demo-details { margin: 0; }
.demo-record--one { grid-template-columns: 1fr; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) and (min-width: 1041px) {
  .demo__tab-v { display: none; }
}
@media (max-width: 640px) {
  .demo__top { gap: 8px; }
  .demo__tabs { flex: 1; min-width: 0; }
  .demo__reset { margin-left: 0; justify-content: center; }
  .demo__tab { flex: 1; flex-direction: column; gap: 1px; min-height: 48px; padding: 6px 4px; justify-content: center; }
  .demo__tab .sdot { display: none; }
  .demo__tab-v { font-size: 10.5px; }
  .demo-app { min-height: 560px; }
  .demo-quick { grid-template-columns: 1fr; }
  .demo-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .demo-tool { flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px; }
  /* Detail panels become a sheet over the hub body. */
  .demo-panel { width: 100%; top: 43px; border-left: 0; border-top: 1px solid rgba(255,255,255,.12); border-radius: 14px 14px 0 0; box-shadow: 0 -18px 40px -12px rgba(0,0,0,.6); animation-name: demoSheet; }
  .demo-record { grid-template-columns: 1fr; }
  /* Compact Leadership view: three indicators across, no sparkline. */
  .demo-app .app-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .demo-app .app-row--3 > :nth-child(3) { grid-column: auto; }
  .demo-app .app-row--3 .app-card { padding: 10px; }
  .demo-app .app-row--3 .app-card__label { letter-spacing: .06em; margin-bottom: 6px; }
  .demo-app .app-row--3 .kpi__value small { display: none; }
  .demo-app .app-row--3 .kpi__note { font-size: 10.5px; line-height: 1.3; }
  .demo-app .app-row--health .spark { display: none; }
  .demo-app .health__ring { width: 64px; height: 64px; }
  .demo-app .app-row--health .app-card { padding: 12px; }
  .demo-app .res-list { gap: 0; }
}
@media (max-width: 760px) {
  .demo-guide__steps-wrap { flex: 1 1 100%; }
  .demo-guide__next, .demo-guide__done { flex: 1 1 100%; font-size: 13px; }
  .demo-guide__m { display: none; }
  .demo-guide__bar { display: block; margin-top: 8px; }
  .demo-guide__act { flex: 1 1 100%; justify-content: space-between; margin-left: 0; }
  .demo-guide__go { flex: 1; justify-content: center; }
}
@media (max-width: 400px) {
  .demo-guide { padding: 12px; }
  .demo-guide__steps { font-size: 12px; gap: 6px 6px; }
  .demo-guide__steps li { gap: 5px; }
}
@keyframes demoSheet { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@media (max-width: 400px) {
  .demo-tools { grid-template-columns: 1fr; }
  .demo-tool { flex-direction: row; align-items: center; }
  .demo-app .app-row--3 .kpi__value { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-panel, .demo-toast, .demo-new { animation: none; }
  .demo-app.has-panel > .app__body { transition: none; }
}

/* ---------- Record Observation icon ---------- */
.demo-rec { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.demo-rec__ico { display: inline-flex; flex: 0 0 16px; }
.demo-rec__ico .staff-tool__ico { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; width: 16px; height: 16px; }

/* ---------- Staff and Manager Hub supporting sections ---------- */
.demo-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.demo-sec { min-width: 0; }
.demo-sec .items { gap: 6px; }
.demo-sec .item { padding: 8px 10px; }
.demo-label--sec { margin: 2px 0 -4px; }
.demo-progs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.demo-prog { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; align-items: center; min-height: 44px; padding: 7px 10px; border: 1px solid var(--app-line); border-radius: 10px; background: var(--app-raise); font: inherit; color: inherit; text-align: left; cursor: pointer; transition: border-color .2s var(--ease); }
.demo-prog:hover { border-color: rgba(200,161,74,.5); }
.demo-prog__l { font-size: 12.5px; font-weight: 500; color: var(--app-text); min-width: 0; }
.demo-prog__v { font-size: 11.5px; color: var(--app-muted); text-align: right; }
.demo-meter { grid-column: 1 / -1; display: block; height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.demo-meter > span { display: block; height: 100%; border-radius: 2px; background: var(--gold); transition: width .3s var(--ease); }
.demo-prog--ok .demo-meter > span { background: var(--app-green); }
.demo-prog--warn .demo-meter > span { background: var(--app-amber); }
.demo-prog--ok .demo-prog__v { color: var(--app-green); }
.demo-prog--warn .demo-prog__v { color: var(--app-amber); }
.demo-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.demo-stat { min-width: 0; padding: 10px 12px; text-align: left; }
.demo-stat .kpi__value { font-size: 24px; }
.demo-stat .kpi__note { font-size: 11px; line-height: 1.3; }
.demo-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.demo-feed li { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--app-line); }
.demo-feed li:first-child { border-top: 0; padding-top: 2px; }
.demo-feed__t { color: var(--app-muted); font-size: 11px; font-variant-numeric: lining-nums tabular-nums; padding-top: 1px; }
.demo-feed__b { display: grid; gap: 1px; min-width: 0; font-size: 12.5px; color: var(--app-text); }
.demo-feed__b b { font-weight: 500; }
.demo-feed__b small { font-size: 11px; color: var(--app-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-pri__n { color: var(--gold-light); font-size: 12px; }
@media (max-width: 900px) {
  .demo-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .demo-pair { grid-template-columns: 1fr; }
}

/* =========================================================================
   Compact product preview: roughly half the previous vertical footprint.
   Heights follow content; no fixed minimums or stretched filler.
   ========================================================================= */
.demo-app, .demo-app { min-height: 0; }
.demo .app__body { padding: 12px 14px 14px; gap: 8px; }
.demo-app .app__sub, .demo .app__sub { display: none; }
.demo .app__title { font-size: 17px; }
.demo .app__kicker { margin-bottom: 1px; }
.demo-app .app-card { padding: 10px 12px; border-radius: 12px; }
.demo-app .app-card__label { margin-bottom: 6px; }

/* Guided demo: two functional areas (progress, action) in a grid.
   Stacked by default; shares one row only when the container is wide enough. */
.demo__guide-wrap { margin-top: 8px; container-type: inline-size; container-name: guide; }
.demo-guide { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "k" "steps" "action"; align-items: center; gap: 8px 20px; min-height: 0; margin-top: 0; padding: 10px 14px; border-radius: 12px; }
.demo-guide__k { grid-area: k; margin: 0; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); }
.demo-guide__steps { grid-area: steps; flex-wrap: wrap; gap: 4px 8px; font-size: 12.5px; }
.demo-guide__steps li { gap: 5px; }
.demo-guide__act { grid-area: action; margin: 0; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.demo-guide__go { min-height: 44px; padding: 8px 18px; font-size: 13px; white-space: normal; text-align: left; }
.demo-guide .demo__reset { min-height: 44px; }
.demo-guide__done { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 12.5px; color: var(--app-green); }
@container guide (min-width: 720px) {
  .demo-guide { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k action" "steps action"; }
}

/* Staff Hub */
.demo-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.demo-people__i { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 8px; border: 1px solid var(--app-line); border-radius: 10px; background: var(--app-surface); }
.demo-people .person__av { width: 26px; height: 26px; flex: 0 0 26px; font-size: 9.5px; }
.demo-people__t { display: grid; min-width: 0; }
.demo-people .person__name { font-size: 12px; line-height: 1.2; }
.demo-people .person__meta { font-size: 10.5px; line-height: 1.25; }
.demo .signal { padding: 8px 12px; }
.demo-quick { gap: 8px; }
.demo-tool, .demo-rec { min-height: 44px; }
.demo-recent .app-card__label { margin-bottom: 2px; }
.demo-recent .staff-act__row { padding-block: 4px; }
.demo-pair { gap: 8px; }
.demo-progs { gap: 4px; }
.demo-prog { min-height: 40px; padding: 5px 10px; }
.demo-sec .item { padding: 6px 10px; }

/* Manager Hub */
.demo-more-det { border: 1px solid var(--app-line); border-radius: 12px; background: var(--app-surface); }
.demo-more-det > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px 12px; cursor: pointer; list-style: none; font-size: 12.5px; font-weight: 600; color: var(--app-text); }
.demo-more-det > summary::-webkit-details-marker { display: none; }
.demo-more-det > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 12px; }
.demo-more-det__a { color: var(--gold-light); font-size: 18px; transition: transform .2s var(--ease); }
.demo-more-det[open] .demo-more-det__a { transform: rotate(90deg); }
.demo-more-det__b { display: grid; gap: 8px; padding: 0 10px 10px; }
.demo-stat .kpi__value { font-size: 22px; }
.demo-toolbar { gap: 6px; }
.demo-tb { min-height: 44px; padding: 6px 8px; }
.demo-app .app-row--2 .kpi__value { font-size: 22px; }

/* Leadership Hub */
.demo-app .health__ring { width: 60px; height: 60px; }
.demo-app .health { gap: 12px; }
.demo-app .app-row { gap: 8px; }
.demo-app .app-row--health .spark { max-height: 26px; }
.demo-res { min-height: 30px; padding-block: 2px; }
.demo-app .app-row--3 .kpi__value { font-size: 22px; }
.demo-app .app-row--3 .app-card { padding: 8px 12px; }
.demo-app .app-row--3 .app-card__label { margin-bottom: 4px; }
.demo-stack { gap: 6px; }
.demo-signal { padding: 8px 12px; }
.demo-trace { min-height: 44px; padding: 6px 12px; }

@media (max-width: 760px) {
  .demo-people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .demo-app { min-height: 0; }
}
