/* Shared layout for the help-guide pages (public/hjalp/<guide>/) — the
   step-by-step "how do I do X" guides with real, annotated app
   screenshots (arrows + explanatory text over a plain UI screenshot),
   distinct from the SEO/marketing pages that use feature-pages.css.
   Sits on top of /legal/legal.css for the shared dark-theme tokens,
   header, brand wordmark and sv/en/nb .lang-* toggle (legal.js) — this
   file only adds the guide-specific step/annotation layout.

   2026-09-23, THIRD pass ("Förslag A — manual/dokument", picked after
   comparing three real mockups side by side — see the design-concepts
   artifact from that conversation). The first two passes kept
   iterating on an accordion-of-cards shape and never stopped reading
   as a generic "dark SaaS help widget" no matter how the chrome was
   restyled. This pass drops the accordion entirely: a guide is now a
   plain flowing document — a serif numeral + serif heading per step
   (Fraunces, loaded alongside Outfit), a paragraph, a modestly-sized
   screenshot with a thin border (not a heavy device bezel), separated
   by hairline rules. Nothing collapses; there is no button, no card,
   no filled accent color anywhere except the annotation bubbles
   (which still mean "look here" inside a screenshot) and the
   marginal rule beside the page's own intro. Every guide has at most
   5 steps, so a full read is short — the "jump to my step" case the
   accordion existed for wasn't worth the generic-widget look it cost.

   Each guide's own HTML supplies its step text + annotation data
   (inline `data-notes` JSON, see hjalp.js) — this stylesheet and
   hjalp.js are the reusable part every future guide shares. */

.hj-back {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
}
.hj-back:hover { color: var(--gold-text); }

/* /hjalp/index.html — the help-center HOME, restyled 2026-09-23 to
   match a real support-site pattern (search hero + category grid,
   reference: support.familywall.com) in FamVibe's own dark/gold
   palette instead of copying their light-blue theme — so it still
   reads as the same site as everything else under famvibe.se. */

.hj-kb-top {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hj-kb-hero {
  text-align: center;
  padding: 12px 24px 40px;
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 180, 41, 0.14), transparent 60%),
    var(--bg);
}
.hj-kb-hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 30px;
  margin: 0 0 24px;
  line-height: 1.2;
}
.hj-kb-search {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}
.hj-kb-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted-soft);
  pointer-events: none;
}
.hj-kb-search input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  outline: none;
}
.hj-kb-search input:focus { border-color: var(--gold); }
.hj-kb-search input::placeholder { color: var(--muted-soft); }
.hj-kb-no-results {
  color: var(--muted);
  font-size: 14px;
  margin: 20px 0 0;
}

.hj-kb-body { padding-top: 44px; }
.hj-kb-section-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
  margin: 0 0 20px;
}

.hj-cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 560px) {
  .hj-cat-grid { grid-template-columns: 1fr 1fr; }
}
.hj-cat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.hj-cat-card:hover { border-color: rgba(239, 169, 43, 0.4); transform: translateY(-1px); }
/* Same specificity as the plain class rule above sets display:flex,
   so the browser's own `[hidden] { display: none }` UA rule loses the
   cascade tie-break to whichever stylesheet rule comes later — this
   explicit, higher-specificity override is what actually makes the
   search filter's `hidden` attribute hide a card (found live: cards
   stayed visible with the attribute correctly set in the DOM). */
.hj-cat-card[hidden] { display: none; }
.hj-cat-card:hover .hj-cat-title { color: var(--gold-text); }
.hj-cat-emoji { font-size: 26px; margin-bottom: 4px; }
.hj-cat-title { font-size: 16px; font-weight: 800; transition: color 0.15s ease; }
.hj-cat-desc { font-size: 13.5px; color: var(--muted); line-height: 1.45; }

.hj-kb-contact {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 36px 0 0;
}
.hj-kb-contact a { color: var(--gold-text); font-weight: 700; text-decoration: none; }
.hj-kb-contact a:hover { text-decoration: underline; }

/* A thin marginal rule beside the intro, not a filled hero band — the
   one small brand touch on an otherwise plain typeset opening,
   reading closer to a document's own title block than a landing
   page's hero. */
.hj-intro {
  padding-left: 16px;
  border-left: 3px solid var(--gold);
}
.hj-intro h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 32px;
  margin: 0 0 12px;
  line-height: 1.15;
}
.hj-intro p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  max-width: 44ch;
}

/* The guide itself — a plain flowing document, one <section> per
   step, hairline rules between them. No wrapper card/border, no
   collapse mechanic. */
.hj-steps {
  margin-top: 48px;
}
.hj-step {
  padding: 40px 0;
  border-bottom: 1px solid var(--divider);
}
.hj-step:first-child { padding-top: 0; }
.hj-step:last-child { border-bottom: none; }

.hj-step-num {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 46px;
  color: var(--muted-soft);
  line-height: 1;
  margin: 0 0 6px;
}
.hj-step h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 21px;
  margin: 0 0 14px;
  line-height: 1.25;
}
.hj-step-text p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0 0 22px;
  max-width: 58ch;
}
.hj-step-text b { color: var(--ink); font-weight: 600; }

/* The screenshot itself — a modest size and a plain thin border, not
   a dominant device bezel. It illustrates the step, it isn't the
   page's hero. */
.hj-shot-wrap {
  position: relative;
  width: 100%;
  max-width: 230px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  line-height: 0;
}
.hj-shot-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

/* One annotation bubble, positioned via inline style (left/top set by
   hjalp.js from the box fractions captured at screenshot time) —
   always anchored just below its target, pointing up at it, since
   every annotated element in this guide sits in the upper 2/3 of its
   screenshot with room below. A later guide with a lower-screen target
   can add a `.hj-note.above` variant that points down instead. */
.hj-note {
  position: absolute;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  max-width: 82%;
}
.hj-note-arrow {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 8px solid var(--gold);
  margin-bottom: 2px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}
.hj-note-text {
  background: var(--gold-gradient);
  color: #201400;
  font-weight: 800;
  font-size: 11.5px;
  line-height: 1.3;
  padding: 5px 10px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  text-align: center;
  white-space: nowrap;
}

/* A target's own highlight ring, drawn from the same box the bubble
   points at, so it's unambiguous which element on a busy screen the
   note actually refers to. */
.hj-highlight {
  position: absolute;
  z-index: 1;
  border: 2px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 0 0 3px rgba(239, 169, 43, 0.18);
  pointer-events: none;
}

@media (max-width: 480px) {
  .hj-note-text { font-size: 10.5px; padding: 4px 8px; white-space: normal; }
}

/* Embedded in the app's Hjälp popup (hjalp.js sets .hj-embedded when the
   page runs inside an iframe): the popup already has its own "Hjälp"
   title bar, and the wordmark would navigate the frame to the marketing
   homepage — so hide it and keep just the language toggle, right-aligned. */
.hj-embedded header .brand { display: none; }
.hj-embedded header { justify-content: flex-end; }
