/* hjalp.css — the introduction (full-screen pages on the first login) and the
   "Om appen" section on Mer. Load AFTER app.css. Tokens only: the whole thing
   flips with prefers-color-scheme like the rest of the app. */

/* ============================================================ 1. the picture */
/* The drawing is inline SVG with its own dark ground and its own 340x250
   coordinate system, so the frame is only a rounded clip. Nothing is positioned
   over it: an earlier version had absolutely-positioned px markers on top, which
   kept their size while the drawing scaled and landed on the artwork at phone
   widths. Annotations belong inside the svg or not at all. */
.hbild { border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: #0c1a2e; aspect-ratio: 340 / 250; }
.hbild svg { width: 100%; height: 100%; display: block; }

/* ============================================================ 2. the intro */
body.intro-on { overflow: hidden; }
.hintro { position: fixed; inset: 0; z-index: 120; background: var(--paper); display: grid; }
.hsida { display: grid; grid-template-rows: auto 1fr auto; min-height: 100%; overflow: auto;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.htopp { display: flex; justify-content: flex-end; padding: 12px 14px 0; min-height: 34px; }
.hhoppa { border: 0; background: transparent; color: var(--granite); font: inherit; font-size: .9rem;
  padding: 6px 8px; text-decoration: underline; text-underline-offset: 3px; }
.hkropp { display: grid; align-content: start; justify-items: center; gap: 20px; padding: 10px 26px 0;
  width: 100%; max-width: 420px; margin: 0 auto; box-sizing: border-box; }
.hkropp .hbild { width: 100%; max-width: 340px; }
.htext { display: grid; gap: 8px; text-align: center; }
.htext h1 { margin: 0; font-size: 1.7rem; line-height: 1.14; font-weight: 400; }
.htext p { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.hater { margin: 2px 0 0; font-size: .87rem; line-height: 1.45; color: var(--granite); text-align: center; text-wrap: pretty; }
.hfraga { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--blue); color: var(--blue-ink, var(--blue)); font-size: .8rem; vertical-align: -4px; }
.hfot { display: grid; gap: 14px; padding: 22px 24px 26px; width: 100%; max-width: 420px; margin: 0 auto; box-sizing: border-box; }
.hknappar { display: flex; gap: 12px; }
.hknappar .hbak { flex: none; }
.hknappar .hnasta { flex: 1; font-size: 1.05rem; padding: 14px; }
.hknappar .hnasta.klar { background: var(--ok); color: #fff; border-color: var(--ok); } /* explicit text: css/las-ny.css `button.klar` would make it light green on green */
.hprickar { display: flex; justify-content: center; gap: 7px; }
.hprickar i { width: 7px; height: 7px; border-radius: 4px; background: var(--line); transition: width .16s; }
.hprickar i.nu { width: 22px; background: var(--blue); }

/* The first page centres; the later ones start at the top so the text never
   jumps as the picture height changes between steps. */
.hintro .hsida:has(.hprickar i.nu:first-child) .hkropp { align-content: center; }

/* ============================================================ 3. the ? in the header */
#hjalpBtn { width: 32px; height: 32px; flex: none; display: grid; place-items: center; padding: 0;
  border: 1.5px solid var(--line); border-radius: 50%; background: transparent;
  color: var(--blue-ink, var(--blue)); font-size: 1rem; font-weight: 700; line-height: 1; }
#hjalpBtn:hover { border-color: var(--blue); }
header .huvudhoger { display: flex; align-items: center; gap: 8px; }

/* ============================================================ 4. Om appen, on Mer */
.omkort { display: grid; gap: 14px; }
.omkort-ett { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--sunk, var(--paper)); }
.omkort-ett .hbild { border: 0; border-radius: 10px; margin: 12px 12px 0; }
/* The pictures are dark in both colour schemes — they are night skies, not UI —
   so only the captions around them follow the scheme. */
.omtext { display: grid; gap: 3px; padding: 11px 14px 13px; }
.omtext b { font-size: 1.05rem; font-weight: 500; }
.omtext span { font-size: .88rem; line-height: 1.45; }

/* ---- the help sheet (Linh, 2026-09-18; regrouped 2026-09-24, design C1–C2): how-to topics behind the ? ---- */
.hjalp { position: fixed; inset: 0; z-index: 120; background: var(--paper); overflow: auto; }
.hjalp-sida { max-width: 560px; margin: 0 auto; padding: 10px 16px 28px; box-sizing: border-box; }
.hjalp-topp { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 1; background: var(--paper); padding: 8px 0; }
.hjalp-topp h2 { margin: 0; font-family: var(--serif); font-size: 1.6rem; font-weight: 500; }
.hjalp-stang { font-size: 1.1rem; }
.hjalp-bak { display: none; background: none; border: 0; padding: 6px 0; font-weight: 600; font-size: .9rem; color: var(--blue-ink, var(--blue)); cursor: pointer; }
.hjalp-sub { margin: -2px 0 14px; font-size: .88rem; line-height: 1.45; }
.hamnen { display: grid; gap: 14px; }
.hgrupp h3 { margin: 0 0 8px; font-size: .66rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--faint, var(--granite)); }
.hlista { border: 1px solid var(--line); border-radius: 14px; background: var(--card, var(--paper)); overflow: hidden; }
.hlista .hamne + .hamne { border-top: 1px solid var(--line); }
.hamne summary { list-style: none; cursor: pointer; padding: 11px 14px; display: flex; align-items: center; gap: 10px; }
.hamne summary::-webkit-details-marker { display: none; }
.hrad { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hrub { font-size: .9rem; font-weight: 500; line-height: 1.2; }
.hkort { font-size: .76rem; line-height: 1.35; color: var(--granite); }
.hpil { flex: none; color: var(--faint, var(--granite)); }
.hamne:not([open]) .hinne { display: none; }
/* "Nytt i appen": a gold row above the groups, its one line as the label. */
.hamne.nytt { border: 1px solid var(--gold, #b8860b); border-radius: 12px; background: var(--gold-soft, #f8efd4); }
.hamne.nytt summary { padding: 11px 13px; }
.hamne.nytt:not([open]) .hrub { display: none; }
.hamne.nytt:not([open]) .hkort { font-size: .84rem; font-weight: 500; line-height: 1.3; color: var(--gold-ink, var(--ink)); }
.hamne.nytt .hpil { color: var(--gold-ink, var(--granite)); }
.hnytt { flex: none; padding: 3px 7px; border-radius: 6px; background: var(--gold, #b8860b); color: #fff; font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
/* One topic open: the sheet becomes that topic's page (C2) — back link, title, steps, Bra att veta, Läs också. */
.hjalp.ett .hjalp-topp h2, .hjalp.ett .hjalp-sub, .hjalp.ett .hgrupp h3, .hjalp.ett .hamne:not([open]) { display: none; }
.hjalp.ett .hjalp-bak { display: inline-block; }
.hjalp.ett .hamnen, .hjalp.ett .hgrupp { gap: 0; }
.hjalp.ett .hlista, .hjalp.ett .hamne.nytt { border: 0; background: none; border-radius: 0; overflow: visible; }
.hjalp.ett .hamne[open] > summary { padding: 4px 0 14px; cursor: default; }
.hjalp.ett .hamne[open] .hpil, .hjalp.ett .hamne[open] .hnytt { display: none; }
.hjalp.ett .hamne[open] .hrad { gap: 6px; }
.hjalp.ett .hamne[open] .hrub { display: block; font-family: var(--serif); font-size: 1.45rem; line-height: 1.15; }
.hjalp.ett .hamne[open] .hkort { font-size: .88rem; line-height: 1.45; font-weight: 400; color: var(--granite); }
.hinne { display: grid; gap: 14px; }
.hsteg { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hsteg li { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; line-height: 1.45; }
.hsteg li > span:last-child { padding-top: 3px; }
.hnr { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: var(--on-blue); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.hbra { padding: 12px 13px; border-radius: 12px; background: var(--sunk, var(--blue-soft)); display: grid; gap: 6px; font-size: .82rem; line-height: 1.45; }
.hbra b { font-size: .78rem; font-weight: 600; letter-spacing: .06em; color: var(--granite); }
.hlas { display: grid; gap: 6px; }
.hlas > span { font-size: .74rem; font-weight: 600; color: var(--faint, var(--granite)); }
.hlas > div { display: flex; flex-wrap: wrap; gap: 7px; }
.hlank { padding: 7px 11px; border-radius: 15px; border: 1.5px solid var(--line); background: none; font-size: .8rem; font-weight: 500; color: var(--blue-ink, var(--blue)); cursor: pointer; }
.hjalp-intro { width: 100%; margin-top: 18px; height: 44px; font-weight: 600; font-size: .86rem; }

/* ============================================================ 7. reminders page (js/paminnelser.js) */
/* No picture: a plain card in .hbild's place, left-aligned since it holds a form, not art. */
.hkropp .hform { width: 100%; max-width: 340px; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; box-sizing: border-box; text-align: left; }

/* links to easy Swedish outside the app (A4) */
.hsteg a, .hbra a { color: var(--blue-ink, var(--blue)); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
