
  :root {
    --b-navy: #072f4a;
    --b-dark: #0b4a6f;
    --b-blue: #0084c9;
    --b-blue-lt: #0ca5eb;
    --b-bg: #eef1f3;
    --b-panel: #ffffff;
    --b-border: #dde3e8;
    --b-text: #072f4a;
    --b-muted: #5b7a89;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: "Inter", sans-serif;
    background: var(--b-bg);
    color: var(--b-text);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* Toppbar */
  /* ══════════════════════════════════════════════════════════════════════
     Innloggingsskjerm (Tessir, okt 2026; design: design_handoff_tessir_login, README).
     To kolonner: skjema på #f4f3ee til venstre, merkeflate #1f3a34 med animert T til høyre (skjult under 900 px).
     Bare utseende: id-ene, visningene (login / forgot / reset) og flytene i app-cloud.js er som før.
     Animasjonen er bare på klossene i merkeflaten (pointer-events: none). Skjemaet beveger seg aldri.
     ══════════════════════════════════════════════════════════════════════ */
  .login-screen {
    --ls-ink: #1f3a34; --ls-bg: #f4f3ee; --ls-line: #d9d6cc; --ls-muted: #6b7177; --ls-lime: #d4ff3f; --ls-link: #0f6b4c;
    position: fixed; inset: 0; z-index: 99999;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-rows: minmax(0, 1fr);
    background: var(--ls-bg); color: var(--ls-ink);
    font-family: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  }
  .login-screen.hidden { display: none; }

  /* ---- skjemakolonnen (ruller selv på lave skjermer; toppen klippes aldri) ---- */
  .login-content { display: flex; flex-direction: column; padding: 40px 56px; box-sizing: border-box; min-width: 0; min-height: 0; overflow-y: auto; }
  .ls-top { flex: none; display: flex; align-items: center; gap: 12px; }
  .ls-top img { display: block; width: 40px; height: 40px; }
  .ls-wordmark { font-size: 28px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
  .ls-center { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; padding: 32px 0; }
  .login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 24px; }
  .login-card h1 { margin: 0; font-size: 36px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; color: var(--ls-ink); }
  .ls-fields { display: flex; flex-direction: column; gap: 18px; }
  .ls-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
  .login-card input[type="email"], .login-card input[type="password"], .login-card input[type="text"] {
    width: 100%; height: 48px; box-sizing: border-box; margin: 0; padding: 0 14px;
    border: 0; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--ls-line);
    font-family: inherit; font-size: 16px; font-weight: 500; color: var(--ls-ink); outline: none;
  }
  .login-card input::placeholder { color: #8b908d; font-weight: 400; }
  .login-card input:focus { box-shadow: inset 0 0 0 2px var(--ls-ink); }
  .ls-pw { position: relative; display: block; }
  .ls-pw input { padding-right: 54px !important; }
  .ls-eye { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #4a524f; cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .ls-eye:hover { background: var(--ls-bg); }
  .ls-eye:focus-visible { outline: 2px solid var(--ls-ink); outline-offset: 1px; }
  .ls-eye .ls-eye-hide, .ls-eye[aria-pressed="true"] .ls-eye-show { display: none; }
  .ls-eye[aria-pressed="true"] .ls-eye-hide { display: block; }
  .ls-link { align-self: flex-start; display: inline-block; padding: 6px 0; margin-top: -2px; font-size: 14px; font-weight: 500; line-height: 20px; color: var(--ls-link); text-underline-offset: 2px; }
  .ls-link:hover { color: var(--ls-ink); }
  .ls-link:focus-visible { outline: 2px solid var(--ls-ink); outline-offset: 2px; border-radius: 4px; }
  .ls-primary { height: 50px; box-sizing: border-box; border: 0; border-radius: 10px; background: var(--ls-ink); color: #fff; font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; }
  .ls-primary:hover { background: #16302a; }
  .ls-primary:focus-visible { outline: 3px solid var(--ls-lime); outline-offset: 2px; }
  .ls-primary:disabled { cursor: progress; background: #16302a; }
  .ls-block { width: 10px; height: 10px; border-radius: 2px; background: var(--ls-lime); animation: ls-pulse 2.4s ease-in-out infinite; }
  .ls-error, .ls-success { border-radius: 10px; padding: 12px 14px; font-size: 14px; font-weight: 500; line-height: 1.45; }
  .ls-error { background: #fdecea; color: #8a1f14; }
  .ls-success { background: #e4f3ea; color: #0f5a3f; }
  .ls-hint { margin: 0; font-size: 15px; line-height: 1.5; color: #4a524f; }
  .ls-foot { flex: none; font-size: 13px; color: var(--ls-muted); }

  /* ---- merkeflaten (bare pynt) ---- */
  .login-brand { background: var(--ls-ink); display: flex; flex-direction: column; gap: 28px; padding: 56px; box-sizing: border-box; min-width: 0; min-height: 0; overflow: hidden; }
  .lb-logo { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
  .lb-mark { display: block; width: 100%; height: 100%; max-width: 440px; max-height: 440px; overflow: visible; }
  .lb-k, .lb-glow { transform-box: fill-box; transform-origin: center; }
  .lb-k { animation: ls-drop .65s cubic-bezier(.2, .9, .3, 1.25) var(--d, 0s) both; }
  .lb-k--p1 { animation: ls-drop .65s cubic-bezier(.2, .9, .3, 1.25) var(--d, 0s) both, ls-pulse 3.6s ease-in-out 1.85s infinite; }
  .lb-k--p2 { animation: ls-drop .65s cubic-bezier(.2, .9, .3, 1.25) var(--d, 0s) both, ls-pulse 3.6s ease-in-out 3.35s infinite; }
  .lb-glow { opacity: 0; filter: blur(8px); }
  .lb-glow--1 { animation: ls-glow 3.6s ease-in-out 1.85s infinite; }
  .lb-glow--2 { animation: ls-glow 3.6s ease-in-out 3.35s infinite; }
  .lb-text { flex: none; display: flex; flex-direction: column; gap: 20px; max-width: 460px; color: #fff; }
  .lb-word { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid #3a5a52; padding-top: 16px; }
  .lb-name { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 14px; color: #b9c9c4; }
  .lb-name b { font-size: 22px; font-weight: 800; letter-spacing: -0.04em; color: var(--ls-lime); }
  .lb-def { font-size: 16px; line-height: 1.5; }
  .lb-pills { display: flex; flex-wrap: wrap; gap: 8px; }
  .lb-pills span { font-size: 15px; font-weight: 700; color: var(--ls-ink); background: var(--ls-lime); border-radius: 8px; padding: 6px 12px; }
  @keyframes ls-drop { from { opacity: 0; transform: translateY(-28px) scale(.6); } to { opacity: 1; transform: none; } }
  @keyframes ls-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
  @keyframes ls-glow { 0%, 100% { opacity: 0; } 50% { opacity: .55; } }
  @media (prefers-reduced-motion: reduce) {
    .lb-k, .lb-k--p1, .lb-k--p2, .lb-glow, .ls-block { animation: none !important; }
  }

  /* ── Innlogging på mobil ──
     Verktøylinjen bak innloggingen er bredere enn en telefon. Mobilnettlesere zoomer da HELE siden ut, og innloggingen ble tegnet i miniatyr.
     Mens innloggingen vises (html.login-open, satt av app-cloud.js), klippes verktøylinjen til skjermbredden så den ikke utvider siden. */
  html.login-open .topbar { overflow: hidden; max-width: 100vw; }
  html.login-open, html.login-open body { overflow: hidden; overscroll-behavior: none; }

  /* Under ca. 900 px: bare skjemaet (merkeflaten skjules) */
  @media (max-width: 900px) {
    .login-screen { grid-template-columns: minmax(0, 1fr); }
    .login-brand { display: none; }
  }
  @media (max-width: 600px) {
    .login-content { padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
    .ls-center { padding: 24px 0; }
    .login-card h1 { font-size: 32px; }
  }
  /* Berøringsskjermer: trykkflater på minst 44 px (øyeknappen og lenkene) */
  @media (pointer: coarse) {
    .ls-eye { width: 44px; height: 44px; top: 2px; right: 2px; }
    .ls-link { padding: 12px 0; margin-top: -8px; }
  }
  /* Telefon på langs og andre lave skjermer: tettere, så knappen nås uten mye rulling */
  @media (max-height: 520px) {
    .login-content { padding-top: 16px; padding-bottom: 12px; }
    .ls-center { padding: 12px 0; }
    .login-card { gap: 14px; }
    .login-card h1 { font-size: 26px; }
    .ls-fields { gap: 12px; }
  }
  .topbar {
    /* Redesign fase 15: litt mørkere og mer nøytral enn kundens navy, med en
       tynn lys linje nederst, så appens meny og kundens navbar ikke flyter
       sammen til én flate. */
    background: #06202f;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,.08);
    color: white;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 56px;
    padding: 0 18px;
    flex-shrink: 0;
  }
  .topbar > .tb-btn, .topbar > .tb-dropdown > .tb-btn, .tb-split .tb-btn { height: 34px; padding-top: 0; padding-bottom: 0; }
  .tb-vsep { width: 1px; height: 24px; background: rgba(255,255,255,0.15); flex-shrink: 0; }
  /* Sidenavn-knappen: selve navnet på åpen side, fungerer som "Fil"-menyen. */
  .tb-pagename {
    background: none; border: none; color: white; font-family: inherit;
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    height: 34px; padding: 0 8px; border-radius: 8px; max-width: 280px;
  }
  .tb-pagename:hover { background: rgba(255,255,255,0.1); }
  #page-name-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tb-btn--white { background: white; color: var(--b-navy); border-color: white; font-weight: 600; }
  .tb-btn--white:hover { background: #e8eef2; }
  #btn-preview-toggle.active { background: white; color: var(--b-navy); border-color: white; }
  /* Enhetsveksler (flyttet hit fra .preview-bar) — kun ikoner */
  .topbar .dev-toggle.tb-seg { background: rgba(255,255,255,0.1); border-radius: 8px; padding: 3px; gap: 2px; }
  .topbar .dev-toggle.tb-seg button {
    width: 30px; height: 28px; padding: 0; border: none; border-radius: 6px;
    background: transparent; color: rgba(255,255,255,0.75); cursor: pointer; font-size: 0.85rem;
  }
  .topbar .dev-toggle.tb-seg button:hover { color: white; }
  .topbar .dev-toggle.tb-seg button.active { background: white; color: var(--b-navy); }
  /* Fase 17: [hidden] må vinne over display:flex/inline-flex over */
  .topbar .dev-toggle[hidden] { display: none !important; }
  /* Delt knapp: Kopier HTML + meny-pil */
  .tb-split { display: flex; }
  .tb-split .tb-split-main { border-top-right-radius: 0; border-bottom-right-radius: 0; }
  .tb-split .tb-split-caret { border-top-left-radius: 0; border-bottom-left-radius: 0; padding: 0 10px; border-left: 1px solid rgba(0,0,0,0.18); }
  .tb-dropdown-menu--right { left: auto !important; right: 0; }
  .tb-radio .tb-radio-dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.5); justify-self: center; }
  .tb-radio.active .tb-radio-dot { border-color: var(--b-blue-lt); background: radial-gradient(circle, var(--b-blue-lt) 45%, transparent 50%); }
  /* Avatar (konto-meny) */
  .tb-avatar {
    position: relative; width: 34px; height: 34px; border-radius: 50%;
    background: var(--b-blue-lt); color: white; border: none; cursor: pointer;
    font-family: inherit; font-weight: 700; font-size: 0.8rem;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .tb-avatar:hover { filter: brightness(1.1); }
  /* Redesign fase 9: felles avatar (initialer eller emoji) */
  .av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0; font-weight: 600; line-height: 1; letter-spacing: 0.2px; font-family: inherit; vertical-align: middle; user-select: none; }
  .tb-avatar { background: transparent !important; padding: 0; }
  #cloud-status-label { display: inline-flex; }
  .presence-indicator .av { margin: 0 2px 0 4px; }
  /* «Din profil» */
  .pf-box { width: min(560px, 100%); }
  .pf-top { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
  .pf-big { flex-shrink: 0; }
  .pf-name { flex: 1; min-width: 0; }
  .pf-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--b-navy); margin-bottom: 6px; }
  .pf-input { width: 100%; box-sizing: border-box; height: 40px; padding: 0 12px; border: 1.5px solid var(--b-border); border-radius: 8px; font-family: inherit; font-size: 0.95rem; color: var(--b-navy); outline: none; }
  .pf-input:focus { border-color: var(--b-blue); box-shadow: 0 0 0 3px rgba(0,132,201,0.12); }
  .pf-help { font-size: 0.76rem; color: var(--b-muted); margin-top: 6px; }
  /* Tilgangsstyring: faner i «Din profil» (bare admin), brukerliste med tilgangsvalg, og låst menypunkt */
  .b-modal-box.pf-box--wide { width: min(940px, 100%); }  /* .b-modal-box (lenger ned i stilarket) setter ellers bredden til 760px */
  .pf-perms[hidden] { display: none !important; }
  .pf-perms { margin-top: 12px; }
  .pa-help { font-size: 0.9rem; color: var(--b-navy); margin-bottom: 6px; line-height: 1.45; }
  .pa-note { font-size: 0.78rem; color: var(--b-muted); margin-bottom: 14px; line-height: 1.5; }
  /* Brukerliste som kort: tre kolonner (hvem | status | tilganger) med skillelinjer. Bryterne er appens vante .ml-switch. */
  .pa-list { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow-y: auto; padding: 2px; margin: -2px; }
  .pa-loading { padding: 16px; font-size: 0.85rem; color: var(--b-muted); }
  .pa-row { display: grid; grid-template-columns: minmax(0, 1fr) 240px 300px;  /* faste kolonner: skillelinjene står på linje fra rad til rad */ align-items: stretch; border: 1px solid var(--b-border); border-radius: 12px; background: #fff; }
  .pa-who, .pa-status-col, .pa-perms { padding: 14px 18px; display: flex; align-items: center; }
  .pa-who { gap: 14px; min-width: 0; }
  .pa-status-col, .pa-perms { border-left: 1px solid var(--b-border); }
  .pa-id { min-width: 0; }
  .pa-name-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .pa-name { font-weight: 700; font-size: 0.95rem; color: var(--b-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pa-you { flex: none; padding: 2px 9px; border-radius: 99px; background: #e3f1fa; color: #00679f; font-size: 0.72rem; font-weight: 600; }
  .pa-email { font-size: 0.8rem; color: var(--b-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
  .pa-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 99px; background: #eef1f4; color: #5a6b7a; font-size: 0.8rem; font-weight: 500; white-space: nowrap; }
  .pa-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
  .pa-pill--green { background: #e5f5ec; color: #12804a; }
  .pa-pill--red { background: #fde9ed; color: #c0264a; }
  .pa-perms { flex-direction: column; align-items: flex-start; justify-content: center; gap: 9px; }
  .pa-perm { font-size: 0.84rem; white-space: nowrap; }  /* aldri brekk etiketten: da havner låsen på feil sted */
  .pa-perm.is-disabled { color: var(--b-muted); cursor: default; }
  .pa-perm-hint { margin: -6px 0 0 46px; font-size: 0.74rem; color: var(--b-muted); white-space: nowrap; }  /* under bryteren, på linje med etiketten */
  .pa-lock { font-size: 0.7rem; color: var(--b-muted); margin-left: -2px; }
  @media (max-width: 720px) {
    .pa-row { grid-template-columns: 1fr; }
    .pa-status-col, .pa-perms { border-left: 0; border-top: 1px solid var(--b-border); min-width: 0; }
  }
  /* Låst menypunkt (mangler tilgang): dempet, med lås i tredje kolonne. Klikk gir en forklaring i stedet for å åpne. */
  .tb-btn.is-locked { opacity: 0.55; cursor: not-allowed; }
  .tb-btn.is-locked:hover { background: transparent; }
  .tb-btn .perm-lock { font-size: 0.7rem; opacity: 0.9; }
  .tb-dropdown-menu .tb-btn[hidden] { display: none; }  /* menypunkt som bare noen skal se (grid-reglene over overstyrer ellers hidden) */
  .pf-row-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .pf-row-h .pf-label { margin: 0; }
  .pf-seg { display: flex; gap: 2px; background: var(--b-bg); border-radius: 8px; padding: 3px; }
  .pf-seg button { border: none; background: transparent; border-radius: 6px; height: 28px; padding: 0 12px; font-family: inherit; font-size: 0.82rem; font-weight: 500; color: var(--b-muted); cursor: pointer; }
  .pf-seg button.active { background: white; color: var(--b-navy); font-weight: 600; box-shadow: 0 1px 3px rgba(7,47,74,0.12); }
  .pf-colors { display: flex; flex-wrap: wrap; gap: 10px; }
  .pf-color { border: none; background: none; padding: 2px; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 2px transparent; transition: box-shadow 0.12s; }
  .pf-color:hover { box-shadow: 0 0 0 2px var(--b-border); }
  .pf-color.active { box-shadow: 0 0 0 2px var(--b-blue); }
  .pf-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
  .pf-emoji { height: 44px; border: 1.5px solid transparent; border-radius: 10px; background: none; font-size: 24px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .pf-emoji:hover { background: var(--b-bg); }
  .pf-emoji.active { border-color: var(--b-blue); background: #e6f3fa; }
  .pf-sub { font-size: 0.8rem; color: var(--b-muted); margin: 12px 0 8px; }
  .pf-sub--caps { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; margin: 0 0 10px; }
  .pf-bgs { display: flex; gap: 10px; }
  .pf-bg { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(7,47,74,0.1); cursor: pointer; padding: 0; box-shadow: 0 0 0 2px transparent; }
  .pf-bg.active { box-shadow: 0 0 0 2px white, 0 0 0 4px var(--b-blue); }
  .pf-preview { margin-top: 18px; padding: 14px 16px; background: #f7f9fa; border: 1px solid var(--b-border); border-radius: 12px; }
  .pf-preview-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
  .pf-pv-top { display: flex; align-items: center; gap: 14px; background: var(--b-navy); color: rgba(255,255,255,0.8); font-size: 0.78rem; padding: 8px 10px 8px 12px; border-radius: 8px; }
  .pf-pv-list { display: flex; align-items: center; gap: 10px; }
  .pf-pv-name { font-size: 0.86rem; font-weight: 600; color: var(--b-navy); }
  .pf-pv-meta { font-size: 0.74rem; color: var(--b-muted); }
  .tb-avatar .changelog-dot { top: 0; right: 0; }
  .topbar h1 { font-size: 0.95rem; font-weight: 600; letter-spacing: 0.3px; }
  .topbar h1 span { color: #7cd3fd; font-weight: 400; }
  .topbar .spacer { flex: 1; }
  .tb-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background 0.15s;
    white-space: nowrap;
  }
  .tb-btn:hover { background: rgba(255,255,255,0.2); }
  .tb-btn--primary { background: var(--b-blue); border-color: var(--b-blue); }
  .tb-btn--primary:hover { background: var(--b-blue-lt); }
  /* Stillegående lagre-status ("Lagrer…"/"Lagret") — samme mønster som
     Google Docs/Notion. Bevisst IKKE en toast: autolagring skjer så ofte
     (hvert tastetrykk) at et varsel per lagring ville blinket konstant.
     Denne sitter bare stille og oppdaterer tekst, ingen animasjon som
     trekker blikket. */

  /* "Noen andre har denne siden åpen"-varsel — Google Docs-stil
     tilstedeværelse via Supabase Realtime Presence (ingen egen tabell,
     rent websocket-basert "hvem er her nå"). Gul/oransje for å skille
     seg tydelig fra den nøytrale lagre-statusen ved siden av. */
  .presence-indicator {
    font-size: 0.76rem;
    color: #f0b429;
    white-space: nowrap;
    min-width: 0;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
  }
  .presence-indicator i { margin-right: 5px; }
  /* Alltid-synlig "hvilken sky-side er dette"-merke — helt separat fra
     .save-status (som kun beskriver den LOKALE, private autolagringen).
     Gir et konkret svar på "jobber jeg med noe som faktisk er lagret i
     skyen, og hvor gammelt er det?" uten å måtte trykke "Lagre" eller
     åpne noen meny for å finne ut av det. */
  /* Redesign fase 1: ÉN samlet lagringsstatus (prikk + tekst). Teksten skal
     aldri kuttes (ingen ellipsis) — den er kort nok i alle tre tilstander. */
  .cloud-status-badge {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .cloud-status-badge i { flex-shrink: 0; }
  .status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: rgba(255,255,255,0.4); }
  .cloud-status-badge--saved .status-dot { background: #4ade80; }
  .cloud-status-badge--dirty .status-dot { background: #f5b041; }
  .cloud-status-badge--local .status-dot { background: rgba(255,255,255,0.4); }
  /* Fast lenke til den publiserte siden (vises når åpen side er publisert på WordPress; samme kilde som «Åpne publisert side» i fil-menyen) */
  .tb-wp-link { font-size: 0.8rem; color: rgba(255, 255, 255, 0.72); text-decoration: none; white-space: nowrap; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; margin-left: 14px; padding: 4px 8px; border-radius: 6px; }
  .tb-wp-link[hidden] { display: none; }
  .tb-wp-link:hover, .tb-wp-link:focus-visible { color: #fff; background: rgba(255, 255, 255, 0.12); }
  .tb-wp-link i { font-size: 0.72rem; }
  .changelog-dot {
    position: absolute;
    top: 5px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e05252;
    border: 1.5px solid var(--b-navy, #072f4a);
  }
  /* Variant brukt inni menyen (ved siden av "Nytt i verktøyet"-teksten) —
     ikke en badge på et hjørne, bare en liten prikk i normal dokumentflyt. */
  .changelog-dot--inline { position: static; display: inline-block; margin-left: 4px; border: none; }
  /* «Hva er nytt» (redesign fase 14) */
  .cl-box { width: min(725px, 100%); }
  .cl-head { padding: 18px 22px; }
  .cl-title { display: inline-flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 600; color: var(--b-navy); }
  .cl-new { font-size: 0.72rem; font-weight: 700; color: white; background: var(--b-blue); border-radius: 99px; padding: 3px 9px; }
  .cl-new[hidden] { display: none; }
  .cl-body { padding: 4px 22px 18px; }
  .cl-day { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; }
  .cl-day-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--b-navy); white-space: nowrap; }
  .cl-day-date { font-size: 0.78rem; color: var(--b-muted); white-space: nowrap; }
  .cl-day-line { flex: 1; height: 1px; background: var(--b-border); }
  .cl-entry { position: relative; padding: 12px 8px 12px 22px; border-bottom: 1px solid #eef1f3; }
  .cl-entry:last-child { border-bottom: none; }
  .cl-entry--unread::before { content: ""; position: absolute; left: 4px; top: 19px; width: 7px; height: 7px; border-radius: 50%; background: var(--b-blue); }
  .cl-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .cl-entry-title { font-weight: 600; font-size: 0.93rem; color: var(--b-navy); }
  .cl-entry:not(.cl-entry--unread):not(.cl-entry--major) .cl-entry-title { color: #4d6776; }
  .cl-entry-desc { font-size: 0.85rem; color: var(--b-muted); line-height: 1.5; margin-top: 3px; max-width: 60ch; }
  .cl-type { font-size: 0.68rem; font-weight: 600; border-radius: 5px; padding: 2px 7px; }
  .cl-type--nytt { background: #dcf3e4; color: #1e7a3c; }
  .cl-type--forbedret { background: #e3f0fa; color: #0b5d8f; }
  .cl-type--rettet { background: #fff1c2; color: #8a6100; }
  .cl-entry--major { background: #e6f3fa; border: 1px solid #b9dcf0; border-radius: 10px; padding: 14px 16px; margin: 4px 0 8px; }
  .cl-entry--major.cl-entry--unread::before { left: auto; right: 16px; top: 20px; }
  .cl-entry--major .cl-entry-title { font-size: 1rem; }
  .cl-entry--major .cl-entry-desc { color: #3d5a69; }
  .cl-entry--pinned { margin-top: 12px; }
  .changelog-dot.changelog-dot--major { width: 11px; height: 11px; background: var(--b-blue-lt); box-shadow: 0 0 0 2px var(--b-navy), 0 0 0 4px rgba(12,165,235,0.45); animation: cl-dot-pulse 2s ease-in-out 3; }
  @keyframes cl-dot-pulse { 50% { box-shadow: 0 0 0 2px var(--b-navy), 0 0 0 6px rgba(12,165,235,0.15); } }
  .cl-major-badge { display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: white; background: var(--b-blue); border-radius: 4px; padding: 3px 7px; margin-bottom: 8px; }
  .cl-action { border: none; background: none; padding: 0; margin-top: 7px; font-family: inherit; font-size: 0.84rem; font-weight: 600; color: var(--b-blue); cursor: pointer; }
  .cl-action:hover { text-decoration: underline; }
  .cl-action i { font-size: 0.72rem; }
  .changelog-empty { padding: 24px 0; text-align: center; color: var(--b-muted, #5b7a89); font-size: 0.88rem; }
  /* "Vis flere"-knappen for Endringslogg — listen ble fort lang etter en
     stor rekke oppdateringer på én gang, så bare de nyeste vises til å
     begynne med. */
  .changelog-more-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 0;
    background: none;
    border: none;
    color: var(--b-blue, #0084c9);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
  }
  .changelog-more-btn:hover { text-decoration: underline; }

  .tb-dropdown { position: relative; }
  .tb-dropdown-caret { font-size: 0.65rem; margin-left: 2px; }
  .tb-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 200;
    background: var(--b-navy);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 6px;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.35);
    min-width: 200px;
  }
  .tb-dropdown.open .tb-dropdown-menu { display: flex; }
  .tb-dropdown-menu .tb-btn {
    background: transparent;
    border-color: transparent;
    width: 100%;
    /* Grid i stedet for flex, slik at selve IKONET får en fast bredde-
       kolonne — uten dette startet teksten ved litt ulik x-posisjon fra
       rad til rad, siden ikonene (sky, blyant, bjelle, dør osv.) naturlig
       har ulik glyf-bredde. Tredje kolonne er kun i bruk av Endringslogg
       sin uleste-prikk; øvrige rader fyller den ganske enkelt ikke. */
    display: grid;
    grid-template-columns: 18px 1fr auto;
    align-items: center;
    gap: 10px;
    text-align: left;
  }
  .tb-dropdown-menu .tb-btn > i:first-child { justify-self: center; }
  .tb-dropdown-menu .tb-btn:hover { background: rgba(255,255,255,0.12); }
  .tb-dropdown-sep { height: 1px; background: rgba(255,255,255,0.12); margin: 4px 2px; }
  .tb-dropdown-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.4px; color: rgba(255,255,255,0.4); padding: 2px 10px 4px; }
  .cloud-pages-loading, .cloud-pages-empty {
    padding: 24px;
    text-align: center;
    color: var(--sw-muted, #64748b);
    font-size: 0.9rem;
  }
  .cloud-page-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 6px;
    border-bottom: 1px solid #eef1f3;
    cursor: pointer;
    transition: background 0.15s;
  }
  .cloud-page-row:hover { background: var(--clr-ilder, #f4f6f8); }
  .cloud-page-row-name { font-weight: 600; color: var(--sw-navy, #072f4a); }

  .cloud-page-row-meta { font-size: 0.76rem; color: var(--sw-muted, #64748b); margin-top: 2px; }

  .cloud-page-row-meta strong { color: var(--sw-navy, #072f4a); font-weight: 600; }
  /* Kolonne 2 ("Sist redigert") — avatar til venstre, navn+tidspunkt
     stablet til høyre, matcher en vanlig tabell-rad-oppdeling i stedet for
     at alt sto på én lang linje. */

  #export-issues-list { max-height: 340px; overflow-y: auto; }
  .export-issue-snippet { color: var(--sw-navy, #072f4a); font-style: italic; }
  #export-issues-notes { margin-top: 10px; font-size: 0.85rem; color: var(--sw-muted, #64748b); line-height: 1.5; }
  .cloud-pages-search {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #e2e8ec;
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: inherit;
    margin-bottom: 12px;
  }
  .template-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
  }

  /* Layout */
  .main { display: flex; flex: 1; min-height: 0; position: relative; }
  .sidebar {
    width: 260px;
    background: var(--b-panel);
    border-right: 1px solid var(--b-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-height: 0;
  }

  .add-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 0 12px 12px;
  }
  .add-btn {
    background: #f4f7f9;
    border: 1px solid var(--b-border);
    border-radius: 8px;
    padding: 8px 6px;
    font-size: 0.72rem;
    font-family: inherit;
    color: var(--b-text);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    text-align: center;
    line-height: 1.2;
  }

  .sb-panel {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  /* "Legg til seksjon" er meningsløst mens man ser den animerte
     forhåndsvisningen — man ser jo ikke resultatet av tillegget uansett
     før man bytter tilbake til Rediger. "Siden din" forblir alltid åpen. */
  #sb-panel-add.add-locked #add-grid {
    pointer-events: none;
    opacity: 0.4;
    filter: grayscale(60%);
  }

  .add-cat { border-bottom: 1px solid var(--b-border); }
  .add-cat:last-of-type { border-bottom: none; }
  .add-cat summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--b-muted);
    cursor: pointer;
    user-select: none;
    list-style: none;
  }
  .add-cat summary::-webkit-details-marker { display: none; }
  .add-cat summary i { font-size: 0.65rem; transition: transform 0.15s; color: var(--b-muted); }
  .add-cat[open] summary i { transform: rotate(90deg); }
  .add-cat-n { font-weight: 600; color: #9fb2bf; margin-left: 2px; }
  #lib-list .add-btn:focus-visible { outline: none; border-color: var(--b-blue); box-shadow: 0 0 0 3px rgba(0,132,201,0.15); }
  /* Forhåndsvisningskort ved hover (fase 11) */
  .lib-prev {
    position: fixed; z-index: 400; width: 376px; background: white; border-radius: 14px; overflow: visible;
    box-shadow: 0 16px 40px rgba(7,47,74,0.22), 0 0 0 1px rgba(7,47,74,0.06); pointer-events: none;
  }
  .lib-prev[hidden] { display: none; }
  .lib-prev::before {
    content: ""; position: absolute; left: -7px; top: var(--arrow-y, 50%); width: 14px; height: 14px;
    background: white; transform: translateY(-50%) rotate(45deg); box-shadow: -1px 1px 0 rgba(7,47,74,0.06);
  }
  .lib-prev-shot { position: relative; width: 376px; height: 220px; overflow: hidden; border-radius: 14px 14px 0 0; background: #f7f9fa; border-bottom: 1px solid var(--b-border); }
  /* Rendres i 1440px (over alle bruddpunkter i eksport-CSS-en, høyeste er
     max-width: 1430px) og skaleres til kortets 376px, så seksjonen får samme
     oppsett som på en vanlig skjerm — ikke mellomstørrelse-oppsettet (f.eks.
     toppseksjonen, som bare har to kolonner fra 1200px). 376/1440 = 0.26111. */
  .lib-prev-shot iframe { width: 1440px; height: 843px; border: 0; transform: scale(0.26111); transform-origin: 0 0; pointer-events: none; background: white; }
  .lib-prev-info { position: relative; padding: 12px 16px 14px; }
  .lib-prev-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .lib-prev-name { font-weight: 600; font-size: 0.95rem; color: var(--b-navy); }
  .lib-prev-cat { font-size: 0.7rem; font-weight: 600; color: var(--b-muted); background: var(--b-bg); border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
  .lib-prev-desc { font-size: 0.82rem; color: #3d5a69; margin-top: 3px; line-height: 1.45; }
  .lib-prev-hint { font-size: 0.74rem; color: var(--b-muted); margin-top: 8px; }
  .add-cat summary:hover { color: var(--b-navy); }
  #lib-list .add-grid { padding: 0 16px 14px; gap: 8px; }
  #lib-list .add-btn { padding: 10px 6px; font-size: 0.76rem; font-weight: 500; min-height: 64px; justify-content: center; }
  #lib-list .add-btn:disabled { opacity: 0.4; cursor: default; transform: none; }
  #lib-list .add-btn mark { background: #fff0c2; color: inherit; border-radius: 2px; padding: 0 1px; }
  .add-btn i { font-size: 0.9rem; color: var(--b-blue); }
  .add-btn:hover { border-color: var(--b-blue); background: #eaf5fc; transform: translateY(-1px); }

  /* Redesign fase 2: seksjonslisten er alltid synlig. Rad = håndtak +
     overskrift (hovedtekst) + seksjonstype (dempet). Valgt rad markeres med
     lys blå bakgrunn og en innvendig blå kant. Handlingsknappene vises kun
     ved hover (flyttes til verktøylinjen i forhåndsvisningen i fase 5). */
  .sb-head {
    padding: 16px 16px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--b-muted);
    flex-shrink: 0;
  }
  .section-list { padding: 0 8px 4px; }
  .sl-empty {
    color: var(--b-muted);
    font-size: 0.8rem;
    text-align: center;
    padding: 24px 12px;
    line-height: 1.6;
  }
  .sl-item {
    position: relative;
    border-radius: 8px;
    padding: 7px 8px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.12s;
  }
  .sl-item:hover { background: var(--b-bg); }
  .sl-item--selected, .sl-item--selected:hover { background: #e6f3fa; box-shadow: inset 0 0 0 1.5px var(--b-blue); }
  .sl-item--drop-target {
    background: #eaf5fc !important;
    box-shadow: inset 0 0 0 1.5px var(--b-blue), 0 -2px 0 var(--b-blue) !important;
  }
  .sl-grip { color: #a9b7c0; font-size: 0.72rem; width: 12px; text-align: center; flex-shrink: 0; cursor: grab; }
  .sl-item--footer { opacity: 0.55; cursor: default; margin-top: 4px; }
  /* Faste ID-er (Header, CTA, Footer): informasjon nederst i seksjonslisten. Admin får «Endre»; andre ser bare at ID-ene er låste. */
  .sl-fixedids { margin: 14px 4px 10px; padding: 10px 12px; border: 1px dashed var(--b-border); border-radius: 10px; background: #fafcfd; }
  .sl-fixedids .fi-head { display: flex; align-items: center; gap: 7px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--b-muted); margin-bottom: 6px; }
  .sl-fixedids .fi-head i { font-size: 0.68rem; }
  .sl-fixedids .fi-edit { margin-left: auto; background: none; border: 1px solid var(--b-border); border-radius: 6px; padding: 2px 9px; font: inherit; font-size: 0.72rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--b-blue); cursor: pointer; }
  .sl-fixedids .fi-edit:hover { background: #e6f3fa; }
  .sl-fixedids .fi-row { display: flex; align-items: baseline; gap: 8px; font-size: 0.78rem; padding: 2px 0; }
  .sl-fixedids .fi-label { color: var(--b-muted); flex: 1; min-width: 0; }
  .sl-fixedids code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.76rem; color: var(--b-navy); background: #eef3f6; border-radius: 5px; padding: 1px 6px; }
  .sl-fixedids .fi-row--absent code { background: none; color: var(--b-muted); font-family: inherit; font-style: italic; padding: 0; }
  .sl-fixedids .fi-tag { font-size: 0.66rem; font-weight: 600; color: #8a5a00; background: #fff1d6; border-radius: 99px; padding: 1px 7px; }
  .sl-fixedids .fi-note { margin-top: 6px; font-size: 0.72rem; line-height: 1.4; color: var(--b-muted); }
  .fi-box { width: min(480px, 100%); }
  .b-modal-box.fi-box { width: min(480px, 100%); }
  .fi-help { font-size: 0.82rem; line-height: 1.5; color: var(--b-muted); margin: 0 0 14px; }
  .fi-help code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.78rem; background: #eef3f6; border-radius: 5px; padding: 1px 5px; color: var(--b-navy); }
  .fi-fields { display: flex; flex-direction: column; gap: 12px; }
  .fi-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.84rem; font-weight: 600; color: var(--b-navy); }
  .fi-field input { font: inherit; font-weight: 500; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; padding: 8px 10px; border: 1px solid var(--b-border); border-radius: 8px; color: var(--b-navy); }
  .fi-field input:focus { outline: 2px solid var(--b-blue); outline-offset: 1px; }
  .fi-field input:disabled { background: #f3f6f8; color: var(--b-muted); }
  .fi-field small { font-weight: 400; font-size: 0.74rem; color: var(--b-muted); }
  /* Publiser til WordPress (bare admin) + status i «Åpne side»-listen */
  .b-modal-box.wp-box { width: min(660px, 100%); }
  .wp-status { font-size: 0.84rem; font-weight: 600; padding: 8px 12px; border-radius: 8px; background: #eef1f4; color: #4d5d6b; margin-bottom: 14px; }
  .wp-status--published { background: #e5f5ec; color: #12804a; }
  .wp-status--changed { background: #fff1d6; color: #8a5a00; }
  .wp-status--down { background: #f3f1f6; color: #5b4d6b; }
  .wp-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; font-size: 0.84rem; }
  .wp-label { font-weight: 600; color: var(--b-navy); }
  .wp-title { font-weight: 600; color: var(--b-navy); padding: 8px 10px; background: #f6f8fa; border: 1px solid var(--b-border); border-radius: 8px; }
  .wp-field small { font-size: 0.74rem; color: var(--b-muted); line-height: 1.4; }
  .wp-field small a { color: var(--b-blue); font-weight: 600; }
  .wp-slugrow { display: flex; align-items: center; gap: 2px; border: 1px solid var(--b-border); border-radius: 8px; padding: 0 10px; background: #fff; }
  .wp-slugrow:focus-within { outline: 2px solid var(--b-blue); outline-offset: 1px; }
  .wp-slugpre, .wp-slugpost { color: var(--b-muted); font-size: 0.8rem; white-space: nowrap; }
  .wp-slugrow input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; padding: 8px 2px; color: var(--b-navy); background: transparent; }
  .wp-slugrow input:read-only { color: var(--b-muted); }
  /* .b-modal-body textarea (JSON-dialogen, lenger ned) har lik spesifisitet og vant; derfor .b-modal-body foran */
  .b-modal-body .wp-field textarea { font: inherit; font-family: inherit; flex: none; height: 84px; min-height: 0; padding: 8px 10px; border: 1px solid var(--b-border); border-radius: 8px; resize: vertical; color: var(--b-navy); line-height: 1.45; }
  .wp-field textarea:focus { outline: 2px solid var(--b-blue); outline-offset: 1px; }
  .wp-imgrow { display: flex; gap: 12px; align-items: flex-start; }
  .wp-imgprev { flex: none; width: 128px; aspect-ratio: 16 / 9; border-radius: 8px; border: 1px solid var(--b-border); background: linear-gradient(135deg, #e6f4fb, #cfe4ef); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 0.7rem; color: var(--b-muted); text-align: center; padding: 4px; }
  .wp-imgprev img { width: 100%; height: 100%; object-fit: cover; display: block; margin: -4px; width: calc(100% + 8px); height: calc(100% + 8px); max-width: none; }
  .wp-imgctl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
  .b-modal-body .wp-imgctl input { font: inherit; width: 100%; padding: 8px 10px; border: 1px solid var(--b-border); border-radius: 8px; color: var(--b-navy); background: #fff; }
  .b-modal-body .wp-imgctl input:focus { outline: 2px solid var(--b-blue); outline-offset: 1px; }
  #wp-open { text-decoration: none; display: inline-flex; align-items: center; color: var(--b-navy); }
  #wp-open[hidden], #wp-unpublish[hidden] { display: none; } /* display:inline-flex over ville ellers overstyrt hidden-attributtet */
  /* Etter publisering: dialogen blir stående som en bekreftelse (ingen tidsavbrudd) med adressen, «Åpne siden» og «Kopier lenke».
     .wp-box--done settes av wpShowDone() og fjernes igjen når dialogen åpnes på vanlig måte (wpFillDialog). */
  .wp-box:not(.wp-box--done) .wp-done-only { display: none; }
  .wp-box--done #wp-form, .wp-box--done #wp-unpublish, .wp-box--done #wp-open, .wp-box--done #wp-publish { display: none; }
  .wp-box--done #wp-done-open { text-decoration: none; display: inline-flex; align-items: center; } /* bare i bekreftelsen: en ID-regel med display ville ellers vist knappen i den vanlige dialogen også */
  .wp-done .wp-status[hidden] { display: none; }
  #wp-done-url { font: inherit; font-size: 0.86rem; padding: 8px 10px; border: 1px solid var(--b-border); border-radius: 8px; color: var(--b-navy); background: #f7f9fb; width: 100%; box-sizing: border-box; }
  #wp-done-url:focus { outline: 2px solid var(--b-blue); outline-offset: 1px; }
  .wp-check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--b-border); border-radius: 8px; background: #f6f8fa; font-size: 0.86rem; color: var(--b-navy); cursor: pointer; }
  /* «Vis på oversiktssiden» som bryter (samme avkrysningsboks under, så tastatur og skjermleser virker som før) */
  .wp-check input { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 38px; height: 22px; margin: 1px 0 0; border-radius: 999px; background: #c3ced6; cursor: pointer; transition: background .15s; }
  .wp-check input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(7,47,74,.3); transition: transform .15s; }
  .wp-check input:checked { background: var(--b-blue); }
  .wp-check input:checked::after { transform: translateX(16px); }
  .wp-check input:focus-visible { outline: 2px solid var(--b-blue); outline-offset: 2px; }
  @media (prefers-reduced-motion: reduce) { .wp-check input, .wp-check input::after { transition: none; } }
  .wp-check small { display: block; margin-top: 2px; font-size: 0.74rem; color: var(--b-muted); line-height: 1.4; }
  #wp-card-fields[hidden] { display: none; }
  .op-wp { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; font-size: 0.68rem; font-weight: 600; line-height: 1.5; vertical-align: 1px; text-decoration: none; white-space: nowrap; }
  .op-wp--published { background: #e5f5ec; color: #12804a; }
  .op-wp--changed { background: #fff1d6; color: #8a5a00; }
  .op-wp--down { background: #eef1f4; color: #5a6b7a; }
  a.op-wp:hover { filter: brightness(0.95); text-decoration: underline; }
  .sl-item--footer:hover { opacity: 0.8; }
  .sl-item--footer .sl-grip { cursor: default; }
  .sl-item--footer.sl-item--hidden { opacity: 0.4; }
  .sl-name { flex: 1; min-width: 0; line-height: 1.3; }
  .sl-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--b-navy);
  }
  .sl-type { display: block; font-size: 0.72rem; color: var(--b-muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sl-actions { display: none; gap: 1px; flex-shrink: 0; }
  .sl-item:focus-within .sl-actions { display: flex; }
  .sl-item:hover .sl-actions { display: flex; }
  .sb-add-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin: 12px 16px 16px; height: 40px;
    border: 1.5px dashed var(--b-blue); border-radius: 8px;
    background: transparent; color: var(--b-blue);
    font-family: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer;
    flex-shrink: 0;
  }
  .sb-add-btn:hover { background: #eaf5fc; }
  /* Seksjonsbiblioteket: eget 340px-panel mellom sidepanel og canvas */
  .add-panel {
    display: none;
    width: 340px;
    flex-shrink: 0;
    flex-direction: column;
    min-height: 0;
    background: var(--b-panel);
    border-right: 1px solid var(--b-border);
  }
  .add-panel.open { display: flex; }
  .add-panel-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; flex-shrink: 0;
    font-weight: 600; font-size: 0.95rem; color: var(--b-navy);
    border-bottom: 1px solid var(--b-border);
  }
  .add-panel-head button {
    border: none; background: none; cursor: pointer; color: var(--b-muted);
    width: 30px; height: 30px; border-radius: 6px; font-size: 1rem;
  }
  .add-panel-head button:hover { background: var(--b-bg); color: var(--b-navy); }
  /* Redesign fase 7: «Åpne side» (Team-sider) */
  .op-box { overflow: hidden; }
  .op-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 12px; }
  .op-title { font-size: 1.15rem; font-weight: 600; color: var(--b-navy); flex: 1; }
  .op-esc { font-size: 0.78rem; color: var(--b-muted); display: inline-flex; align-items: center; gap: 6px; }
  .op-esc kbd { font-family: inherit; font-size: 0.72rem; border: 1px solid var(--b-border); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: white; color: var(--b-navy); }
  .op-close { border: none; background: none; cursor: pointer; color: var(--b-navy); width: 30px; height: 30px; border-radius: 6px; font-size: 1rem; }
  .op-close:hover { background: var(--b-bg); }
  .op-toolbar { display: flex; gap: 10px; align-items: center; padding: 0 22px 16px; border-bottom: 1px solid var(--b-border); }
  .op-search { position: relative; flex: 1; }
  .op-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--b-muted); font-size: 0.85rem; }
  .op-search input {
    width: 100%; height: 40px; box-sizing: border-box; padding: 0 12px 0 36px;
    border: 1.5px solid var(--b-border); border-radius: 8px; font-family: inherit; font-size: 0.9rem; color: var(--b-navy); outline: none;
  }
  .op-search input:focus { border-color: var(--b-blue); box-shadow: 0 0 0 3px rgba(0,132,201,0.12); }
  .op-seg { display: flex; gap: 2px; background: var(--b-bg); border-radius: 9px; padding: 3px; flex-shrink: 0; }
  .op-seg button { border: none; background: transparent; border-radius: 7px; padding: 0 12px; height: 34px; font-family: inherit; font-size: 0.84rem; font-weight: 500; color: var(--b-muted); cursor: pointer; white-space: nowrap; }
  .op-seg button.active { background: white; color: var(--b-navy); font-weight: 600; box-shadow: 0 1px 3px rgba(7,47,74,0.12); }
  .op-seg-n { font-weight: 400; color: var(--b-muted); margin-left: 2px; }
  .op-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 12px; }
  /* Radmenyen (Lag kopi, Gi nytt navn, Tidligere versjoner, Arkiver) åpner nedover og ble klippet av bunnen når listen hadde
     få rader (1–3 sider). Minstehøyden rommer hele menyen under den første raden. Bare side-listen, ikke versjoner/arkiv. */
  .op-box:not(.op-sub) .op-list { min-height: 270px; }
  .op-group { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--b-muted); padding: 14px 10px 6px; }
  .op-row {
    position: relative; display: flex; align-items: center; gap: 12px;
    padding: 9px 10px; border-radius: 10px; cursor: pointer; outline: none;
  }
  .op-row:hover, .op-row:focus, .op-row:focus-within, .op-row.menu-open { background: var(--b-bg); }
  .op-row:focus-visible { box-shadow: inset 0 0 0 1.5px var(--b-blue); }
  .op-row--open, .op-row--open:hover { background: #e6f3fa; }
  .op-avatar {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px;
    background: var(--b-bg); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem;
  }
  .op-avatar { background: none !important; }

  .op-main { flex: 1; min-width: 0; }
  .op-name { font-size: 0.92rem; font-weight: 600; color: var(--b-navy); display: flex; align-items: center; gap: 6px; min-width: 0; }
  .op-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .op-lock { color: var(--b-muted); font-size: 0.75rem; }
  /* Fase 16b: tidspunktet i metalinjen har nøyaktig tid som verktøytips */
  .op-when { cursor: default; }
  .op-when:hover { text-decoration: underline dotted; text-underline-offset: 2px; }
  .op-open-badge { font-size: 0.68rem; font-weight: 700; color: var(--b-blue); background: white; border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
  .op-meta { font-size: 0.78rem; color: var(--b-muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .op-count { font-size: 0.8rem; color: var(--b-muted); white-space: nowrap; flex-shrink: 0; }
  .op-actions { display: none; align-items: center; gap: 6px; flex-shrink: 0; }
  .op-row:hover .op-count, .op-row:focus .op-count, .op-row:focus-within .op-count, .op-row.menu-open .op-count { display: none; }
  .op-row:hover .op-actions, .op-row:focus .op-actions, .op-row:focus-within .op-actions, .op-row.menu-open .op-actions { display: flex; }
  .op-btn { width: 32px; height: 32px; border: 1px solid var(--b-border); background: white; color: var(--b-navy); border-radius: 7px; cursor: pointer; font-size: 0.85rem; }
  .op-btn:hover { border-color: #b9c6ce; }
  .op-open-btn { height: 32px; padding: 0 14px; border: none; background: var(--b-blue); color: white; border-radius: 7px; font-family: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer; }
  .op-open-btn:hover { background: var(--b-blue-lt); }
  .op-more { position: relative; }
  .op-more--up .op-menu { top: auto; bottom: calc(100% + 6px); }
  .op-menu {
    display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 10; min-width: 210px;
    background: white; border: 1px solid var(--b-border); border-radius: 10px; padding: 5px; box-shadow: 0 10px 28px rgba(7,47,74,0.16);
  }
  .op-more.open .op-menu { display: block; }
  .op-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%; border: none; background: none; text-align: left;
    padding: 8px 10px; border-radius: 7px; font-family: inherit; font-size: 0.86rem; color: var(--b-navy); cursor: pointer; white-space: nowrap;
  }
  .op-menu button i { width: 16px; text-align: center; color: var(--b-muted); }
  .op-menu button:hover:not(:disabled) { background: var(--b-bg); }
  .op-menu button.op-danger:hover:not(:disabled) { background: #fde8e8; color: #c0392b; }
  .op-menu button.op-danger:hover:not(:disabled) i { color: #c0392b; }
  .op-menu button:disabled { color: #a9b7c0; cursor: default; }
  .op-menu button:disabled i { color: #c5d0d6; }
  .op-menu-note { margin-left: auto; font-size: 0.76rem; color: #a9b7c0; }
  .op-menu-sep { height: 1px; background: var(--b-border); margin: 5px 4px; }
  .op-show-older { display: inline-flex; align-items: center; gap: 8px; margin: 10px 10px 4px; border: none; background: none; color: var(--b-blue); font-family: inherit; font-size: 0.84rem; font-weight: 500; cursor: pointer; padding: 0; }
  .op-show-older:hover { text-decoration: underline; }
  .op-row--busy { cursor: progress; }
  /* Versjonshistorikk og papirkurv (undervisninger i «Åpne side») */
  .op-box.op-sub .op-toolbar { display: none; }
  .op-subhead { display: flex; align-items: center; gap: 12px; padding: 6px 10px 4px; }
  .op-back { border: none; background: var(--b-bg); color: var(--b-navy); border-radius: 7px; height: 30px; padding: 0 12px; font-family: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
  .op-back:hover { background: #e2e8ec; }
  .op-subtitle { font-size: 0.95rem; font-weight: 600; color: var(--b-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .op-subhelp { font-size: 0.8rem; color: var(--b-muted); padding: 4px 10px 10px; line-height: 1.45; }
  .op-row--static { cursor: default; }
  .op-row--static .op-actions { display: flex; }
  .op-row--static .op-count { display: inline; margin-right: 6px; }
  .op-hist-ic { color: var(--b-muted); font-size: 0.95rem; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--b-bg); }
  .op-btn--text { width: auto; padding: 0 12px; font-family: inherit; font-size: 0.82rem; font-weight: 500; color: #c0392b; }
  .op-btn--text:hover { background: #fde8e8; border-color: #f5c2c2; }
  .op-foot-text { flex: 1; }
  .op-trash-link { border: none; background: none; color: var(--b-muted); font-family: inherit; font-size: 0.8rem; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; padding: 4px 8px; }
  .op-trash-link:hover { background: #e9eef1; color: var(--b-navy); }
  .op-trash-link[hidden] { display: none; }
  .op-row--busy .op-actions, .op-row--busy .op-count,
  .op-row--renaming .op-actions, .op-row--renaming .op-count { display: none !important; }
  .op-busy { color: var(--b-blue); font-size: 1rem; flex-shrink: 0; padding: 0 8px; }
  .op-rename { display: flex; align-items: center; gap: 6px; }
  .op-rename-input {
    flex: 1; min-width: 0; height: 32px; box-sizing: border-box; padding: 0 10px;
    border: 1.5px solid var(--b-blue); border-radius: 7px; font-family: inherit; font-size: 0.9rem; font-weight: 600;
    color: var(--b-navy); outline: none; box-shadow: 0 0 0 3px rgba(0,132,201,0.12);
  }
  .op-rename-input:disabled { background: #f7f9fa; color: var(--b-muted); }
  .op-rename-save {
    height: 32px; padding: 0 14px; border: none; border-radius: 7px; background: var(--b-blue); color: white;
    font-family: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 6px;
  }
  .op-rename-save:disabled { opacity: 0.7; cursor: progress; }
  .op-rename-cancel { width: 32px; height: 32px; border: none; background: none; color: var(--b-muted); border-radius: 7px; cursor: pointer; }
  .op-rename-cancel:hover { background: #e2e8ec; color: var(--b-navy); }
  .op-foot { display: flex; align-items: center; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--b-border); background: #f7f9fa; font-size: 0.8rem; color: var(--b-muted); flex-shrink: 0; }
  /* Redesign fase 13: første gang / tom side */
  .tb-disabled { opacity: 0.4; pointer-events: none; }
  .empty-start { position: absolute; inset: 0; z-index: 15; background: #d5dde2; display: flex; align-items: center; justify-content: center; padding: 24px; overflow: auto; }
  .empty-start[hidden] { display: none; }
  .es-inner { width: 100%; max-width: 1024px; text-align: center; }
  .es-h { font-size: 1.75rem; font-weight: 700; color: var(--b-navy); margin: 0 0 6px; }
  .es-sub { color: var(--b-muted); margin: 0 0 26px; font-size: 0.95rem; }
  .es-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: left; }
  .es-card { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 8px 8px 16px; background: white; border: 2px solid transparent; border-radius: 12px; cursor: pointer; font-family: inherit; text-align: left; box-shadow: 0 1px 3px rgba(7,47,74,0.06); transition: border-color 0.15s, box-shadow 0.15s; }
  .es-card:hover, .es-card--selected { border-color: var(--b-blue); box-shadow: 0 8px 24px rgba(7,47,74,0.12); }
  .es-card:focus-visible { outline: none; border-color: var(--b-blue); }
  .es-thumb { display: block; height: 142px; border-radius: 8px; position: relative; overflow: hidden; }
  .es-thumb--standard { background: #0b4a6f; padding: 36px 18px; box-sizing: border-box; }
  .es-thumb--standard i { display: block; height: 7px; border-radius: 4px; background: white; margin-bottom: 10px; }
  .es-thumb--standard i:nth-child(1) { width: 34%; background: #7cd3fd; height: 5px; }
  .es-thumb--standard i:nth-child(2) { width: 68%; }
  .es-thumb--standard i:nth-child(3) { width: 50%; }
  .es-thumb--standard b { display: block; width: 26%; height: 14px; border-radius: 4px; background: var(--b-blue-lt); margin-top: 16px; }
  .es-thumb--tpl { background: var(--b-bg); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; box-sizing: border-box; }
  .es-tpl { background: white; border-radius: 6px; padding: 8px 9px; display: flex; flex-direction: column; justify-content: center; gap: 3px; overflow: hidden; }
  .es-tpl b { font-size: 0.72rem; color: var(--b-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .es-tpl small { font-size: 0.64rem; color: var(--b-muted); }
  .es-tpl--ph { background: rgba(255,255,255,0.6); }
  .es-tpl--more { align-items: center; font-size: 0.72rem; color: var(--b-muted); }
  .es-thumb--blank { border: 1.5px dashed #b9c6ce; display: flex; align-items: center; justify-content: center; color: #9fb2bf; font-size: 1.4rem; box-sizing: border-box; }
  .es-thumb--open { background: var(--b-bg); display: flex; align-items: center; justify-content: center; color: var(--b-blue); font-size: 1.6rem; box-sizing: border-box; }
  .es-body { display: flex; flex-direction: column; gap: 4px; padding: 0 8px; }
  .es-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 0.98rem; color: var(--b-navy); }
  .es-desc { font-size: 0.84rem; color: var(--b-muted); line-height: 1.45; }
  .es-links { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 24px; font-size: 0.86rem; color: var(--b-muted); }
  .es-links button { border: none; background: none; padding: 0; font-family: inherit; font-size: inherit; font-weight: 600; color: var(--b-blue); cursor: pointer; }
  .es-links button:hover { text-decoration: underline; }
  .es-links i { margin-right: 4px; color: var(--b-blue); }
  .es-links-sep { width: 1px; height: 14px; background: #b9c6ce; }
  @media (max-width: 1100px) { .es-cards { grid-template-columns: 1fr; } .es-thumb { height: 110px; } }
  /* Redesign fase 5: engangstips over forhåndsvisningen */
  .edit-tip {
    position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 20;
    display: flex; align-items: center; gap: 10px; max-width: calc(100% - 40px);
    background: var(--b-navy); color: white; font-size: 0.82rem; line-height: 1.4;
    padding: 10px 12px 10px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(7,47,74,0.3);
  }
  .edit-tip[hidden] { display: none; }
  .edit-tip i { color: #f5b041; }
  .edit-tip button { border: none; background: rgba(255,255,255,0.16); color: white; font-family: inherit; font-weight: 600; font-size: 0.78rem; border-radius: 6px; padding: 5px 10px; cursor: pointer; flex-shrink: 0; }
  .edit-tip button:hover { background: rgba(255,255,255,0.26); }
  /* Redesign fase 4: Design-panel til høyre (Skrift + Maler) */
  #btn-design.active { background: white; color: var(--b-navy); border-color: white; }
  .design-panel {
    display: none; width: 400px; flex-shrink: 0; flex-direction: column; min-height: 0;
    background: var(--b-panel); border-left: 1px solid var(--b-border);
  }
  .design-panel.open { display: flex; }
  @media (max-width: 1439px) {
    .design-panel { position: absolute; top: 0; right: 0; bottom: 0; z-index: 50; box-shadow: -12px 0 32px rgba(7,47,74,0.14); }
  }
  .dp-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; font-weight: 600; font-size: 1rem; color: var(--b-navy); }
  .dp-head button { border: none; background: none; cursor: pointer; color: var(--b-muted); width: 30px; height: 30px; border-radius: 6px; font-size: 1rem; }
  .dp-head button:hover { background: var(--b-bg); color: var(--b-navy); }
  .dp-tabs { display: flex; gap: 20px; padding: 0 18px; border-bottom: 1px solid var(--b-border); flex-shrink: 0; }
  .dp-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 10px 0; font-family: inherit; font-size: 0.86rem; font-weight: 600; color: var(--b-muted); cursor: pointer; }
  .dp-tab.active { color: var(--b-navy); border-bottom-color: var(--b-blue); }
  .dp-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 12px 16px; }
  .dp-body[hidden], .dp-foot[hidden] { display: none; }
  .dp-hint { font-size: 0.8rem; color: var(--b-muted); line-height: 1.5; padding: 0 6px 12px; }
  .dpt-field { display: block; padding: 0 6px 12px; }
  .dpt-field > span { display: block; font-size: 13px; font-weight: 600; color: #072f4a; margin-bottom: 6px; }
  .dpt-field > input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1.5px solid #dfe3e6; border-radius: 8px; font: inherit; font-size: 0.88rem; }
  .dpt-field > input:focus { outline: none; border-color: #0084c9; }
  .dpt-err { font-size: 0.78rem; color: #b42318; padding: 0 6px 12px; margin-top: -6px; }
  .dpt-h { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #5b7a89; padding: 0 6px 8px; }
  .dpt-h--sm { padding-top: 6px; }
  .dpt-sep { height: 1px; background: var(--b-border); margin: 10px 6px 16px; }
  .dpt-field > textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1.5px solid #dfe3e6; border-radius: 8px; font: inherit; font-size: 0.88rem; resize: vertical; }
  .dpt-field > textarea:focus { outline: none; border-color: #0084c9; }
  .dpt-count { font-size: 0.75rem; color: var(--b-muted); padding: 0 6px 10px; margin-top: -6px; }
  .dpt-links { font-size: 0.8rem; padding: 0 6px 8px; margin-top: -6px; }
  .dpt-links a { color: #0084c9; }
  .dpt-prev { margin: 4px 6px 14px; border: 1px solid #dfe3e6; border-radius: 8px; overflow: hidden; background: #fff; }
  .dpt-prev-img { aspect-ratio: 1.91 / 1; background: #eef2f4; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; color: #5b7a89; overflow: hidden; }
  .dpt-prev-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .dpt-prev-body { padding: 8px 10px 10px; background: #f3f6f8; }
  .dpt-prev-dom { font-size: 10.5px; letter-spacing: 0.04em; color: #5b7a89; }
  .dpt-prev-title { font-size: 0.92rem; font-weight: 600; color: #072f4a; line-height: 1.3; margin-top: 2px; overflow-wrap: anywhere; }
  .dpt-prev-desc { font-size: 0.8rem; color: #5b7a89; margin-top: 2px; overflow-wrap: anywhere; }
  .dpt-portal { padding: 0 6px 8px; }
  .dpt-portal .dp-hint { padding-left: 0; padding-right: 0; }
  .dpt-copyrow { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
  .dpt-copyrow > span { flex: 0 0 38px; font-size: 0.78rem; color: #5b7a89; }
  .dpt-copyrow > input { flex: 1 1 auto; min-width: 0; padding: 7px 9px; border: 1.5px solid #dfe3e6; border-radius: 7px; font: inherit; font-size: 0.8rem; background: #f8fafb; }
  .dpt-copyrow > button { flex: 0 0 auto; padding: 7px 12px; border: 1.5px solid #0084c9; border-radius: 7px; background: #fff; color: #0084c9; font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
  /* ── Ikoner-fanen i Design-panelet (redesign 15c) ── */
  #dp-body-icons { padding: 18px 20px 20px; display: flex; flex-direction: column; }
  #dp-body-icons[hidden] { display: none; }
  .dpi-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #5b7a89; margin-bottom: 14px; }
  .dpi-h { font-size: 13px; font-weight: 600; color: #072f4a; margin-bottom: 8px; }
  .dpi-seg { display: flex; gap: 4px; padding: 4px; background: #f3f6f8; border-radius: 9px; }
  .dpi-seg-btn { flex: 1 1 0; min-width: 0; height: 44px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 11.5px; font-weight: 600; color: #5b7a89; cursor: pointer; padding: 0 2px; }
  .dpi-seg-btn:hover { color: #072f4a; }
  .dpi-seg-btn.active { background: #fff; color: #072f4a; box-shadow: 0 1px 3px rgba(7, 47, 74, 0.15); }
  .dpi-seg-btn:focus-visible { outline: 2px solid #0084c9; outline-offset: 1px; }
  .dpi-hint { font-size: 12px; color: #5b7a89; line-height: 1.45; margin: 8px 2px 14px; }
  .dpi-preview { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; background: #f3f6f8; border-radius: 10px; min-height: 60px; box-sizing: border-box; }
  .dpi-circle { width: 36px; height: 36px; border-radius: 50%; background: #e6f3fa; color: #0084c9; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
  .dpi-info { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #dde3e8; font-size: 12.5px; line-height: 1.45; color: #3d5d6d; }
  .dpi-info[hidden] { display: none; }
  .dpi-info > i { color: #0084c9; margin-top: 2px; }
  .dpi-link { background: none; border: 0; padding: 0; font: inherit; color: #0084c9; text-decoration: underline; cursor: pointer; }
  .dpi-list { margin-top: 12px; border: 1px solid #dde3e8; border-radius: 10px; overflow: hidden; }
  .dpi-list[hidden] { display: none; }
  .dpi-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #eef1f3; font-size: 12.5px; color: #3d5d6d; }
  .dpi-row .dpi-circle { width: 28px; height: 28px; font-size: 12px; }
  .dpi-row-name { flex: 1; min-width: 0; font: 11.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #5b7a89; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dpi-row-n { font-size: 11.5px; color: #5b7a89; }
  .dpi-reset { display: block; width: 100%; height: 40px; border: 0; background: #f7f9fa; font: inherit; font-size: 13px; font-weight: 600; color: #0084c9; cursor: pointer; }
  .dpi-reset:hover { background: #eaf5fc; }
  .dp-foot { padding: 12px 16px; border-top: 1px solid var(--b-border); flex-shrink: 0; }
  .dp-save-tpl {
    width: 100%; height: 40px; border: 1px solid var(--b-border); border-radius: 8px; background: white;
    font-family: inherit; font-size: 0.86rem; font-weight: 600; color: var(--b-navy); cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
  }
  .dp-save-tpl:hover { background: var(--b-bg); }
  .dp-use-btn {
    border: none; background: var(--b-blue); color: white; border-radius: 6px;
    padding: 5px 12px; font-family: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  }
  .dp-use-btn:hover { background: var(--b-blue-lt); }
  /* Skrift-kort */
  .dp-font-card { border: 1.5px solid transparent; border-radius: 10px; padding: 12px 14px; cursor: pointer; margin-bottom: 4px; transition: background 0.12s; }
  .dp-font-card:hover { background: var(--b-bg); }
  .dp-font-card.active { border-color: var(--b-blue); background: #f3f9fd; cursor: default; }
  .dp-font-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
  .dp-font-name { font-size: 0.76rem; font-weight: 600; color: var(--b-navy); }
  .dp-font-card.active .dp-font-name { color: var(--b-blue); }
  .dp-font-card .dp-use-btn { opacity: 0; transition: opacity 0.12s; }
  .dp-font-card:hover .dp-use-btn { opacity: 1; }
  .dp-font-heading { font-size: 22px; font-weight: 600; color: var(--b-navy); line-height: 1.25; margin: 4px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dp-font-mood { font-size: 0.84rem; color: #3d5a69; line-height: 1.4; }
  .dp-font-pair { font-size: 0.7rem; color: var(--b-muted); margin-top: 6px; }
  /* Maler-kort */
  .design-panel .template-category-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px 12px; }
  .dp-tpl-card { border-radius: 10px; padding: 12px 14px; margin-bottom: 6px; }
  .dp-tpl-card:hover { background: var(--b-bg); }
  .dp-tpl-card--builtin { background: var(--b-bg); }
  .dp-tpl-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .dp-tpl-text { min-width: 0; }
  .dp-tpl-name { font-weight: 600; font-size: 0.92rem; color: var(--b-navy); }
  .dp-tpl-meta { font-size: 0.76rem; color: var(--b-muted); margin-top: 2px; }
  .dp-tpl-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
  .dp-tpl-card:not(.dp-tpl-card--builtin) .dp-use-btn { opacity: 0; transition: opacity 0.12s; }
  .dp-tpl-card:not(.dp-tpl-card--builtin):hover .dp-use-btn { opacity: 1; }
  .dp-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
  .dp-tag { font-size: 0.72rem; color: var(--b-navy); background: white; border: 1px solid var(--b-border); border-radius: 5px; padding: 2px 7px; }
  .dp-more { position: relative; }
  .dp-more-btn { border: none; background: none; cursor: pointer; color: var(--b-muted); width: 28px; height: 28px; border-radius: 6px; }
  .dp-more-btn:hover { background: #e2e8ec; color: var(--b-navy); }
  .dp-more-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; min-width: 160px;
    background: white; border: 1px solid var(--b-border); border-radius: 8px; padding: 4px; box-shadow: 0 8px 24px rgba(7,47,74,0.14);
  }
  .dp-more.open .dp-more-menu { display: block; }
  .dp-more-menu button {
    display: flex; align-items: center; gap: 8px; width: 100%; border: none; background: none; text-align: left;
    padding: 7px 10px; border-radius: 6px; font-family: inherit; font-size: 0.82rem; color: var(--b-navy); cursor: pointer;
  }
  .dp-more-menu button:hover { background: var(--b-bg); }
  .dp-more-menu button.danger:hover { background: #fde8e8; color: #c0392b; }
  /* Redesign fase 3: innholdet i biblioteket */
  .lib-top { position: sticky; top: 0; z-index: 2; background: var(--b-panel); padding: 14px 16px 12px; border-bottom: 1px solid var(--b-border); }
  .lib-search { position: relative; }
  .lib-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--b-muted); font-size: 0.85rem; }
  .lib-search input {
    width: 100%; height: 38px; box-sizing: border-box;
    padding: 0 12px 0 34px; border: 1.5px solid var(--b-border); border-radius: 8px;
    font-family: inherit; font-size: 0.88rem; color: var(--b-navy); outline: none;
  }
  .lib-search input:focus { border-color: var(--b-blue); box-shadow: 0 0 0 3px rgba(0,132,201,0.12); }

  .lib-chip {
    border: none; background: var(--b-bg); color: var(--b-navy);
    border-radius: 99px; padding: 5px 12px; font-family: inherit; font-size: 0.78rem; font-weight: 500; cursor: pointer;
  }
  .lib-chip:hover { background: #e2e8ec; }
  .lib-chip.active { background: var(--b-navy); color: white; }
  .lib-count { padding: 12px 16px 4px; font-size: 0.74rem; color: var(--b-muted); }
  .lib-list { padding: 0 8px 12px; display: flex; flex-direction: column; gap: 2px; }
  .lib-empty { padding: 24px 16px; text-align: center; color: var(--b-muted); font-size: 0.82rem; }

  /* Miniatyr-skisser (88x56) */

  .sl-actions button {
    background: none;
    border: none;
    color: var(--b-muted);
    cursor: pointer;
    font-size: 0.72rem;
    padding: 4px 5px;
    border-radius: 5px;
  }
  .sl-actions button:hover { background: #e5ecf0; color: var(--b-navy); }
  .sl-actions button.danger:hover { color: #c0392b; background: #fde8e8; }

  /* Preview */
  .preview-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .dev-toggle { display: flex; gap: 4px; }
  .dev-toggle button {
    background: white;
    border: 1px solid var(--b-border);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-family: inherit;
    cursor: pointer;
    color: var(--b-muted);
  }
  .dev-toggle button.active { background: var(--b-navy); color: white; border-color: var(--b-navy); }
  .preview-area {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    background: #d5dde2;
    overflow: hidden;
    padding: 24px 28px 0;
    min-height: 0;
  }
  /* Redesign fase 15: arket med nettleserlinje rundt forhåndsvisningen */
  .canvas-sheet {
    flex: 1 1 auto; min-width: 0; max-width: 100%;
    display: flex; flex-direction: column;
    background: white; border-radius: 10px 10px 0 0; overflow: hidden;
    box-shadow: 0 0 0 1px rgba(7,47,74,.08), 0 8px 28px rgba(7,47,74,.14);
    transition: flex-basis 0.25s ease;
  }
  .canvas-sheet.mobile { flex: 0 0 390px; border-radius: 10px; margin-bottom: 24px; }
  .canvas-bar {
    height: 30px; flex-shrink: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    padding: 0 12px; background: #f3f6f8; border-bottom: 1px solid #e3e8ec; font-size: 0.72rem; color: #7b929f;
  }
  .cb-dots { display: flex; gap: 6px; }
  .cb-dots i { width: 8px; height: 8px; border-radius: 50%; background: #d0d8de; }
  .cb-url { justify-self: center; display: inline-flex; align-items: center; gap: 6px; background: white; border: 1px solid #e3e8ec; border-radius: 6px; padding: 3px 12px; color: #4d6776; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .cb-url i { font-size: 0.62rem; color: #9fb2bf; }
  .cb-width { justify-self: end; font-variant-numeric: tabular-nums; }
  .canvas-sheet.mobile .cb-dots { display: none; }
  .canvas-sheet.mobile .canvas-bar { grid-template-columns: 1fr auto; }
  .canvas-sheet.mobile .cb-url { justify-self: start; }
  .canvas-sheet #preview, .canvas-sheet #preview.mobile { flex: 1; width: 100%; height: auto; min-height: 0; margin: 0; border-radius: 0; box-shadow: none; }
  #preview {
    border: none;
    width: 100%;
    height: 100%;
    background: white;
    transition: width 0.25s ease, opacity 0.15s ease;
  }
  #preview.mobile {
    width: 390px;
    margin: 16px 0;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
    height: calc(100% - 32px);
  }

  /* Modal (JSON-redigering) */
  .b-modal {
    position: fixed;
    inset: 0;
    background: rgba(7,47,74,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
  }
  .b-modal.visible { display: flex; }
  .b-modal-box {
    background: white;
    border-radius: 14px;
    width: min(760px, 100%);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  }
  .b-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--b-border);
    font-weight: 600;
    font-size: 0.9rem;
  }
  .b-modal-head button {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--b-muted);
  }
  .b-modal-body { padding: 14px 18px; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
  .b-modal-body textarea {
    flex: 1;
    min-height: 320px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.5;
    border: 1px solid var(--b-border);
    border-radius: 8px;
    padding: 12px;
    resize: vertical;
    color: var(--b-navy);
  }
  .b-modal-body .hint { font-size: 0.72rem; color: var(--b-muted); }
  .b-modal-foot {
    padding: 12px 18px;
    border-top: 1px solid var(--b-border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }
  .b-btn {
    border-radius: 8px;
    border: 1px solid var(--b-border);
    background: white;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
  }
  .b-btn--primary { background: var(--b-blue); border-color: var(--b-blue); color: white; }
  .b-btn--primary:hover { background: var(--b-blue-lt); }
  .json-error { color: #c0392b; font-size: 0.75rem; display: none; }
  /* ── Modulbibliotek (fase 19) ── */
  /* Modulikonets STANDARD (samme som .feature-icon i eksporten: --clr-blue-600
     på en lys blå gradient). Brukes overalt et modulikon vises i editoren, så
     det ser likt ut i skjema, liste, velger og forhåndsvisning. */
  :root { --mod-icon-fg: #0084c9; --mod-icon-bg: linear-gradient(135deg, rgba(0, 132, 201, 0.12), rgba(12, 165, 235, 0.07)); }
  .ml-view { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; background: #f3f5f7; font-family: inherit; }
  .ml-view[hidden] { display: none; }
  .ml-top { display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 20px; background: #06202f; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.08); flex-shrink: 0; }
  .ml-back { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.14); border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 0.82rem; cursor: pointer; }
  .ml-back:hover { background: rgba(255,255,255,0.16); }
  .ml-title { font-weight: 600; font-size: 0.95rem; flex: 1; }
  .ml-status { font-size: 0.78rem; color: rgba(255,255,255,0.75); display: inline-flex; align-items: center; gap: 6px; }
  .ml-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.8; }
  .ml-status[data-state="idle"]::before { display: none; }
  .ml-status[data-state="saved"] { color: #8de8ac; }
  .ml-status[data-state="saving"], .ml-status[data-state="dirty"] { color: #ffd479; }
  .ml-status[data-state="error"] { color: #ff9c8f; }
  .ml-banner { padding: 10px 20px; background: #fff4db; color: #6b4e00; border-bottom: 1px solid #f0dfae; font-size: 0.82rem; flex-shrink: 0; }
  .ml-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
  .ml-side { display: flex; flex-direction: column; min-height: 0; background: #fff; border-right: 1px solid var(--b-border); }
  .ml-side-head { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-bottom: 1px solid var(--b-border); }
  .ml-new { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; border-radius: 8px; border: 1px solid #00679f; background: #00679f; color: #fff; font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
  .ml-new:hover:not(:disabled) { background: #005a8b; }
  .ml-new:disabled { background: #e2e8ec; border-color: #e2e8ec; color: #4a5b67; cursor: not-allowed; }
  .ml-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 16px; }
  .ml-group { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--b-muted); padding: 14px 8px 6px; border-radius: 6px; }
  .ml-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; font-size: 0.86rem; color: var(--b-navy); border: 1px solid transparent; }
  .ml-item:hover { background: var(--b-bg); }
  .ml-item.is-selected { background: #e8f3fa; border-color: #b9dcf0; }
  .ml-item.is-inactive .ml-item-name, .ml-item.is-inactive .ml-item-icon { opacity: 0.5; }
  .ml-item.is-draft .ml-item-name { font-style: italic; color: var(--b-muted); }
  .ml-item-icon { width: 28px; height: 28px; border-radius: 7px; background: var(--mod-icon-bg); color: var(--mod-icon-fg); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; flex-shrink: 0; }
  .ml-item-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ml-tag { font-size: 0.66rem; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: #eceff2; color: #4a5b67; }
  .ml-item[draggable="true"] { cursor: grab; }
  .ml-item.is-dragging { opacity: 0.4; }
  .ml-item.drop-before { box-shadow: inset 0 2px 0 #00679f; }
  .ml-item.drop-after { box-shadow: inset 0 -2px 0 #00679f; }
  .ml-group.drop-into { background: #e8f3fa; color: #00679f; }
  .ml-list-empty { padding: 24px 8px; text-align: center; color: var(--b-muted); font-size: 0.85rem; }
  .ml-main { min-height: 0; overflow-y: auto; padding: 24px 28px 40px; }
  .ml-empty { color: var(--b-muted); font-size: 0.9rem; padding: 40px 0; text-align: center; }
  .ml-edit { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; max-width: 1040px; }
  .ml-edit[hidden] { display: none; }
  .ml-form { display: flex; flex-direction: column; gap: 16px; background: #fff; border: 1px solid var(--b-border); border-radius: 12px; padding: 20px; }
  .ml-field { display: flex; flex-direction: column; gap: 6px; }
  .ml-label { font-size: 0.78rem; font-weight: 600; color: var(--b-navy); }
  .ml-label em { font-style: normal; font-weight: 400; color: var(--b-muted); margin-left: 4px; }
  .ml-form input[type="text"], .ml-form select, .ml-form textarea { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1.5px solid #dfe3e6; border-radius: 8px; font: inherit; font-size: 0.88rem; color: var(--b-navy); background: #fff; }
  .ml-form textarea { resize: vertical; line-height: 1.5; }
  .ml-form input:focus, .ml-form select:focus, .ml-form textarea:focus { outline: none; border-color: var(--b-blue); box-shadow: 0 0 0 3px rgba(0,132,201,0.12); }
  .ml-form :disabled { background: #f4f6f8; color: #6b7c87; cursor: not-allowed; }
  .ml-err { font-size: 0.75rem; color: #a8321f; }
  .ml-err[hidden] { display: none; }
  .ml-count { font-size: 0.72rem; color: var(--b-muted); text-align: right; }
  .ml-count.is-over { color: #a8321f; font-weight: 600; }
  /* Lagringsstatus inne i skjemaet, ved tegntelleren (der man ser). */
  .ml-count-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 18px; }
  .ml-count-row .ml-count { margin-left: auto; }
  .ml-fstatus { font-size: 0.75rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
  .ml-fstatus:empty { display: none; }
  .ml-fstatus[data-state="saved"] { color: #1e7a45; }
  .ml-fstatus[data-state="saving"], .ml-fstatus[data-state="dirty"] { color: #8a6400; }
  .ml-fstatus[data-state="error"] { color: #a8321f; }
  /* Lagringsfeil: tydelig linje øverst i skjemaet, blir stående til neste lagring lykkes. */
  .ml-formerr { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: #fdecea; border: 1px solid #f0c7c0; color: #8a2a1a; font-size: 0.82rem; line-height: 1.4; }
  .ml-formerr[hidden] { display: none; }
  .ml-formerr i { flex-shrink: 0; }
  .ml-formerr-text { flex: 1; min-width: 0; }
  .ml-formerr-retry { flex-shrink: 0; border: 1px solid #a8321f; background: #fff; color: #a8321f; border-radius: 6px; padding: 5px 12px; font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
  .ml-formerr-retry:hover { background: #a8321f; color: #fff; }
  .ml-formerr-retry[hidden] { display: none; }
  .ml-row2 { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 14px; }
  .ml-icon-btn { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; padding: 6px 12px 6px 6px; border: 1.5px solid #dfe3e6; border-radius: 8px; background: #fff; font: inherit; font-size: 0.85rem; color: var(--b-navy); cursor: pointer; }
  .ml-icon-btn:hover:not(:disabled) { border-color: var(--b-blue); }
  .ml-icon-prev { width: 32px; height: 32px; border-radius: 8px; background: var(--mod-icon-bg); color: var(--mod-icon-fg); display: flex; align-items: center; justify-content: center; }
  .ml-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 0.86rem; color: var(--b-navy); cursor: pointer; align-self: flex-start; }
  .ml-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
  .ml-switch-ui { width: 36px; height: 20px; border-radius: 99px; background: #c9d2d9; position: relative; transition: background 0.15s; flex-shrink: 0; }
  .ml-switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
  .ml-switch input:checked + .ml-switch-ui { background: #00679f; }
  .ml-switch input:checked + .ml-switch-ui::after { transform: translateX(16px); }
  .ml-switch input:focus-visible + .ml-switch-ui { outline: 2px solid var(--b-blue); outline-offset: 2px; }
  .ml-switch input:disabled + .ml-switch-ui { opacity: 0.5; }
  .ml-meta { font-size: 0.74rem; color: var(--b-muted); }
  .ml-danger { border-top: 1px solid var(--b-border); padding-top: 14px; }
  .ml-delete { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid #f0c7c0; color: #a8321f; border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 0.8rem; cursor: pointer; }
  .ml-delete:hover:not(:disabled) { background: #fdecea; }
  .ml-delete:disabled { opacity: 0.5; cursor: not-allowed; }
  .ml-preview-wrap { position: sticky; top: 0; display: flex; flex-direction: column; gap: 8px; }
  .ml-preview { display: block; width: 100%; height: 160px; overflow: hidden; border: 1px solid var(--b-border); border-radius: 12px; background: #fff; }

  /* ── Modulvelger (Funksjonsgrid) ── */
  .mp-box { width: min(560px, 100%); }
  .mp-list { padding: 4px 12px 10px; }
  .mp-group { padding: 14px 10px 4px; }
  .mp-row { display: grid; grid-template-columns: auto 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
  .mp-row:hover { background: var(--b-bg); }
  .mp-row:has(.mp-check:focus-visible) { outline: 2px solid var(--b-blue); outline-offset: -2px; }
  .mp-check { width: 16px; height: 16px; margin: 0; accent-color: #00679f; cursor: pointer; }
  .mp-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--mod-icon-bg); color: var(--mod-icon-fg); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }
  .mp-main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
  .mp-name { font-size: 0.88rem; font-weight: 600; color: var(--b-navy); }
  .mp-desc { font-size: 0.78rem; color: var(--b-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mp-badge { display: none; font-size: 0.68rem; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: #e6f4ea; color: #1e6b3a; white-space: nowrap; }
  .mp-row.is-added .mp-badge { display: inline-block; }
  .mp-row.is-removing .mp-badge { background: #fdecea; color: #a8321f; }
  .mp-row[hidden], .mp-sec[hidden], .mp-empty[hidden] { display: none; }
  .mp-empty { padding: 28px 10px; text-align: center; color: var(--b-muted); font-size: 0.85rem; }
  .mp-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--b-border); background: #f7f9fa; flex-shrink: 0; }
  /* Primærknappen: full kontrast (hvit på #00679f ≈ 6:1). Deaktivert er
     fortsatt lesbar (≈ 5,7:1), ikke bare nedtonet. */
  .mp-primary { background: #00679f; border-color: #00679f; color: #fff; font-weight: 600; }
  .mp-primary:hover:not(:disabled) { background: #005a8b; border-color: #005a8b; }
  .mp-primary:disabled { background: #e2e8ec; border-color: #e2e8ec; color: #4a5b67; cursor: not-allowed; }

  .json-error.visible { display: block; }
  /* ── Ikonvelger (redesign 15b): velg ikon, så stil, med forhåndsvisning på kortet ── */
  .icon-modal-box { width: min(852px, 100%); height: min(632px, 90vh); max-height: 90vh; overflow: hidden; }
  .icon-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid #dde3e8; flex-shrink: 0; }
  .icon-head-title { font-size: 17px; font-weight: 600; color: #072f4a; }
  .icon-head button { background: none; border: none; cursor: pointer; color: #5b7a89; font-size: 1.05rem; padding: 4px 6px; border-radius: 6px; }
  .icon-head button:hover { background: #f3f6f8; color: #072f4a; }
  .icon-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; flex: 1; min-height: 0; }
  .icon-left { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; border-right: 1px solid #dde3e8; min-height: 0; min-width: 0; }
  .icon-search-wrap { position: relative; flex-shrink: 0; }
  .icon-search-wrap > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 13px; color: #5b7a89; pointer-events: none; }
  .icon-search { width: 100%; height: 40px; box-sizing: border-box; padding: 0 12px 0 36px; border: 1.5px solid #dde3e8; border-radius: 8px; font: inherit; font-size: 0.86rem; color: #072f4a; background: #fff; }
  .icon-search:focus { outline: none; border-color: #0084c9; }
  .icon-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #5b7a89; margin-bottom: 8px; }
  #icon-used-wrap { flex-shrink: 0; }
  #icon-used-wrap[hidden] { display: none; }
  #icon-used-wrap .icon-label { margin-bottom: 8px; }
  #icon-grid-label { margin-bottom: 0; flex-shrink: 0; }
  .icon-used { display: flex; flex-wrap: wrap; gap: 6px; }
  .icon-used-cell { width: 44px; height: 44px; border: 0; border-radius: 8px; background: #f7f9fa; color: #072f4a; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .icon-used-cell:hover { background: #eaf5fc; }
  .icon-used-cell.active { background: #e6f3fa; box-shadow: inset 0 0 0 1.5px #0084c9; color: #0084c9; }
  .icon-grid-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px 4px; }
  .icon-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
  .icon-cell { height: 48px; border: 0; border-radius: 8px; background: #f7f9fa; color: #072f4a; font-size: 17px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
  .icon-cell:hover { background: #eaf5fc; }
  .icon-cell.active { background: #e6f3fa; box-shadow: inset 0 0 0 1.5px #0084c9; color: #0084c9; }
  .icon-cell:focus-visible, .icon-used-cell:focus-visible { outline: 2px solid #0084c9; outline-offset: 1px; }
  .icon-empty { font-size: 0.8rem; color: #5b7a89; padding: 20px 4px; text-align: center; }
  .icon-right { padding: 18px; display: flex; flex-direction: column; gap: 14px; background: #fbfcfd; min-height: 0; overflow-y: auto; }
  .icon-card { background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px #dde3e8; padding: 16px; flex-shrink: 0; }
  .icon-card-circle { width: 36px; height: 36px; border-radius: 50%; background: #e6f3fa; color: #0084c9; display: flex; align-items: center; justify-content: center; font-size: 15px; margin-bottom: 10px; }
  .icon-card-title { font-size: 14px; font-weight: 600; color: #072f4a; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .icon-card-text { font-size: 12px; line-height: 1.45; color: #3d5d6d; }
  .icon-styles { display: flex; flex-direction: column; gap: 2px; }
  .icon-style-row { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left; font: inherit; color: #072f4a; }
  .icon-style-row:hover { background: #f3f6f8; }
  .icon-style-row.active { background: #e6f3fa; box-shadow: inset 0 0 0 1.5px #0084c9; }
  .icon-style-row:focus-visible { outline: 2px solid #0084c9; outline-offset: 1px; }
  .icon-radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #9bb0bb; background: #fff; box-sizing: border-box; flex-shrink: 0; }
  .icon-style-row.active .icon-radio { border: 5px solid #0084c9; }
  .icon-style-ico { width: 20px; text-align: center; font-size: 16px; flex-shrink: 0; }
  .icon-style-name { font-size: 13px; font-weight: 600; }
  .icon-style-badge { margin-left: auto; font-size: 10.5px; font-weight: 600; color: #3d5d6d; background: #e4e8eb; border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
  .icon-brand-note { font-size: 13px; font-weight: 600; color: #3d5d6d; }
  .icon-brand-note[hidden] { display: none; }
  #icon-style-wrap[hidden] { display: none; }
  .icon-classname { font: 11.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #5b7a89; word-break: break-all; min-height: 16px; }
  .icon-manual { display: flex; gap: 8px; padding: 10px 22px; border-top: 1px solid #dde3e8; background: #f7f9fa; flex-shrink: 0; }
  .icon-manual[hidden] { display: none; }
  .icon-custom-input { flex: 1; height: 36px; box-sizing: border-box; padding: 0 12px; border: 1.5px solid #dde3e8; border-radius: 8px; font: inherit; font-size: 0.82rem; }
  .icon-custom-input:focus { outline: none; border-color: #0084c9; }
  .icon-foot { display: flex; align-items: center; gap: 8px; padding: 12px 22px; border-top: 1px solid #dde3e8; flex-shrink: 0; }
  .icon-foot-spacer { flex: 1; }
  .icon-manual-link { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: #0084c9; text-decoration: underline; cursor: pointer; }
  .icon-cancel { background: none; border: 0; font: inherit; font-size: 13px; font-weight: 600; color: #3d5d6d; padding: 0 12px; height: 36px; border-radius: 8px; cursor: pointer; }
  .icon-cancel:hover { background: #f3f6f8; }
  .icon-apply { height: 36px; padding: 0 22px; border: 0; border-radius: 8px; background: #0084c9; color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
  .icon-apply:hover:not(:disabled) { background: #0072ae; }
  .icon-apply:disabled { background: #cfd8de; color: #5b7a89; cursor: not-allowed; }
  @media (max-width: 760px) { .icon-body { grid-template-columns: minmax(0, 1fr); } .icon-right { display: none; } .icon-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

  .toast {
    position: fixed;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%) translateY(16px) scale(0.96);
    background: #14181d;
    color: white;
    padding: 12px 22px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1.5px solid rgba(126, 226, 168, 0.45);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 0 4px rgba(255, 255, 255, 0.07);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 2000;
  }
  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  .toast::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.72rem;
    color: #7ee2a8;
    flex-shrink: 0;
  }
  /* Full-skjerm laste-overlegg — for tunge, blokkerende operasjoner (som
     JSON-import av en gammel/stor side) der brukeren ellers ikke får noe
     tegn på at noe skjer mens nettleseren jobber. Bevisst enkel: spinner +
     kort tekst, ingen fremdriftsbar (vi har ikke noe reelt fremdriftstall
     å vise — bygging av forhåndsvisningen skjer i én operasjon). */
  .loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 30, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
  }
  .loading-overlay.show { display: flex; }
  .loading-overlay-box {
    background: white;
    border-radius: 14px;
    padding: 22px 32px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--b-text, #072f4a);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  }
  .loading-overlay-box i { color: var(--b-blue, #0084c9); font-size: 1.2rem; }

  /* ── Velg bilde (redesign fase 16) ── */
  .imgp-box { width: min(680px, 100%); max-height: 90vh; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
  .imgp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 10px; }
  .imgp-title { font-size: 1.15rem; font-weight: 600; color: var(--b-navy); }
  .imgp-sub { font-size: 0.82rem; color: var(--b-muted); margin-top: 2px; }
  .imgp-close { border: none; background: none; color: var(--b-navy); width: 30px; height: 30px; border-radius: 6px; cursor: pointer; font-size: 1rem; }
  .imgp-close:hover { background: var(--b-bg); }
  .imgp-tabs { display: flex; gap: 22px; padding: 0 22px; border-bottom: 1px solid var(--b-border); flex-shrink: 0; }
  .imgp-tab { border: none; background: none; border-bottom: 2px solid transparent; padding: 10px 0; font-family: inherit; font-size: 0.88rem; font-weight: 600; color: var(--b-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
  .imgp-tab.active { color: var(--b-navy); border-bottom-color: var(--b-blue); }
  .imgp-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 22px 18px; }
  .imgp-panel[hidden] { display: none; }
  .imgp-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--b-navy); margin: 0 0 7px; }
  .imgp-url { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 8px 0 12px; border: 1.5px solid var(--b-border); border-radius: 9px; background: white; }
  .imgp-url:focus-within { border-color: var(--b-blue); box-shadow: 0 0 0 3px rgba(0,132,201,0.12); }
  .imgp-url.ok { border-color: #2e9d57; box-shadow: 0 0 0 3px rgba(46,157,87,0.12); }
  .imgp-url.bad { border-color: #d64545; box-shadow: 0 0 0 3px rgba(214,69,69,0.12); }
  .imgp-url-ic { color: #9fb2bf; font-size: 0.85rem; }
  .imgp-url.ok .imgp-url-ic::before { content: "\f058"; color: #2e9d57; }
  .imgp-url.bad .imgp-url-ic::before { content: "\f06a"; color: #d64545; }
  .imgp-url input { flex: 1; min-width: 0; border: none; outline: none; font-family: inherit; font-size: 0.9rem; color: var(--b-navy); background: transparent; }
  .imgp-url-clear { border: none; background: none; color: #9fb2bf; width: 26px; height: 26px; border-radius: 6px; cursor: pointer; }
  .imgp-url-clear:hover { background: var(--b-bg); color: var(--b-navy); }
  .imgp-status { font-size: 0.78rem; color: var(--b-muted); min-height: 1.2em; margin: 6px 2px 0; }
  .imgp-status--ok { color: #2e7d4f; }
  .imgp-status--bad { color: #c0392b; }
  .imgp-warn { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: #fff6dc; border: 1px solid #f5d27a; color: #7a5a00; font-size: 0.8rem; line-height: 1.45; }
  .imgp-warn[hidden] { display: none; }
  .imgp-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; margin: 14px 0 16px; align-items: start; }
  .imgp-preview { position: relative; width: 100%; max-height: 240px; border: 1.5px dashed #c5d0d6; border-radius: 10px; background: #eef1f3; overflow: hidden; display: flex; align-items: center; justify-content: center; }
  .imgp-preview img { width: 100%; height: 100%; display: block; }
  .imgp-preview:has(img) { border-style: solid; border-color: var(--b-border); }
  .imgp-preview-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #7b929f; font-size: 0.82rem; font-weight: 600; }
  .imgp-preview-empty i { font-size: 1.6rem; color: #9fb2bf; }
  .imgp-preview-tag { position: absolute; top: 8px; left: 8px; background: rgba(7,47,74,0.78); color: white; font-size: 0.68rem; font-weight: 600; border-radius: 5px; padding: 3px 7px; }
  .imgp-altcol textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 110px; padding: 10px 12px; border: 1.5px solid var(--b-border); border-radius: 9px; font-family: inherit; font-size: 0.88rem; color: var(--b-navy); outline: none; }
  .imgp-altcol textarea:focus { border-color: var(--b-blue); box-shadow: 0 0 0 3px rgba(0,132,201,0.12); }
  .imgp-hint { font-size: 0.74rem; color: var(--b-muted); margin-top: 6px; }
  .imgp-recent { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 14px; }
  .imgp-thumb { aspect-ratio: 1; border: 1.5px solid transparent; border-radius: 8px; background: #e3e8ec; padding: 0; overflow: hidden; cursor: pointer; }
  .imgp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .imgp-thumb:hover { border-color: var(--b-blue); }
  .imgp-thumb--more { font-family: inherit; font-size: 0.82rem; font-weight: 600; color: var(--b-muted); background: var(--b-bg); }
  .imgp-recent-empty { grid-column: 1 / -1; font-size: 0.8rem; color: var(--b-muted); padding: 6px 0 2px; }
  .imgp-help { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 9px; background: #f3f6f8; font-size: 0.8rem; color: #4d6776; line-height: 1.45; }
  .imgp-help i { color: var(--b-blue); margin-top: 2px; }
  .imgp-searchrow { display: flex; gap: 8px; }
  .imgp-search { position: relative; flex: 1; }
  .imgp-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--b-muted); font-size: 0.85rem; }
  .imgp-search input { width: 100%; box-sizing: border-box; height: 42px; padding: 0 12px 0 36px; border: 1.5px solid var(--b-border); border-radius: 9px; font-family: inherit; font-size: 0.9rem; color: var(--b-navy); outline: none; }
  .imgp-search input:focus { border-color: var(--b-blue); box-shadow: 0 0 0 3px rgba(0,132,201,0.12); }
  .imgp-orient { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 10px; border: 1.5px solid var(--b-border); border-radius: 9px; color: var(--b-navy); font-size: 0.86rem; }
  .imgp-orient i { color: var(--b-muted); }
  .imgp-orient select { border: none; background: none; font-family: inherit; font-size: 0.86rem; color: var(--b-navy); outline: none; cursor: pointer; }
  .imgp-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 12px; }
  .imgp-chips-l { font-size: 0.78rem; color: var(--b-muted); margin-right: 2px; }
  .imgp-chip { border: none; background: var(--b-bg); color: var(--b-navy); border-radius: 99px; padding: 5px 12px; font-family: inherit; font-size: 0.78rem; cursor: pointer; }
  .imgp-chip:hover { background: #e2e8ec; }
  .imgp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-items: start; }
  .imgp-grid-msg { grid-column: 1 / -1; padding: 22px 0; text-align: center; font-size: 0.84rem; color: var(--b-muted); }
  .imgp-tile { position: relative; border: 2px solid transparent; border-radius: 9px; padding: 0; overflow: hidden; background: #e3e8ec; cursor: pointer; }
  .imgp-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .imgp-tile-credit { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; background: linear-gradient(transparent, rgba(0,0,0,0.6)); color: white; font-size: 0.7rem; font-weight: 600; text-align: left; opacity: 0; transition: opacity 0.12s; }
  .imgp-tile:hover .imgp-tile-credit, .imgp-tile.selected .imgp-tile-credit { opacity: 1; }
  .imgp-tile-check { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--b-blue); color: white; font-size: 0.7rem; display: none; align-items: center; justify-content: center; box-shadow: 0 0 0 2px white; }
  .imgp-tile.selected { border-color: var(--b-blue); }
  .imgp-tile.selected .imgp-tile-check { display: flex; }
  .imgp-foot { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--b-border); flex-shrink: 0; }
  .imgp-foot-note { flex: 1; font-size: 0.78rem; color: var(--b-muted); }
  .imgp-cancel { border: none !important; background: none !important; font-weight: 600; }
  #imgp-use:disabled { opacity: 0.5; cursor: default; }
  @media (max-width: 640px) { .imgp-row { grid-template-columns: 1fr; } .imgp-recent { grid-template-columns: repeat(4, 1fr); } .imgp-grid { grid-template-columns: repeat(2, 1fr); } }

  /* «Innebygd nettside»: valg mellom video-format (16:9) og fast høyde */
  .embed-height-row { display: flex; justify-content: center; margin: -8px auto 16px; }
  .embed-height-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--b-navy, #072f4a); background: #f4f7f9; border: 1px solid var(--b-border, #e2e8ec); border-radius: 8px; padding: 6px 10px; }
  .embed-height-row input { width: 64px; border: 1px solid var(--b-border, #e2e8ec); border-radius: 6px; padding: 3px 6px; font: inherit; text-align: right; }

  /* ── Varsel om ny versjon ── */
  .ver-banner { position: fixed; left: 20px; bottom: 20px; z-index: 1500; width: min(380px, calc(100vw - 40px)); box-sizing: border-box; background: #072f4a; color: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(7, 47, 74, 0.35); }
  .ver-banner[hidden] { display: none; }
  .ver-banner-title { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
  .ver-banner-title i { color: #5cc4ff; margin-right: 6px; }
  .ver-banner-text { font-size: 12.5px; line-height: 1.45; color: #c7d8e2; }
  .ver-banner-warn { font-size: 12.5px; line-height: 1.45; color: #ffd98a; margin-top: 8px; }
  .ver-banner-warn[hidden] { display: none; }
  .ver-banner-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
  .ver-banner-later { background: none; border: 0; color: #c7d8e2; font: inherit; font-size: 13px; font-weight: 600; padding: 0 12px; height: 34px; border-radius: 8px; cursor: pointer; }
  .ver-banner-later:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
  .ver-banner-reload { background: #0084c9; color: #fff; border: 0; font: inherit; font-size: 13px; font-weight: 600; padding: 0 16px; height: 34px; border-radius: 8px; cursor: pointer; }
  .ver-banner-reload:hover { background: #0072ae; }

  /* ── Bildevalg i logo-modus (kundelogo i Hero) ── */
  .imgp-logo { margin: 12px 0 4px; padding: 12px 14px 10px; background: #f7f9fa; border-radius: 10px; box-shadow: 0 0 0 1px #e3e9ed; }
  .imgp-logo[hidden] { display: none; }
  .imgp-logo-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
  .imgp-logo-head .imgp-label { margin: 0; }
  .imgp-logo-val { font-size: 13px; font-weight: 600; color: #072f4a; display: inline-flex; align-items: center; gap: 10px; }
  .imgp-logo-reset { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; font-weight: 500; color: #0084c9; text-decoration: underline; cursor: pointer; }
  .imgp-range { width: 100%; accent-color: #0084c9; margin: 2px 0; }
  .imgp-logo-ends { display: flex; justify-content: space-between; font-size: 11px; color: #7b8a94; }
  .imgp-logo-hint { font-size: 12px; line-height: 1.4; color: #1e7a45; margin-top: 6px; min-height: 16px; }
  .imgp-logo-hint.is-muted { color: #5b7a89; }
  .imgp-preview.imgp-preview--logo { display: flex; align-items: center; justify-content: center; background: #dfe6eb; padding: 16px; box-sizing: border-box; }
  .imgp-logo-chip { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; background: #fff; border-radius: 10px; padding: 10px 16px; box-shadow: 0 2px 8px rgba(7, 47, 74, 0.12); box-sizing: border-box; }
  .imgp-logo-chip img { display: block; width: auto; object-fit: contain; max-width: 100%; }
  .imgp-tab[hidden] { display: none; }

  /* ══ Telefonmodus ══
     Klassen html.phone settes av index.html (tidlig i <head>) og app-editor.js ved bredde ≤ 820 px, eller liggende telefon.
     Da er editoren en enkel visning for å se på siden og rette tekst: sidepanel, design og eksport er skjult, og lerretet fyller skjermen i
     ekte telefonbredde (siden vises i sin mobile utforming). Strukturverktøyene i selve lerretet skjules i buildSrcdoc (PHONE_EDIT_CSS). */
  /* Berøringsskjermer (også nettbrett: ingen hover OG grov pekeenhet) har ikke hover: handlingene som ellers kommer ved hover vises alltid. Både hover: none og
     pointer: coarse kreves, så en PC med mus (og testmiljøer uten hover) fortsatt får handlingene bare ved hover. */
  @media (hover: none) and (pointer: coarse) {
    .op-actions { display: flex; }
    .sl-item .sl-actions { display: flex; }
    /* Statuspillen «Publisert» er en lenke til den publiserte siden. På berøringsskjerm havner den lett midt i raden, og et trykk der åpnet hjemmesiden
       i stedet for siden i editoren. Der er den bare tekst; den publiserte siden åpnes fra «Åpne publisert side» i fil-menyen. */
    a.op-wp { pointer-events: none; }
  }
  html.phone body { height: 100vh; height: 100dvh; }
  html.phone .topbar { height: 52px; box-sizing: content-box; gap: 8px; padding-top: env(safe-area-inset-top); padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
  html.phone .topbar h1 img, html.phone .tb-area-toggle img { height: 22px !important; }
  html.phone .tb-vsep, html.phone #dev-toggle, html.phone #btn-design, html.phone #btn-preview-toggle, html.phone #tb-copy-dropdown { display: none !important; }
  html.phone .tb-pagename { max-width: 44vw; min-width: 0; }
  html.phone #page-name-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.phone .cloud-status-badge { font-size: 0; gap: 0; }               /* bare statusikonet; teksten er for lang for en telefon */
  html.phone .cloud-status-badge i { font-size: 0.8rem; }
  html.phone .tb-wp-link { display: none !important; }  /* på telefon finnes «Åpne publisert side» i fil-menyen */
  html.phone .topbar .tb-btn { min-height: 40px; padding-inline: 12px; }
  html.phone .tb-dropdown-menu { max-width: calc(100vw - 16px); }
  html.phone .tb-dropdown-menu .tb-btn { min-height: 44px; }
  /* fil-menyen: bare de enkle valgene (Ny, Åpne, Lagre som, Åpne publisert side) */
  html.phone #btn-module-library, html.phone #btn-wp-publish, html.phone #btn-global-json, html.phone #btn-import, html.phone #btn-export-json,
  html.phone #tb-file-dropdown .tb-dropdown-label, html.phone #tb-file-dropdown .tb-dropdown-sep { display: none !important; }
  html.phone .sidebar, html.phone .design-panel, html.phone .edit-tip, html.phone .canvas-bar { display: none !important; }
  html.phone .preview-area { padding: 0; }
  html.phone .canvas-sheet, html.phone .canvas-sheet.mobile { flex: 1 1 auto; border-radius: 0; box-shadow: none; margin: 0; }
  html.phone #preview { width: 100%; }
  .phone-tip { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; background: var(--b-navy); color: #fff; font-size: 0.82rem; line-height: 1.4; }
  .phone-tip[hidden] { display: none; }
  .phone-tip i { margin-top: 2px; color: #7cd3fd; }
  .phone-tip span { flex: 1; }
  .phone-tip button { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22); color: #fff; border-radius: 8px; padding: 6px 12px; font: inherit; font-weight: 600; cursor: pointer; }

  /* ── Områdevelger under logoen (Sidebygger / Forretningsutvikling) ──
     Uten tilgang til flere områder vises bare logoen: ingen pil, ingen meny (se applyPermissionUI i app-cloud.js). */
  .tb-area-toggle { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px; background: none; border: none; border-radius: 8px; color: white; font: inherit; cursor: pointer; }
  .tb-area-toggle img { height: 26px; width: auto; display: block; }
  .tb-area.has-areas .tb-area-toggle:hover, .tb-area.open .tb-area-toggle { background: rgba(255,255,255,0.12); }
  .tb-area:not(.has-areas) .tb-area-toggle { cursor: default; }
  .tb-area:not(.has-areas) .tb-area-caret { display: none; }
  .tb-area:not(.has-areas) .tb-dropdown-menu { display: none !important; }
  .tb-dropdown-menu .tb-btn.is-current { background: rgba(255,255,255,0.08); }
  .tb-area-check { justify-self: end; font-size: 0.7rem; color: #7cd3fd; }

  /* ── Forretningsutvikling: veikart og oppgaver (app-bizdev.js) ── */
  .bz-view { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; background: var(--b-bg); font-family: inherit; color: var(--b-navy); }
  .bz-view[hidden] { display: none; }
  .bz-top { display: flex; align-items: center; gap: 16px; height: 52px; padding: 0 20px 0 14px; background: #0a2233; color: #fff; box-shadow: inset 0 -1px 0 rgba(255,255,255,0.08); flex-shrink: 0; }
  .bz-area-name { font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; }
  .bz-area-toggle { gap: 10px; padding: 0 10px 0 6px; }
  .bz-area-toggle img { height: 22px; }
  .bz-area-toggle .tb-area-caret { font-size: 10px; color: #9fb2bd; }
  .bz-spacer { flex: 1; }
  .bz-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: rgba(255,255,255,0.08); }
  .bz-tabs button { font: inherit; font-size: 13.5px; font-weight: 600; height: 30px; padding: 0 14px; border: none; border-radius: 7px; background: transparent; color: #c9d6de; cursor: pointer; }
  .bz-tabs button:hover { color: #fff; }
  .bz-tabs button.active { background: #fff; color: #072f4a; }
  .bz-tabs button:focus-visible { outline: 2px solid #7cd3fd; outline-offset: 1px; }
  .bz-top #bz-new { height: 34px; padding: 0 14px; border-radius: 8px; background: #0084c9; border-color: #0084c9; color: #fff; font-size: 13.5px; font-weight: 600; gap: 8px; }
  .bz-top #bz-new i { font-size: 12px; }
  .bz-top #bz-new:hover:not(:disabled) { background: #0076b4; }
  .bz-body { flex: 1; min-height: 0; overflow: auto; padding: 0 0 32px; }
  .bz-page { display: flex; flex-direction: column; gap: 0; }
  .bz-page[hidden] { display: none; }
  .bz-avatar { min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px; background: rgba(7,47,74,0.12); display: inline-flex; align-items: center; justify-content: center; font-size: 0.62rem; font-weight: 700; box-sizing: border-box; }
  .bz-empty { background: #fff; border: 1.5px dashed #c3ccd3; border-radius: 10px; padding: 28px; text-align: center; color: var(--b-muted); font-size: 0.86rem; }
  .bz-linkbtn { color: #00679f; font-weight: 600; align-self: flex-start; padding-left: 0; }
  .bz-meta { font-size: 0.72rem; color: var(--b-muted); }
  .bz-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .b-btn.bz-danger { color: #b3261e; border-color: #e3b7b3; }
  html.phone .bz-top { height: auto; min-height: 52px; flex-wrap: wrap; padding: 8px 10px; gap: 8px; }
  html.phone .bz-area-name, html.phone .bz-top .tb-vsep { display: none; }
  .bz-ilist { min-width: 780px; }
  .bz-ititle { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
  .bz-ititle-text { font-weight: 600; overflow-wrap: anywhere; }
  .bz-ilane, .bz-iperiod { color: var(--b-muted); font-size: 0.76rem; }
  .bz-pill { display: inline-block; padding: 2px 10px; border-radius: 99px; border: 1.5px solid; font-size: 0.72rem; font-weight: 600; }
  .bz-iprog { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-size: 0.76rem; }
  .bz-iprog .bz-bar-prog { flex: 1; min-width: 36px; }
  .bz-iprog .bz-bar-prog i { background: var(--b-blue); opacity: 1; }
  .bz-tagrow { display: flex; flex-wrap: wrap; gap: 5px; }
  .bz-tagpill { font: inherit; font-size: 0.7rem; padding: 1px 9px; border-radius: 99px; border: 1px solid #d7dee3; background: #f6f9fb; color: var(--b-navy); cursor: pointer; }
  .bz-tagpill:hover { border-color: var(--b-blue); }
  .bz-tagchip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 99px; background: #e1f1fa; border: 1px solid #b9d9ec; color: var(--b-navy); font-size: 0.78rem; }
  .bz-tagchip button { font: inherit; border: none; background: none; cursor: pointer; color: var(--b-muted); padding: 0 5px; line-height: 1; font-size: 1rem; }
  .bz-lane-list { display: flex; flex-direction: column; gap: 6px; }
  .bz-lane-row { display: flex; align-items: center; gap: 6px; }
  .bz-lane-row input[type="text"] { flex: 1; min-width: 0; }
  .bz-lane-row button, .bz-lane-add .b-btn { font: inherit; font-size: 0.8rem; min-height: 38px; min-width: 38px; border: 1px solid #c3ccd3; border-radius: 8px; background: #fff; color: var(--b-navy); cursor: pointer; }
  .bz-lane-row button:disabled { opacity: 0.35; cursor: default; }
  .bz-lane-row button.bz-danger { color: #b3261e; border-color: #e3b7b3; }
  .bz-lane-count { font-size: 0.72rem; color: var(--b-muted); white-space: nowrap; min-width: 84px; text-align: right; }
  .bz-lane-add { display: flex; gap: 8px; margin-top: 4px; }
  .bz-lane-add input { flex: 1; min-width: 0; }
  .bz-lane-add .b-btn--primary { background: var(--b-blue); border-color: var(--b-blue); color: #fff; padding: 0 14px; }


  .bz-hint { font-size: 0.8rem; color: var(--b-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
  .bz-hint .bz-linkbtn { padding-top: 0; padding-bottom: 0; align-self: auto; }
  .bz-linkbtn { font: inherit; font-size: 0.8rem; background: none; border: none; cursor: pointer; padding: 4px 6px; }
  .bz-irow { display: grid; align-items: center; gap: 0 8px; border-top: 1px solid #eef1f3; font-size: 0.82rem; cursor: pointer; outline: none; }
  .bz-irow:focus-visible { box-shadow: inset 2px 0 0 #0084c9; }
  .bz-irow:hover { background: #f7f9fa; }
  .bz-irow--head { min-height: 38px; padding-top: 0; padding-bottom: 0; border-top: none; cursor: default; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #5b7a89; }
  .bz-irow--head:hover { background: none; }
  .bz-view input[type="text"], .bz-view input[type="date"], .bz-view select, #bz-lane-modal input[type="text"], #bz-col-modal input[type="text"] { font: inherit; font-size: 0.84rem; font-weight: 400; padding: 8px 10px; border: 1px solid #c3ccd3; border-radius: 8px; background: #fff; color: var(--b-navy); min-height: 38px; box-sizing: border-box; width: 100%; }
  .bz-view input:focus-visible, .bz-view select:focus-visible, .bz-view textarea:focus-visible { outline: 2px solid var(--b-blue); outline-offset: 1px; }
  .bz-hint { padding: 0 24px 10px; }
  .bz-ilist-wrap { margin: 0 24px 24px; background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px #dde3e8; overflow-x: auto; }
  .bz-irow { grid-template-columns: minmax(0, 1fr) 150px 110px 190px 64px 110px; padding: 10px 16px; }
  .bz-ilane { display: inline-flex; align-items: center; gap: 8px; }
  .bz-avatar--sm { width: 22px; min-width: 22px; height: 22px; border-radius: 50%; padding: 0; font-size: 9px; }
  .bz-avatar--md { width: 22px; min-width: 22px; height: 22px; border-radius: 50%; padding: 0; font-size: 9px; flex: none; }
  .bz-avatar--xs { width: 20px; min-width: 20px; height: 20px; border-radius: 50%; padding: 0; font-size: 8px; flex: none; }
  .bz-segc { display: inline-flex; gap: 0; padding: 3px; border-radius: 9px; background: #e6ebef; }
  .bz-segc[hidden] { display: none; }
  .bz-segc button { font: inherit; height: 30px; padding: 0 12px; border: none; border-radius: 7px; background: transparent; font-size: 13px; font-weight: 600; color: #5b7a89; cursor: pointer; }
  .bz-segc button:hover { color: #072f4a; }
  .bz-segc button[aria-pressed="true"] { background: #fff; color: #072f4a; box-shadow: 0 1px 2px rgba(7,47,74,0.12); }
  .bz-segc button:focus-visible, .bz-navbtn:focus-visible, .bz-pill2:focus-visible, .bz-ibtn:focus-visible, .bz-tl-addlane:focus-visible, .bz-tgroup:focus-visible, .bz-pval:focus-visible, .bz-pdesc:focus-visible, .bz-pt-add:focus-visible, .bz-cal-day:focus-visible, .bz-cal-nav:focus-visible, .bz-cal-link:focus-visible, .bz-pt button:focus-visible, .bz-trow button:focus-visible { outline: 2px solid #0084c9; outline-offset: 1px; }
  .bz-nav3 { display: inline-flex; gap: 6px; }
  .bz-nav3[hidden] { display: none; }
  .bz-navbtn { font: inherit; height: 36px; min-width: 36px; padding: 0 10px; border: none; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px #dde3e8; color: #3d5d6d; font-size: 13px; font-weight: 600; cursor: pointer; }
  .bz-navbtn:hover { box-shadow: 0 0 0 1px #9fb2bd; }
  .bz-pills { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 16px; }
  .bz-pill2 { font: inherit; height: 32px; padding: 0 14px; border: none; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px #dde3e8; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #072f4a; cursor: pointer; }
  .bz-pill2 b { font-weight: 600; color: #8aa2af; font-variant-numeric: tabular-nums; }
  .bz-pill2:hover { box-shadow: 0 0 0 1px #9fb2bd; }
  .bz-pill2[aria-pressed="true"] { box-shadow: 0 0 0 2px #072f4a; }
  .bz-pill2--all[aria-pressed="true"] { background: #072f4a; color: #fff; box-shadow: none; }
  .bz-pill2--all[aria-pressed="true"] b { color: #c9d6de; }
  .bz-sw { display: inline-block; width: 16px; height: 10px; border-radius: 3px; border: 1.5px solid; box-sizing: border-box; flex: none; }
  /* tidslinjen */
  .bz-tl-wrap { margin: 0 24px 24px; background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px #dde3e8; overflow-x: auto; overflow-y: hidden; }
  .bz-tl-wrap[hidden] { display: none; }
  .bz-timeline { min-width: 900px; position: relative; }
  .bz-tl-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); border-top: 1px solid #eef1f3; }
  .bz-tl-row--head { border-top: none; }
  .bz-tl-lane { position: sticky; left: 0; z-index: 4; background: #fff; border-right: 1px solid #dde3e8; padding: 0 14px; display: flex; align-items: center; gap: 8px; min-width: 0; }
  .bz-tl-corner { min-height: 56px; }
  .bz-tl-lname { font-size: 13.5px; font-weight: 700; color: #072f4a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bz-tl-lcount { font-size: 12px; color: #8aa2af; font-variant-numeric: tabular-nums; }
  .bz-tl-hcols { position: relative; display: grid; grid-template-rows: 28px 28px; height: 56px; }
  .bz-tl-q { padding: 8px 8px 0; font-size: 12px; font-weight: 700; color: #072f4a; white-space: nowrap; overflow: hidden; }
  .bz-tl-m { padding: 3px 8px 0; font-size: 12px; color: #5b7a89; }
  .bz-tl-m.is-now { color: #0084c9; font-weight: 600; }
  .bz-vline { position: absolute; top: 0; bottom: 0; width: 1px; background: #eef1f3; pointer-events: none; }
  .bz-vline.is-q { background: #dde3e8; }
  .bz-today-line { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #0084c9; pointer-events: none; z-index: 1; }
  .bz-tl-hcols .bz-today-line { top: 40px; }
  .bz-today-label { position: absolute; bottom: -12px; transform: translateX(-50%); height: 20px; padding: 0 9px; border-radius: 10px; background: #0084c9; color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; white-space: nowrap; z-index: 3; pointer-events: none; }
  .bz-tl-grid { position: relative; touch-action: pan-y; }
  .bz-tl-row--add .bz-tl-lane { padding: 0; }
  .bz-tl-row--add .bz-tl-grid { height: 40px; }
  .bz-tl-addlane { font: inherit; width: 100%; height: 40px; padding: 0 14px; border: none; background: none; text-align: left; font-size: 13px; font-weight: 600; color: #0084c9; cursor: pointer; }
  .bz-tl-addlane:hover { background: #f3f8fc; }
  .bz-ghost { position: absolute; top: 8px; height: 32px; border-radius: 8px; border: 1.5px dashed #9fb2bd; box-sizing: border-box; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #5b7a89; background: rgba(255,255,255,0.7); pointer-events: none; white-space: nowrap; overflow: hidden; z-index: 2; }
  .bz-ghost.is-drag { border-color: #0084c9; background: #e6f3fa; color: #0084c9; font-weight: 600; }
  .bz-bar { position: absolute; z-index: 2; height: 48px; overflow: visible; touch-action: pan-y; user-select: none; -webkit-user-select: none; box-sizing: border-box; display: flex; align-items: center; gap: 10px; text-align: left; min-width: 0; padding: 0 12px; border-radius: 8px; border: 1.5px solid; font: inherit; cursor: pointer; }
  .bz-bar:hover { box-shadow: 0 2px 8px rgba(7,47,74,0.14); }
  .bz-bar:focus-visible { outline: 2px solid #0084c9; outline-offset: 2px; }
  .bz-bar.is-selected { box-shadow: 0 0 0 2px #0084c9; }
  .bz-bar.is-dragging { z-index: 6; cursor: grabbing; box-shadow: 0 6px 18px rgba(7,47,74,0.22); }
  .bz-bar.is-dragging::after { content: attr(data-drag); position: absolute; left: 0; bottom: calc(100% + 4px); white-space: nowrap; background: #072f4a; color: #fff; font-size: 0.72rem; font-weight: 600; padding: 4px 8px; border-radius: 6px; pointer-events: none; }
  .bz-bar.is-cl { border-top-left-radius: 2px; border-bottom-left-radius: 2px; border-left-width: 4px; }
  .bz-bar.is-cr { border-top-right-radius: 2px; border-bottom-right-radius: 2px; border-right-width: 4px; }
  .bz-bar-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
  .bz-bar-title { font-size: 13.5px; font-weight: 600; line-height: 1.2; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .bz-bar-count { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
  .bz-bar-prog { display: block; height: 3px; border-radius: 2px; background: rgba(7,47,74,0.12); overflow: hidden; }
  .bz-bar-prog i { display: block; height: 100%; background: currentColor; opacity: 0.55; border-radius: 2px; }
  .bz-handle { position: absolute; top: 0; bottom: 0; width: 10px; cursor: ew-resize; touch-action: none; }
  .bz-handle--l { left: -3px; } .bz-handle--r { right: -3px; }
  .bz-handle::before { content: ""; position: absolute; top: 12px; bottom: 12px; left: 4px; width: 2px; border-radius: 1px; background: currentColor; opacity: 0; transition: opacity 0.12s; }
  .bz-bar:hover .bz-handle::before, .bz-bar:focus-visible .bz-handle::before, .bz-bar.is-dragging .bz-handle::before { opacity: 0.45; }
  /* hode og kropp for flate faner */
  .bz-view .bz-search--sm { width: 300px; }
  .bz-tlist-wrap { margin: 0 24px 24px; background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px #dde3e8; overflow-x: auto; }
  .bz-tlist { min-width: 860px; }
  /* oppgaver: rader */
  .bz-trow { display: grid; grid-template-columns: 28px minmax(0, 1fr) 280px 110px 36px 64px; align-items: center; gap: 12px; padding: 0 16px; min-height: 44px; border-top: 1px solid #eef1f3; font-size: 14px; color: #072f4a; cursor: pointer; outline: none; }
  .bz-trow:hover { background: #f7f9fa; }
  .bz-trow.is-open { background: #f3f8fc; }
  .bz-trow.is-key, .bz-trow:focus-visible { box-shadow: inset 2px 0 0 #0084c9; }
  .bz-trow--head { min-height: 36px; border-top: none; cursor: default; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #5b7a89; }
  .bz-trow--head:hover { background: none; }
  .bz-trow--quick { min-height: 44px; cursor: text; }
  .bz-trow--quick:hover { background: none; }
  .bz-tq-plus { color: #8aa2af; font-size: 12px; text-align: center; }
  .bz-tq-wrap { grid-column: 2 / -1; display: flex; align-items: center; gap: 12px; min-width: 0; }
  .bz-view input.bz-tq { border: none; padding: 0; min-height: 40px; background: none; font-size: 14px; flex: 0 1 96px; width: auto; }
  .bz-view input.bz-tq:focus, .bz-view input.bz-tq:not(:placeholder-shown) { flex: 1 1 260px; }
  .bz-view input.bz-tq:focus-visible { outline: none; }
  .bz-tq-hint { font-size: 12.5px; color: #8aa2af; }
  .bz-tgroup { font: inherit; width: 100%; height: 40px; padding: 0 16px; border: none; border-top: 1px solid #eef1f3; background: #f7f9fa; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; color: #5b7a89; }
  .bz-tgroup-ic { font-size: 10px; width: 12px; }
  .bz-tgroup-name { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
  .bz-tgroup-n { font-size: 12px; color: #8aa2af; }
  .bz-tgroup.is-late, .bz-tgroup.is-late .bz-tgroup-n { color: #b42318; }
  .bz-ttitle { font: inherit; font-size: 14px; color: #072f4a; text-align: left; background: none; border: none; padding: 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .bz-view input.bz-ttitle-edit { border: 1px solid #0084c9; min-height: 32px; padding: 4px 8px; font-size: 14px; }
  .bz-trow.is-checking .bz-ttitle, .bz-trow.is-done .bz-ttitle { text-decoration: line-through; color: #8aa2af; transition: color 0.2s; }
  .bz-trow.is-checking { opacity: 0.6; transition: opacity 0.4s; }
  .bz-tcell { display: flex; align-items: center; min-width: 0; }
  .bz-tkort { font: inherit; font-size: 12.5px; color: #3d5d6d; background: none; border: none; padding: 4px 0; display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; max-width: 100%; }
  .bz-tkort:hover .bz-tkort-t { text-decoration: underline; }
  .bz-tkort-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bz-tkort.is-none { color: #8aa2af; }
  .bz-tdue { font: inherit; font-size: 12.5px; color: #3d5d6d; background: none; border: none; padding: 4px 6px; margin: 0 -6px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
  .bz-tdue:hover { background: #eef1f3; }
  .bz-tdue.is-late { color: #b42318; font-weight: 600; }
  .bz-tdue.is-empty { opacity: 0; } .bz-trow:hover .bz-tdue.is-empty, .bz-tdue.is-empty:focus-visible, .bz-tdue.is-empty.is-open { opacity: 1; color: #8aa2af; }
  .bz-twho, .bz-pt-who { background: none; border: none; padding: 0; border-radius: 50%; cursor: pointer; display: inline-flex; }
  .bz-twho .bz-avatar, .bz-pt-who .bz-avatar { width: 24px; min-width: 24px; height: 24px; border-radius: 50%; padding: 0; font-size: 10px; }
  .bz-avatar-empty { width: 22px; height: 22px; border-radius: 50%; border: 1.5px dashed #c5d0d7; box-sizing: border-box; display: inline-block; }
  .bz-twho.is-empty, .bz-pt-who.is-empty { opacity: 0; } .bz-trow:hover .bz-twho.is-empty, .bz-pt:hover .bz-pt-who.is-empty, .bz-twho.is-empty:focus-visible, .bz-pt-who.is-empty:focus-visible, .bz-twho.is-empty.is-open, .bz-pt-who.is-empty.is-open { opacity: 1; }
  .bz-tprio { font: inherit; font-size: 12.5px; background: none; border: none; padding: 4px 6px; margin: 0 -6px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
  .bz-tprio:hover { background: #eef1f3; }
  .bz-tprio--hoy { color: #b42318; font-weight: 600; } .bz-tprio--lav { color: #8aa2af; }
  .bz-tprio.is-empty { opacity: 0; } .bz-trow:hover .bz-tprio.is-empty, .bz-tprio.is-empty:focus-visible, .bz-tprio.is-empty.is-open { opacity: 1; color: #8aa2af; }
  .bz-pop-ic.is-hoy { color: #b42318; }
  .bz-cb { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; border: 1.5px solid #9fb2bd; border-radius: 5px; background: #fff; cursor: pointer; flex: none; display: inline-grid; place-content: center; }
  .bz-cb:hover { border-color: #0084c9; }
  .bz-cb:checked { background: #0084c9; border-color: #0084c9; }
  .bz-cb:checked::after { content: ""; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
  .bz-cb:focus-visible { outline: 2px solid #0084c9; outline-offset: 2px; }
  .bz-cb:disabled { opacity: 0.5; cursor: default; }
  .bz-tcell-cb { display: flex; }
  .bz-undo { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 960; display: flex; align-items: center; gap: 16px; padding: 10px 14px 10px 18px; border-radius: 10px; background: #072f4a; color: #fff; font-size: 13.5px; box-shadow: 0 8px 24px rgba(7,47,74,0.3); }
  .bz-undo[hidden] { display: none; }
  .bz-undo button { font: inherit; font-weight: 700; background: none; border: none; color: #7cd3fd; cursor: pointer; padding: 2px 4px; }
  /* menyer: søk, kalender, tagger */
  .bz-pop-search { display: block; width: 100%; box-sizing: border-box; height: 34px; margin: 0 0 6px; padding: 0 10px; border: 1px solid #dde3e8; border-radius: 7px; font: inherit; font-size: 13px; color: #072f4a; background: #fff; }
  .bz-pop-search:focus { outline: 2px solid #0084c9; outline-offset: -1px; border-color: transparent; }
  .bz-pop-list { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; }
  .bz-pop-item.is-danger, .bz-pop-item.is-danger .bz-pop-ic { color: #b42318; }
  .bz-pop--cal { min-width: 264px; padding: 10px; }
  .bz-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
  .bz-cal-title { font-size: 13px; font-weight: 700; text-transform: capitalize; }
  .bz-cal-nav { width: 28px; height: 28px; border: none; border-radius: 6px; background: none; color: #3d5d6d; cursor: pointer; font-size: 11px; }
  .bz-cal-nav:hover { background: #eef1f3; }
  .bz-cal-hint { font-size: 12px; color: #5b7a89; margin: 2px 0 4px; }
  .bz-cal-grid { display: grid; grid-template-columns: repeat(7, 34px); gap: 2px; justify-content: center; }
  .bz-cal-wd { font-size: 11px; font-weight: 600; color: #8aa2af; text-align: center; padding: 4px 0; }
  .bz-pop .bz-cal-day { width: 34px; min-height: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 7px; font-size: 13px; }
  .bz-cal-day.is-today { box-shadow: inset 0 0 0 1.5px #9fb2bd; }
  .bz-cal-day.is-mid { background: #e6f3fa; border-radius: 0; }
  .bz-pop .bz-cal-day.is-sel { background: #0084c9; color: #fff; }
  .bz-cal-foot { display: flex; justify-content: space-between; margin-top: 6px; padding-top: 6px; border-top: 1px solid #eef1f3; }
  .bz-cal-link { font: inherit; font-size: 12.5px; font-weight: 600; background: none; border: none; color: #0084c9; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
  .bz-cal-link:hover { background: #f3f8fc; }
  .bz-cal-clear { color: #b42318; margin-left: auto; }
  .bz-pop--tags { min-width: 260px; }
  .bz-tagchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
  .bz-pop-err { font-size: 12px; color: #b42318; }
  .bz-pop-err:empty { display: none; }
  /* kortpanel (19a) */
  .bz-view.has-panel .bz-body { margin-right: 480px; }
  .bz-ibtn { width: 32px; height: 32px; border: none; border-radius: 7px; background: none; color: #3d5d6d; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
  .bz-ibtn:hover:not(:disabled) { background: #f3f6f8; }
  .bz-ibtn[aria-expanded="true"], .bz-ibtn.is-open { background: #eef1f3; }
  .bz-ibtn:disabled { opacity: 0.35; cursor: default; }
  .bz-drawer { width: 480px; box-shadow: -12px 0 32px rgba(7,47,74,0.14), -1px 0 0 #dde3e8; border-left: none; outline: none; }
  .bz-drawer-head { height: 52px; box-sizing: border-box; padding: 0 12px 0 20px; gap: 12px; border-bottom: 1px solid #eef1f3; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #5b7a89; flex: none; }
  .bz-drawer-head .bz-ibtn { padding: 0; font-size: 13px; letter-spacing: normal; text-transform: none; }
  .bz-pstatus { font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: #5b7a89; }
  .bz-pstatus[data-state="saved"] { color: #2e8b57; animation: bz-fade 2s forwards; }
  .bz-pstatus[data-state="saved"] i { font-size: 10px; }
  .bz-pstatus[data-state="error"] { color: #b42318; }
  .bz-pstatus button { font: inherit; color: inherit; font-weight: 600; background: none; border: none; padding: 0; cursor: pointer; text-decoration: underline; }
  @keyframes bz-fade { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
  .bz-drawer-body { padding: 20px 20px 32px; gap: 0; }
  .bz-view textarea.bz-ptitle { display: block; width: 100%; box-sizing: border-box; border: none; background: none; resize: none; overflow: hidden; padding: 4px 6px; margin: -4px -6px 14px; font: inherit; font-size: 22px; font-weight: 700; line-height: 1.25; color: #072f4a; border-radius: 8px; text-wrap: pretty; min-height: 0; }
  .bz-view textarea.bz-ptitle:hover:not(:read-only) { background: #f3f6f8; }
  .bz-view textarea.bz-ptitle:focus { background: #f3f6f8; outline: 2px solid #0084c9; outline-offset: 0; }
  .bz-props { display: flex; flex-direction: column; gap: 2px; margin-bottom: 20px; }
  .bz-prow { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; min-height: 36px; }
  .bz-plabel { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #5b7a89; }
  .bz-plabel-ic { width: 14px; font-size: 12px; text-align: center; }
  .bz-pval { font: inherit; font-size: 13.5px; color: #072f4a; height: 32px; padding: 0 8px; margin-left: -8px; border: none; border-radius: 7px; background: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; justify-self: start; max-width: 100%; text-align: left; }
  .bz-pval:hover:not(:disabled), .bz-pval.is-open { background: #f3f6f8; }
  .bz-pval:disabled { cursor: default; }
  .bz-pval.is-late { color: #b42318; font-weight: 600; }
  .bz-pempty { color: #8aa2af; }
  .bz-ptags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
  .bz-tagchip--ro { padding: 1px 9px; }
  .bz-plabel2 { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #5b7a89; }
  .bz-psec { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
  .bz-pdesc-wrap { display: flex; flex-direction: column; }
  .bz-pdesc { font: inherit; font-size: 14px; line-height: 1.55; color: #072f4a; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; background: none; border: none; border-radius: 7px; padding: 4px 8px; margin: 0 -8px; cursor: text; }
  .bz-pdesc:hover:not(:disabled) { background: #f3f6f8; }
  .bz-pdesc.is-empty { color: #8aa2af; }
  .bz-view textarea.bz-pdesc-edit { font: inherit; font-size: 14px; line-height: 1.55; width: 100%; box-sizing: border-box; min-height: 60px; resize: none; overflow: hidden; padding: 4px 8px; margin: 0 -8px; width: calc(100% + 16px); border: none; outline: 2px solid #0084c9; border-radius: 7px; background: #fff; }
  .bz-ctasks { gap: 4px; }
  .bz-ctasks-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
  .bz-ctasks-head .bz-meta { font-size: 12px; color: #5b7a89; }
  .bz-ctasks-prog { flex: 1; height: 4px; background: #eef1f3; }
  .bz-ctasks-prog i { background: #0084c9; opacity: 1; }
  .bz-pt-list { display: flex; flex-direction: column; position: relative; }
  .bz-pt { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 8px 0 2px; margin: 0 -8px 0 -4px; border-radius: 8px; }
  .bz-pt:hover, .bz-pt:focus-within { background: #f3f6f8; }
  .bz-pt.is-focus { background: #e6f3fa; }
  .bz-pt.is-ghost { opacity: 0.4; }
  .bz-pt-grip { width: 16px; height: 24px; border: none; background: none; color: #8aa2af; font-size: 11px; cursor: grab; padding: 0; opacity: 0; flex: none; touch-action: none; }
  .bz-pt:hover .bz-pt-grip, .bz-pt-grip:focus-visible, .bz-pt:focus-within .bz-pt-grip { opacity: 1; }
  .bz-view input.bz-pt-title { flex: 1; min-width: 0; border: none; background: none; padding: 0 4px; min-height: 32px; font-size: 13.5px; color: #072f4a; width: auto; }
  .bz-view input.bz-pt-title:focus { background: #fff; outline: 2px solid #0084c9; outline-offset: 0; }
  .bz-pt.is-done .bz-pt-title { color: #8aa2af; text-decoration: line-through; }
  .bz-pt-due { font: inherit; font-size: 12px; color: #5b7a89; background: none; border: none; padding: 4px 6px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
  .bz-pt-due i { font-size: 11px; }
  .bz-pt-due:hover { background: #e4eaee; }
  .bz-pt-due.is-late { color: #b42318; font-weight: 600; }
  .bz-pt-due.is-empty { opacity: 0; } .bz-pt:hover .bz-pt-due.is-empty, .bz-pt-due.is-empty:focus-visible, .bz-pt-due.is-empty.is-open { opacity: 1; color: #8aa2af; }
  .bz-pt-rm { width: 24px; height: 24px; border: none; background: none; border-radius: 6px; color: #8aa2af; cursor: pointer; font-size: 12px; opacity: 0; flex: none; }
  .bz-pt:hover .bz-pt-rm, .bz-pt-rm:focus-visible, .bz-pt:focus-within .bz-pt-rm { opacity: 1; }
  .bz-pt-rm:hover { color: #b42318; background: #e4eaee; }
  .bz-pt-add { font: inherit; font-size: 13.5px; color: #8aa2af; background: none; border: none; text-align: left; height: 36px; padding: 0 8px; margin: 0 -8px; border-radius: 8px; cursor: pointer; }
  .bz-pt-add:hover { background: #f3f6f8; color: #5b7a89; }
  .bz-view input.bz-pt-new { height: 36px; min-height: 36px; border: 1.5px solid #0084c9; font-size: 13.5px; }
  .bz-pact { border-top: 1px solid #eef1f3; padding-top: 16px; }
  .bz-act-list { display: flex; flex-direction: column; gap: 10px; }
  .bz-act { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #3d5d6d; }
  .bz-act-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .bz-act-text b { font-weight: 600; color: #072f4a; }
  .bz-act-time { color: #8aa2af; white-space: nowrap; }
  html.phone .bz-drawer { width: 100vw; }
  html.phone .bz-view.has-panel .bz-body { margin-right: 0; }
  html.phone .bz-toolbar .bz-segc, html.phone .bz-nav3 { order: 8; }
  html.phone .bz-tl-wrap, html.phone .bz-tlist-wrap, html.phone .bz-ilist-wrap { margin: 0 12px 16px; }
  html.phone .bz-pills, html.phone .bz-hint { padding-left: 12px; padding-right: 12px; }

/* ── Forretningsutvikling: Tavle (kanban): kolonner = faser, kort = initiativer med oppgaver (skisse 18a) ── */
.bz-view.is-board .bz-body { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.bz-view.is-board #bz-board { flex: 1; min-height: 0; gap: 0; width: 100%; min-width: 0; margin: 0; }
.bz-page--wide { max-width: none; }
/* verktøylinjen: tittel, antall, hjelp, søk, filtre og Visning på én rad */
.bz-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 20px 24px 16px; }
.bz-toolbar h2.bz-tb-title { font-size: 22px; font-weight: 700; color: #072f4a; line-height: 1.2; margin: 0; }
.bz-tb-count { font-size: 13px; color: #5b7a89; font-variant-numeric: tabular-nums; margin-left: -2px; }
.bz-help { font: inherit; width: 24px; height: 24px; margin-left: -4px; border: none; border-radius: 6px; background: none; color: #8aa2af; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.bz-help:hover, .bz-help.is-open { color: #3d5d6d; background: rgba(7,47,74,0.06); }
.bz-tb-err { font-size: 12.5px; color: #b42318; }
.bz-tb-err[hidden] { display: none; }
.bz-tb-err button { font: inherit; font-weight: 600; color: #b42318; background: none; border: none; padding: 0; cursor: pointer; text-decoration: underline; }
.bz-search { display: flex; align-items: center; gap: 10px; width: 340px; max-width: 100%; height: 36px; padding: 0 8px 0 12px; margin-left: 12px; box-sizing: border-box; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px #dde3e8; color: #8aa2af; font-size: 12px; }
.bz-search:focus-within { box-shadow: 0 0 0 2px #0084c9; }
.bz-view .bz-search input[type="search"] { flex: 1; min-width: 0; border: none; padding: 0; min-height: 0; height: 34px; background: none; font-size: 13px; color: #072f4a; outline: none; }
.bz-view .bz-search input[type="search"]::placeholder { color: #8aa2af; }
.bz-search kbd { font: inherit; font-size: 11px; color: #8aa2af; box-shadow: 0 0 0 1px #dde3e8; border-radius: 4px; padding: 1px 5px; line-height: 1.3; }
.bz-search:focus-within kbd { display: none; }
.bz-tbtn { font: inherit; height: 36px; padding: 0 12px; border: none; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px #dde3e8; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #3d5d6d; cursor: pointer; max-width: 220px; }
.bz-tbtn > span:not(.bz-tbtn-ic) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-tbtn:hover, .bz-tbtn.is-open { box-shadow: 0 0 0 1px #9fb2bd; }
.bz-tbtn.is-set { box-shadow: 0 0 0 1.5px #0084c9; color: #072f4a; font-weight: 600; }
.bz-tbtn-ic { display: inline-flex; }
.bz-tbtn-tag { font-size: 11px; color: #8aa2af; }
.bz-tbtn-caret { font-size: 9px; }
.bz-tlink { font: inherit; height: 36px; padding: 0 12px; border: none; border-radius: 8px; background: none; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #3d5d6d; cursor: pointer; }
.bz-tlink i { font-size: 12px; }
.bz-tlink:hover, .bz-tlink.is-open { background: rgba(7,47,74,0.06); }
.bz-tlink[aria-pressed="true"], .bz-tlink.is-set { background: #e6f3fa; color: #0084c9; }
.bz-tlink:disabled { opacity: 0.5; cursor: default; }
.bz-help:focus-visible, .bz-tbtn:focus-visible, .bz-tlink:focus-visible, .bz-col-btn:focus-visible, .bz-col-new:focus-visible, .bz-cell-add:focus-visible, .bz-cell-empty:focus-visible, .bz-card-menu:focus-visible, .bz-pop-item:focus-visible, .bz-swatch:focus-visible { outline: 2px solid #0084c9; outline-offset: 2px; }
/* menyer (popover) */
.bz-pop { position: fixed; z-index: 950; min-width: 200px; max-width: 300px; max-height: min(420px, calc(100vh - 24px)); overflow-y: auto; box-sizing: border-box; padding: 6px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px #dde3e8, 0 10px 28px rgba(7,47,74,0.18); color: #072f4a; font-size: 13px; }
.bz-pop:focus { outline: none; }
.bz-pop-item { font: inherit; width: 100%; min-height: 34px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: none; border-radius: 6px; background: none; color: inherit; text-align: left; cursor: pointer; }
.bz-pop-item:hover:not(:disabled), .bz-pop-item:focus-visible { background: #f0f4f7; }
.bz-pop-item:disabled { color: #8aa2af; cursor: default; }
.bz-pop-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-pop-check { font-size: 11px; color: #0084c9; visibility: hidden; }
.bz-pop-item[aria-checked="true"] .bz-pop-check { visibility: visible; }
.bz-pop-ic { width: 16px; text-align: center; font-size: 12px; color: #5b7a89; }
.bz-pop-head { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: #8aa2af; }
.bz-pop-sep { height: 1px; margin: 6px 4px; background: #eef1f3; }
.bz-pop--help { max-width: 280px; padding: 12px 14px; }
.bz-pop-p { margin: 0; font-size: 13px; line-height: 1.45; color: #3d5d6d; }
.bz-pop-p + .bz-pop-p { margin-top: 6px; }
.bz-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.bz-lane-sw { width: 14px; height: 14px; border-radius: 4px; flex: none; box-sizing: border-box; }
.bz-swatches { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px 6px; }
.bz-swatch { width: 22px; height: 22px; border-radius: 50%; border: none; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(7,47,74,0.12); }
.bz-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #072f4a; }
/* tavlen og kolonnene: tavlen ruller sidelengs, hver kolonne ruller for seg */
.bz-board-wrap { flex: 1; min-height: 0; overflow: auto hidden; padding: 0 24px 24px; }
.bz-board { display: flex; align-items: flex-start; gap: 12px; height: 100%; min-height: 200px; }
.bz-col { flex: 1 1 0; min-width: 260px; max-width: 380px; max-height: 100%; display: flex; flex-direction: column; gap: 8px; background: #e6ebef; border-radius: 12px; padding: 10px; box-sizing: border-box; min-height: 0; }
.bz-col-head { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 4px; flex: none; }
.bz-col-name { font-size: 13.5px; font-weight: 700; color: #072f4a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bz-col-count { font-size: 12px; font-weight: 600; color: #5b7a89; font-variant-numeric: tabular-nums; }
.bz-col-btn { font: inherit; font-size: 13px; line-height: 1; width: 26px; height: 26px; flex: none; border: none; border-radius: 6px; background: none; color: #5b7a89; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; opacity: 0; }
.bz-col:hover .bz-col-btn, .bz-col:focus-within .bz-col-btn, .bz-col-btn.is-open { opacity: 1; }
.bz-col-btn:hover, .bz-col-btn.is-open { background: rgba(7,47,74,0.08); color: #072f4a; }
@media (hover: none) and (pointer: coarse) { .bz-col-btn { opacity: 1; } }
.bz-cell { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; margin: -2px -4px; padding: 2px 4px; border-radius: 9px; }
.bz-cell.is-over { background: rgba(0,132,201,0.08); }
.bz-cell-empty { font: inherit; height: 72px; flex: none; box-sizing: border-box; border-radius: 9px; border: 1.5px dashed #c5d0d7; background: none; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: #5b7a89; cursor: pointer; }
.bz-cell-empty i { font-size: 11px; }
.bz-cell-empty:hover { border-color: #9fb2bd; color: #072f4a; background: rgba(255,255,255,0.5); }
.bz-cell-empty.is-static { cursor: default; }
.bz-cell.is-over .bz-cell-empty { border-color: #0084c9; background: #e6f3fa; color: #0084c9; }
.bz-cell-add { font: inherit; height: 34px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 8px; border: none; border-radius: 8px; background: none; font-size: 13px; color: #5b7a89; cursor: pointer; text-align: left; }
.bz-cell-add i { font-size: 11px; }
.bz-cell-add:hover { background: rgba(7,47,74,0.06); color: #072f4a; }
.bz-week { font-size: 11px; font-weight: 600; color: #5b7a89; text-align: center; background: #dbe2e7; border-radius: 6px; padding: 4px 6px; flex: none; }
.bz-col-new { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px; border: 1.5px dashed #c5d0d7; background: none; color: #5b7a89; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.bz-col-new:hover { border-color: #9fb2bd; color: #072f4a; background: rgba(255,255,255,0.6); }
/* kortet */
.bz-card { position: relative; flex: none; display: flex; flex-direction: column; gap: 10px; background: #fff; border-radius: 10px; padding: 12px 14px; cursor: grab; box-shadow: 0 1px 2px rgba(7,47,74,0.08), 0 0 0 1px #dde3e8; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.bz-card:hover { box-shadow: 0 4px 12px rgba(7,47,74,0.12), 0 0 0 1px #dde3e8; }
.bz-card:focus-visible { outline: 2px solid #0084c9; outline-offset: 2px; }
.bz-card.is-selected { box-shadow: 0 0 0 2px #0084c9, 0 4px 12px rgba(7,47,74,0.12); }
.bz-card.is-ghost { opacity: 0.35; }
.bz-card.is-clone { position: fixed; z-index: 1000; pointer-events: none; opacity: 0.97; box-shadow: 0 14px 32px rgba(7,47,74,0.28), 0 0 0 1px #dde3e8; transform: rotate(2deg); cursor: grabbing; }
.bz-card-top { display: flex; align-items: center; gap: 8px; min-height: 20px; }
.bz-card-lane { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 5px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bz-card-no { font-size: 11.5px; color: #8aa2af; font-variant-numeric: tabular-nums; }
.bz-card-no--abs { position: absolute; top: 13px; right: 14px; }
.bz-card.has-abs-no .bz-card-title { padding-right: 26px; }
.bz-card-menu { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: none; border-radius: 6px; background: #fff; color: #5b7a89; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; opacity: 0; }
.bz-card:hover .bz-card-menu, .bz-card:focus-within .bz-card-menu, .bz-card-menu.is-open { opacity: 1; }
.bz-card-menu:hover, .bz-card-menu.is-open { background: #eef1f3; color: #072f4a; }
@media (hover: none) and (pointer: coarse) { .bz-card-menu { display: none; } } /* berøring: dra med langt trykk, eller Kolonne i kortskuffen */
.bz-card-title { font-size: 14.5px; font-weight: 600; line-height: 1.35; color: #072f4a; text-wrap: pretty; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bz-card-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #5b7a89; min-height: 24px; }
.bz-card-meta .bz-spacer { flex: 1; }
.bz-card-meta > span:not(.bz-spacer):not(.bz-avatars) { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bz-card-meta .bz-tdue.is-late { color: #b42318; font-weight: 600; }
.bz-card-meta .bz-tdue.is-soon { color: #7a4f00; font-weight: 600; }
.bz-card-tasks.is-all { color: #2f8a57; }
.bz-card-prog { height: 3px; border-radius: 2px; background: #eef1f3; overflow: hidden; margin-top: -2px; }
.bz-card-prog i { display: block; height: 100%; background: #0084c9; border-radius: 2px; }
.bz-avatars { display: inline-flex; flex: none; }
.bz-avatars .bz-avatar { width: 24px; min-width: 24px; height: 24px; border-radius: 50%; padding: 0; font-size: 10px; box-shadow: 0 0 0 2px #fff; }
.bz-avatars .bz-avatar + .bz-avatar { margin-left: -6px; }
.bz-avatar--sm { width: 22px; min-width: 22px; height: 22px; border-radius: 50%; padding: 0; font-size: 9px; }
.bz-av-0 { background: #6b4fbb; color: #fff; } .bz-av-1 { background: #1f2d3a; color: #fff; } .bz-av-2 { background: #0084c9; color: #fff; }
.bz-av-3 { background: #b4560b; color: #fff; } .bz-av-4 { background: #2f8a57; color: #fff; } .bz-av-5 { background: #a0233c; color: #fff; }
.bz-avatar--more { background: #e4eaee; color: #072f4a; }
.bz-view input.bz-cell-input { font: inherit; font-size: 13px; padding: 8px 10px; border: 1.5px solid #0084c9; border-radius: 8px; min-height: 38px; box-sizing: border-box; width: 100%; flex: none; }
.bz-dropline { height: 3px; border-radius: 2px; background: #0084c9; margin: -5.5px 0; flex: none; pointer-events: none; }
.bz-board-empty { flex: 1; }
body.bz-dragging, body.bz-dragging * { cursor: grabbing !important; user-select: none; }
html.phone .bz-toolbar { padding: 14px 12px 12px; gap: 8px; }
html.phone .bz-search { width: 100%; margin-left: 0; order: 9; }
html.phone .bz-board-wrap { padding: 0 12px 16px; }
.bz-drawer { position: fixed; top: 52px; right: 0; bottom: 0; max-width: 100vw; z-index: 60; background: #fff; display: flex; flex-direction: column; }
.bz-drawer[hidden] { display: none; }
.bz-drawer-head { display: flex; align-items: center; }
.bz-drawer-body { overflow-y: auto; display: flex; flex-direction: column; flex: 1; }
.bz-col-box { width: min(720px, 100%) !important; }
.bz-col-row select.bz-col-st { flex: 0 0 170px; width: 170px; font: inherit; font-size: 0.8rem; padding: 6px 8px; border: 1px solid #c3ccd3; border-radius: 8px; min-height: 38px; background: #fff; color: var(--b-navy); }
#bz-col-modal .bz-lane-add input, #bz-col-modal .bz-lane-row input[type="text"] { font: inherit; font-size: 0.84rem; padding: 8px 10px; border: 1px solid #c3ccd3; border-radius: 8px; min-height: 38px; box-sizing: border-box; }
html.phone .bz-drawer { top: 0; width: 100vw; }

/* Ferdig: «Vis alle (N)», slippsone for å forkaste, panelet «Forkastede kort» */
.bz-showall { font: inherit; font-size: 13px; font-weight: 600; color: #0084c9; background: none; border: none; text-align: left; height: 34px; padding: 0 8px; border-radius: 8px; cursor: pointer; flex: none; }
.bz-showall:hover { background: rgba(7,47,74,0.06); }
.bz-showall:focus-visible { outline: 2px solid #0084c9; outline-offset: 2px; }
.bz-dropzone { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 990; width: 360px; max-width: calc(100vw - 24px); height: 56px; box-sizing: border-box; border-radius: 12px; border: 1.5px dashed #9fb2bd; background: rgba(255,255,255,0.95); box-shadow: 0 8px 24px rgba(7,47,74,0.15); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; font-weight: 600; color: #5b7a89; pointer-events: auto; }
.bz-dropzone.is-over { border-color: #b42318; color: #b42318; background: #fdf1f0; }
.bz-disc .bz-drawer-head { justify-content: flex-start; }
.bz-disc-search { padding: 12px 20px 0; }
.bz-disc-search .bz-search { width: 100%; margin-left: 0; }
.bz-disc-list { padding: 12px 20px 24px; gap: 4px; }
.bz-dr { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid #eef1f3; }
.bz-dr-top { display: flex; align-items: flex-start; gap: 8px; }
.bz-dr-title { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; color: #072f4a; line-height: 1.35; overflow-wrap: anywhere; }
.bz-dr-more { margin: -4px -6px 0 0; flex: none; }
.bz-dr-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #5b7a89; }
.bz-dr-restore { font: inherit; font-size: 13px; font-weight: 600; color: #0084c9; background: none; border: none; padding: 4px 0; align-self: flex-start; cursor: pointer; }
.bz-dr-restore:hover { text-decoration: underline; }
.bz-dr-restore:focus-visible, .bz-dr-more:focus-visible { outline: 2px solid #0084c9; outline-offset: 2px; }

/* veikart: statusfarger (fyll og kant); sist i filen så de slår shorthand-reglene for .bz-sw, .bz-bar og .bz-pill */
  .bz-st-ide { background: #fdf3dc; background-image: repeating-linear-gradient(135deg, rgba(212,167,44,0.08) 0 8px, transparent 8px 16px); border-color: #d4a72c; color: #5c3d00; }
  .bz-st-planlagt { background: #fff; border-color: #072f4a; color: #072f4a; }
  .bz-st-pagar { background: #e6f3fa; border-color: #0084c9; color: #064a73; }
  .bz-st-ferdig { background: #e3f3ea; border-color: #2e8b57; color: #14412a; }
  .bz-pill.bz-st-ide, .bz-pill.bz-st-planlagt, .bz-pill.bz-st-pagar, .bz-pill.bz-st-ferdig { border-width: 1.5px; border-style: solid; }
