/* Guide page (pages/guide.js) and the hands-on walkthrough additions (core/tour.js).
   Tokens from app.css :root (orange, black, cream, line, muted). Loaded after peppy.css. */

/* ---- walkthrough: panes around the spotlight, "Click here" ---- */
.tour-root .tour-block{position:fixed;inset:auto}
.tour-root.no-target .tour-block{inset:0}
.tour-hole{position:fixed;background:transparent}
.tour-root.is-live .tour-hole,.tour-root.no-target .tour-hole{display:none}
.tour-here{position:fixed;display:none;background:var(--orange);color:var(--black);font:700 13px/1 var(--display);padding:7px 12px;border-radius:999px;border:2px solid var(--black);box-shadow:0 3px 0 var(--black);pointer-events:none!important;white-space:nowrap;animation:tour-bob 1.1s ease-in-out infinite}
.tour-root.is-click .tour-here{display:block}
.tour-root.is-click .tour-spot{animation:tour-pulse 1.4s ease-out infinite}
.tour-root.is-busy .tour-here{display:none}
@keyframes tour-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@keyframes tour-pulse{0%{outline-offset:0;outline-color:var(--orange)}70%{outline-offset:6px;outline-color:rgba(251,139,35,0)}100%{outline-offset:0;outline-color:var(--orange)}}
@media (prefers-reduced-motion:reduce){.tour-here,.tour-root.is-click .tour-spot{animation:none}}
.tour-prompt .tour-title{font-size:18px}

