.demo-page { background: #f3f5f8; }
.demo { max-width: 1260px; margin: auto; padding: clamp(16px, 3vw, 40px); color: #172235; }
.demo * { box-sizing: border-box; }
.demo-header h1 { font-size: clamp(28px, 4vw, 44px); margin: 12px 0; }
.demo-badge { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: #a92323; }
.demo-notice { max-width: 85ch; line-height: 1.65; }
.demo-actions, .demo-steps, .demo-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 18px 0; }
.demo a { color: #243e78; text-underline-offset: 3px; }
.demo .lp-btn-primary { color: white; }
.demo-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; margin-top: 32px; }
.demo-menu { display: flex; flex-direction: column; align-self: start; gap: 6px; }
.demo-menu a, .demo-steps a { display: block; padding: 12px; background: white; border: 1px solid #c8d1de; border-radius: 8px; text-decoration: none; }
.demo [aria-current] { background: #e4ebfc; border-color: #425e99; font-weight: bold; }
.demo-panel { background: white; border: 1px solid #d1d9e4; border-radius: 14px; padding: clamp(14px, 2vw, 28px); min-width: 0; }
.demo-panel h2 { margin-top: 0; font-size: 25px; }
.demo-card { padding: 18px; border: 1px solid #d1d9e4; border-radius: 10px; background: #fafbfe; }
.demo-card p, .demo-panel p { line-height: 1.65; }
.demo-card h3 { margin-top: 0; }
.demo-action { display: inline-block; margin: 10px 6px 10px 0; }
.demo button, .demo select { font: inherit; padding: 10px 14px; border: 1px solid #aab8ce; border-radius: 6px; background: #f4f6fb; color: #172235; min-height: 44px; }
.demo button { cursor: pointer; }
.demo label { display: grid; gap: 8px; }
.demo textarea { display: block; font: inherit; line-height: 1.6; background: #f7f8fb; border: 1px solid #aab8ce; padding: 14px; border-radius: 6px; width: 100%; }
.demo-table { overflow-x: auto; margin: 20px 0; }
.demo table { width: 100%; border-collapse: collapse; font-size: 14px; }
.demo th, .demo td { text-align: left; padding: 12px; border-bottom: 1px solid #d1d9e4; vertical-align: top; overflow-wrap: anywhere; }
.demo summary { cursor: pointer; font-weight: bold; }
.demo-metrics, .demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 14px; }
.demo-metrics strong { display: block; font-size: 32px; margin-bottom: 8px; }
.demo pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.demo dialog { max-width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; border: 2px solid #425e99; border-radius: 14px; padding: 24px; color: #172235; }
.demo dialog::backdrop { background: #172235aa; }
.demo :focus-visible { outline: 3px solid #235ed6; outline-offset: 3px; }
#demo-result:not(:empty) { border-left: 4px solid #a92323; padding: 12px; background: #fff1f1; }
@media (max-width: 680px) { .demo-layout { grid-template-columns: 1fr; } .demo-menu { flex-direction: row; flex-wrap: wrap; } .demo-menu a { flex: 1 1 130px; } .demo th, .demo td { padding: 7px; } }
/* Keep the shared public header usable on a phone, scoped to the demo only. */
.demo-page .lp-top, .demo-page .lp-nav { flex-wrap: wrap; gap: 12px; }
.demo-page .lp-top > *, .demo-page .lp-foot > * { min-width: 0; }
.demo-page .lp-foot { flex-wrap: wrap; overflow-wrap: anywhere; }
.demo-page.lp { background: #f3f5f8; }
.demo-panel, .demo-header { overflow-wrap: anywhere; }
