/* Try a quantum computer (#/demo). Builds on the site's panels, doors and buttons. */
.demo-steps { list-style: none; margin: 1.5rem 0 0; padding: 0; counter-reset: demo; }
.demo-step { position: relative; padding-left: 3.4rem; margin-bottom: 2.25rem; }
.demo-step::before {
  counter-increment: demo; content: counter(demo);
  position: absolute; left: 0; top: 0; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700;
}
.demo-step > h2 { margin: 0.25rem 0 0.9rem; }
.demo-step.is-locked::before { background: var(--line-strong); }
.demo-step.is-locked > h2 { color: var(--ink-dim); }
.demo-step.is-locked > *:not(h2) { display: none; }

.demo-doors { display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.demo-door {
  text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius-card); padding: 1.1rem 1.2rem;
  transition: border-color 0.15s, background 0.15s;
}
.demo-door h3 { font-size: 1.08rem; margin: 0 0 0.3rem; }
.demo-door p { margin: 0; font-size: 0.95rem; line-height: 1.45; color: var(--ink-dim); }
.demo-door:hover, .demo-door:focus-visible { border-color: var(--accent); background: var(--surface); outline: none; }
.demo-door[aria-pressed="true"] { border-color: var(--accent); background: #e4f6f5; }
.demo-door[aria-pressed="true"] h3 { color: var(--accent); }

.demo-dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 0; }
.demo-dl dt { color: var(--ink-dim); font-weight: 600; }
.demo-dl dd { margin: 0; }

