/* Keep the supplied walkthrough inside the shared site's main scrolling panel.
   CasePilot's shared theme supplies the light/dark --cp-* palette. */
.page-wrapper > .container.casepilot-demo-container { width: 100%; max-width: 1800px; padding: 24px; overflow: visible; }
.firm-demo { max-width: 1560px; margin: auto; padding: 24px; border-radius: 16px; background: var(--cp-bg); color: var(--cp-text); font: 17px/1.6 "Segoe UI", Aptos, Calibri, -apple-system, BlinkMacSystemFont, sans-serif; }
.firm-demo :where(*) { box-sizing: border-box; }
.firm-demo :where(a) { color: var(--cp-link); text-underline-offset: 3px; }
.firm-demo a:focus-visible, .firm-demo summary:focus-visible, .firm-demo .shot-scroll:focus-visible { outline: 3px solid var(--cp-link); outline-offset: 4px; }
.firm-demo-skip { position: fixed; top: -100px; left: 20px; z-index: 1080; background: var(--cp-surface); padding: 12px; }
.firm-demo-skip:focus { top: 12px; }
.firm-demo .firm-demo-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding-bottom: 20px; }
.firm-demo .brand { color: var(--cp-text); font-size: 25px; font-weight: 750; text-decoration: none; letter-spacing: -.5px; transition: none; }
.firm-demo .brand span { display: inline-block; margin-left: 20px; padding-left: 20px; border-left: 1px solid var(--cp-border-strong); font-size: 16px; font-weight: 400; letter-spacing: 0; }
.firm-demo .firm-demo-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; font-size: 15px; }
.firm-demo .disclosure { padding: 12px 24px; background: var(--cp-surface-soft); border: 1px solid var(--cp-border); border-radius: .625rem; font-size: 14px; }
.firm-demo .firm-demo-footer { padding: 24px 0 0; color: var(--cp-text-muted); font-size: 13px; border-top: 1px solid var(--cp-border); }
.firm-demo h1, .firm-demo h2, .firm-demo h3 { line-height: 1.2; color: var(--cp-text); }
.firm-demo h1 { font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -1px; margin: 8px 0 20px; }
.firm-demo h2 { font-size: 24px; margin: 0 0 12px; }
.firm-demo h3 { font-size: 19px; }
.firm-demo p { margin: 0 0 16px; }
.firm-demo .eyebrow { text-transform: uppercase; letter-spacing: 1.4px; font-size: 12px; font-weight: 750; color: var(--cp-accent); }
.firm-demo .eyebrow span { color: var(--cp-text-muted); margin-left: 20px; }
.firm-demo .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 36px; align-items: center; padding: 28px 0 44px; }
.firm-demo .lead { font-size: 20px; }
.firm-demo .hero-preview { display: block; border: 1px solid var(--cp-border); border-radius: 16px; overflow: hidden; background: var(--cp-surface); text-decoration: none; }
.firm-demo .hero-preview img { display: block; width: 100%; height: auto; }
.firm-demo .hero-preview span { display: block; padding: 12px; text-align: center; background: var(--cp-accent); color: var(--cp-accent-fg); font-weight: 700; }
.firm-demo .hero-preview span span { display: inline; padding: 0; }
.firm-demo .button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; border-radius: .625rem; padding: 8px 20px; font-size: 16px; font-weight: 650; text-decoration: none; white-space: normal; }
.firm-demo .hero .button { margin: 8px 0 20px; }
.firm-demo .overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.firm-demo .card { border: 1px solid var(--cp-border); background: var(--cp-surface); color: var(--cp-text); border-radius: 16px; padding: 24px; min-width: 0; }
.firm-demo .card p:last-child { margin-bottom: 0; }
.firm-demo .contents { margin-top: 48px; }
.firm-demo .contents h3 { margin-top: 28px; }
.firm-demo .step-index { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 44px; padding-left: 28px; }
.firm-demo .step-index li { padding: 4px 8px; }
.firm-demo .rejection-tag { font-size: 11px; color: var(--cp-danger); background: var(--cp-surface-soft); padding: 4px 8px; border-radius: .625rem; display: inline-block; margin-left: 8px; }
.firm-demo .step-heading { display: flex; align-items: start; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 24px; }
.firm-demo .step-heading .eyebrow { flex-basis: 100%; margin-bottom: 0; }
.firm-demo .step-heading h1 { flex: 1 1 420px; min-width: 0; }
.firm-demo .pager { display: flex; gap: 12px; flex-wrap: wrap; }
.firm-demo .action-card { background: var(--cp-surface); border: 1px solid var(--cp-border); border-left: 4px solid var(--cp-accent); border-radius: .625rem; padding: 24px 28px; margin-bottom: 24px; }
.firm-demo .action-card h2 { font-size: 19px; }
.firm-demo .action-card > p { margin-bottom: 0; font-size: 18px; }
.firm-demo .validation { margin-top: 20px; padding: 16px 20px; border: 1px solid var(--cp-danger); border-radius: .625rem; background: var(--cp-surface-soft); color: var(--cp-text); }
.firm-demo .validation h3 { margin-top: 0; color: var(--cp-danger); }
.firm-demo .validation p:last-child { margin-bottom: 0; }
.firm-demo figure { margin: 0 0 24px; min-width: 0; }
.firm-demo .shot-scroll { overflow-x: auto; border: 1px solid var(--cp-border-strong); border-radius: .625rem; background: var(--cp-surface); }
.firm-demo .screenshot { position: relative; min-width: 900px; }
.firm-demo .screenshot > img { display: block; width: 100%; height: auto; }
.firm-demo .annotations { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.firm-demo .highlight { fill: none; stroke: var(--cp-danger); stroke-width: 3; vector-effect: non-scaling-stroke; }
.firm-demo .number-dot, .firm-demo .callout { fill: var(--cp-danger); stroke: var(--cp-surface); stroke-width: 1.5; }
.firm-demo .number-text { font: bold 15px "Segoe UI", Aptos, Calibri, sans-serif; fill: var(--cp-surface); text-anchor: middle; }
.firm-demo .click-target { pointer-events: auto; cursor: pointer; }
.firm-demo .hit-area { fill: var(--cp-surface); fill-opacity: 0; }
.firm-demo .click-line { stroke: var(--cp-danger); stroke-width: 4; }
.firm-demo .click-arrowhead { fill: var(--cp-danger); }
.firm-demo .callout-text { fill: var(--cp-surface); font: bold 20px "Segoe UI", Aptos, Calibri, sans-serif; text-anchor: middle; }
.firm-demo .click-target:hover .callout, .firm-demo .click-target:focus .callout { stroke: var(--cp-text); stroke-width: 3; }
.firm-demo .click-target:focus .hit-area { stroke: var(--cp-text); stroke-width: 5; stroke-dasharray: 7 5; }
.firm-demo figcaption { color: var(--cp-text-muted); font-size: 13px; padding: 12px 4px; }
.firm-demo .explanation-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.firm-demo .card ol { margin: 0; padding-left: 24px; }
.firm-demo .presenter-notes { border: 1px solid var(--cp-border); border-radius: .625rem; background: var(--cp-surface); padding: 20px 24px; }
.firm-demo .presenter-notes summary { cursor: pointer; color: var(--cp-link); font-weight: 650; }
.firm-demo .presenter-notes p { margin-top: 16px; }
.firm-demo .bottom-pager { justify-content: space-between; margin: 28px 0; }
@media (max-width: 1000px) {
    .firm-demo .hero, .firm-demo .overview-grid { grid-template-columns: minmax(0, 1fr); }
    .firm-demo .hero { gap: 20px; }
    .firm-demo .hero-preview { max-width: 800px; }
}
@media (max-width: 620px) {
    .page-wrapper > .container.casepilot-demo-container { padding: 12px; }
    .firm-demo { padding: 16px; overflow-wrap: anywhere; }
    .firm-demo .firm-demo-header { align-items: flex-start; flex-direction: column; }
    .firm-demo .brand span { display: block; padding-left: 0; border: 0; margin-left: 0; }
    .firm-demo .firm-demo-header nav { gap: 20px; }
    .firm-demo .step-index, .firm-demo .explanation-grid { grid-template-columns: minmax(0, 1fr); }
    .firm-demo .card, .firm-demo .action-card { padding: 20px; }
    .firm-demo .eyebrow span { display: block; margin-left: 0; }
}
@media print {
    .firm-demo .firm-demo-header nav, .firm-demo .pager, .firm-demo .hero .button, .firm-demo .click-target { display: none; }
    .firm-demo { background: var(--cp-surface); font-size: 12pt; padding: 0; max-width: none; }
    .firm-demo .screenshot { min-width: 0; }
    .firm-demo .shot-scroll { overflow: visible; }
    .firm-demo .card, .firm-demo figure, .firm-demo .action-card { break-inside: avoid; }
}
