/* A guide article (scripts/help-pages.mjs), in the planner's docs window AND on the public page
   naviboss.app/help/<slug>. John's pick 3C (2026-11-17): NaviBoss's own night/day colours with
   Clerk's building blocks (numbered steps, tip boxes, framed pictures) and Resend's calm spacing.

   It reads the tokens of whichever page it sits in: the planner's (style.css: --panel, --ink,
   --muted, --line, --accent; day = body.light) or the landing frame's (site-frame.css:
   --surface, --ink, ...; day = body.landing.light). Every colour goes through the --hd-* names
   below, so nothing here is tied to one of the two. */

.hd {
  --hd-ink: var(--ink, #ededed);
  --hd-muted: var(--muted, #8b909c);
  --hd-line: var(--line, rgba(255, 255, 255, .08));
  --hd-line-2: var(--line-strong, rgba(255, 255, 255, .13));
  --hd-card: var(--panel, var(--surface, #14161d));
  --hd-fill: var(--muted-fill, rgba(255, 255, 255, .04));
  --hd-accent: var(--accent, #fb6415);
  --hd-accent-ink: #ff9f45;
  --hd-accent-soft: rgba(251, 100, 21, .12);
  --hd-tip: #3ecf8e;
  --hd-tip-soft: rgba(62, 207, 142, .10);
  --hd-note: #6ea8ff;
  --hd-note-soft: rgba(110, 168, 255, .10);
  --hd-shadow: 0 18px 40px -22px rgba(0, 0, 0, .8);
  --hd-mono: "Geist Mono Variable", "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color: var(--hd-ink);
  font-size: 15.5px;
  line-height: 1.65;
  max-width: 720px;
  overflow-wrap: break-word;
}
.light .hd {
  --hd-accent-ink: #b33c0b;
  --hd-accent-soft: rgba(237, 90, 12, .09);
  --hd-tip: #11804c;
  --hd-tip-soft: rgba(17, 128, 76, .08);
  --hd-note: #1d5fd1;
  --hd-note-soft: rgba(29, 95, 209, .07);
  --hd-shadow: 0 16px 34px -22px rgba(15, 23, 42, .35);
}

/* ---- the top ---- */
.hd-head { display: grid; gap: 8px; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--hd-line); }
.hd-kick { margin: 0; font: 600 11.5px/1 var(--hd-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--hd-accent-ink); }
.hd h1 { margin: 0; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; font-weight: 650; letter-spacing: -.02em; text-wrap: balance; }
.hd-sum { margin: 0; font-size: 17px; line-height: 1.55; color: var(--hd-muted); max-width: 60ch; }
.hd-upd { margin: 2px 0 0; font-size: 12.5px; color: var(--hd-muted); }

/* ---- text ---- */
.hd-body > :first-child { margin-top: 0; }
.hd p { margin: 0 0 14px; }
.hd h2 { margin: 44px 0 12px; font-size: 22px; line-height: 1.25; font-weight: 640; letter-spacing: -.012em; scroll-margin-top: 20px; position: relative; text-wrap: balance; }
.hd h3 { margin: 28px 0 8px; font-size: 16.5px; line-height: 1.35; font-weight: 620; scroll-margin-top: 20px; position: relative; }
.hd-anchor { position: absolute; left: -22px; top: 0; width: 18px; text-align: center; color: var(--hd-muted); text-decoration: none; opacity: 0; font-weight: 500; }
.hd h2:hover .hd-anchor, .hd h3:hover .hd-anchor, .hd-anchor:focus-visible { opacity: 1; }
.hd ul, .hd ol { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 5px; }
.hd li::marker { color: var(--hd-muted); }
.hd strong { font-weight: 640; color: var(--hd-ink); }
.hd a { color: var(--hd-accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* An address in an account guide where nothing links out (Desktop): text to type on a phone. */
.hd .hd-addr { font-family: var(--font-mono, ui-monospace, monospace); font-size: .92em; color: var(--hd-accent-ink); white-space: nowrap; }
.hd code { font: 500 .88em/1 var(--hd-mono); padding: 1px 5px; border-radius: 5px; background: var(--hd-fill); border: 1px solid var(--hd-line); }
.hd kbd {
  display: inline-block; min-width: 22px; padding: 2px 6px; border-radius: 6px; text-align: center;
  font: 600 .8em/1.35 var(--hd-mono); color: var(--hd-ink); background: var(--hd-card);
  border: 1px solid var(--hd-line-2); box-shadow: inset 0 -2px 0 var(--hd-line-2);
}

/* ---- numbered steps (Clerk): a thin line joins the numbers ---- */
.hd .hd-steps { list-style: none; padding: 0; margin: 8px 0 22px; gap: 0; counter-reset: hd-step; }
.hd-step { position: relative; padding: 0 0 22px 46px; counter-increment: hd-step; }
.hd-step::before {
  content: counter(hd-step); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font: 650 13px/1 var(--hd-mono);
  color: var(--hd-accent-ink); background: var(--hd-accent-soft); border: 1px solid color-mix(in srgb, var(--hd-accent) 35%, transparent);
}
.hd-step::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 6px; width: 1px; background: var(--hd-line-2); }
.hd-step:last-child { padding-bottom: 4px; }
.hd-step:last-child::after { display: none; }
.hd .hd-step > h3 { margin: 3px 0 6px; }

/* ---- tip / note / caution ---- */
.hd-call { margin: 6px 0 18px; padding: 12px 16px 2px; border-radius: 12px; border: 1px solid var(--hd-line); background: var(--hd-fill); border-left-width: 3px; }
.hd-call-h { margin: 0 0 4px !important; font: 650 12px/1.3 var(--hd-mono); letter-spacing: .06em; text-transform: uppercase; }
.hd-call p { margin-bottom: 10px; }
.hd-tip { border-color: color-mix(in srgb, var(--hd-tip) 30%, transparent); border-left-color: var(--hd-tip); background: var(--hd-tip-soft); }
.hd-tip .hd-call-h { color: var(--hd-tip); }
.hd-note { border-color: color-mix(in srgb, var(--hd-note) 30%, transparent); border-left-color: var(--hd-note); background: var(--hd-note-soft); }
.hd-note .hd-call-h { color: var(--hd-note); }
.hd-caution { border-color: color-mix(in srgb, var(--hd-accent) 32%, transparent); border-left-color: var(--hd-accent); background: var(--hd-accent-soft); }
.hd-caution .hd-call-h { color: var(--hd-accent-ink); }

/* ---- pictures and clips: a soft frame, day shots by day, night shots by night ---- */
.hd-fig { margin: 10px 0 22px; }
.hd-frame { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--hd-line-2); background: var(--hd-card); box-shadow: var(--hd-shadow); line-height: 0; }
.hd-frame img, .hd-frame video { display: block; width: 100%; height: auto; }
/* A picture fades in as it arrives (help_runtime.ts .hd-wait). */
.hd-frame img, .hd-tour-stage img { transition: opacity .45s ease; }
.hd .hd-wait { opacity: 0; }
.hd .hm-d { display: none !important; }
.light .hd .hm-d { display: block !important; }
.light .hd .hm-n { display: none !important; }
.hd-still .hd-frame, .hd-still figcaption { max-width: var(--hd-max, 100%); }
.hd figcaption { margin-top: 9px; font-size: 13.5px; line-height: 1.5; color: var(--hd-muted); }
.hd-zoom { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; cursor: zoom-in; }
.hd-zoom:focus-visible, .hd-play:focus-visible { outline: 2px solid var(--hd-accent); outline-offset: -4px; }
.hd-play {
  position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(6, 8, 14, .66); color: #fff; cursor: pointer; backdrop-filter: blur(6px);
  display: grid; place-items: center; line-height: 1;
}
.hd-play::before { content: ""; width: 0; height: 0; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }
.hd-play[data-playing="1"]::before { width: 10px; height: 12px; border: 0; margin: 0; background: linear-gradient(90deg, #fff 0 3.5px, transparent 3.5px 6.5px, #fff 6.5px); }
.hd-loop { position: absolute; left: 10px; bottom: 10px; padding: 4px 8px; border-radius: 999px; font: 600 10.5px/1 var(--hd-mono); letter-spacing: .06em; text-transform: uppercase; color: #fff; background: rgba(6, 8, 14, .6); }
.hd-missing { padding: 34px 18px; border-radius: 12px; border: 1px dashed var(--hd-line-2); color: var(--hd-muted); text-align: center; line-height: 1.6; font-size: 13.5px; }
.hd-lightbox { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 24px; background: rgba(3, 5, 10, .86); cursor: zoom-out; }
.hd-lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }

/* ---- tabs ---- */
.hd-tabs { margin: 6px 0 20px; }
.hd-tablist { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; border-radius: 11px; background: var(--hd-fill); border: 1px solid var(--hd-line); margin-bottom: 14px; }
.hd-tablist button { transition: background-color .2s, color .2s, box-shadow .2s; min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--hd-muted); font: 600 13.5px/1 inherit; font-family: inherit; cursor: pointer; }
.hd-tablist button[aria-selected="true"] { background: var(--hd-card); color: var(--hd-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 0 0 1px var(--hd-line-2); }
.hd-tablist button:focus-visible { outline: 2px solid var(--hd-accent); outline-offset: 1px; }
.hd-tabs-on .hd-tab-h { display: none; }
.hd-tab-h { margin: 14px 0 6px; font-size: 14px; color: var(--hd-muted); }

/* ---- click-through tour ---- */
.hd-tour { margin: 12px 0 24px; border-radius: 14px; border: 1px solid var(--hd-line-2); background: var(--hd-card); overflow: hidden; box-shadow: var(--hd-shadow); }
.hd-tour-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--hd-line); }
.hd-tour-k { font: 650 11px/1 var(--hd-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--hd-accent-ink); }
.hd .hd-tour-steps { list-style: none; padding: 0; margin: 0; gap: 0; }
.hd-tour-step { margin: 0; }
.hd-tour:not(.hd-tour-on) .hd-tour-step { border-bottom: 1px solid var(--hd-line); }
.hd-tour-stage { position: relative; line-height: 0; cursor: pointer; overflow: hidden; }  /* the spot's dimming stays on the picture */
.hd-tour-stage img { display: block; width: 100%; height: auto; }
.hd-tour-spot {
  position: absolute; border-radius: 10px; box-shadow: 0 0 0 3px var(--hd-accent), 0 0 0 9999px rgba(3, 5, 10, .38);
  animation: hd-spot 1.8s ease-in-out infinite;
}
@keyframes hd-spot { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--hd-accent) 60%, transparent), 0 0 0 9999px rgba(3, 5, 10, .38); } }
.hd .hd-tour-text { margin: 0; padding: 12px 16px; font-size: 14.5px; }
.hd-tour-text b { font: 650 11.5px/1 var(--hd-mono); color: var(--hd-accent-ink); margin-right: 6px; letter-spacing: .04em; }
.hd-tour-on .hd-tour-text b { display: none; }
.hd-tour-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--hd-line); }
.hd-tour-nav button { min-height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--hd-line-2); background: var(--hd-fill); color: var(--hd-ink); font: 600 13.5px/1 inherit; font-family: inherit; cursor: pointer; }
.hd-tour-nav button.hd-tour-next { background: var(--hd-accent); border-color: var(--hd-accent); color: #fff; }
.hd-tour-nav button:disabled { opacity: .4; cursor: default; }
.hd-tour-nav button:focus-visible { outline: 2px solid var(--hd-accent); outline-offset: 2px; }
.hd-tour-n { font: 500 12.5px/1 var(--hd-mono); color: var(--hd-muted); }

/* ---- "try it" button ---- */
.hd-try {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; margin: 0 2px; vertical-align: baseline;
  border-radius: 999px; border: 1px solid color-mix(in srgb, var(--hd-accent) 40%, transparent); background: var(--hd-accent-soft);
  color: var(--hd-accent-ink); font: 600 13px/1 inherit; font-family: inherit; cursor: pointer;
}
.hd-try::after { content: "→"; }
.hd-try { transition: background-color .15s, transform .1s; }
.hd-try:active { transform: scale(.97); }
.hd-try:focus-visible { outline: 2px solid var(--hd-accent); outline-offset: 2px; }
/* Outside the planner the buttons have nothing to open. */
.help-page .hd-try { display: none; }

.hd .hd-safe { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--hd-line); font-size: 13px; color: var(--hd-muted); }

