/* Help centre: get-curio.us/help. Builds on css/site.css (its tokens give the
   dark and light themes). Layout "LD" (chosen 25 Oct 2026): a home page of
   title-led topic cards under a big search, a "Start here" path for new
   customers, and single-column guide pages ending in "Was this helpful?".
   Pages are generated by tools/help/build.mjs; this file and help.js are
   hand-written. */

.help { padding-block: clamp(5.5rem, 8vw, 6.5rem) clamp(3.5rem, 7vw, 6rem); } /* the site header sits over the top of the page */
.hicon { width: 1.25rem; height: 1.25rem; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }

/* ---------- home ---------- */
.hhero { max-width: 46rem; }
.hkicker { font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase; color: var(--ember-text); font-weight: 600; }
.hhero__title { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1; letter-spacing: -.04em; font-weight: 800; color: var(--tx); margin: .6rem 0 0; text-wrap: balance; }
.hhero__title .stop, .help__title .stop { color: var(--ember); }
.hhero .hsearch { margin-top: 1.6rem; max-width: 40rem; }
.hstart {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1rem;
  padding: .55rem .95rem .55rem .7rem; border-radius: var(--r-pill);
  background: rgb(247 112 30 / .1); border: 1px solid rgb(247 112 30 / .35);
  color: var(--tx); font-weight: 600; font-size: .98rem; text-decoration: none;
}
.hstart .hicon { color: var(--ember); width: 1.1rem; height: 1.1rem; }
.hstart span { color: var(--ember-text); }
.hstart:hover { background: rgb(247 112 30 / .16); }
.hpop { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1rem 0 0; color: var(--tx-dim); font-size: .85rem; }
.hchip { font-size: .85rem; color: var(--tx-mute); border: 1px solid var(--line-hi); border-radius: var(--r-pill); padding: .35rem .8rem; text-decoration: none; }
.hchip:hover { color: var(--tx); border-color: var(--tx-dim); }

.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.25rem; margin-top: clamp(2.2rem, 5vw, 3rem); align-items: stretch; }
.tcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.4rem 1.4rem 1rem; display: flex; flex-direction: column; gap: 1rem; scroll-margin-top: 6rem; }
.tcard__head { display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; align-items: center; }
.tcard__head .hicon { grid-row: span 2; width: 2.6rem; height: 2.6rem; padding: .6rem; border-radius: 12px; background: rgb(247 112 30 / .12); color: var(--ember); box-sizing: border-box; }
.tcard__head h2 { margin: 0; font-size: 1.45rem; letter-spacing: -.02em; color: var(--tx); font-weight: 800; text-wrap: balance; }
.tcard__head small { color: var(--tx-dim); font-size: .85rem; }
.tcard ul { list-style: none; margin: 0; padding: 0; }
.tcard li a { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .1rem; border-top: 1px solid var(--line); color: var(--tx-body); text-decoration: none; font-size: .97rem; line-height: 1.4; }
.tcard li a::after { content: "›"; color: var(--tx-dim); }
.tcard li a:hover { color: var(--tx); }
.tcard { position: relative; }
.tcard.is-folded .tcard__rest { display: none; }
/* Open: the rest of the topic's guides drop down from the card, over the
   cards below, so the grid doesn't move. */
.tcard.is-folded.is-open { z-index: 5; border-bottom-left-radius: 0; border-bottom-right-radius: 0; box-shadow: 0 24px 50px rgb(var(--sh-rgb) / calc(0.5 * var(--sh-k))); }
.tcard.is-folded.is-open .tcard__rest {
  display: block; position: absolute; left: -1px; right: -1px; top: calc(100% - 1px);
  background: var(--panel); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--r-md) var(--r-md); padding: 0 1.4rem 1rem;
  box-shadow: 0 24px 50px rgb(var(--sh-rgb) / calc(0.5 * var(--sh-k)));
}
.tcard__rest li:first-child a { border-top: 0; }
@media (max-width: 720px) {
  /* One card per row: just grow the card. */
  .tcard.is-folded.is-open { border-radius: var(--r-md); box-shadow: none; }
  .tcard.is-folded.is-open .tcard__rest { position: static; border: 0; box-shadow: none; padding: 0; background: none; order: 2; }
  .tcard.is-folded.is-open .tcard__rest li:first-child a { border-top: 1px solid var(--line); }
  .tcard.is-folded.is-open .tcard__more { order: 3; }
}
.tcard__more { margin-top: auto; align-self: flex-start; padding: .6rem .1rem .2rem; border: 0; background: none; color: var(--ember-text); font: 600 .92rem var(--font); cursor: pointer; }
.tcard__more::after { content: " ↓"; }
.tcard.is-open .tcard__more::after { content: " ↑"; }
.tcard__more:hover { text-decoration: underline; text-underline-offset: 3px; }
.tcard__more:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 6px; }
.tcard:target { border-color: rgb(247 112 30 / .5); }

