.product-demo {
  --pd-ok: #176744;
  --pd-ok-bg: #e9f5ed;
  --pd-danger: #a93931;
  --pd-danger-bg: #fff0ed;
  --pd-warning: #795018;
  --pd-panel: #eaf2ff;
  container: product-window / inline-size;
  width: 100%; min-width: 0; overflow: hidden;
  color: var(--mix-ink, #062b72); background: var(--mix-surface, #fff);
  border: 1px solid var(--mix-line, #cfdcf0); border-radius: 7px;
  font: 14px/1.45 Hanken, Arial, sans-serif;
  box-shadow: 0 20px 60px rgba(6, 43, 114, .09);
  text-align: left;
}
[data-theme="dark"] .product-demo { --pd-ok: #a3d7b8; --pd-ok-bg: #193b2b; --pd-danger: #ffb4a8; --pd-danger-bg: #452924; --pd-warning: #edbf84; --pd-panel: #162942; box-shadow: 0 24px 64px #0003; }
.product-demo *, .product-demo *::before, .product-demo *::after { box-sizing: border-box; }
.product-demo [hidden] { display: none !important; }
.product-demo button, .product-demo input { font: inherit; }
.product-demo button { cursor: pointer; }
.product-demo button:focus-visible, .product-demo input:focus-visible { outline: 3px solid var(--mix-action, #0a6cdd); outline-offset: 3px; }
.product-demo p, .product-demo h3, .product-demo h4, .product-demo dl, .product-demo dd { margin: 0; }
.pd-bar { display: flex; align-items: center; gap: 18px; min-height: 70px; padding: 12px 23px; border-bottom: 1px solid var(--mix-line); background: var(--mix-surface); }
.pd-logo { display: block; width: 143px; height: auto; flex: none; }
.pd-logo-dark { display: none; }
[data-theme="dark"] .pd-logo-light { display: none; }
[data-theme="dark"] .pd-logo-dark { display: block; }
.pd-window-title { font-size: 12px; color: var(--mix-muted); border-left: 1px solid var(--mix-line); padding-left: 18px; }
.pd-demo-label { margin-left: auto; font-size: 10px; color: var(--mix-muted); white-space: nowrap; }
.pd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 235px; }
.pd-main { min-width: 0; padding: 25px 25px 23px; }
.pd-topline { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 9px; }
.pd-eyebrow { color: var(--mix-link); font-size: 11px; font-weight: 600; }
.pd-person { font-size: 12px; color: var(--mix-muted); }
.pd-main h3 { font-size: 24px; font-weight: 650; letter-spacing: -.025em; line-height: 1.2; }
.pd-intro { color: var(--mix-muted); font-size: 12px; margin-top: 8px !important; max-width: 550px; }
.pd-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; margin-top: 22px !important; }
.pd-field { min-width: 0; border: 1px solid var(--mix-line); border-radius: 5px; padding: 12px 13px; background: var(--mix-surface); }
.pd-field dt { color: var(--mix-muted); font-size: 10px; margin-bottom: 4px; }
.pd-field dd { font-size: 14px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.pd-field small { display: block; font-size: 10px; font-weight: 400; color: var(--mix-muted); margin-top: 3px; }
.pd-field-date { background: var(--mix-action-soft); border-color: var(--mix-action); }
.pd-note { font-size: 11px; color: var(--mix-muted); margin-top: 13px !important; }
.pd-note strong { color: var(--mix-ink); font-weight: 600; }
/* Keep the sidebar opaque even when a standalone preview omits palette tokens. */
.pd-side { min-width: 0; padding: 25px 18px 20px; background: var(--mix-soft, var(--pd-panel)); border-left: 1px solid var(--mix-line); }
.pd-mode { display: flex; align-items: center; gap: 7px; color: var(--mix-link); font-size: 11px; margin-bottom: 8px !important; }
.pd-mode::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pd-side h4 { font-size: 16px; font-weight: 650; line-height: 1.3; }
.pd-side-person { font-size: 11px; color: var(--mix-muted); margin-top: 5px !important; }
.pd-phases { list-style: none; padding: 0; margin: 18px 0 16px; display: grid; gap: 7px; }
.pd-phase { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--mix-line); border-radius: 4px; font-size: 10px; color: var(--mix-muted); background: var(--mix-surface); min-height: 37px; }
.pd-phase-symbol { width: 14px; height: 14px; flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.pd-phase-symbol svg { display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pd-phase[data-step-state="done"] { color: var(--mix-ink); }
.pd-phase[data-step-state="active"] { background: var(--mix-action-soft); border-color: var(--mix-action); color: var(--mix-link); }
.pd-side-note { font-size: 10px; color: var(--mix-muted); line-height: 1.55; }
.pd-report { margin-top: 20px; }
.pd-report-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.pd-report-heading h4 { font-size: 12px; font-weight: 650; }
.pd-report-heading span { color: var(--mix-muted); font-size: 10px; }
.pd-table-scroll { overflow: auto; max-width: 100%; scrollbar-width: thin; }
.pd-report table { width: 100%; border-collapse: collapse; font-size: 11px; text-align: left; }
.pd-report th { text-align: left; font-size: 10px; color: var(--mix-muted); font-weight: 500; background: var(--mix-soft); padding: 7px 9px; }
.pd-report td { padding: 9px; border-bottom: 1px solid var(--mix-line); vertical-align: middle; }
.pd-report td:first-child { font-weight: 550; }
.pd-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; line-height: 1.35; font-weight: 600; color: var(--mix-link); }
.pd-badge[data-tone="ok"] { color: var(--pd-ok); }
.pd-badge[data-tone="awaiting"] { color: var(--mix-muted); }
.pd-badge[data-tone="review"] { color: var(--pd-warning); }
.pd-badge[data-tone="danger"] { color: var(--pd-danger); }
.pd-badge::before { content: ''; width: 4px; height: 4px; flex: none; border-radius: 50%; background: currentColor; }
.pd-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 23px; border-top: 1px solid var(--mix-line); background: var(--mix-surface); }
.pd-footer-copy { font-size: 11px; color: var(--mix-muted); max-width: 580px; }
.pd-action { flex: none; padding: 10px 17px; min-height: 39px; font-size: 11px !important; line-height: 1.3; font-weight: 650 !important; border: 1px solid transparent; border-radius: 4px; color: var(--mix-on-action); background: var(--mix-action); }
.pd-action:hover { filter: brightness(.96); }
.pd-result { border: 1px solid var(--mix-line); border-left: 3px solid var(--mix-action); border-radius: 3px; background: var(--mix-soft); padding: 12px 13px; font-size: 11px; color: var(--mix-ink); margin-top: 16px !important; }
.pd-result[data-tone="ok"] { border-left-color: var(--pd-ok); background: var(--pd-ok-bg); }
.pd-result[data-tone="danger"] { border-left-color: var(--pd-danger); background: var(--pd-danger-bg); }
.pd-criteria { display: grid; gap: 9px; margin-top: 18px; }
.pd-criterion { border: 1px solid var(--mix-line); border-radius: 5px; padding: 11px 13px; min-width: 0; margin: 0; }
.pd-criterion legend { font-size: 11px; font-weight: 650; padding-inline: 4px; }
.pd-criterion-fixed { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 11px; }
.pd-criterion-fixed strong { font-weight: 650; }
.pd-criterion-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 3px; }
.pd-option { display: flex; align-items: center; gap: 7px; border: 1px solid var(--mix-line); border-radius: 4px; padding: 9px 8px; cursor: pointer; font-size: 11px; line-height: 1.4; }
.pd-option input { margin: 0; width: 14px; height: 14px; flex: none; accent-color: var(--mix-action); }
.pd-option:has(input:checked) { background: var(--mix-action-soft); border-color: var(--mix-action); }
.pd-option-ineligible { color: var(--pd-danger); }
.pd-option-ineligible:has(input:checked) { background: var(--pd-danger-bg); border-color: var(--pd-danger); }
.pd-option span small { display: block; font-size: 9px; font-weight: 650; }
.product-demo[data-compact] .pd-main { padding-block: 21px; }
.product-demo[data-compact] .pd-main h3 { font-size: 23px; }
.product-demo[data-compact] .pd-intro, .product-demo[data-compact] .pd-note { display: none; }
.product-demo[data-compact] .pd-fields { margin-top: 17px !important; }
.product-demo[data-compact] .pd-report { margin-top: 15px; }
@container product-window (max-width: 700px) {
  .pd-layout { grid-template-columns: minmax(0,1fr); }
  .pd-side { border-left: 0; border-top: 1px solid var(--mix-line); padding: 17px 20px; }
  .pd-phases { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 12px; margin-bottom: 10px; }
  .pd-side-person { display: none; }
  .pd-bar { padding-inline: 19px; gap: 13px; }
  .pd-logo { width: 124px; }
  .pd-window-title { padding-left: 13px; font-size: 10px; }
  .pd-demo-label { display: none; }
  .pd-footer { padding-inline: 20px; }
}
@container product-window (max-width: 430px) {
  .pd-main { padding: 20px 15px; }
  .pd-bar { padding: 11px 15px; min-height: 59px; gap: 12px; }
  .pd-logo { width: 112px; }
  .pd-window-title { padding-left: 12px; font-size: 9px; }
  .pd-topline { gap: 8px; }
  .pd-person, .pd-eyebrow { font-size: 10px; }
  .pd-main h3 { font-size: 22px; }
  .pd-field { padding: 10px; }
  .pd-field dd { font-size: 12px; }
  .pd-fields { gap: 8px; }
  .pd-report th, .pd-report td { padding-inline: 6px; }
  .pd-report table { min-width: 275px; }
  .pd-side { padding: 16px 15px; }
  .pd-phase { padding: 8px; gap: 6px; font-size: 9px; }
  .pd-footer { align-items: flex-start; flex-direction: column; gap: 12px; padding: 14px 15px; }
  .pd-action { width: 100%; }
  .pd-criterion { padding: 10px; }
  .pd-criterion-options { grid-template-columns: 1fr; }
  .pd-criterion-fixed { align-items: flex-start; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .product-demo *, .product-demo *::before, .product-demo *::after { animation: none !important; transition: none !important; } }
