/* Felles stil for brukerveiledningen (/guide/ og /no/veiledning/).
   Samme farger som forsiden (public-web/index.html). */
:root {
  color-scheme: light dark;
  --ink: #2b2420;
  --ink-soft: #6b5f55;
  --paper: #faf6ee;
  --surface: #ffffff;
  --line: #e3d9c8;
  --gold: #b8862f;
  --gold-tint: rgba(184, 134, 47, 0.12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2ece0;
    --ink-soft: #c9beac;
    --paper: #1c1712;
    --surface: #262019;
    --line: #3a3226;
    --gold: #d4a544;
    --gold-tint: rgba(212, 165, 68, 0.14);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}
a { color: var(--gold); }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.brand img { border-radius: 8px; object-fit: cover; }
.lang { font-size: 0.85rem; white-space: nowrap; }
.draft {
  max-width: 720px;
  margin: 8px auto 0;
  padding: 0 16px;
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 600;
}
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 16px 48px;
}
h1 { font-size: 1.9rem; line-height: 1.25; margin: 12px 0 8px; }
.lead { color: var(--ink-soft); font-size: 1.05rem; margin: 0 0 24px; }
.crumb { margin: 16px 0 0; font-size: 0.85rem; }
.cards { display: grid; gap: 14px; }
.card, .toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
}
.card h2 { font-size: 1.15rem; margin: 0 0 4px; }
.card h2 a { color: var(--ink); text-decoration: none; }
.card p { margin: 0 0 8px; color: var(--ink-soft); font-size: 0.95rem; }
.card ul, .toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.9rem;
}
.toc { margin-bottom: 8px; }
.toc p { margin: 0 0 6px; font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.topic {
  scroll-margin-top: 16px;
  padding: 4px 12px;
  margin: 20px -12px 0;
  border-radius: 10px;
}
/* Når appen lenker rett til et avsnitt (#anker), markeres det. */
.topic:target { background: var(--gold-tint); }
.topic h2 { font-size: 1.2rem; margin: 12px 0 6px; position: relative; }
.anchor {
  position: absolute;
  left: -0.9em;
  color: var(--line);
  text-decoration: none;
  font-weight: 400;
}
.topic h2:hover .anchor { color: var(--gold); }
.topic h3 { font-size: 1.05rem; margin: 16px 0 4px; }
/* Ankre inne i et avsnitt (for eksempel #images og #rename-tag). */
.topic [id] { scroll-margin-top: 16px; }
.topic p:target, .topic h3:target { background: var(--gold-tint); border-radius: 6px; }
.topic p, .topic li { font-size: 1rem; }
.topic ol, .topic ul { padding-left: 1.3em; }
.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 8px 16px 40px;
}
footer p { margin: 4px 0; }
@media (max-width: 480px) {
  h1 { font-size: 1.6rem; }
  .anchor { display: none; }
}

/* --- Steg-for-steg-veiledninger (fra 2026-10-02, første: Kom i gang).
   Merkup: nav.stepbar + ol.steps > li.step[data-n][data-title] med .step-body (.phone + .txt).
   Skriptet /guide/steps.js markerer steget du leser i .stepbar. --- */