/* ---------- search ---------- */
.hsearch { position: relative; }
.hsearch input {
  width: 100%; font: inherit; font-size: .95rem; color: var(--tx);
  background: var(--panel); border: 1px solid var(--line-hi); border-radius: 12px;
  padding: .7rem .85rem .7rem 2.3rem;
}
.hsearch svg { position: absolute; left: .8rem; top: 50%; translate: 0 -50%; width: 1rem; height: 1rem; stroke: var(--tx-dim); fill: none; stroke-width: 2; pointer-events: none; }
.hsearch input:focus-visible { outline: 2px solid var(--ember); outline-offset: 1px; }
.hsearch__results {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--panel); border: 1px solid var(--line-hi); border-radius: 14px;
  box-shadow: 0 18px 40px rgb(var(--sh-rgb) / calc(0.45 * var(--sh-k)));
  padding: .35rem; display: grid; gap: 2px; max-height: 60vh; overflow: auto;
}
.hsearch__results a { display: block; padding: .55rem .65rem; border-radius: 10px; text-decoration: none; color: var(--tx); font-size: .93rem; }
.hsearch__results a small { display: block; color: var(--tx-dim); font-size: .8rem; margin-top: 2px; }
.hsearch__results a:hover, .hsearch__results a.is-on { background: var(--glass-hi); }
.hsearch__empty { padding: .6rem .7rem; color: var(--tx-mute); font-size: .9rem; }
.hsearch--big input { font-size: 1.08rem; padding: 1rem 1rem 1rem 2.9rem; border-radius: 16px; }
.hsearch--big svg { left: 1.05rem; width: 1.2rem; height: 1.2rem; }

/* ---------- guide pages ---------- */
.help__doc { max-width: 48rem; }
.crumbs { list-style: none; margin: 0 0 1.4rem; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; font-size: .86rem; color: var(--tx-dim); }
.crumbs li { display: flex; align-items: center; gap: .35rem; }
.crumbs li + li::before { content: "›"; color: var(--tx-dim); }
.crumbs a { color: var(--tx-mute); text-decoration: none; }
.crumbs a:hover { color: var(--tx); text-decoration: underline; }
.crumbs [aria-current] { color: var(--tx); }

.help__title { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; color: var(--tx); margin: 0; text-wrap: balance; }
.help__meta { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.help__meta li { font-size: .8rem; color: var(--tx-mute); border: 1px solid var(--line-hi); border-radius: var(--r-pill); padding: .25rem .7rem; }
.help__lede { font-size: var(--fs-lede); color: var(--tx-body); line-height: 1.55; margin: 1.3rem 0 0; max-width: 42rem; }
.help p { color: var(--tx-body); line-height: 1.65; }
.help b { color: var(--tx); font-weight: 600; }
.help code { font-size: .9em; background: var(--glass-hi); border-radius: 6px; padding: .1em .35em; }
.help__doc a:not(.hcard):not(.spath__item) { color: var(--tx); text-decoration-color: var(--ember); text-underline-offset: 3px; }
.help__h2 { font-size: 1.3rem; letter-spacing: -.015em; color: var(--tx); margin: 2.6rem 0 1rem; font-weight: 700; }

.hsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.2rem; }
.hstep { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 1rem; }
.hstep__n {
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--ember); color: var(--on-ember); font-weight: 800; font-size: 1.05rem;
  display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
.hstep__body { min-width: 0; padding-top: .35rem; }
.hstep__body > p { margin: 0; font-size: 1.04rem; }
.tip { margin: .85rem 0 0; padding: .75rem 1rem; border-radius: 12px; background: rgb(247 112 30 / .08); border: 1px solid rgb(247 112 30 / .28); font-size: .94rem; }
.tip strong { display: block; font-size: var(--fs-label); letter-spacing: .12em; text-transform: uppercase; color: var(--ember-text); margin-bottom: .15rem; }

.shot { margin: 1rem 0 0; }
.shot button { display: block; width: 100%; padding: 0; border: 1px solid var(--line-hi); border-radius: 14px; background: #0B0E17; overflow: hidden; cursor: zoom-in; max-height: 34rem; }
.shot img { display: block; width: 100%; height: auto; }
.shot button:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }

.notes { margin: 0; padding-left: 1.2rem; display: grid; gap: .55rem; }
.notes li { color: var(--tx-body); line-height: 1.6; }
.notes li::marker { color: var(--ember); }

