/* TurkeyBoards Tools — help panel, "?" buttons and the guided tour. */

/* Small "?" buttons beside inspector headings */
.group-h h4 { display: inline-flex; align-items: center; gap: 6px; }
.help-dot { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink-muted); font: 700 11px/1 var(--font-ui); cursor: pointer; }
.help-dot:hover { border-color: var(--link); color: var(--link); }

/* ---------- Help panel (slide-over on the right) ---------- */
.help-panel { position: fixed; z-index: 45; top: 0; right: 0; bottom: 0; width: min(400px, 100%); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-pop); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); }
.help-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 8px 20px; }
.help-head h2 { margin: 0; font: 700 21px/26px var(--font-display); letter-spacing: -0.02em; }
.help-search { padding: 0 20px 12px; border-bottom: 1px solid var(--line); }
.help-search .tb-input { height: 36px; font-family: var(--font-ui); font-size: 13px; }
.help-body { overflow-y: auto; padding: 16px 20px 32px; display: grid; gap: 20px; align-content: start; flex: 1; min-height: 0; }
.help-tour-card { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 14px 16px; border-radius: var(--radius-lg); border: 2px solid var(--sticker-edge); background: var(--brand-feather); color: var(--on-feather); box-shadow: var(--shadow-sticker); cursor: pointer; font: 400 13px/18px var(--font-ui); transition: transform .08s ease, box-shadow .08s ease; }
.help-tour-card:hover { background: var(--brand-feather-deep); }
.help-tour-card:active { transform: translate(3px, 3px); box-shadow: var(--shadow-sticker-press); }
.help-tour-card b { display: block; font-size: 15px; line-height: 20px; }
.help-tour-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-outline); color: #ffffff; flex: none; }
.help-tour-icon svg { width: 16px; height: 16px; fill: currentColor; }
.help-group { display: grid; gap: 4px; }
.help-group h3 { margin: 0 0 4px; }
.help-topic { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.help-topic summary { list-style: none; cursor: pointer; padding: 10px 12px; font: 700 13px/20px var(--font-ui); display: flex; justify-content: space-between; gap: 8px; border-radius: var(--radius-md); }
.help-topic summary::-webkit-details-marker { display: none; }
.help-topic summary::after { content: "+"; color: var(--ink-muted); font-weight: 400; }
.help-topic[open] summary::after { content: "−"; }
.help-topic summary:hover { background: var(--surface-sunken); }
.help-topic[open] { border-color: var(--line-strong); }
.help-text { padding: 2px 12px 14px; font-size: 13px; line-height: 21px; color: var(--ink); display: grid; gap: 10px; justify-items: start; }
.help-text p, .help-text ul, .help-text ol, .help-text dl { margin: 0; }
.help-text ul, .help-text ol { padding-left: 18px; display: grid; gap: 6px; }
.help-text code { font: 400 12px/18px var(--font-mono); background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 4px; }
.help-text kbd { font-size: 10.5px; padding: 2px 5px; }
.help-keys { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.help-keys td { padding: 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.help-keys td:first-child { white-space: nowrap; padding-right: 12px; }
.help-keys tr:last-child td { border-bottom: 0; }
.help-gloss { display: grid; gap: 8px; }
.help-gloss dt { font-weight: 700; }
.help-gloss dd { margin: -6px 0 0; color: var(--ink-muted); }
.help-empty { color: var(--ink-muted); font-size: 13px; margin: 0; }
@media (max-width: 900px) { .help-panel { width: 100%; border-left: 0; } }

/* ---------- Guided tour ---------- */
.tour { position: fixed; inset: 0; z-index: 70; }
.tour-block { position: absolute; inset: 0; }
.tour-spot { position: fixed; border-radius: var(--radius-md); box-shadow: 0 0 0 3px var(--brand-feather), 0 0 0 9999px rgba(0, 10, 24, 0.62); pointer-events: none; transition: left .2s ease, top .2s ease, width .2s ease, height .2s ease; }
.tour-pop { position: fixed; width: min(360px, calc(100vw - 24px)); padding: 18px 18px 14px; background: var(--surface); color: var(--ink); border: 2px solid var(--sticker-edge); border-radius: var(--radius-lg); box-shadow: var(--shadow-sticker); display: grid; gap: 8px; transition: left .2s ease, top .2s ease; }
.tour-pop.is-center { width: min(420px, calc(100vw - 24px)); }
.tour-pop h2 { margin: 0; font: 700 18px/24px var(--font-display); letter-spacing: -0.02em; }
.tour-pop p { margin: 0; font-size: 13px; line-height: 21px; color: var(--ink-muted); }
.tour-step { color: var(--link); }
.tour-mascot { width: 64px; height: auto; margin: -4px 0 2px; }
.tour-dots { display: flex; gap: 5px; margin-top: 4px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.tour-dots i.on { background: var(--brand-feather-deep); width: 16px; border-radius: 3px; }
.tour-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.tour-spacer { flex: 1; }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-pop { transition: none; } }