/* Fast linje øverst med stegnumrene: viser hvor du er, og trykk hopper dit. */
.stepbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 6px; align-items: center;
  margin: 0 -16px 8px; padding: 10px 16px;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.stepbar a {
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--surface);
  color: var(--ink-soft); font-weight: 700; font-size: 0.85rem; text-decoration: none;
}
.stepbar a.passed { border-color: var(--gold); color: var(--gold); }
.stepbar a.current { border-color: var(--gold); background: var(--gold); color: #fff; }
.stepbar .line { flex: 1; height: 2px; background: var(--line); min-width: 6px; }
.stepbar .line.passed { background: var(--gold); }
.stepbar .now {
  margin-left: 8px; font-size: 0.8rem; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}

/* Tidslinjen: nummer i en sirkel til venstre, en strek ned til neste steg. */
.steps { list-style: none; margin: 0; padding: 0; }
.step {
  position: relative; padding: 0 0 32px 52px;
  scroll-margin-top: 64px;
}
.step::before {
  content: attr(data-n);
  position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: #fff; font-weight: 700;
}
.step::after {
  content: ""; position: absolute; left: 17px; top: 42px; bottom: 6px;
  width: 2px; background: var(--line);
}
.step:last-child::after { display: none; }
.step > h2 { font-size: 1.3rem; margin: 4px 0 10px; line-height: 1.3; }
.step h3 { font-size: 1.02rem; margin: 18px 0 4px; }
.step p { margin: 0 0 10px; }
.step [id] { scroll-margin-top: 64px; }
.step:target > h2, .step [id]:target { background: var(--gold-tint); border-radius: 6px; }
.tip {
  font-size: 0.9rem; color: var(--ink-soft);
  border-left: 3px solid var(--gold); padding: 2px 0 2px 10px; margin: 10px 0;
}

/* Tekst og skjermskisse side om side på brede skjermer, under hverandre på mobil. */
.step-body { display: grid; gap: 4px 24px; }
@media (min-width: 640px) {
  .step-body { grid-template-columns: 1fr 220px; align-items: start; }
  .step-body .phone { grid-column: 2; grid-row: 1; margin-top: 0; }
  .step-body .txt { grid-column: 1; grid-row: 1; }
}

/* Liten skisse av skjermen i appen */
.phone {
  max-width: 240px; margin: 4px 0 12px; padding: 14px 14px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  font-size: 0.82rem; line-height: 1.4;
}
.phone .t { font-weight: 700; margin: 0 0 2px; }
.phone .s { color: var(--ink-soft); font-size: 0.72rem; margin: 0 0 10px; }
.phone .opt { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin-bottom: 6px; }
.phone .opt.on { border-color: var(--gold); background: var(--gold-tint); font-weight: 600; }
.phone .row { display: flex; gap: 6px; margin-bottom: 6px; }
.phone .row .opt { margin: 0; flex: 1; text-align: center; padding: 6px 4px; }
.phone .btn { margin-top: 8px; text-align: right; color: var(--gold); font-weight: 700; }

.done-box {
  margin: 0 0 0 52px; padding: 14px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.done-box p { margin: 0; }
.to-top { display: block; margin: 16px 0 0 52px; font-size: 0.9rem; }

@media (max-width: 480px) {
  .step { padding-left: 44px; }
  .step::before { width: 30px; height: 30px; font-size: 0.9rem; }
  .step::after { left: 14px; top: 36px; }
  .done-box, .to-top { margin-left: 44px; }
}

/* Forsiden: «Slik gjør du» (steg-for-steg-veiledningene) over emnene. */
.section-title {
  font-size: 0.8rem; font-weight: 700; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.04em; margin: 28px 0 10px;
}
.howto { scroll-margin-top: 16px; }
.howto-list { display: grid; gap: 10px; }
.howto-link {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; color: var(--ink); text-decoration: none;
}
.howto-link:hover { border-color: var(--gold); }
.howto-link .badge {
  flex: none; font-size: 0.75rem; font-weight: 700; color: var(--gold);
  background: var(--gold-tint); border-radius: 999px; padding: 3px 10px;
}
.howto-link .what { flex: 1; min-width: 0; }
.howto-link b { display: block; font-size: 1.05rem; }
.howto-link small { color: var(--ink-soft); font-size: 0.9rem; }
.howto-link .go { color: var(--gold); font-weight: 700; }

/* Utgivelsesnotater (0.9.2): «Ny i 0.9.2» i veiledningen og sidene
   /no/nytt/ og /whats-new/. Lages av scripts/build-release-notes.mjs. */
.new-badge {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  font-size: 0.72rem; font-weight: 700; color: var(--gold);
  background: var(--gold-tint); border-radius: 999px; padding: 2px 10px;
  text-decoration: none; letter-spacing: 0.01em;
}
.new-badge:hover { text-decoration: underline; }
.rn-date { color: var(--ink-soft); font-size: 0.9rem; margin-top: -4px; }
.rn-item { border-left: 3px solid var(--gold); padding: 2px 0 2px 14px; margin: 16px 0; scroll-margin-top: 16px; }
.rn-item h3 { font-size: 1.05rem; margin: 0 0 4px; }
.rn-item p { margin: 4px 0; }
.rn-tag {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  font-size: 0.72rem; font-weight: 600; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px;
}