/* "Was this helpful?" */
.fb { margin-top: 2.8rem; padding: 1.3rem 1.4rem; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); }
.fb h2 { margin: 0; font-size: 1.1rem; color: var(--tx); font-weight: 700; }
.fb__ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.2rem; }
.fb__btns { display: flex; gap: .6rem; }
.fb__btn { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1.15rem; border-radius: var(--r-pill); border: 1px solid var(--line-hi); background: none; color: var(--tx); font: 600 .95rem var(--font); cursor: pointer; }
.fb__btn .hicon { width: 1rem; height: 1rem; }
.fb__btn:hover { border-color: var(--tx-dim); }
.fb__btn:focus-visible, .fb__send:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.fb__form { display: grid; gap: .8rem; }
.fb__form label { color: var(--tx); font-weight: 700; font-size: 1.05rem; }
.fb__form textarea { width: 100%; min-height: 5rem; font: inherit; color: var(--tx); background: var(--ink-deep); border: 1px solid var(--line-hi); border-radius: 12px; padding: .7rem .85rem; resize: vertical; }
.fb__form textarea:focus-visible { outline: 2px solid var(--ember); outline-offset: 1px; }
.fb__row { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; }
.fb__send { background: var(--ember); color: var(--on-ember); font: 700 .95rem var(--font); border: 0; border-radius: var(--r-pill); padding: .6rem 1.2rem; cursor: pointer; }
.fb__send[disabled] { opacity: .6; cursor: progress; }
.fb__row small { color: var(--tx-dim); font-size: .85rem; }
.fb__done { display: grid; gap: .35rem; }
.fb__done b { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; }
.fb__done b .hicon { color: var(--live); }
.fb__done p { margin: 0; color: var(--tx-mute); }
.fb__err { color: var(--alert); font-size: .9rem; margin: 0; }

.hmore { margin-top: 2.4rem; padding: 1.4rem; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); }
.hmore .help__h2 { margin-top: 0; }
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .75rem; }
.hcard { display: block; text-decoration: none; padding: 1rem 1.1rem; border-radius: 14px; background: var(--ink-deep); border: 1px solid var(--line); color: var(--tx); }
.hcard:hover { border-color: var(--line-hi); background: var(--glass-hi); }
.hcard b { display: block; font-size: .98rem; }
.hcard span { display: block; font-size: .85rem; color: var(--tx-mute); margin-top: .3rem; line-height: 1.45; }
.hcard em { font-style: normal; font-size: var(--fs-label); letter-spacing: .1em; text-transform: uppercase; color: var(--ember-text); display: block; margin-bottom: .3rem; }

/* ---------- start here ---------- */
.spath { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.1rem; }
.spath__item { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) minmax(0, 16rem); gap: 1.2rem; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem 1.1rem; text-decoration: none; color: var(--tx); }
.spath__item:hover { border-color: var(--line-hi); }
.spath__n { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--ember); color: var(--on-ember); font-weight: 800; font-size: 1.1rem; display: grid; place-items: center; }
.spath__text b { display: block; font-size: 1.1rem; }
.spath__text span { display: block; color: var(--tx-mute); font-size: .92rem; margin-top: .25rem; line-height: 1.5; }
.spath__text small { display: block; color: var(--ember-text); font-size: .82rem; margin-top: .45rem; }
.spath__img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: left top; border-radius: 10px; border: 1px solid var(--line); background: #0B0E17; }
.spath__next { margin-top: 2rem; }

/* lightbox */
.hlb { position: fixed; inset: 0; z-index: 100; background: rgb(5 6 8 / .92); overflow: auto; padding: calc(env(safe-area-inset-top, 0px) + 3.5rem) 1rem 2rem; cursor: zoom-out; }
.hlb img { display: block; max-width: min(1600px, 100%); margin: 0 auto; border-radius: 10px; }
.hlb button { position: fixed; top: calc(env(safe-area-inset-top, 0px) + .8rem); right: 1rem; font: 600 .9rem var(--font); background: #fff; color: #0B0E17; border: 0; border-radius: var(--r-pill); padding: .5rem 1rem; cursor: pointer; }

/* ---------- phones ---------- */
@media (max-width: 720px) {
  .hstep { grid-template-columns: 2rem minmax(0, 1fr); gap: .75rem; }
  .hstep__n { width: 2rem; height: 2rem; font-size: .92rem; }
  .spath__item { grid-template-columns: 2.2rem minmax(0, 1fr); }
  .spath__img { grid-column: 1 / -1; }
  .spath__n { width: 2.2rem; height: 2.2rem; }
}
