/* Interactive walkthrough (/guide). Uses the app's theme tokens so
   light and dark mode both work without extra overrides. */
.wt { margin-top: 6px; }
.wt-intro { margin: 0 0 10px; color: var(--ink-soft); font-size: .92rem; line-height: 1.55; }

.wt-topics, .wt-pills {
    display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px;
    scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.wt-topics button, .wt-pills button {
    flex: 0 0 auto; font: inherit; cursor: pointer; white-space: nowrap;
    border: 1.5px solid var(--rule-blue); background: transparent; color: var(--ink);
    border-radius: 999px; padding: 7px 14px; font-size: .88rem; font-weight: 600;
}
.wt-topics button[aria-pressed="true"] { background: var(--ink); color: var(--paper-card); border-color: var(--ink); }
.wt-pills button { font-weight: 500; padding: 5px 11px; font-size: .82rem; }
.wt-pills button b { color: var(--rule-red); margin-right: 4px; }
.wt-pills button[aria-pressed="true"] { border-color: var(--rule-red); background: var(--gold-soft); }

.wt-stage { display: grid; gap: 16px; margin-top: 6px; align-items: start; }
@media (min-width: 860px) {
    .wt-stage { grid-template-columns: minmax(300px, 380px) 1fr; gap: 28px; }
    .wt-side { position: sticky; top: 76px; }
}

.wt-phone {
    max-width: 400px; width: 100%; margin: 0 auto;
    border: 7px solid #1E2A38; border-radius: 26px; background: #1E2A38;
    box-shadow: var(--shadow), 0 10px 30px rgba(0,0,0,.18); overflow: hidden;
}
[data-theme="dark"] .wt-phone { border-color: #0C1015; background: #0C1015; }
.wt-shot { position: relative; line-height: 0; background: var(--paper); border-radius: 18px; overflow: hidden; }
.wt-shot img { width: 100%; height: auto; display: block; transition: opacity .18s; }
.wt-shot.loading img { opacity: .35; }

.wt-box {
    position: absolute; border: 2px dashed rgba(229,57,53,.55); border-radius: 6px;
    background: rgba(229,57,53,.05); cursor: pointer; padding: 0; margin: 0;
    transition: background .2s, border-color .2s, box-shadow .2s;
}
.wt-box:focus-visible { outline: 3px solid #1E88E5; outline-offset: 2px; }
.wt-box.on {
    border: 3px solid #E53935; background: rgba(229,57,53,.13);
    box-shadow: 0 0 0 4px rgba(229,57,53,.22); animation: wtPulse 1.6s ease-in-out infinite;
    z-index: 2;
}
@keyframes wtPulse { 50% { box-shadow: 0 0 0 8px rgba(229,57,53,.08); } }
.wt-num {
    position: absolute; left: -9px; top: -11px; width: 22px; height: 22px; border-radius: 50%;
    background: #E53935; color: #fff; font: 700 12px/22px system-ui, sans-serif; text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.wt-box:not(.on) .wt-num { background: #9AA5B1; }

.wt-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; overflow: visible; }
.wt-svg path { fill: none; stroke: #E53935; stroke-width: 3.5; stroke-linecap: round; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.wt-svg polygon { fill: #E53935; }

.wt-tip {
    position: absolute; z-index: 4; line-height: 1.4; font-size: 13.5px; font-weight: 600;
    background: #FFF8E1; color: #1E2A38; border: 2px solid #E53935; border-radius: 10px;
    padding: 7px 10px; box-shadow: 0 4px 14px rgba(0,0,0,.28); width: max-content; max-width: 78%;
    pointer-events: none;
}

.wt-body h3 { margin: 0 0 4px; font-size: 1.1rem; }
.wt-body .wt-count { font-size: .78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.wt-body p { margin: 6px 0 12px; line-height: 1.6; }

.wt-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.wt-list button {
    display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; font: inherit;
    cursor: pointer; border: 1.5px solid var(--rule-blue); border-radius: 10px; background: transparent;
    color: var(--ink); padding: 8px 10px; line-height: 1.45; font-size: .92rem;
}
.wt-list button i {
    flex: 0 0 22px; height: 22px; border-radius: 50%; background: #9AA5B1; color: #fff;
    font: 700 12px/22px system-ui, sans-serif; text-align: center; font-style: normal; margin-top: 1px;
}
.wt-list button[aria-current="true"] { border-color: #E53935; background: var(--gold-soft); }
.wt-list button[aria-current="true"] i { background: #E53935; }

.wt-ctrl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wt-ctrl .btn { flex: 1 1 auto; min-width: 90px; text-align: center; }
.wt-ctrl .btn[disabled] { opacity: .4; cursor: default; }
.wt-bar { height: 5px; border-radius: 3px; background: var(--rule-blue); margin: 12px 0 0; overflow: hidden; }
.wt-bar span { display: block; height: 100%; background: var(--rule-red); transition: width .25s; }
.wt-open { display: inline-block; margin-top: 10px; font-size: .88rem; color: var(--gold); font-weight: 600; }
.wt-hint { font-size: .78rem; color: var(--ink-soft); margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
    .wt-box.on { animation: none; }
    .wt-shot img, .wt-bar span { transition: none; }
}
.wt:focus, .wt:focus-visible { outline: none; }

/* ---- notes under the walkthrough + collapsible reference sections ---- */
.wt-notes { display: grid; gap: 10px; margin: 0 0 22px; }
.wt-note { background: var(--gold-soft); border: 1px solid var(--rule-blue); border-left: 4px solid var(--gold); border-radius: 10px; padding: 10px 14px; line-height: 1.6; font-size: .93rem; }
.ref-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 10px; }
.ref-head h2 { font-size: 1.15rem; margin: 0; }
details.ref > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
details.ref > summary::-webkit-details-marker { display: none; }
details.ref > summary h2 { margin: 0; flex: 1; }
details.ref > summary::after { content: '▾'; font-size: 1.2rem; color: var(--ink-soft); transition: transform .2s; }
details.ref[open] > summary::after { transform: rotate(180deg); }
details.ref > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 6px; }
details.ref[open] > summary { margin-bottom: 8px; }