@media (prefers-reduced-motion: reduce) { .hd-tour-spot { animation: none; } }
@media (max-width: 560px) {
  .hd { font-size: 15px; }
  .hd-step { padding-left: 40px; }
  .hd-anchor { display: none; }
}
@media print {
  .hd-play, .hd-loop, .hd-zoom, .hd-tour-nav, .hd-try { display: none !important; }
  .hd-tour-step[hidden] { display: block !important; }
}

/* ---- use cases (picks of 2026-11-17): the live tour bar at a use case's top, and a tool
   guide's strip of the use cases that use its tool (way in D). Window and public pages. ---- */
.hd-tourbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 26px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--hd-line-2); background: var(--hd-accent-soft); }
.hd-tour-go { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 18px; border-radius: 11px; border: 0;
  background: var(--cta-bg, var(--hd-accent)); color: var(--cta-ink, #fff) !important; font: 650 14.5px/1 inherit; text-decoration: none !important; cursor: pointer; }
.hd-tour-go::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.hd-tourbar > span { flex: 1 1 220px; min-width: 0; color: var(--hd-muted); font-size: 14px; line-height: 1.45; }
.hd-tour-phone { display: none; }
body.m-shell .hd-tourbar .hd-tour-go, body.m-shell .hd-tour-why { display: none; }
body.m-shell .hd-tour-phone { display: block; }
@media (hover: hover) { .hd-tour-go:hover { filter: brightness(1.06); } }
.hd-tour-go:focus-visible { outline: 2px solid var(--hd-accent); outline-offset: 2px; }
.hd-ucs { display: grid; gap: 10px; margin: 0 0 26px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--hd-line-2); background: var(--hd-fill); }
.hd-ucs > span { font: 600 11px/1 var(--hd-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--hd-muted); }
.hd-ucs > div { display: flex; flex-wrap: wrap; gap: 8px; }
.hd-ucs a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--hd-line-2);
  background: var(--hd-card); color: var(--hd-ink) !important; font-size: 13.5px; font-weight: 600; line-height: 1.3; text-decoration: none !important; }
.hd-ucs a::before { content: ""; flex: none; border-style: solid; border-width: 4.5px 0 4.5px 7px; border-color: transparent transparent transparent var(--hd-accent); }
@media (hover: hover) { .hd-ucs a:hover { border-color: var(--hd-accent); } }