.demo-chart { display: flex; align-items: flex-end; gap: 0.5rem; height: 11rem; margin: 1rem 0 0.4rem; padding: 0 0.25rem; border-bottom: 2px solid var(--line-strong); }
.demo-bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.demo-bar i { display: block; width: 100%; height: 0; background: var(--accent); border-radius: 4px 4px 0 0; transition: height 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.demo-bar b { font-size: 0.85rem; margin-top: 0.35rem; }
.demo-bar small { font-size: 0.72rem; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (prefers-reduced-motion: reduce) { .demo-bar i { transition: none; } }

.demo-answer { font-size: 1.15rem; line-height: 1.55; margin: 0.75rem 0 0; }
.demo-note { margin: 0.9rem 0 0; padding: 0.7rem 1rem; border-left: 4px solid var(--need); background: #fdf6f1; border-radius: 0 var(--radius-field) var(--radius-field) 0; font-size: 0.98rem; }
.demo-code { background: #10202a; color: #dbe8ee; padding: 1rem; border-radius: var(--radius-field); overflow: auto; font-size: 0.85rem; line-height: 1.5; margin: 0.6rem 0 0; }

@media (max-width: 44rem) {
  .demo-step { padding-left: 2.9rem; }
  .demo-step::before { width: 2.1rem; height: 2.1rem; }
  .demo-dl { grid-template-columns: 1fr; gap: 0.1rem; }
  .demo-dl dt { margin-top: 0.5rem; }
}

/* Map */
.demo-map { margin: 1rem 0 0; }
.demo-map svg { width: 100%; height: auto; display: block; background: var(--surface); border-radius: var(--radius-field); }
.demo-map circle { fill: #b9cfd2; }
.demo-map circle.on { fill: var(--accent); }
.demo-map circle.reach { fill: rgba(163, 82, 27, 0.08); stroke: var(--need); stroke-width: 1.2; stroke-dasharray: 3 3; }
.demo-map circle.short { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.demo-map path.site { fill: var(--need); stroke: #fff; stroke-width: 1.2; }
.demo-legend { font-size: 0.85rem; color: var(--ink-dim); margin: 0.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; align-items: center; }
.demo-legend span { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 50%; vertical-align: middle; margin-right: 0.3rem; }
.demo-legend .l-dot { background: #b9cfd2; }
.demo-legend .l-on { background: var(--accent); }
.demo-legend .l-site { background: var(--need); border-radius: 2px; }
.demo-legend .l-short { background: transparent; border: 1.5px solid var(--ink); }

/* Detailed report */
.rep-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.75rem; margin: 1rem 0 0.5rem; }
.rep-head div { background: var(--surface); border-radius: var(--radius-field); padding: 0.8rem 0.9rem; }
.rep-head b { display: block; font-size: 1.5rem; line-height: 1.1; }
.rep-head span { font-size: 0.85rem; color: var(--ink-dim); }
.rep-h { margin: 1.5rem 0 0.6rem; font-size: 1.05rem; color: var(--accent); }
.rep-sites { display: grid; gap: 0.9rem; }
.rep-site { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 1rem 1.1rem; background: #fff; }
.rep-site header { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.6rem; }
.rep-site h4 { margin: 0; font-size: 1.1rem; }
.rep-site header p { margin: 0; color: var(--ink-dim); font-size: 0.9rem; }
.rep-rank { width: 2rem; height: 2rem; border-radius: 50%; background: var(--need); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.rep-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.25rem 1rem; margin: 0 0 0.6rem; font-size: 0.92rem; }
.rep-facts dt { color: var(--ink-dim); } .rep-facts dd { margin: 0 0 0.3rem; font-weight: 600; }
.rep-line { margin: 0.4rem 0 0.6rem; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.rep-table th, .rep-table td { text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--line); }
.rep-table th { color: var(--ink-dim); font-weight: 600; }
.rep-table td small { color: var(--ink-dim); margin-left: 0.3rem; }
.rep-table td:nth-child(n+2), .rep-table th:nth-child(n+2) { text-align: right; white-space: nowrap; }
.rep-curve { width: 100%; height: auto; display: block; }
.rep-curve rect { fill: #b9cfd2; } .rep-curve rect.cur { fill: var(--accent); }
.rep-curve .val { font-size: 12px; fill: var(--ink); font-weight: 600; }
.rep-curve .lab { font-size: 12px; fill: var(--ink); } .rep-curve .sub { font-size: 9px; fill: var(--ink-dim); }
.rep-curve .axis { stroke: var(--line-strong); stroke-width: 1.5; }
.rep-list { margin: 0.3rem 0; padding-left: 1.2rem; font-size: 0.9rem; color: var(--ink-dim); }
.rep-cav li { color: var(--ink); }
@media print { .site-head, .site-foot, #d1, #d2, .actions, details, .demo-chart, .demo-explain { display: none !important; } .demo-step::before { display: none; } .demo-step { padding-left: 0; } }

/* How this works */
.demo-how { margin: 0.9rem 0 0; padding: 0.7rem 1rem; background: var(--surface); border-radius: var(--radius-field); font-size: 0.98rem; }
.demo-explain { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.demo-explain h2 { margin: 0 0 0.6rem; }
.demo-explain h3 { margin: 1.8rem 0 0.5rem; font-size: 1.15rem; color: var(--accent); }
.demo-pipe { width: 100%; height: auto; display: block; margin: 1rem 0; }
.demo-pipe .box rect { fill: #fff; stroke: var(--line-strong); stroke-width: 1.5; }
.demo-pipe .box.q rect { fill: #e4f6f5; stroke: var(--accent); }
.demo-pipe text { font-size: 13px; fill: var(--ink); text-anchor: middle; font-weight: 600; }
.demo-pipe text.sub { font-size: 11px; fill: var(--ink-dim); font-weight: 400; }
.demo-pipe .arrow { fill: none; stroke: var(--ink-dim); stroke-width: 1.5; }
.demo-steps-how { padding-left: 1.3rem; }
.demo-steps-how li { margin-bottom: 0.7rem; }
.demo-steps-how code, .demo-explain code { background: var(--surface); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.9em; }
.demo-why { padding-left: 1.3rem; }
.demo-why li { margin-bottom: 0.5rem; }
