/* Shared "Get started" guide (guide.js) for KinVoice + KinBot. Layout after onboarding-checklist and
   coachmark references; KinShield theme: ink dark surfaces, Kip greens, white rows, red only for risk.
   Uses the tokens from kinbot-app.css. */

.kg { position: fixed; right: 20px; bottom: 20px; z-index: 55; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; font-family: var(--font); }
.kg > * { pointer-events: auto; }

/* corner pill: "Get started | 33% complete" */
.kg-pill { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 8px; border: 0; border-radius: 999px; background: var(--white); color: var(--ink); box-shadow: 0 0 0 1px rgba(0, 17, 35, .06), 0 14px 34px rgba(0, 17, 35, .18); cursor: pointer; font: inherit; transition: transform .15s var(--ease); }
.kg-pill:hover { transform: translateY(-1px); }
.kg-pill.pop { animation: kgpop .5s var(--ease); }
@keyframes kgpop { 40% { transform: scale(1.06); } }
.kg-pill img { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); object-fit: contain; }
.kg-pill-t { font-size: 15px; font-weight: 700; }
.kg-pill-sep { width: 1.5px; height: 20px; background: var(--line-strong); }
.kg-pill-p { font-size: 15px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* checklist panel */
.kg-panel { width: 384px; max-height: calc(100dvh - 110px); overflow-y: auto; border-radius: 18px; background: var(--white); box-shadow: 0 0 0 1px rgba(0, 17, 35, .08), 0 28px 70px rgba(0, 17, 35, .28); animation: kgup .25s var(--ease); scrollbar-width: thin; }
@keyframes kgup { from { opacity: 0; transform: translateY(10px); } }
.kg-head { background: var(--ink); color: var(--white); }
.kg-head-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 12px 18px; border-bottom: 1px solid rgba(255, 255, 255, .12); font-size: 13.5px; font-weight: 600; }
.kg-ib { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
.kg-ib:hover { background: rgba(255, 255, 255, .12); }
.kg-ib svg { width: 17px; height: 17px; }
.kg-head-main { display: flex; align-items: center; gap: 14px; padding: 16px 18px 20px; }
.kg-head-main h2 { margin: 0 0 6px; font-size: 19px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
.kg-head-main p { margin: 0; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .72); }
.kg-dial { position: relative; flex: none; width: 92px; height: 104px; }
.kg-ring { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
.kg-ring circle { fill: none; stroke-width: 6; }
.kg-ring .bg { stroke: rgba(255, 255, 255, .14); }
.kg-ring .fg { stroke: var(--mint); stroke-linecap: round; transition: stroke-dasharray .5s var(--ease); }
.kg-dial-c { position: absolute; top: 9px; left: 9px; width: 74px; height: 74px; border-radius: 50%; background: var(--white); display: grid; place-items: center; overflow: hidden; }
.kg-dial-c img { width: 66px; height: 66px; object-fit: contain; }
.kg-dial-p { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); padding: 3px 9px; border-radius: 6px; background: var(--mint); color: var(--mint-ink); font-size: 11px; font-weight: 700; white-space: nowrap; }

.kg-list { list-style: none; margin: 0; padding: 12px; display: grid; gap: 8px; }
.kg-list li { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.kg-list li.next { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.kg-ic { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--paper); color: var(--ink-3); }
.kg-ic svg { width: 18px; height: 18px; }
.kg-list li.done .kg-ic { background: var(--brand-soft); color: var(--brand-deep); }
.kg-tx { flex: 1; min-width: 0; display: grid; gap: 1px; }
.kg-tx b { font-size: 14px; font-weight: 600; color: var(--ink); }
.kg-list li.done .kg-tx b { color: var(--ink-3); font-weight: 500; }
.kg-tx small { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.kg-list li.done .kg-tx small { display: none; }
.kg-start { flex: none; padding: 7px 16px; border: 1px solid var(--ink); border-radius: 8px; background: var(--white); color: var(--ink); font: 600 13px var(--font); cursor: pointer; }
.kg-start:hover { background: var(--paper); }
.kg-start.primary { background: var(--ink); color: var(--white); }
.kg-start.primary:hover { background: #12263B; }
.kg-start:disabled { border-color: var(--line); color: var(--faint); background: var(--white); cursor: not-allowed; }
.kg-done { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.kg-done i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.kg-foot { display: flex; justify-content: space-between; padding: 0 18px 14px; }
.kg-foot button { padding: 4px 0; border: 0; background: none; color: var(--muted); font: 600 12.5px var(--font); cursor: pointer; }
.kg-foot button:hover { color: var(--ink); }

/* coachmark: dark card with an arrow at the real control */
.kg-coach { position: fixed; z-index: 70; width: 288px; padding: 16px; border-radius: 16px; background: var(--ink); color: var(--white); box-shadow: 0 24px 60px rgba(0, 17, 35, .35); font-family: var(--font); }
.kg-coach.kg-in { animation: kgcoach .22s var(--ease); }
@keyframes kgcoach { from { opacity: 0; transform: scale(.96); } }
.kg-arrow { position: absolute; width: 14px; height: 14px; background: var(--ink); border-radius: 2px; transform: rotate(45deg); }
.kg-coach[data-side="none"] .kg-arrow { display: none; }
.kg-coach[data-side="left"] .kg-arrow { left: -6px; margin-top: -7px; }
.kg-coach[data-side="right"] .kg-arrow { right: -6px; margin-top: -7px; }
.kg-coach[data-side="top"] .kg-arrow { top: -6px; margin-left: -7px; }
.kg-coach[data-side="bottom"] .kg-arrow { bottom: -6px; margin-left: -7px; }
.kg-c-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.kg-c-top b { font-size: 15px; font-weight: 600; }
.kg-art { position: relative; height: 112px; border-radius: 12px; background: linear-gradient(135deg, var(--mint) 0%, var(--brand) 100%); display: grid; place-items: center; overflow: hidden; }
.kg-art-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--brand-deep); color: var(--white); box-shadow: 0 0 0 10px rgba(255, 255, 255, .22); }
.kg-art-ic svg { width: 26px; height: 26px; }
.kg-art i { position: absolute; color: rgba(255, 255, 255, .85); }
.kg-art i svg { fill: currentColor; stroke: none; }
.kg-art .s1 { left: 22%; top: 20%; } .kg-art .s1 svg { width: 16px; height: 16px; }
.kg-art .s2 { right: 24%; top: 54%; } .kg-art .s2 svg { width: 20px; height: 20px; }
.kg-art .s3 { left: 30%; bottom: 14%; } .kg-art .s3 svg { width: 11px; height: 11px; }
.kg-c-d { margin: 12px 0 14px; font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .78); }
.kg-c-go { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 42px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; background: rgba(255, 255, 255, .1); color: var(--white); font: 600 14px var(--font); cursor: pointer; }
.kg-c-go:hover { background: rgba(255, 255, 255, .18); }
.kg-c-go svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.kg-c-go em { font-style: normal; font-weight: 500; color: rgba(255, 255, 255, .6); }

/* Wide screens: make room for the open checklist instead of covering the page */
@media (min-width: 1200px) { body.kg-open .kb-log, body.kg-open .kb-dock-bottom { padding-right: 410px; } }

/* the control the coachmark points at */
.kg-hi { position: relative; z-index: 2; outline: 3px solid var(--brand) !important; outline-offset: 3px; border-radius: 10px; animation: kghi 1.3s ease-in-out infinite; }
@keyframes kghi { 50% { outline-color: rgba(94, 190, 106, .35); outline-offset: 6px; } }

@media (max-width: 900px) {
  .kg { right: 12px; left: 12px; bottom: var(--kg-mb, 12px); }
  .kg-panel { width: 100%; max-height: calc(100dvh - 90px); }
  .kg-pill { height: 46px; padding-right: 16px; }
  .kg-pill-t, .kg-pill-sep { display: none; }
  .kg-coach { width: min(300px, calc(100vw - 24px)); }
}
@media (prefers-reduced-motion: reduce) {
  .kg-pill.pop, .kg-panel, .kg-coach.kg-in, .kg-hi { animation: none; }
}
