/* 시연판 전용 스타일. 색과 단추는 ../style.css 것을 그대로 쓴다. */
body.demo-page { background: var(--bg-tint); }

.demo-banner { background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; }
.demo-banner .wrap { display: flex; gap: 10px; align-items: flex-start; padding-top: 11px; padding-bottom: 11px; }
.demo-banner svg { width: 20px; height: 20px; flex: none; margin-top: 3px; }

.demo { padding-top: 36px; padding-bottom: 80px; }
.demo-head { max-width: 760px; margin-bottom: 26px; }
.demo-head h1 { font-size: clamp(25px, 3.2vw, 33px); font-weight: 800; margin: 10px 0 10px; }
.demo-head p { margin: 0; color: var(--ink-2); }
#video { margin-bottom: 28px; max-width: 760px; }

.demo-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 20px; align-items: start; }

/* 단계 표시 */
.stepper { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.stepper-title { font-size: 13.5px; font-weight: 800; color: var(--muted); padding: 4px 10px 10px; }
.stepper ol { display: grid; gap: 4px; }
.stepper button {
  width: 100%; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; text-align: left;
  padding: 10px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2);
  font: inherit; cursor: pointer;
}
.stepper button:hover { background: var(--was-soft); }
.stepper .no { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; background: var(--was-soft); color: var(--was-text); }
.stepper .no svg { width: 18px; height: 18px; }
.stepper b { display: block; font-size: 16px; line-height: 1.35; color: var(--ink); }
.stepper small { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); }
.stepper button[aria-current="step"] { background: var(--accent-soft); }
.stepper button[aria-current="step"] .no { background: var(--accent); color: #fff; }
.stepper button.is-done .no { background: var(--ok-soft); color: var(--ok-text); }

/* 본문 칸 */
.pane { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 34px 36px 30px; box-shadow: var(--shadow); }
.pane-kicker { font-size: 14px; font-weight: 800; color: var(--accent-text); }
.pane h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; margin: 6px 0 8px; }
.pane h2:focus { outline: none; }
.pane-lead { color: var(--ink-2); margin-bottom: 24px; max-width: 44em; }
.pane-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.pane-foot .spacer { flex: 1; }

/* 1단계 */
.ask-url { background: var(--bg-tint); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.ask-url .urlrow { margin-bottom: 10px; }
.ask-url .url svg { width: 17px; height: 17px; flex: none; margin-right: 9px; color: var(--muted); }
.run-list { margin-top: 18px; display: grid; gap: 8px; }
.run-list li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--muted); }
.run-list li .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--was-line); display: grid; place-items: center; flex: none; }
.run-list li .dot svg { width: 13px; height: 13px; opacity: 0; }
.run-list li.on { color: var(--ink); }
.run-list li.on .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.run-list li.on .dot svg { opacity: 1; }
.looks { margin-top: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.looks li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 15.5px; color: var(--ink-2); }
.looks b { display: block; color: var(--ink); }