/* ---- Guide ---- */
.guide-page{display:grid;grid-template-columns:260px minmax(0,1fr);gap:24px;align-items:start}
.guide-side{position:sticky;top:12px;display:flex;flex-direction:column;gap:10px}
.guide-search{position:relative}
.guide-search-ic svg{position:absolute;left:12px;top:50%;width:18px;height:18px;transform:translateY(-50%);color:var(--muted);pointer-events:none}
.guide-search-input{width:100%;padding-left:38px;min-height:44px;border-radius:999px}
.guide-count{min-height:1.2em;margin:0}
.guide-topics{display:flex;flex-direction:column;gap:2px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:6px;box-shadow:var(--card-shadow)}
.guide-topic{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--radius-sm);font-weight:700;color:var(--ink);min-height:40px}
.guide-topic:hover{background:var(--orange-tint)}
.guide-topic.active{background:var(--black);color:#fff}
.guide-topic.active .guide-ico{background:var(--orange);border-color:var(--orange)}
.guide-topic span:not(.guide-ico){flex:1;min-width:0}
.guide-topic-n{font-size:12px;background:var(--orange-tint);color:var(--orange-text);border-radius:999px;padding:1px 8px}
.guide-ico{flex:none;display:inline-grid;place-items:center;width:28px;height:28px;border-radius:8px;background:var(--orange-tint);border:1px solid var(--line);color:var(--black)}
.guide-ico svg{width:17px;height:17px}
.guide-walk{min-height:42px}
.guide-tour-card{font-size:13px;color:var(--body)}
.guide-tour-switch{display:flex;gap:8px;align-items:flex-start;cursor:pointer;line-height:1.4}
.guide-tour-switch input{margin-top:2px;accent-color:var(--orange);width:16px;height:16px;flex:none}

.guide-art{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--card-shadow);padding:26px 30px 30px;min-width:0;color:var(--body);font-size:15px;line-height:1.6}
.guide-art-head{display:flex;align-items:center;gap:12px;margin-bottom:8px;flex-wrap:wrap}
.guide-art-head h1{font-size:26px;margin:0}
.guide-art-head .guide-ico{width:44px;height:44px;border-radius:12px}
.guide-art-head .guide-ico svg{width:24px;height:24px}
.guide-art-head p{flex-basis:100%}
.guide-intro{margin:0 0 14px;color:var(--body)}
.guide-toc{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 18px}
.guide-toc a{display:inline-block;padding:5px 12px;border-radius:999px;border:1px solid var(--line);background:var(--field);font-size:13px;font-weight:700;color:var(--ink)}
.guide-toc a:hover{border-color:var(--orange)}
.guide-sec{padding:18px 0 4px;border-top:1px solid var(--line);scroll-margin-top:16px;border-radius:8px;transition:background .6s}
.guide-sec.flash{background:var(--orange-tint)}
.guide-sec-topic{font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.guide-sec-head{display:flex;align-items:center;gap:10px;justify-content:space-between;flex-wrap:wrap;margin-bottom:8px}
.guide-sec-head h2{font-size:19px;margin:0}
.guide-sec-head h2 a:hover{color:var(--orange-text)}
.guide-showme{min-height:36px;border-color:var(--orange);font-weight:700}
.guide-body p{margin:0 0 10px}
.guide-body ol,.guide-body ul{margin:0 0 12px;padding-left:0}
.guide-body ol{counter-reset:g}
.guide-body ol>li{counter-increment:g;position:relative;padding-left:38px;margin:0 0 10px;min-height:26px}
.guide-body ol>li::before{content:counter(g);position:absolute;left:0;top:0;width:26px;height:26px;border-radius:50%;background:var(--black);color:#fff;font:700 13px/26px var(--display);text-align:center}
.guide-body ul>li{position:relative;padding-left:20px;margin:0 0 8px}
.guide-body ul>li::before{content:"";position:absolute;left:4px;top:.62em;width:7px;height:7px;border-radius:50%;background:var(--orange)}
.guide-body a{color:var(--orange-text);font-weight:700;text-decoration:underline}
.guide-body b{color:var(--ink)}
.guide-body .ui{font-weight:700;color:var(--ink);background:var(--field);border:1px solid var(--line);border-radius:6px;padding:0 5px;white-space:nowrap}
.guide-body .msg{font-style:italic;color:var(--ink)}
.guide-body .pill{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:700;border-radius:999px;padding:2px 10px;vertical-align:middle;white-space:nowrap}
.guide-body .pill svg{width:13px;height:13px}
.guide-body .pill.owner{background:var(--black);color:#fff}
.guide-body .pill.plan{background:var(--orange-tint);color:var(--orange-text);border:1px solid #F7CDA0}
.guide-body .pill.net{background:var(--info-tint);color:var(--ink)}
.guide-body .note{display:flex;gap:10px;background:var(--cream);border:1px solid var(--line);border-left:4px solid var(--orange);border-radius:10px;padding:12px 14px;margin:6px 0 14px}
.guide-body .note>svg{flex:none;width:20px;height:20px;color:var(--orange-text);margin-top:2px}
.guide-body .note p{margin:0}
.guide-body .tbl{overflow-x:auto;margin:6px 0 14px;border:1px solid var(--line);border-radius:10px}
.guide-body table{width:100%;font-size:14px}
.guide-body th,.guide-body td{text-align:left;padding:8px 12px;border-bottom:1px solid var(--line);vertical-align:top}
.guide-body th{background:#FFFBF6;font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.guide-body tr:last-child td{border-bottom:0}
.guide-body details{border:1px solid var(--line);border-radius:10px;padding:10px 14px;margin:0 0 8px;background:#fff}
.guide-body summary{font-weight:700;color:var(--ink);cursor:pointer}
.guide-body details p{margin:8px 0 0}
.guide-pager{display:flex;justify-content:space-between;gap:10px;margin-top:20px;flex-wrap:wrap}
.guide-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px;margin:12px 0 4px}
.guide-card{display:flex;gap:12px;align-items:flex-start;border:1px solid var(--line);border-radius:var(--radius);padding:14px;background:var(--field)}
.guide-card:hover{border-color:var(--orange);background:#fff}
.guide-card b{display:block;color:var(--ink);font-family:var(--display);font-size:16px}
.guide-card small{display:block;color:var(--muted);font-size:13px;line-height:1.4;margin-top:2px}
.guide-empty{padding:24px 0;text-align:center}
.guide-empty h3{margin-bottom:4px}
.guide-stuck{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-top:24px;background:var(--black);color:#fff;border-radius:var(--radius);padding:18px 20px}
.guide-stuck h3{color:#fff;font-size:18px;margin:0 0 4px}
.guide-stuck p{margin:0;color:rgba(255,255,255,.75);font-size:14px}
@media (max-width:860px){
  .guide-page{grid-template-columns:minmax(0,1fr);gap:14px}
  .guide-side{position:static;min-width:0}
  .guide-topics{flex-direction:row;overflow-x:auto;padding:6px;gap:6px;scrollbar-width:none}
  .guide-topics::-webkit-scrollbar{display:none}
  .guide-topic{flex:none;white-space:nowrap;border:1px solid var(--line)}
  .guide-art{padding:18px 16px 22px}
  .guide-art-head h1{font-size:22px}
  .guide-body .ui{white-space:normal}
  .guide-stuck .btn{width:100%}
}
/* phones: a live step (form, sheet) gets a compact card so more of the form stays usable */
@media (max-width:860px){
  .tour-root.is-phone.is-live .tour-count{display:none}
  .tour-root.is-phone.is-live .tour-card{padding-top:12px;padding-bottom:12px}
  .tour-root.is-phone.is-live .tour-actions{margin-top:10px}
}
