/* Interactive demo store on the home page. Loaded after site.css. */
:where(#demo) button { font: inherit; color: inherit; cursor: pointer; }
.demo-intro { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-end; justify-content: space-between; }
.demo-lede { margin-top: 16px; font-size: 17px; line-height: 1.55; color: var(--body); max-width: 760px; }
.demo-tasks { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.demo-tasks .lbl { font-weight: 600; margin-right: 4px; }
.task { min-height: 44px; padding: 10px 16px; border-radius: 999px; background: var(--white); border: 1px solid var(--line-strong); font: 600 14px var(--sans); }
.task:hover { border-color: var(--ink); }
.demo-toggle { margin-top: 28px; display: flex; gap: 10px; align-items: center; }
.demo-toggle + .browser { margin-top: 12px; }

/* button variants of the static mock classes */
.seg button, .subtabs button, .dchip, .app-nav button { border: 0; background: transparent; }
.seg button { padding: 7px 12px; min-height: 32px; }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--white); font-weight: 600; }
.seg button:disabled, .stepper button:disabled { opacity: .35; cursor: default; }
.dchip { border: 1px solid var(--line-strong); background: var(--white); }
.dchip[aria-pressed="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); font-weight: 600; }
.subtabs button { padding: 8px 0; color: var(--body); border-bottom: 2px solid transparent; }
.subtabs button[aria-pressed="true"] { border-bottom-color: var(--navy); font-weight: 700; color: var(--ink); }
.app-nav button { text-align: left; padding: 10px; border-radius: 6px; color: var(--on-dark); font-size: 14px; }
.app-nav button:hover { background: var(--navy-mid); }
.app-nav button[aria-current="page"] { background: var(--navy-mid); color: var(--white); font-weight: 600; }
button.stop { width: 100%; background: var(--white); text-align: left; font: inherit; }
button.stop.stop-warn { background: #FFF8EE; }
.demo-toggle .seg button, .ph-btns button { min-height: 36px; }
#demo button:focus-visible, #demo input:focus-visible, #demo select:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
.app-nav button:focus-visible { outline-color: var(--white); }

.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--info); font-weight: 600; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn.light { color: var(--white); margin-left: 8px; }
.pillbtn { min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--white); font-weight: 600; }
.pillbtn.on, .pillbtn[aria-pressed="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.thb { background: none; border: 0; padding: 0; font-weight: 600; color: var(--body); white-space: nowrap; }
.thb:hover { color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.b { font-weight: 700; }

.big { margin-top: 4px; font-size: 34px; font-weight: 600; }
.meter { position: relative; height: 12px; background: #E6EBF2; border-radius: 6px; margin-top: 10px; }
.meter-fill { height: 12px; border-radius: 6px; background: var(--good); }
.meter-mark { position: absolute; top: -4px; width: 2px; height: 20px; background: var(--navy); }
.chart { position: relative; height: 170px; display: flex; gap: 10px; align-items: flex-end; padding-bottom: 22px; }
.chart-line { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--navy); z-index: 1; bottom: calc(22px + (100% - 22px) * var(--p)); }
.chart-line span { position: absolute; left: 0; top: -20px; font-size: 11px; color: var(--navy); font-weight: 600; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.bar { width: 100%; background: #9DB4D6; border-radius: 4px 4px 0 0; }
.bar.latest { background: var(--info); }
.bar-col span { position: absolute; bottom: -20px; font-size: 10px; color: var(--muted); white-space: nowrap; }

.needs { list-style: none; margin: 0; padding: 0; }
.needs li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid #EEF1F5; }
.needs li:first-child { border-top: 0; padding-top: 0; }
.need-n { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--white); display: grid; place-items: center; font-size: 12px; }
.need-b { flex: 1 1 240px; min-width: 0; }
.need-t { font-weight: 700; font-size: 14px; }
.need-s { font-size: 11px; font-weight: 500; color: var(--warn); margin-left: 6px; }
.need-d { margin-top: 2px; color: var(--body); line-height: 1.45; }

.coachbar { margin-top: 16px; display: flex; gap: 12px; align-items: flex-start; background: var(--navy); color: var(--on-dark); border-radius: 10px; padding: 14px 16px; line-height: 1.5; }
.coachbar svg { flex: 0 0 20px; color: var(--orange); margin-top: 2px; }
.coachbar strong { color: var(--white); }
.darkbar { margin-top: 12px; background: var(--navy); color: var(--white); border-radius: 8px; padding: 8px 12px; }

.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--white); }
.stepper-l { min-width: 90px; text-align: center; font-weight: 600; }
.rowbar { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.rowbar .chips { margin-top: 0; }
.srch input, .xform input, .xform select { min-height: 36px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 6px; font: inherit; background: var(--white); color: var(--ink); }
.xform { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.xform label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.xform input[type=number] { width: 110px; }
.tx { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid #EEF1F5; }
.tx-m { font-weight: 600; }
.tx-b { display: flex; gap: 6px; flex-wrap: wrap; }
.notes { margin: 0 0 8px; padding-left: 18px; line-height: 1.6; color: var(--body); }
.mt { margin-top: 16px; }

.spark { display: inline-flex; gap: 2px; align-items: flex-end; height: 22px; width: 54px; }
.spark i { flex: 1; background: #9DB4D6; border-radius: 1px; display: block; }
.spark i:last-child { background: var(--info); }
tr.hl td { background: #FFF8EE; }
.strip10 { display: inline-flex; gap: 2px; }
.strip10 i { width: 9px; height: 16px; border-radius: 2px; display: block; }
.strip10 .p { background: var(--good); }
.strip10 .m { background: #E4A29C; }
.stagecards { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stagecard { text-align: left; display: flex; flex-direction: column; gap: 4px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
button.stagecard[aria-pressed="true"] { border-color: var(--navy); box-shadow: 0 0 0 2px var(--navy); }
.sc-n { font-size: 20px; font-weight: 600; }
.sc-b, .sc-d { color: var(--body); font-size: 12px; }
.cd-name { font-size: 22px; font-weight: 700; margin: 2px 0 6px; }
.detail { position: relative; }
.detail .linkbtn { position: absolute; top: 12px; right: 14px; }
.plan-row { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid #EEF1F5; }
.plan-n { flex: 1 1 220px; }
tr.total td { background: var(--ground); }

.phones-wrap { display: flex; flex-wrap: wrap; gap: 32px; justify-content: center; align-items: center; }
.phone-in { overflow: hidden; }
.phone-cap { max-width: 300px; line-height: 1.55; color: var(--body); }
.phone-cap p + p { margin-top: 10px; }
.phone-cap-t { font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.ph-btns button { text-align: center; font-weight: 600; padding: 12px 4px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--white); }
.ph-btns button[aria-pressed="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }

.flash { animation: demoflash 3s ease-out 1; }
@keyframes demoflash { 0%, 60% { box-shadow: 0 0 0 3px var(--orange); background: #FFF4E5; } 100% { box-shadow: 0 0 0 0 transparent; } }
tr.flash td { animation: demoflashrow 3s ease-out 1; }
@keyframes demoflashrow { 0%, 60% { background: #FFF4E5; } 100% { background: transparent; } }
tr.flash { animation: none; }
@media (prefers-reduced-motion: reduce) { .flash, tr.flash td { animation: none; outline: 3px solid var(--orange); } }
@media (pointer: coarse) { .seg button, .dchip, .pillbtn, .app-nav button, .stepper button { min-height: 44px; } .stepper button { width: 44px; } }
@media (max-width: 760px) { .app-main { padding: 16px; } .app-nav button { flex: 1 1 auto; text-align: center; } .big { font-size: 28px; } .detail .linkbtn { position: static; } }