/* 2단계 */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.tile { border-radius: 14px; padding: 14px 16px; background: var(--was-soft); }
.tile b { display: block; font-size: 30px; line-height: 1.2; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile span { font-size: 14.5px; font-weight: 700; color: var(--ink-2); }
.tile.ok { background: var(--ok-soft); }
.tile.ok b { color: var(--ok-text); }
.tile.unk { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.tile .to { font-size: 15px; font-weight: 700; color: var(--muted); margin: 0 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters button { font: inherit; font-size: 15px; font-weight: 700; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chk { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; overflow: hidden; background: var(--surface); }
.chk.miss { border-left: 4px solid var(--was); }
.chk.ok { border-left: 4px solid var(--ok); }
.chk.unk { border-left: 4px solid var(--was-line); }
.chk-head { width: 100%; display: grid; grid-template-columns: auto 1fr 22px; gap: 12px; align-items: center; text-align: left; padding: 14px 16px; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.chk-head .chip { min-width: 5.4em; justify-content: center; }
.chk-head svg { width: 20px; height: 20px; color: var(--muted); transition: transform .15s; }
.chk-head[aria-expanded="true"] svg { transform: rotate(180deg); }
.chk-body { padding: 2px 18px 16px; color: var(--ink-2); font-size: 15.5px; }
.chk-body p { margin-bottom: 10px; }
.toolsaid { border-radius: 10px; background: var(--was-soft); padding: 10px 14px; font-size: 14px; }
.toolsaid small { display: block; font-weight: 800; color: var(--muted); font-size: 12.5px; margin-bottom: 2px; }
.toolsaid code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13.5px; }

/* 3단계 */
.preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.snip { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: var(--surface); }
.snip.next { border-color: var(--ok-line); background: var(--ok-soft); }
.snip.next .chip { background: var(--surface); }
.snip .path { font-size: 13px; color: var(--muted); margin: 10px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snip .ttl { font-size: 18px; line-height: 1.4; font-weight: 600; color: var(--accent-text); margin: 0 0 4px; }
.snip .desc { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); margin: 0; }
.snip .desc.none { font-style: italic; color: var(--muted); }
.fix { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-top: 12px; }
.fix.is-in { border-color: var(--ok-line); }
.fix-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 12px; }
.fix-head h3 { font-size: 18px; }
.fix-cols { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 10px; }
.fix-box { border-radius: 12px; padding: 12px 14px; background: var(--was-soft); font-size: 15px; min-width: 0; }
.fix-box.next { background: var(--ok-soft); }
.fix-box small { display: block; font-size: 12.5px; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.fix-box.next small { color: var(--ok-text); }
.fix-box p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.fix-foot { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 12px; font-size: 14px; color: var(--muted); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14.5px; font-weight: 700; padding: 7px 14px 7px 10px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.toggle .box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--was-line); display: grid; place-items: center; }
.toggle .box svg { width: 13px; height: 13px; opacity: 0; color: #fff; }
.toggle[aria-pressed="true"] { border-color: var(--ok); color: var(--ok-text); background: var(--ok-soft); }
.toggle[aria-pressed="true"] .box { background: var(--ok); border-color: var(--ok); }
.toggle[aria-pressed="true"] .box svg { opacity: 1; }
.linkbtn { font: inherit; font-size: 14.5px; font-weight: 700; color: var(--accent-text); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.asks { margin-top: 26px; border: 1.5px dashed var(--was-line); border-radius: 16px; padding: 20px; }
.asks > h3 { font-size: 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.asks > p { font-size: 15px; color: var(--ink-2); }
.ask { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.ask h4 { font-size: 16.5px; margin-bottom: 10px; }
.ask-answer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ask-answer .fake-input { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); font-weight: 600; }
.choice { font: inherit; font-weight: 700; font-size: 15.5px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.choice small { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.choice { padding-top: 6px; padding-bottom: 6px; text-align: left; }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.ask-result { margin: 10px 0 0; font-size: 15px; font-weight: 600; color: var(--ok-text); min-height: 1.6em; }

/* 4단계 */
.cmp-wrap { border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
.cmp th, .cmp td { padding: 13px 16px; font-size: 15.5px; }
.cmp td .chip { min-width: 4.6em; justify-content: center; }
.cmp .same { color: var(--muted); font-weight: 600; }
.cmp .changed { color: var(--ok-text); font-weight: 800; }
.result-line { margin: 16px 0 0; padding: 14px 18px; border-radius: 12px; background: var(--was-soft); font-weight: 600; }
.result-line.good { background: var(--ok-soft); color: var(--ok-text); }
.done-box { margin-top: 22px; border-radius: 16px; background: var(--bg-tint); border: 1px solid var(--line); padding: 22px 24px; }
.done-box h3 { font-size: 19px; margin-bottom: 8px; }
.done-box li { position: relative; padding: 5px 0 5px 18px; color: var(--ink-2); font-size: 15.5px; }
.done-box li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--was); }

/* 실제 화면 펼침 */
.real { margin-top: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.real summary { cursor: pointer; padding: 13px 16px; font-weight: 700; font-size: 15px; color: var(--ink-2); list-style-position: inside; }
.real[open] summary { border-bottom: 1px solid var(--line); }
.real .real-in { padding: 16px; }
.real img { border-radius: 10px; border: 1px solid var(--line); width: 100%; }
.real p { margin: 10px 2px 0; font-size: 14px; color: var(--muted); }

.sr-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 960px) {
  .demo-shell { grid-template-columns: minmax(0, 1fr); }
  .stepper { position: static; padding: 8px; }
  .stepper-title { display: none; }
  .stepper ol { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stepper button { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 6px; padding: 8px 2px; }
  .stepper b { font-size: 13.5px; }
  .stepper small { display: none; }
}
@media (max-width: 720px) {
  .demo { padding-top: 24px; }
  .pane { padding: 22px 18px 20px; border-radius: 16px; }
  .preview, .fix-cols, .looks { grid-template-columns: minmax(0, 1fr); }
  .tiles { gap: 8px; }
  .tile { padding: 12px; }
  .tile b { font-size: 25px; }
  .tile span { font-size: 13.5px; }
  .chk-head { grid-template-columns: auto 1fr 20px; gap: 10px; padding: 13px 12px; font-size: 15.5px; }
  .pane-foot .btn { flex: 1 1 100%; }
  .pane-foot .spacer { display: none; }
  .fix-head { flex-direction: column; align-items: flex-start; }
  .chk-head .chip { min-width: 0; }
  .cmp th, .cmp td { padding: 11px 8px; font-size: 14.5px; }
  .cmp th:first-child, .cmp td:first-child { padding-left: 12px; }
  .cmp tbody th { white-space: normal; }
  .cmp td .chip { min-width: 0; padding: 3px 8px; }
  .cmp thead th { white-space: nowrap; }
}
