.demo-page .page-head { padding-block: 3.2rem 2.5rem; }
.demo-banner { position: sticky; top: .5rem; z-index: 4; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem 1rem; padding: .8rem 1rem; border: 2px solid var(--accent); background: var(--surface); box-shadow: 0 6px 20px #00000012; }
.demo-banner strong { color: var(--accent); }
.demo-banner span { color: var(--muted); font-size: .88rem; }
.demo-tabs { display: flex; gap: .35rem; margin-top: 2rem; border-bottom: 1px solid var(--line); }
.demo-tabs button { border: 1px solid transparent; background: transparent; padding: .75rem 1rem; color: var(--muted); }
.demo-tabs button[aria-selected="true"] { border-color: var(--line); border-bottom-color: var(--surface); background: var(--surface); color: var(--ink); margin-bottom: -1px; }
.demo-panel { background: var(--surface); border: 1px solid var(--line); padding: clamp(1rem, 3vw, 2rem); margin-bottom: 2rem; min-width: 0; }
.demo-app-header, .windows-demo-title { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.demo-app-header h2, .windows-demo-title h2 { margin: .25rem 0; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.demo-app-header p, .windows-demo-title p { margin: .3rem 0; color: var(--muted); }
.demo-chip { padding: .4rem .8rem; border: 1px solid var(--line); color: var(--accent); font: 700 .8rem ui-monospace, monospace; }
.demo-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin: 1.4rem 0; border: 1px solid var(--line); }
.demo-summary div { padding: .8rem 1rem; border-right: 1px solid var(--line); }
.demo-summary div:last-child { border: 0; }
.demo-summary span, .demo-summary strong { display: block; }
.demo-summary span { color: var(--muted); font-size: .78rem; }
.demo-summary strong { margin-top: .25rem; }
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-block: 1rem; }
.demo-card, .windows-demo-card { min-width: 0; padding: 1rem; border: 1px solid var(--line); background: var(--surface); }
.demo-card h3, .windows-demo-card h3 { margin: 0 0 .55rem; font-size: 1.05rem; }
.demo-card p, .windows-demo-card p { color: var(--muted); font-size: .9rem; }
.demo-card label, .windows-demo-card label { display: block; margin: .65rem 0; font-size: .86rem; font-weight: 650; }
.demo-card input, .demo-card select, .windows-demo-card input, .windows-demo-card select { display: block; width: 100%; margin-top: .3rem; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); color: var(--ink); }
.demo-card button:not(.button), .demo-table button:not(.button), .demo-list button { padding: .35rem .5rem; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: .78rem; }
.demo-card button:hover, .demo-list button:hover { border-color: var(--accent); }
.demo-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .65rem; }
.demo-approval { border-left: 4px solid var(--signal); margin-block: 1rem; }
.demo-table-card { margin-block: 1rem; }
.demo-table-scroll { width: 100%; overflow-x: auto; }
.demo-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .85rem; }
.demo-table th, .demo-table td { min-width: 8rem; padding: .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.demo-table th { font-weight: 650; }
.demo-table small { display: block; color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
.demo-row-actions { display: flex; flex-wrap: wrap; gap: .3rem; min-width: 16rem !important; }
.demo-row-actions .danger { color: var(--signal) !important; }
.demo-status { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; font-size: .82rem; font-weight: 700; }
.demo-status::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--muted); }
.demo-status.is-on::before { background: #327447; }
.demo-status.is-off::before { background: var(--signal); }
.demo-list { padding: 0; list-style: none; }
.demo-list li { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding: .45rem 0; }
.demo-notice, .demo-inline-notice { padding: .65rem .8rem; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--ink); font-size: .88rem; }
.demo-footnote { margin-block: 0 3rem; }
.windows-demo-window { border: 1px solid var(--line); box-shadow: 0 12px 32px #00000010; }
.windows-demo-top { display: flex; align-items: center; gap: .75rem; min-height: 3.5rem; padding: .5rem .85rem; border-bottom: 1px solid var(--line); }
.windows-demo-top .micro { margin-left: auto; color: var(--muted); }
.app-mark { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; background: var(--accent); color: var(--surface); font-weight: 800; }
.quiet-button { padding: .35rem .55rem; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: .78rem; }
.windows-demo-layout { display: grid; grid-template-columns: 12rem minmax(0, 1fr); min-height: 45rem; }
.windows-demo-nav { padding: 1rem .7rem; border-right: 1px solid var(--line); background: var(--paper); }
.windows-demo-nav strong { display: block; padding: .35rem; }
.windows-demo-nav button { display: block; width: 100%; margin-top: .4rem; padding: .55rem; border: 0; background: transparent; color: var(--ink); text-align: left; }
.windows-demo-nav button.selected { background: var(--accent-soft); }
.windows-demo-nav button:disabled { color: var(--muted); cursor: not-allowed; }
.windows-demo-content { padding: clamp(.85rem, 2vw, 1.5rem); min-width: 0; }
.windows-policy-strip { display: flex; flex-wrap: wrap; gap: .5rem 1rem; padding: .65rem; margin-block: 1rem; background: var(--soft); font-size: .8rem; }
.windows-policy-strip strong { margin-left: .25rem; }
.windows-demo-card { margin-block: .8rem; }
.windows-demo-card form { max-width: 36rem; }
.windows-demo-card .demo-check { display: flex; align-items: center; gap: .5rem; }
.windows-demo-card .demo-check input { width: auto; margin: 0; }
.demo-terminal { overflow: auto; min-height: 8rem; max-height: 18rem; padding: .8rem; background: #12211d; color: #e2eee2; }
.demo-terminal pre { margin: 0; font: .85rem/1.5 "Cascadia Code", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.demo-terminal-input { display: flex; gap: .5rem; align-items: end; }
.demo-terminal-input input { min-width: 0; flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .demo-banner { grid-template-columns: 1fr auto; }
  .demo-banner span { grid-column: 1 / -1; grid-row: 2; }
  .demo-banner .button { grid-column: 2; grid-row: 1; }
  .demo-grid { grid-template-columns: 1fr; }
  .demo-summary { grid-template-columns: 1fr; }
  .demo-summary div { border-right: 0; border-bottom: 1px solid var(--line); }
  .demo-summary div:last-child { border-bottom: 0; }
  .windows-demo-layout { grid-template-columns: 1fr; }
  .windows-demo-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; border-right: 0; border-bottom: 1px solid var(--line); padding: .5rem; }
  .windows-demo-nav strong { width: 100%; }
  .windows-demo-nav button { width: auto; margin: 0; }
  .windows-demo-nav .fine { margin: 0 0 0 auto; }
  .demo-app-header { align-items: flex-start; }
}
@media (max-width: 460px) {
  .demo-panel { padding: .7rem; }
  .demo-tabs button { flex: 1; padding-inline: .4rem; font-size: .85rem; }
  .windows-demo-top .micro { display: none; }
  .demo-terminal-input { align-items: stretch; flex-direction: column; }
  .demo-terminal-input button { align-self: flex-start; }
  .demo-row-actions { min-width: 12rem !important; }
}
