/* ============================================================
   Veiviser — Chat-basert agentisk interface
   Kantega visuell identitet. Fargene kan overstyres per kunde
   via `theme` i tenant-fila (se tenant/README.md).
   ============================================================ */

/* hidden-attributtet skal alltid vinne. Uten denne blir elementer som
   setter display: flex eller grid stående som tomme striper. */
[hidden] { display: none !important; }

:root {
    --vv-navy: #27003D;
    --vv-navy-deep: #1A0029;
    --vv-white: #FFFFFF;
    --vv-off-white: #FFF8FC;
    --vv-red: #EE3A64;
    --vv-orange: #F49727;
    --vv-green: #028EA7;
    --vv-mint: #06B3C6;
    --font: 'Source Sans Pro', 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(16, 58, 97, 0.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font); font-weight: 400; line-height: 1.6;
    color: var(--vv-navy-deep); background: var(--vv-off-white);
    min-height: 100vh;
    display: flex; flex-direction: column;
}

/* --- Top bar --- */
.topbar {
    background: var(--vv-navy); color: var(--vv-white);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 12px rgba(16, 58, 97, 0.18);
}
.topbar-inner {
    max-width: 720px; margin: 0 auto; padding: 14px 24px;
    display: flex; justify-content: space-between; align-items: center;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-title { font-weight: 600; font-size: 1rem; }
.topbar-back {
    font-family: var(--font); font-size: 0.82rem; font-weight: 600;
    color: var(--vv-white); background: rgba(255,255,255,0.12);
    border: none; border-radius: var(--radius-sm); padding: 5px 10px;
    cursor: pointer; white-space: nowrap; transition: background 0.15s;
}
.topbar-back:hover { background: rgba(255,255,255,0.22); }
.topbar-brand { display: flex; align-items: center; gap: 18px; opacity: 0.9; }
.topbar-logo { display: block; }

.topbar-right { display: flex; align-items: center; gap: 14px; }
.app-menu-wrap { position: relative; }
.app-menu-btn {
    width: 30px; height: 30px; line-height: 1;
    border: 1px solid rgba(255,255,255,0.28); border-radius: 50%;
    background: none; color: var(--vv-white);
    font-size: 1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.app-menu-btn:hover { background: rgba(255,255,255,0.16); }
.app-menu {
    position: absolute; right: 0; top: calc(100% + 8px);
    min-width: 230px; z-index: 200;
    background: var(--vv-white);
    border: 1px solid #e4e0ea; border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(16,58,97,0.16);
    padding: 6px;
}
.app-menu-item {
    display: block; width: 100%; text-align: left;
    background: none; border: none; cursor: pointer;
    font-family: var(--font); font-size: 0.88rem; color: var(--vv-navy);
    padding: 9px 12px; border-radius: 6px;
}
.app-menu-item:hover { background: #f4f2f7; }

/* --- Slik fungerer veiviseren --- */
.howto-overlay {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(16,58,97,0.45);
    align-items: center; justify-content: center;
    padding: 24px;
}
.howto-modal {
    position: relative;
    background: var(--vv-white); border-radius: var(--radius);
    max-width: 560px; width: 100%;
    max-height: 86vh; overflow-y: auto;
    padding: 28px 30px 24px;
}
.howto-title { margin: 0 0 10px; font-size: 1.3rem; color: var(--vv-navy); }
.howto-intro { margin: 0 0 18px; font-size: 0.96rem; line-height: 1.6; color: #3c4750; }
.howto-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.howto-item { display: flex; gap: 12px; align-items: flex-start; }
.howto-num {
    flex: 0 0 auto;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--vv-green); color: var(--vv-white);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 700;
}
.howto-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.howto-item-text strong { color: var(--vv-navy); font-size: 0.95rem; }
.howto-item-text span { font-size: 0.9rem; line-height: 1.55; color: #4a545c; }
.howto-bookmark {
    margin-top: 20px; padding: 14px 16px;
    background: #f7f5fa; border-radius: var(--radius-sm);
}
.howto-bookmark-title { display: block; color: var(--vv-navy); font-size: 0.92rem; }
.howto-bookmark p { margin: 6px 0 10px; font-size: 0.88rem; line-height: 1.55; color: #4a545c; }
.howto-actions { display: flex; justify-content: flex-end; margin-top: 20px; }

body.admin-mode .app-menu-wrap { display: none !important; }

/* --- Container --- */
.container { max-width: 720px; margin: 0 auto; padding: 24px 20px 60px; }

/* --- Screens --- */
.screen { display: none; animation: fadeIn 0.35s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* --- Card --- */
.card {
    background: var(--vv-white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); padding: 40px 36px;
}
@media (max-width: 600px) { .card { padding: 28px 20px; border-radius: var(--radius-md); } }

/* --- Welcome --- */
.welcome-card { text-align: center; }
.welcome-hero {
    background: linear-gradient(135deg, var(--vv-navy), var(--vv-navy-deep));
    margin: -40px -36px 28px; padding: 40px 36px 28px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.welcome-logo { margin-bottom: 16px; }
.welcome-card h1 { font-size: 2rem; font-weight: 700; color: var(--vv-navy); margin-bottom: 4px; }
.welcome-hero h1 { color: var(--vv-white); }
.subtitle { font-size: 1.05rem; color: var(--vv-green); font-weight: 600; margin-bottom: 24px; }
.welcome-hero .subtitle { color: var(--vv-mint); }
.welcome-goal { font-size: 1.2rem; font-style: italic; font-weight: 600; color: var(--vv-white); max-width: 480px; margin: 0 auto 20px; line-height: 1.4; }
.welcome-text { font-size: 1.05rem; max-width: 520px; margin: 0 auto 12px; }
.welcome-hero .welcome-text { color: var(--vv-white); opacity: 0.92; }
.welcome-subtext { font-size: 0.92rem; color: #666; max-width: 480px; margin: 0 auto 24px; }
.welcome-footer { font-size: 0.78rem; color: #aaa; margin-top: 20px; }

.welcome-logout-link {
    display: block;
    margin: 10px auto 0;
    background: none;
    border: none;
    color: #999;
    font-size: 0.78rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 4px 8px;
}
.welcome-logout-link:hover { color: var(--vv-navy); }

.welcome-leader-shortcuts {
    display: none;
    margin: 18px auto 0;
    padding: 14px 16px;
    max-width: 460px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
}
body.is-leader .welcome-leader-shortcuts { display: block; }
.welcome-leader-hint {
    font-size: 0.85rem;
    color: var(--vv-white);
    opacity: 0.85;
    margin: 0 0 10px;
}
.welcome-leader-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Skjul deler av welcome-skjermen inntil deltakeren er logget inn. */
body:not(.is-authed) .welcome-authonly { display: none !important; }
.welcome-lockmsg {
    font-size: 0.95rem;
    color: var(--vv-white);
    opacity: 0.85;
    margin: 8px auto 0;
    max-width: 420px;
}
body.is-authed .welcome-lockmsg { display: none; }

/* Demomodus: ingen tilgangskode, ingen samtykkeboks, ingen deltaker-ID. */
body.is-demo #consentBlock,
body.is-demo #authBlock,
body.is-demo #idRestore,
body.is-demo .welcome-subtext { display: none; }
.consent-demo {
    margin: 0 0 18px; padding: 10px 14px;
    background: rgba(2, 142, 167, 0.08);
    border-left: 3px solid var(--vv-green);
    border-radius: var(--radius-sm);
    font-size: 0.86rem; color: var(--vv-navy);
}

.firsttime-tip {
    max-width: 480px;
    margin: 0 auto 20px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: #fff7e6;
    border: 1px solid #f2c46a;
    text-align: left;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.firsttime-tip__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--vv-navy);
    margin-bottom: 6px;
}
.firsttime-tip__body {
    font-size: 0.92rem;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.5;
}
.firsttime-tip__body strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: rgba(0,0,0,0.06);
    padding: 1px 6px;
    border-radius: 4px;
}

.auth-block { margin: 0 auto 20px; max-width: 420px; }
.auth-options { display: block; margin-top: 14px; text-align: left; }
.auth-options .btn { width: 100%; box-sizing: border-box; }
.auth-options .form-group { margin-top: 6px; }
.auth-options input[type="password"] { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #d8d8d8; border-radius: 6px; font-size: 0.95rem; }
.auth-options input[type="password"]:focus { outline: none; border-color: var(--vv-green); }
.auth-options .form-group .btn { margin-top: 10px; }
.field-hint { font-size: 0.78rem; color: #999; margin-top: 4px; }
.wordcount {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.75rem; color: #adb5bd; margin-top: 4px;
    font-variant-numeric: tabular-nums;
    transition: color 0.2s ease;
}
.wordcount .wc-num { font-weight: 600; color: #6c757d; }
.wordcount .wc-check {
    opacity: 0; transform: scale(0.7); transition: opacity 0.2s ease, transform 0.2s ease;
    color: var(--vv-green); font-size: 0.85rem; line-height: 1;
}
.wordcount--ok { color: var(--vv-green); }
.wordcount--ok .wc-num { color: var(--vv-green); }
.wordcount--ok .wc-check { opacity: 0.85; transform: scale(1); }
.auth-error { font-size: 0.82rem; color: #c44; margin-top: 8px; }
.leader-code-toggle { margin-top: 8px; }
.leader-code-toggle summary { font-size: 0.8rem; color: #999; cursor: pointer; }
.leader-code-toggle input[type="password"] { margin-top: 8px; }

/* API status indicator */
.api-status {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    font-size: 0.78rem; font-weight: 500;
    margin-bottom: 20px;
    transition: color 0.3s;
}
.api-dot {
    width: 7px; height: 7px; border-radius: 50%;
    display: inline-block; flex-shrink: 0;
    transition: background 0.3s;
}
.api-status--nokey { color: #bbb; }
.api-status--nokey .api-dot { background: #ddd; }
.api-status--checking { color: #bbb; }
.api-status--checking .api-dot { background: var(--vv-orange); animation: dotPulse 1s ease-in-out infinite; }
@keyframes dotPulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.api-status--ok { color: var(--vv-green); }
.api-status--ok .api-dot { background: var(--vv-green); }
.api-status--error { color: #c88; }
.api-status--error .api-dot { background: #c88; }

/* --- Mode selection --- */
.mode-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 24px; padding: 14px 18px;
    background: linear-gradient(135deg, rgba(39,222,166,0.06), rgba(20,115,86,0.04));
    border-left: 3px solid var(--vv-mint);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.95rem;
}
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .mode-grid { grid-template-columns: 1fr; } }
.mode-card {
    display: flex; flex-direction: column; align-items: flex-start;
    padding: 24px; border: 2px solid #dee2e6; border-radius: var(--radius-md);
    background: var(--vv-white); cursor: pointer; transition: all 0.2s;
    text-align: left; font-family: var(--font);
}
.mode-card:hover { border-color: var(--vv-mint); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(16,58,97,0.08); }
.mode-card__tag {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; padding: 3px 10px; border-radius: 3px; margin-bottom: 12px;
}
.mode-card__tag--teal { background: rgba(20,115,86,0.12); color: var(--vv-green); }
.mode-card__tag--coral { background: rgba(248,74,74,0.12); color: var(--vv-red); }
.mode-grid--slotted { margin-top: 16px; }
.mode-grid--slotted.mode-grid--empty { margin-top: 0; }
.mode-card--module { border-style: dashed; border-color: var(--vv-orange); }
.mode-card--module:hover { border-color: var(--vv-orange); }
.mode-card--module .mode-card__tag { background: rgba(255,144,8,0.14); color: var(--vv-orange); }
.mode-card__title { font-size: 1.15rem; font-weight: 700; color: var(--vv-navy); margin-bottom: 6px; }
.mode-card__desc { font-size: 0.88rem; color: #666; line-height: 1.5; margin-bottom: 12px; flex-grow: 1; }
.mode-card__output { font-size: 0.78rem; font-weight: 600; color: var(--vv-green); }

/* ============================================ */
/*  CHAT INTERFACE                              */
/* ============================================ */

/* Chatten vokser med innholdet. Den skal ikke reservere en hel
   skjermhøyde og etterlate et tomrom mellom svarene og inntastingen. */
.chat-container {
    display: flex; flex-direction: column;
    min-height: 220px;
    min-width: 0;
}
.chat-messages {
    flex: 1; overflow-y: auto;
    padding: 0 0 20px;
}

/* --- Todelt visning i modul 2 ---
   Samtalen til venstre, visualiseringen til høyre. Klassen settes på
   body av sitpanel.js, siden containeren må slippes ut fra 720 px for
   at to kolonner skal ha plass. */
.chat-layout { display: block; }
body.split-view .container { max-width: 1140px; }
body.split-view .chat-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 36px;
    align-items: start;
}
/* Panelet følger med nedover mens samtalen vokser. */
body.split-view .sitpanel { position: sticky; top: 84px; }

/* På smal skjerm faller panelet over samtalen, ikke under den. */
@media (max-width: 1000px) {
    body.split-view .chat-layout { display: flex; flex-direction: column; }
    body.split-view .sitpanel { order: -1; position: static; margin-bottom: 18px; }
}

/* --- Panelet selv --- */
.sitpanel {
    border: 1px solid #e4e0ea;
    border-radius: var(--radius-sm);
    background: var(--vv-white);
    padding: 18px 20px 10px;
    margin: 0;
}
.sp-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 10px;
}
.sp-theme {
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--vv-green);
}
.sp-count { font-size: 0.78rem; color: #8b8595; white-space: nowrap; }
.sp-title {
    margin: 0 0 8px; font-size: 0.82rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    color: #8b8595;
}
/* Utsagnet er det tyngste elementet i panelet. Det skal leses som et
   sitat hun tar stilling til, ikke som brødtekst. */
.sp-text {
    margin: 0 0 6px; padding: 0 0 0 14px;
    border-left: 3px solid var(--vv-green);
    font-size: 1.08rem; line-height: 1.5; font-weight: 600;
    color: var(--vv-navy);
}
/* SVG-en er 600 enheter bred og skaleres ned til panelbredden. Uten
   egne størrelser her blir 13 px tekst til 8 px på skjermen. */
.sp-svg { display: block; width: 100%; height: auto; margin-top: 4px; }
.sitpanel .sp-pole { font-size: 21px; }
.sitpanel .sp-marker { font-size: 23px; }
.sitpanel .sp-axis { stroke-width: 3; }
.sitpanel .sp-dot { r: 9; }
.sitpanel .sp-dot--on { r: 15; }

/* --- Oversikten som fyller seg ut --- */
.sp-track { border-top: 1px solid #ede9f2; margin-top: 10px; padding-top: 12px; }
.sp-track-title {
    margin: 0 0 8px; font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em; color: #8b8595;
}
.sp-rows { list-style: none; margin: 0 0 8px; padding: 0; }
.sp-row {
    display: grid; grid-template-columns: 1fr auto;
    align-items: center; gap: 4px 10px;
    padding: 7px 0; border-bottom: 1px solid #f4f1f8;
}
.sp-row:last-child { border-bottom: none; }
.sp-row-t { font-size: 0.85rem; color: #8b8595; line-height: 1.35; }
.sp-row--done .sp-row-t { color: #3c4750; }
.sp-row--now .sp-row-t { color: var(--vv-navy); font-weight: 700; }
.sp-row-v {
    grid-column: 1 / -1; font-size: 0.78rem; color: #8b8595;
}
.sp-row--done .sp-row-v { color: var(--vv-green); font-weight: 600; }
.sp-mini { display: inline-flex; gap: 4px; align-items: center; }
.sp-mini-dot {
    display: block; width: 7px; height: 7px; border-radius: 50%;
    background: #e4e0ea;
}
.sp-mini-dot--on { background: var(--vv-green); transform: scale(1.35); }
.sp-axis { stroke: #ddd8e4; stroke-width: 2; }
.sp-dot { fill: #ddd8e4; }
.sp-dot--on { fill: var(--vv-green); }
.sp-pole { font-size: 13px; fill: #6d7780; }
.sp-marker { font-size: 13px; font-weight: 600; fill: var(--vv-navy); }

/* --- «Spørsmålet treffer ikke» --- */
/* Står rett under spørsmålet, ikke nede ved siden av svarknappen.
   Deltakeren må se den uten å lete. */
.chat-reframe { display: none; }

/* Hintet ligger i spørsmålsboblen, ikke i en egen rad under samtalen.
   Samme visuelle språk som «endre» på brukerens bobler: stille til man
   er i nærheten av det. Ikke pille, ikke ikon — det er et spørsmål om
   spørsmålet, ikke en handling. */
.reframe-hint {
    display: block;
    margin: 10px -4px -2px auto;
    background: none; border: none; cursor: pointer;
    font-family: var(--font); font-size: 0.72rem; font-weight: 600;
    color: #8b8595;
    padding: 2px 4px;
    text-decoration: underline; text-underline-offset: 3px;
    opacity: 0.6;
    transition: opacity 0.15s ease, color 0.15s ease;
}
.chat-msg--agent .chat-bubble:hover .reframe-hint,
.reframe-hint:focus-visible { opacity: 1; color: var(--vv-navy); }
@media (hover: none) { .reframe-hint { opacity: 0.85; } }
.reframe-skip {
    display: block; margin-top: 8px;
    background: none; border: none; cursor: pointer;
    font-family: var(--font); font-size: 0.82rem; color: #8b8595;
    padding: 4px 2px; text-decoration: underline; text-underline-offset: 3px;
}
.reframe-skip:hover { color: var(--vv-navy); }
@media (max-width: 640px) { .chat-reframe { margin-left: 0; } }

/* --- Fordeling langs aksen, kursleders visning --- */
.axis-dist {
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: end; gap: 14px;
}
.axis-cols { display: flex; align-items: flex-end; gap: 10px; }
.axis-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.axis-bar {
    display: block; width: 22px; border-radius: 3px 3px 0 0;
    background: var(--vv-green);
}
.axis-n { font-size: 0.74rem; color: #6d7780; }
.axis-pole { font-size: 0.82rem; color: #5d6b73; line-height: 1.4; }
.axis-pole--right { text-align: right; }

/* --- Enig-uenig-skalaen i modul 2 ---
   Fem trinn med navn under hvert. Ingen av dem er markert som det
   riktige, og ingen av dem er større enn de andre før hun velger. */
.likert {
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 6px; padding: 4px 0;
}
.likert-opt {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    background: none; border: 1px solid transparent; border-radius: var(--radius-sm);
    cursor: pointer; padding: 10px 4px;
    font-family: var(--font);
    transition: background 0.12s ease, border-color 0.12s ease;
}
.likert-dot {
    display: block; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid #c8c2d2; background: var(--vv-white);
    transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.likert-label {
    font-size: 0.78rem; line-height: 1.3; color: #5d6b73; text-align: center;
}
.likert-opt:hover { background: rgba(20,115,86,0.05); }
.likert-opt:hover .likert-dot { border-color: var(--vv-green); transform: scale(1.12); }
.likert-opt:focus-visible { border-color: var(--vv-green); outline: none; }
.likert-opt.selected { background: rgba(20,115,86,0.09); }
.likert-opt.selected .likert-dot {
    background: var(--vv-green); border-color: var(--vv-green); transform: scale(1.22);
}
.likert-opt.selected .likert-label { color: var(--vv-navy); font-weight: 700; }
.scale-caption {
    margin: 6px 0 0; text-align: center;
    font-size: 0.84rem; color: #8b8595; min-height: 1.2em;
}

/* Under 560 px blir fem kolonner uleselige. Da står trinnene under
   hverandre som en vanlig liste, med navnet først. */
@media (max-width: 560px) {
    .likert { grid-template-columns: 1fr; gap: 2px; }
    .likert-opt {
        flex-direction: row; justify-content: flex-start; gap: 12px;
        padding: 11px 10px; border: 1px solid #e4e0ea;
    }
    .likert-label { text-align: left; font-size: 0.92rem; }
}

/* --- Chat messages --- */
.chat-msg {
    display: flex; gap: 12px;
    margin-bottom: 16px;
    animation: msgIn 0.3s ease;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.chat-msg--agent { align-items: flex-start; }
.chat-msg--user { justify-content: flex-end; }

.chat-avatar {
    flex-shrink: 0; width: 36px; height: 36px;
    background: rgba(16,58,97,0.06); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-top: 2px;
}

.chat-bubble {
    max-width: 85%; padding: 14px 18px;
    font-size: 0.95rem; line-height: 1.6;
    border-radius: var(--radius-md);
}
.chat-msg--agent .chat-bubble {
    background: var(--vv-white);
    border: 1px solid #dee2e6;
    border-radius: 2px var(--radius-md) var(--radius-md) var(--radius-md);
    box-shadow: 0 2px 8px rgba(16,58,97,0.05);
}
.chat-msg--user .chat-bubble {
    background: var(--vv-navy); color: var(--vv-white);
    border-radius: var(--radius-md) 2px var(--radius-md) var(--radius-md);
}
.chat-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    font-style: italic;
    color: #6c757d;
    line-height: 1.45;
}

.admin-plenum-launch {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin: 0 0 16px;
}
.admin-plenum-note { font-size: 0.85rem; color: #6c757d; }
/* --- Plenumsflate (storskjerm) --- */
body.plenum-mode .topbar,
body.plenum-mode .veileder-fab { display: none !important; }
body.plenum-mode { background: var(--vv-navy-deep, #051C2C); }

.plenum {
    position: fixed; inset: 0; z-index: 1200;
    overflow-y: auto;
    background: var(--vv-navy-deep, #051C2C);
    color: #eef4f7;
    padding: 28px 36px 40px;
}
.plenum-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 20px; flex-wrap: wrap;
    border-bottom: 1px solid rgba(255,255,255,0.14);
    padding-bottom: 16px; margin-bottom: 22px;
}
.plenum-title { margin: 0; font-size: 2rem; font-weight: 800; color: #fff; }
.plenum-sub { margin: 4px 0 0; font-size: 1rem; color: #9fb6c4; }
.plenum-actions { display: flex; gap: 10px; }
.pl-count {
    margin: 0 0 20px;
    font-size: 1.6rem; font-weight: 700; color: #fff;
}

/* Fire store tall. Det er dem salen skal lese. */
.pl-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 28px;
}
.pl-stat {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-top: 3px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    padding: 18px 20px;
}
.pl-stat--press { border-top-color: var(--vv-red); }
.pl-stat--posisjonert { border-top-color: var(--vv-mint); }
.pl-stat--rolig { border-top-color: rgba(255,255,255,0.28); }
.pl-stat--rustet { border-top-color: var(--vv-green); }
.pl-stat-num {
    display: block;
    font-size: 3rem; font-weight: 800; line-height: 1; color: #fff;
    font-variant-numeric: tabular-nums;
}
.pl-stat-label {
    display: block; margin-top: 6px;
    font-size: 0.95rem; color: #9fb6c4;
}

.pl-chart { max-width: 860px; margin: 0 auto 32px; }
.pl-svg { width: 100%; height: auto; display: block; }
.pl-quad { fill: rgba(255,255,255,0.03); }
.pl-quad--press { fill: rgba(232,44,42,0.10); }
.pl-quad--posisjonert { fill: rgba(52,187,218,0.10); }
.pl-quad--rustet { fill: rgba(0,151,169,0.08); }
.pl-grid-line { stroke: rgba(255,255,255,0.08); stroke-width: 1; }
.pl-frame { fill: none; stroke: rgba(255,255,255,0.2); stroke-width: 1.5; }
.pl-axis { stroke: rgba(255,255,255,0.32); stroke-width: 2; }
.pl-axis-label { font-size: 19px; font-weight: 700; fill: #9fb6c4; }
.pl-tick { font-size: 15px; fill: #7f97a6; }
.pl-dot {
    fill: var(--vv-mint, #34BBDA); fill-opacity: 0.9;
    stroke: var(--vv-navy-deep, #051C2C); stroke-width: 3;
}

/* Små multipler, like brede, side om side */
.pl-bars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px 32px;
}
.pl-bar-title {
    margin: 0 0 10px; font-size: 1rem; font-weight: 700; color: #fff;
    padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,0.12);
}
.pl-bar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 30px;
    align-items: center; gap: 10px;
    margin-bottom: 6px;
}
.pl-bar-label { font-size: 0.86rem; color: #9fb6c4; }
.pl-bar-track { height: 10px; background: rgba(255,255,255,0.1); border-radius: 999px; overflow: hidden; }
.pl-bar-fill { display: block; height: 100%; background: var(--vv-mint, #34BBDA); border-radius: 999px; }
.pl-bar-count { font-size: 0.9rem; font-weight: 700; color: #fff; text-align: right; }
.pl-note { margin: 30px 0 0; font-size: 0.9rem; color: #7f97a6; }
.pl-empty { font-size: 1.2rem; color: #9fb6c4; }

@media (max-width: 900px) {
    .pl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pl-stat-num { font-size: 2.2rem; }
}


/* --- Forarbeidsbanner og oppfølgingssamtykke --- */


.wm-badge--stale {
    background: rgba(244,151,39,0.16);
    color: #8a5a12;
    font-size: 0.72rem; font-weight: 700;
    padding: 3px 9px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 0.03em;
}

/* --- Deltakere og personlige lenker --- */
.inv-create {
    margin: 22px 0 8px; padding: 4px 16px;
    border: 1px dashed #dcd6e4; border-radius: 8px; background: #fff;
}
.inv-create[open] { padding: 12px 16px 16px; }
.inv-create-summary { cursor: pointer; font-weight: 600; font-size: 0.92rem; padding: 8px 0; list-style: none; color: var(--vv-navy); }
.inv-create-summary::-webkit-details-marker { display: none; }
.inv-create-summary::before { content: "▸ "; color: var(--vv-green); }
.inv-create[open] .inv-create-summary::before { content: "▾ "; }
.inv-create label { display: block; font-size: 0.86rem; color: #6c757d; margin: 6px 0 6px; }
.inv-create textarea {
    width: 100%; box-sizing: border-box; padding: 10px 12px;
    border: 1.5px solid #ced4da; border-radius: 8px; font: inherit; font-size: 0.95rem;
}
.inv-create-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.inv-msg { font-size: 0.85rem; margin: 8px 0 0; min-height: 1.2em; }
.inv-msg--ok { color: var(--vv-green); font-weight: 600; }
.inv-msg--err { color: var(--vv-red); font-weight: 600; }

.inv-tiles { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.inv-tile {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    min-width: 96px; padding: 8px 12px; border-radius: 8px;
    background: #fff; border: 1.5px solid #e6e1ec; cursor: pointer;
    font-family: inherit; text-align: left; color: #495057;
    border-top: 3px solid #cfc9d8;
}
.inv-tile strong { font-size: 1.25rem; color: var(--vv-navy); font-variant-numeric: tabular-nums; line-height: 1.1; }
.inv-tile span { font-size: 0.76rem; letter-spacing: 0.02em; }
.inv-tile:hover:not(:disabled) { border-color: var(--vv-green); }
.inv-tile.is-active { background: #ece7f5; border-color: var(--vv-navy); }
.inv-tile:disabled { opacity: 0.5; cursor: default; }
.inv-tile--done { border-top-color: var(--vv-green); }
.inv-tile--started { border-top-color: var(--vv-orange); }
.inv-tile--opened { border-top-color: #8b8595; }
.inv-tile--none { border-top-color: #cfc9d8; }

.inv-table-wrap { overflow-x: auto; background: #fff; border: 1px solid #e9ecef; border-radius: 8px; }
.inv-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.inv-table th, .inv-table td {
    text-align: left; padding: 10px 12px; border-bottom: 1px solid #eef1f6; vertical-align: middle;
}
.inv-table tbody tr:last-child td { border-bottom: none; }
.inv-table th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: #8b8595; background: #faf9fb; }
.inv-name { font-weight: 600; color: var(--vv-navy); }
.inv-name .inv-id { display: block; font-weight: 400; margin-top: 1px; }
.inv-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.76rem; color: #8b8595; }
.inv-status-cell { white-space: nowrap; }
.inv-seen { display: block; font-size: 0.76rem; color: #8b8595; margin-top: 3px; }
.inv-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.inv-actions .btn-link { font-size: 0.85rem; }
.inv-table th.inv-pick, .inv-table td.inv-pick { width: 34px; padding-right: 0; }
.inv-check, #inviteCheckAll { width: 16px; height: 16px; cursor: pointer; accent-color: var(--vv-navy); }
.inv-filter-empty { color: #8b8595; font-style: italic; text-align: center; padding: 18px 12px; }

.inv-status {
    display: inline-block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em;
    text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
}
.inv-status--done { background: rgba(2,142,167,0.14); color: #056b77; }
.inv-status--started { background: rgba(244,151,39,0.18); color: #8a5a12; }
.inv-status--opened { background: rgba(120,120,140,0.14); color: #55555f; }
.inv-status--none { background: #f1eef5; color: #77707f; }

.inv-bulk { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.inv-bulk-spacer { flex: 1; }
.inv-bulk .btn-link { font-size: 0.85rem; }
.inv-bulk .btn-link:disabled { opacity: 0.4; cursor: default; }
.inv-all-done { font-size: 0.9rem; font-weight: 600; color: #056b77; }
.inv-note { margin-top: 20px; }

/* --- Inspeksjonsmodus og personlig lenke --- */
.inspect-banner {
    position: sticky; top: 0; z-index: 1100;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: #2d1b4d; color: #f3eefa;
    padding: 10px 18px;
    font-size: 0.9rem;
}
.inspect-banner strong { color: #fff; }
.invite-msg {
    max-width: 640px; margin: 12px auto; padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
}
.invite-msg--err { background: #fdecec; border: 1px solid #f3c4c4; color: #8a2b2b; }

.chat-dig {
    display: inline-block;
    margin: 0 0 6px;
    padding: 3px 10px;
    background: rgba(0,151,169,0.13);
    color: var(--vv-green);
    border-radius: 20px;
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
}

/* Utsagnet i modul 2, inne i samtaleboblen. */
.chat-sitat {
    display: block;
    margin: 2px 0 10px;
    padding: 2px 0 2px 14px;
    border-left: 3px solid var(--vv-green);
    font-size: 1.04rem; font-weight: 600; line-height: 1.5;
    color: var(--vv-navy);
}

.mirror-list { margin: 0; }
.mirror-q {
    margin: 12px 0 3px;
    font-size: 0.88rem; font-weight: 700; color: var(--vv-navy);
}
.mirror-q:first-child { margin-top: 0; }
.mirror-a { margin: 0; font-size: 0.95rem; color: #444; line-height: 1.6; }

/* --- Onepager til egen ledergruppe --- */
#screen-onepager { --op-primary: #1f2d3d; --op-accent: #0097A9; }
.op-brand { margin-top: 18px; padding-top: 18px; border-top: 1px solid #ece8f1; }
.op-brand-lead { margin: 0 0 4px; font-size: 0.95rem; }
.op-brand-hint { margin: 0 0 14px; font-size: 0.85rem; color: #6c757d; line-height: 1.55; }
.op-brand-row { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.op-brand-field { display: flex; flex-direction: column; gap: 5px; font-size: 0.82rem; color: #5d5768; }
.op-brand-field input[type="color"] {
    width: 54px; height: 34px; padding: 0;
    border: 1px solid #d5cee0; border-radius: 6px; background: none; cursor: pointer;
}
.op-brand-field--file input { font-size: 0.8rem; max-width: 220px; }
.op-brand-msg { margin: 10px 0 0; font-size: 0.85rem; }
.op-brand-msg--ok { color: var(--vv-green); font-weight: 600; }
.op-brand-msg--err { color: var(--vv-red); font-weight: 600; }

.op-preview { margin: 22px 0 0; }
.op-sheet {
    background: var(--vv-white);
    border: 1px solid #e4e0ea;
    border-radius: var(--radius-md);
    padding: 40px 44px 32px;
    box-shadow: var(--shadow);
}
.op-head {
    display: flex; align-items: flex-start; gap: 22px;
    padding-bottom: 16px; margin-bottom: 24px;
    border-bottom: 3px solid var(--op-primary);
}
.op-logo { max-height: 60px; max-width: 170px; display: block; }
.op-eyebrow {
    margin: 0 0 4px;
    font-size: 0.7rem; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--op-accent);
}
.op-title { margin: 0 0 4px; font-size: 1.9rem; font-weight: 800; color: var(--op-primary); line-height: 1.15; }
.op-meta { margin: 0; font-size: 0.9rem; color: #6c757d; }
.op-block { margin: 0 0 22px; }
.op-h3 {
    margin: 0 0 7px;
    font-size: 0.74rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--op-primary);
}
.op-body { margin: 0; font-size: 0.98rem; line-height: 1.65; }
.op-body--stop { font-weight: 600; color: var(--op-primary); }
.op-list { margin: 0; padding-left: 20px; }
.op-list li { margin: 0 0 6px; font-size: 0.98rem; line-height: 1.6; }
.op-list li::marker { color: var(--op-accent); }
.op-foot {
    margin-top: 26px; padding-top: 12px;
    border-top: 1px solid #e9e5ef;
    font-size: 0.78rem; color: #8b8595;
}
@media (max-width: 600px) {
    .op-sheet { padding: 26px 22px 22px; }
    .op-head { flex-direction: column; gap: 14px; }
    .op-title { font-size: 1.5rem; }
}

/* Kompakte fordelinger i admin */
.ls-stats {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px; margin-top: 6px;
}
.ls-stat {
    background: #f7f5fa; border: 1px solid #eae6f0;
    border-radius: 10px; padding: 14px 16px;
}
.ls-stat--has { background: rgba(0,151,169,0.08); border-color: rgba(0,151,169,0.3); }
.ls-stat-num {
    display: block; font-size: 1.9rem; font-weight: 800; line-height: 1;
    color: var(--vv-navy); font-variant-numeric: tabular-nums;
}
.ls-stat-label { display: block; margin-top: 5px; font-size: 0.86rem; color: #3f3a4a; }
.ls-stat-pct { display: block; margin-top: 2px; font-size: 0.76rem; color: #8b8595; }

.ls-tally-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 18px 28px; margin-top: 8px;
}
.ls-tally-title {
    margin: 0 0 8px; font-size: 0.8rem; font-weight: 700;
    color: var(--vv-navy);
}
.ls-tally .ls-bar-row { grid-template-columns: minmax(0, 1fr) 90px 26px; }

@media (max-width: 900px) {
    .ls-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- Lederkortet, modul 2 --- */
.shift-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.shift-item {
    display: flex; flex-direction: column; gap: 5px;
    padding: 14px 16px;
    background: #faf9fc;
    border-left: 3px solid var(--vv-green);
    border-radius: var(--radius-sm);
}
.shift-title { font-size: 1.04rem; font-weight: 700; color: var(--vv-navy); }
.shift-mal { font-size: 0.93rem; color: #444; line-height: 1.55; }
.shift-hard { font-size: 0.9rem; color: #5d5768; line-height: 1.55; }
.shift-hard em { font-style: normal; font-weight: 600; color: var(--vv-navy); }
.shift-sharp {
    margin-top: 3px; padding-top: 8px;
    border-top: 1px dashed #ddd6e6;
    font-size: 0.93rem; font-weight: 600; color: var(--vv-navy); line-height: 1.55;
}
.input-radio--own { border-style: dashed; }

/* Egne svar i samtalen er klikkbare. Ett klikk tilbake til spørsmålet. */
.chat-bubble--editable {
    position: relative;
    display: block;
    width: 100%;
    text-align: left;
    font: inherit;
    cursor: pointer;
    border: 1px solid transparent;
}
.chat-bubble--editable:hover { border-color: rgba(255,255,255,0.45); }
.chat-bubble--editable:focus-visible { outline: 2px solid var(--vv-mint); outline-offset: 2px; }
.chat-edit-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.chat-bubble--editable:hover .chat-edit-hint,
.chat-bubble--editable:focus-visible .chat-edit-hint { opacity: 0.75; }
@media (hover: none) {
    .chat-edit-hint { opacity: 0.55; }
}

/* Diskret utløser nederst i sidemenyen */
.admin-nav-quiet {
    margin-top: 26px;
    text-align: left;
    background: none; border: none;
    padding: 8px 12px;
    font-family: inherit; font-size: 0.82rem;
    color: #8b8595; cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px;
}
.admin-nav-quiet:hover { color: var(--vv-navy); }
.program-decks {
    margin-top: 26px; padding-top: 18px;
    border-top: 1px solid #e6e1ec;
}
.program-decks-title {
    margin: 0 0 10px;
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: #8b8595;
}
.program-decks-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- Bunnlinjen. Samme farge som toppen, med diskret utlogging. --- */
.sitefoot {
    margin-top: auto;
    background: var(--vv-navy);
    color: var(--vv-white);
}
.sitefoot-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.sitefoot-brand { display: inline-flex; align-items: center; gap: 18px; opacity: 0.85; }
.sitefoot-logo { display: block; }
.sitefoot-line {
    flex: 1 1 auto;
    font-size: 0.78rem;
    opacity: 0.65;
    min-width: 0;
}
.sitefoot-logout {
    background: none; border: none; padding: 4px 2px;
    font-family: var(--font); font-size: 0.78rem;
    color: var(--vv-white); opacity: 0.6;
    cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px;
}
.sitefoot-logout:hover { opacity: 1; }
body.admin-mode .sitefoot { display: none !important; }
@media (max-width: 600px) {
    .sitefoot-inner { padding: 14px 16px; gap: 12px; }
    .sitefoot-line { flex-basis: 100%; order: 3; }
}

/* --- Bla mellom spørsmålene --- */
.chat-nav {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 4px 2px;
    border-top: 1px solid #ece8f1;
    margin-top: 10px;
}
.chat-nav:empty { display: none; }
.chat-nav-btn {
    font-family: var(--font); font-size: 0.84rem; font-weight: 600;
    padding: 6px 13px;
    background: var(--vv-white); color: var(--vv-navy);
    border: 1px solid #d5cee0; border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.chat-nav-btn:hover:not(:disabled) { background: #f6f3fb; border-color: var(--vv-navy); }
.chat-nav-btn:disabled { opacity: 0.4; cursor: default; }
.chat-nav-btn--done {
    margin-left: auto;
    background: var(--vv-navy); color: var(--vv-white); border-color: var(--vv-navy);
}
.chat-nav-btn--done:hover:not(:disabled) { background: #081e32; }
.chat-nav-pos { font-size: 0.8rem; color: #6c757d; }
.chat-avatar-initial {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px;
    background: var(--vv-navy); color: var(--vv-white);
    border-radius: 50%;
    font-size: 0.72rem; font-weight: 700;
}

/* --- Endre-lenker på refleksjonskortet --- */
.edit-link {
    background: none; border: none; padding: 0;
    font-family: var(--font); font-size: 0.78rem; font-weight: 600;
    color: var(--vv-green); cursor: pointer;
    text-decoration: underline; text-underline-offset: 2px;
}
.edit-link:hover { color: var(--vv-navy); }
.section-edit { float: right; font-weight: 600; }

.card-stale {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: #fff8ec;
    border: 1px solid #f0dcb8;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin: 0 0 18px;
    font-size: 0.9rem; color: #6b4e16;
}

/* --- Modenhetsvurdering: kvadrant, dimensjoner, bordkort --- */
.quadrant { margin: 6px 0 14px; }
.qd-svg { width: 100%; max-width: 440px; height: auto; display: block; margin: 0 auto; }
.qd-cell { fill: #f6f4fa; }
.qd-cell--on { fill: rgba(0,151,169,0.13); }
.qd-frame { fill: none; stroke: #ddd6e6; stroke-width: 1; }
.qd-axis { stroke: #b9b1c6; stroke-width: 1.2; }
.qd-axis-label { font-size: 11px; font-weight: 700; fill: var(--vv-navy); }
.qd-cell-label { font-size: 10.5px; font-weight: 700; fill: #9a92a8; }
.qd-cell-label--on { fill: var(--vv-navy); }
.qd-dot { fill: var(--vv-green); stroke: var(--vv-white); stroke-width: 2.5; }
.qd-dot-halo { fill: var(--vv-green); fill-opacity: 0.2; }
.quadrant-verdict {
    margin: 2px 0 10px;
    font-size: 0.82rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: #8b8595;
}

.dimbars, .expbars {
    display: flex; flex-direction: column; gap: 9px;
    margin: 4px 0 16px;
}
.dimbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-radius: 7px;
    padding: 5px 8px;
    margin: 0 -8px;
    font-family: var(--font);
    cursor: pointer;
}
.dimbar:hover { background: #f5f2fa; }
.dimbar:hover .dimbar-name { text-decoration: underline; text-underline-offset: 2px; }
.dimbar:focus-visible { outline: 2px solid var(--vv-green); outline-offset: 1px; }
.bars-label {
    margin: 14px 0 6px;
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: #8b8595;
}
.bars-label:first-of-type { margin-top: 2px; }
.dimbar-name { font-size: 0.92rem; color: #333; }
.dimbar-pips { display: inline-flex; gap: 4px; }
.dimbar-pip {
    width: 22px; height: 8px;
    background: #e4e0ea;
    border-radius: 999px;
}
.dimbar-pip--on { background: var(--vv-green); }
.dimbar-pip--exp { background: var(--vv-red); }
.dimbar-level {
    font-size: 0.82rem; font-weight: 600;
    color: #6c757d;
    min-width: 104px; text-align: right;
}
.dimbar--gap .dimbar-name { font-weight: 700; color: var(--vv-navy); }
.dimbar-tag {
    grid-column: 3;
    justify-self: end;
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--vv-red);
}
.reflection-body--gap { font-weight: 600; color: var(--vv-navy); }

.reflection-section--bordkort {
    background: #faf9fc;
    border: 1px solid #e7e2ee;
    border-radius: var(--radius-sm);
    padding: 18px 20px;
}
.bordkort-lead { font-size: 0.9rem; color: #555; margin: 0 0 12px; line-height: 1.55; }
.bordkort-fields { display: flex; flex-direction: column; gap: 10px; }
.bordkort-field { display: flex; gap: 10px; align-items: flex-start; }
.bordkort-num {
    flex: 0 0 auto;
    width: 22px; height: 22px; margin-top: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--vv-navy); color: var(--vv-white);
    border-radius: 50%;
    font-size: 0.74rem; font-weight: 700;
}
.bordkort-input {
    flex: 1 1 auto;
    font-family: var(--font); font-size: 0.94rem;
    padding: 9px 12px;
    border: 1.5px solid #ced4da; border-radius: var(--radius-sm);
    background: var(--vv-white);
    resize: vertical;
}
.bordkort-input:focus {
    outline: none;
    border-color: var(--vv-green);
    box-shadow: 0 0 0 3px rgba(0,151,169,0.14);
}
.bordkort-actions {
    display: flex; align-items: center; gap: 12px;
    margin-top: 12px; flex-wrap: wrap;
}
.bordkort-print { display: none; margin: 0 0 8px; font-size: 0.94rem; }
.bordkort-msg { font-size: 0.85rem; }
.bordkort-msg--ok { color: var(--vv-green); font-weight: 600; }
.bordkort-msg--err { color: var(--vv-red); font-weight: 600; }

@media (max-width: 600px) {
    .dimbar { grid-template-columns: 1fr auto; row-gap: 4px; }
    .dimbar-level { grid-column: 1 / -1; text-align: left; min-width: 0; }
}

/* Typing indicator */
.typing-dots { display: flex; gap: 4px; padding: 4px 0; }
.typing-dots span {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--vv-mint);
    animation: typePulse 1.4s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; background: var(--vv-green); }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; background: var(--vv-red); }
@keyframes typePulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* --- Chat input area --- */
.chat-input-area {
    background: var(--vv-white);
    border: 1px solid #dee2e6;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: 0 -2px 12px rgba(16,58,97,0.04);
    animation: slideUp 0.3s ease;
}
.chat-input-area:empty { display: none; }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* --- Form inputs (in chat) --- */
.input-fields { display: flex; flex-direction: column; gap: 14px; }
.input-field { display: flex; flex-direction: column; gap: 4px; }
.input-field label { font-weight: 600; font-size: 0.88rem; color: var(--vv-navy); }
.input-field input,
.input-field select,
.input-field textarea {
    font-family: var(--font); font-size: 0.95rem;
    padding: 10px 14px; border: 1.5px solid #ced4da;
    border-radius: var(--radius-sm); background: var(--vv-white);
    color: var(--vv-navy-deep); transition: border-color 0.2s;
}
.input-field input:focus,
.input-field select:focus,
.input-field textarea:focus {
    outline: none; border-color: var(--vv-mint);
    box-shadow: 0 0 0 3px rgba(39,222,166,0.12);
}
.input-field textarea { resize: vertical; min-height: 60px; }

.known-context {
    font-size: 0.9rem; color: var(--vv-navy-deep);
    background: #eef1f6; border-radius: var(--radius-sm);
    padding: 10px 14px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-weight: 600; font-size: 0.92rem; color: var(--vv-navy); }
.form-group input[type="password"],
.form-group input[type="text"] {
    font-family: var(--font); font-size: 1rem; padding: 12px 14px;
    border: 1.5px solid #ced4da; border-radius: var(--radius-sm);
    background: var(--vv-white);
}
.form-group input:focus { outline: none; border-color: var(--vv-mint); box-shadow: 0 0 0 3px rgba(39,222,166,0.12); }

/* --- Radio options (in chat) --- */
.input-fields--after-radio { margin-top: 12px; }
.input-fields--after-radio label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.input-radio-group { display: flex; flex-direction: column; gap: 8px; }
.input-radio {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 16px; border: 1.5px solid #dee2e6;
    border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s;
}
.input-radio:hover { border-color: var(--vv-mint); background: rgba(39,222,166,0.03); }
.input-radio.selected { border-color: var(--vv-red); background: rgba(248,74,74,0.04); }
.input-radio__dot {
    flex-shrink: 0; width: 18px; height: 18px;
    border: 2px solid #adb5bd; border-radius: 50%;
    margin-top: 2px; transition: all 0.2s; position: relative;
}
.input-radio.selected .input-radio__dot {
    border-color: var(--vv-red);
}
.input-radio.selected .input-radio__dot::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 8px; height: 8px; border-radius: 50%; background: var(--vv-red);
}
.input-radio__content { display: flex; flex-direction: column; gap: 1px; }
.input-radio__content strong { font-size: 0.92rem; color: var(--vv-navy); }
.input-radio.selected .input-radio__content strong { color: var(--vv-red); }
.input-radio__content span { font-size: 0.82rem; color: #888; }

/* --- Checkbox options (in chat) --- */
.input-checkbox-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.input-checkbox {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border: 1.5px solid #dee2e6;
    border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s;
    font-size: 0.92rem;
}
.input-checkbox:hover { border-color: var(--vv-mint); background: rgba(39,222,166,0.03); }
.input-checkbox.selected { border-color: var(--vv-red); background: rgba(248,74,74,0.04); }
.input-checkbox__box {
    flex-shrink: 0; width: 18px; height: 18px;
    border: 2px solid #adb5bd; border-radius: 4px;
    transition: all 0.2s; position: relative;
}
.input-checkbox.selected .input-checkbox__box {
    background: var(--vv-red); border-color: var(--vv-red);
}
.input-checkbox.selected .input-checkbox__box::after {
    content: ''; position: absolute; top: 1px; left: 4px;
    width: 6px; height: 9px;
    border: solid var(--vv-white); border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* --- Weights (in chat) --- */
.input-weights { display: flex; flex-direction: column; gap: 20px; }
.weight-group { padding-bottom: 16px; border-bottom: 1px solid #eee; }
.weight-group:last-of-type { border-bottom: none; }
.wg-title {
    font-size: 0.82rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; margin-bottom: 12px; padding-left: 10px;
    border-left: 3px solid;
}
.wg-title--teal { border-color: var(--vv-green); color: var(--vv-green); }
.wg-title--coral { border-color: var(--vv-red); color: var(--vv-red); }

.wr { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.wr-label { flex: 1; min-width: 0; }
.wr-label strong { font-size: 0.88rem; color: var(--vv-navy); display: block; }
.wr-label span { font-size: 0.75rem; color: #999; }
.wr-ctrl { display: flex; align-items: center; gap: 8px; flex-shrink: 0; width: 160px; }
.wr-ctrl input[type="range"] {
    flex: 1; height: 5px; -webkit-appearance: none; appearance: none;
    background: #dee2e6; border-radius: 3px; outline: none;
}
.wr-ctrl input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
    background: var(--vv-navy); cursor: pointer;
    border: 2px solid var(--vv-white); box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.wr-ctrl input[type="range"]::-moz-range-thumb {
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--vv-navy); cursor: pointer;
    border: 2px solid var(--vv-white); box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.wr-val { font-size: 0.82rem; font-weight: 700; color: var(--vv-navy); min-width: 36px; text-align: right; }
.weight-sum { font-size: 0.78rem; font-weight: 600; color: var(--vv-green); text-align: right; margin-top: 4px; }
.weight-sum--warn { color: var(--vv-red); }

@media (max-width: 520px) {
    .wr { flex-direction: column; align-items: stretch; gap: 6px; }
    .wr-ctrl { width: 100%; }
}

/* --- Initiatives (in chat) --- */
.input-initiatives { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.init-block {
    background: #f6f9fc; border: 1px solid #dee2e6;
    border-radius: var(--radius-md); padding: 16px;
}
.init-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.init-num { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--vv-green); }
.btn-x {
    width: 24px; height: 24px; border-radius: 50%; border: 1px solid #ddd;
    background: var(--vv-white); color: #999; font-size: 1rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.btn-x:hover { border-color: var(--vv-red); color: var(--vv-red); }
.init-actions { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }

/* --- Scoring (in chat) --- */
.input-scoring { display: flex; flex-direction: column; gap: 20px; }
.sc-card {
    background: #f6f9fc; border: 1px solid #dee2e6;
    border-radius: var(--radius-md); padding: 18px;
}
.sc-title {
    font-size: 1rem; font-weight: 700; color: var(--vv-navy);
    display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.sc-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--vv-green); color: var(--vv-white);
    font-size: 0.78rem; font-weight: 700; flex-shrink: 0;
}
.sc-group { margin-bottom: 8px; }
.sc-group-label {
    display: inline-block; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    padding: 2px 8px; border-radius: 3px; margin-bottom: 8px;
}
.sc-group-label--teal { background: rgba(20,115,86,0.1); color: var(--vv-green); }
.sc-group-label--coral { background: rgba(248,74,74,0.1); color: var(--vv-red); }

.sc-metric { padding: 6px 0; }
.sc-metric-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.sc-metric-head label { font-size: 0.88rem; font-weight: 600; color: var(--vv-navy); }
.sc-metric-hint {
    margin: 0 0 6px;
    font-size: 0.78rem;
    color: #5d6673;
    line-height: 1.35;
}
.sc-metric-val {
    font-size: 0.85rem; font-weight: 700; color: var(--vv-navy);
    background: rgba(16,58,97,0.06); padding: 1px 8px; border-radius: 10px;
}
.sc-slider-row { display: flex; align-items: center; gap: 10px; }
.sc-end {
    font-size: 0.72rem; color: #6c757d; font-weight: 600;
    flex: 0 0 auto; max-width: 110px; line-height: 1.25;
}
.sc-end--left { text-align: right; }
.sc-end--right { text-align: left; }
.sc-slider-row input[type="range"] {
    flex: 1; height: 5px; -webkit-appearance: none; appearance: none;
    background: linear-gradient(90deg, #dee2e6, var(--vv-mint));
    border-radius: 3px; outline: none;
}
.sc-slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
    background: var(--vv-navy); cursor: pointer;
    border: 2px solid var(--vv-white); box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.sc-slider-row input[type="range"]::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--vv-navy); cursor: pointer;
    border: 2px solid var(--vv-white); box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.sc-hint { font-size: 0.72rem; color: #bbb; margin-top: 1px; }

.scoring-intro {
    background: rgba(20,115,86,0.06);
    border-left: 3px solid var(--vv-green);
    padding: 12px 14px;
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.55;
    border-radius: 0 4px 4px 0;
}

.vision-hint {
    margin: 10px 0 0;
    font-size: 0.9rem;
    background: rgba(16,58,97,0.03);
    border: 1px solid rgba(16,58,97,0.08);
    border-radius: 6px;
    padding: 0 12px;
}
.vision-hint > summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 0;
    font-weight: 600;
    color: var(--vv-green);
    font-size: 0.88rem;
    user-select: none;
}
.vision-hint > summary::-webkit-details-marker { display: none; }
.vision-hint > summary::before {
    content: "＋"; display: inline-block;
    width: 16px; margin-right: 6px;
    color: var(--vv-green); font-weight: 700;
}
.vision-hint[open] > summary::before { content: "−"; }
.vision-hint__body {
    padding: 4px 0 12px;
    color: #555;
    line-height: 1.6;
}
.vision-hint__body p { margin: 0 0 8px; }
.vision-hint__body p:last-child { margin-bottom: 0; }
.vision-hint__muted { font-size: 0.85rem; color: #888; font-style: italic; }

/* --- Buttons --- */
.btn {
    font-family: var(--font); font-size: 0.95rem; font-weight: 600;
    padding: 12px 32px; border: none; border-radius: var(--radius-sm);
    cursor: pointer; transition: all 0.2s; display: inline-block;
}
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-primary { background: var(--vv-navy); color: var(--vv-white); }
.btn-primary:hover:not(:disabled) { background: var(--vv-green); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.16); }
.btn-secondary { background: transparent; color: var(--vv-navy); border: 1.5px solid #ced4da; }
.btn-secondary:hover { background: rgba(16,58,97,0.04); transform: translateY(-1px); }
.btn-send {
    background: var(--vv-navy); color: var(--vv-white);
    font-family: var(--font); font-size: 0.92rem; font-weight: 600;
    padding: 10px 28px; border: none; border-radius: 20px;
    cursor: pointer; transition: all 0.2s; align-self: flex-end;
}
.btn-send:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-send:hover:not(:disabled) { background: var(--vv-green); }
.btn-sm { font-size: 0.85rem; padding: 8px 16px; }
.chat-end-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.chat-end-actions--stack { flex-direction: column; align-items: stretch; }

/* --- Processing --- */
.processing-card { text-align: center; padding: 80px 36px; }
.processing-icon { display: flex; justify-content: center; gap: 8px; margin-bottom: 28px; }
.processing-icon .dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--vv-mint); animation: pulse 1.4s ease-in-out infinite;
}
.processing-icon .dot:nth-child(2) { animation-delay: 0.2s; background: var(--vv-green); }
.processing-icon .dot:nth-child(3) { animation-delay: 0.4s; background: var(--vv-red); }
@keyframes pulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}
.processing-text { font-size: 1.15rem; font-weight: 600; color: var(--vv-navy); margin-bottom: 8px; }
.processing-subtext { font-size: 0.92rem; color: #888; }

/* ============================================ */
/*  RESULT CARDS                                */
/* ============================================ */

.reflection-card { border: none; overflow: hidden; padding: 0; }
.reflection-header {
    background: linear-gradient(135deg, var(--vv-navy), var(--vv-navy-deep));
    color: var(--vv-white); padding: 36px 36px 28px;
}
.reflection-header--dag2 { background: linear-gradient(135deg, var(--vv-navy-deep), #1a3a6a); }
.reflection-badges { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.reflection-badge {
    display: inline-block; font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.1em;
    background: rgba(39,222,166,0.25); color: var(--vv-mint);
    padding: 4px 12px; border-radius: 3px;
}
.reflection-badge--ai { background: rgba(255,144,8,0.3); color: var(--vv-orange); }
.reflection-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.reflection-meta { font-size: 0.9rem; opacity: 0.75; }

.reflection-section { padding: 28px 36px; border-bottom: 1px solid #eee; }
.reflection-section:last-of-type { border-bottom: none; }
.reflection-section-title {
    font-size: 1rem; font-weight: 600; color: var(--vv-navy);
    margin-bottom: 12px; display: flex; align-items: center; gap: 10px;
}
.section-icon { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.si-teal { background: var(--vv-green); }
.si-orange { background: var(--vv-orange); }
.si-cyan { background: var(--vv-mint); }
.si-coral { background: var(--vv-red); }

.reflection-body { font-size: 0.97rem; line-height: 1.7; color: #444; }
.reflection-section--observasjon .reflection-observation-text { margin: 0 0 10px; }
.reflection-section--observasjon .reflection-observation-question {
    margin: 0;
    padding: 12px 14px;
    border-left: 3px solid var(--vv-mint);
    background: rgba(39, 222, 166, 0.06);
    border-radius: 4px;
    font-style: italic;
    color: var(--vv-navy);
}

.ownership-map { display: flex; flex-direction: column; gap: 12px; }
.ownership-row {
    padding: 14px 16px;
    border-left: 3px solid var(--vv-red);
    background: rgba(248,74,74,0.04);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ownership-row__area {
    font-weight: 700;
    color: var(--vv-navy);
    font-size: 0.95rem;
}
.ownership-row__cells {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: center;
}
.ownership-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ownership-cell__label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
    font-weight: 600;
}
.ownership-cell__pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    background: var(--vv-white);
    border: 1px solid rgba(248,74,74,0.25);
    color: var(--vv-navy);
}
.ownership-cell__pill--owner {
    border-color: rgba(20,115,86,0.4);
    background: rgba(20,115,86,0.08);
    color: var(--vv-green);
}
.ownership-cell__pill--role {
    border-color: rgba(248,74,74,0.4);
    background: rgba(248,74,74,0.08);
    color: var(--vv-red);
}
@media (max-width: 560px) {
    .ownership-row__cells { flex-direction: column; align-items: flex-start; gap: 10px; }
}

.themes-list { display: flex; flex-wrap: wrap; gap: 10px; }
.theme-tag {
    background: linear-gradient(135deg, rgba(255,144,8,0.10), rgba(255,144,8,0.05));
    border: 1px solid rgba(255,144,8,0.25);
    color: var(--vv-navy-deep); font-size: 0.88rem; font-weight: 600;
    padding: 8px 16px; border-radius: var(--radius-sm);
}

.disc-questions { list-style: none; counter-reset: dq; }
.disc-questions li {
    counter-increment: dq; padding: 10px 0 10px 36px;
    position: relative; font-size: 0.95rem; color: #444; line-height: 1.55;
}
.disc-questions li::before {
    content: counter(dq); position: absolute; left: 0; top: 10px;
    width: 24px; height: 24px; background: var(--vv-mint);
    color: var(--vv-white); border-radius: 50%;
    font-size: 0.78rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

.focus-section { background: linear-gradient(135deg, rgba(248,74,74,0.04), rgba(248,74,74,0.01)); }
.focus-text { font-size: 1.02rem; font-weight: 600; color: var(--vv-navy); line-height: 1.6; }

.reflection-footer {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    padding: 16px 36px; font-size: 0.78rem; color: #aaa; border-top: 1px solid #eee;
}
.footer-logo { opacity: 0.5; display: block; }
/* Kundelogo og leverandørlogo trenger luft mellom seg. Skillestreken
   får marg på begge sider i tillegg til flex-gapet. */
.brand-logo-sep {
    display: inline-block; width: 1px; height: 16px;
    margin: 0 10px;
    background: currentColor; opacity: 0.22;
}
.welcome-logo { display: flex; align-items: center; justify-content: center; gap: 22px; }
.welcome-logo-img { display: block; }
.wizard-header-logo { display: inline-flex; align-items: center; gap: 20px; }
.wizard-logo-img { display: block; }
.footer-sep { opacity: 0.3; }

.result-actions .ovf-menu-list { top: auto; bottom: 42px; }
.result-actions { display: flex; gap: 14px; justify-content: center; align-items: center; margin-top: 28px; flex-wrap: wrap; }
.btn-print {
    background: none; border: none; cursor: pointer;
    font-family: var(--font); font-size: 0.82rem; font-weight: 500; color: #5d6673;
    padding: 8px 10px; display: inline-flex; align-items: center; gap: 6px;
    transition: color 0.2s;
}
.btn-print:hover { color: var(--vv-navy); }
.btn-print svg { display: block; }

/* Quadrant chart */
.quadrant-chart { max-width: 820px; margin: 0 auto; }
.q-svg { display: block; width: 100%; height: auto; }

.q-item-legend {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px 18px;
    margin-top: 18px; padding-top: 14px;
    border-top: 1px solid #eee;
}
.q-item {
    display: flex; align-items: baseline; gap: 8px;
    font-size: 0.9rem; line-height: 1.4;
}
.q-item-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; min-width: 22px; border-radius: 50%;
    color: #fff; font-size: 0.75rem; font-weight: 700;
    flex-shrink: 0; position: relative; top: 2px;
}
.q-item-name {
    font-weight: 700; color: var(--vv-navy);
    flex-grow: 1;
}
.q-item-quad {
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    flex-shrink: 0;
}

/* Initiative analysis cards */
.ia-card {
    background: #f6f9fc; border: 1px solid #dee2e6;
    border-radius: var(--radius-md); padding: 18px; margin-bottom: 14px;
}
.ia-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.ia-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--vv-navy-deep); color: var(--vv-white);
    font-size: 0.78rem; font-weight: 700; flex-shrink: 0;
}
.ia-head h4 { font-size: 0.97rem; font-weight: 700; color: var(--vv-navy); flex-grow: 1; margin: 0; }
.ia-badge {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--vv-white);
    padding: 2px 8px; border-radius: 3px;
}
.ia-scores { display: flex; gap: 14px; margin-bottom: 8px; font-size: 0.78rem; font-weight: 600; color: #888; }
.ia-text { font-size: 0.9rem; color: #555; line-height: 1.6; margin-bottom: 10px; }
.ia-section { font-size: 0.88rem; color: #555; line-height: 1.5; padding: 4px 0; }
.ia-section strong { color: var(--vv-navy); }
.ia-gng { color: #777; }
.ia-risk { color: #999; font-style: italic; }

/* New ideas block (Prioriteringsanalyse, modul 3) */
.reflection-body--hint { font-size: 0.86rem; color: #777; margin-bottom: 14px; }
.new-ideas { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.new-idea {
    background: #f6f9fc; border: 1px solid #dee2e6;
    border-radius: var(--radius-md); padding: 16px 18px;
}
.new-idea-title { font-size: 0.97rem; font-weight: 700; color: var(--vv-navy); margin: 0 0 6px; }
.new-idea-desc { font-size: 0.9rem; color: #555; line-height: 1.55; margin: 0 0 6px; }
.new-idea-why { font-size: 0.85rem; color: #777; line-height: 1.5; margin: 0; }
.new-idea-why em { color: var(--vv-navy); font-style: normal; font-weight: 600; }

/* ============================================ */
/*  ROADMAP                                     */
/* ============================================ */

.rm-vision-section { background: linear-gradient(135deg, rgba(248,74,74,0.04), rgba(248,74,74,0.01)); }
.rm-vision-text {
    font-size: 1.1rem; font-weight: 700; color: var(--vv-navy);
    line-height: 1.5; font-style: italic;
}

.roadmap-chart { overflow-x: auto; }
.rm-chart-placeholder {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 32px 16px; background: rgba(39,0,61,0.03); border-radius: 8px;
    border: 1.5px dashed #c8bdd0;
}
.rm-chart-placeholder-text { margin: 0; color: #857a92; font-size: 0.92rem; }
.rm-svg { display: block; min-width: 500px; }

.rm-legend {
    display: flex; gap: 20px; justify-content: center;
    margin-top: 14px; font-size: 0.78rem; color: #888;
}
.rm-legend-item { display: flex; align-items: center; gap: 6px; }
.rm-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.rm-dot--solid { background: var(--vv-green); opacity: 0.85; }
.rm-dot--dashed {
    background: transparent; border: 2px dashed var(--vv-green); opacity: 0.5;
    width: 10px; height: 10px;
}

/* Vision hover tooltip */
.rm-vision-tip { opacity: 0; transition: opacity 0.25s; pointer-events: none; }
.rm-vision-group:hover .rm-vision-tip { opacity: 1; }
.rm-vision-tipbox {
    background: rgba(16,58,97,0.92); color: #fff;
    font-size: 12px; line-height: 1.5; padding: 10px 14px;
    border-radius: 8px; font-family: var(--font);
    box-shadow: 0 4px 16px rgba(16,58,97,0.25);
}

/* Item legend below radar chart */
.rm-item-legend {
    display: flex; flex-direction: column; gap: 6px;
    margin-top: 16px; padding-top: 14px;
    border-top: 1px solid #eee;
}
.rm-item {
    display: flex; align-items: baseline; gap: 8px;
    font-size: 0.88rem; line-height: 1.4;
}
.rm-item--support { opacity: 0.6; }
.rm-item-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; min-width: 20px; border-radius: 50%;
    color: #fff; font-size: 0.72rem; font-weight: 700;
    flex-shrink: 0; position: relative; top: 1px;
}
.rm-item-name {
    font-weight: 700; color: var(--vv-navy);
}
.rm-item-desc {
    color: #999; font-size: 0.82rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 280px;
}

.rm-disclaimer-section { background: rgba(255,144,8,0.04); }
.rm-disclaimer {
    font-size: 0.88rem; color: #888; line-height: 1.6;
    padding-left: 16px; border-left: 3px solid var(--vv-orange);
}

/* Stream mapping input */
.input-stream-mapping { display: flex; flex-direction: column; gap: 16px; }
.sm-card {
    background: #f6f9fc; border: 1px solid #dee2e6;
    border-radius: var(--radius-md); padding: 16px;
}
.sm-title {
    font-size: 0.95rem; font-weight: 700; color: var(--vv-navy);
    display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.sm-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 520px) { .sm-options { grid-template-columns: 1fr; } }
.sm-option {
    padding: 10px 12px; border: 1.5px solid #dee2e6;
    border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s;
}
.sm-option:hover { border-color: var(--vv-mint); background: rgba(39,222,166,0.03); }
.sm-option.selected { border-color: var(--vv-green); background: rgba(20,115,86,0.06); }
.sm-option strong { display: block; font-size: 0.85rem; color: var(--vv-navy); }
.sm-option span { font-size: 0.75rem; color: #999; }

/* ============================================ */
/*  FIXES: Focus, accessibility, polish         */
/* ============================================ */

/* Chat typing indicator container */
.chat-typing { opacity: 0.7; }

/* Focus-visible for keyboard navigation */
.input-radio:focus-within { box-shadow: 0 0 0 3px rgba(39,222,166,0.15); }
.input-checkbox:focus-within { box-shadow: 0 0 0 3px rgba(39,222,166,0.15); }
.sm-option:focus-within { outline: 2px solid var(--vv-green); outline-offset: 1px; }

.wr-ctrl input[type="range"]:focus-visible {
    outline: 2px solid var(--vv-mint); outline-offset: 2px; border-radius: 3px;
}
.sc-slider-row input[type="range"]:focus-visible {
    outline: 2px solid var(--vv-mint); outline-offset: 2px; border-radius: 3px;
}
.wr-ctrl input[type="range"]::-webkit-slider-thumb { transition: box-shadow 0.2s; }
.wr-ctrl input[type="range"]:active::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(16,58,97,0.12); }

/* Custom select arrow */
.input-field select {
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23081e32' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* Details/summary styling */
.auth-block .btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Button remove hover polish */
.btn-x:hover { box-shadow: 0 2px 6px rgba(248,74,74,0.15); }

/* Chat input area animation performance */
.chat-input-area { will-change: transform; }

/* Stream mapping - distinct numbering from scoring */
.sm-title .sc-num {
    background: var(--vv-navy-deep);
}

/* --- Print --- */
@media print {
    @page { size: A4; margin: 0; }
    body { background: white; padding: 18mm 18mm 16mm; line-height: 1.6; }
    .topbar, .result-actions, .auth-block, .chat-container,
    .program-overlay, .module-slides-overlay, .firsttime-tip,
    .wizard-header, .wizard-modules, .wizard-footer,
    .modules-header, .modules-agenda-status, .module-groups,
    .module-edit-actions, .module-leader-bar,
    .admin-wizard-list, .admin-actions,
    .ls-select-block, .ls-scatter, .ls-ask-block, .ls-block { display: none !important; }
    /* Behold refleksjonskortet og alt inne i det */
    .screen:not(.active) { display: none !important; }
    .screen.active .reflection-card { display: block !important; }
    .screen.active .reflection-section, .screen.active .ls-block { display: block !important; }
    .container { max-width: 100%; padding: 0; }
    .reflection-card { box-shadow: none; border: 1px solid #ddd; }
    .reflection-header, .reflection-header--dag2 { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .ia-card, .reflection-section, .sc-card { break-inside: avoid; }
    .rm-disclaimer-section { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .rm-vision-section, .focus-section { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .qd-cell, .qd-cell--on, .qd-dot, .qd-dot-halo, .dimbar-pip, .dimbar-pip--on,
    .dimbar-pip--exp, .bordkort-num, .wm-tag {
        -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
    .qd-svg { max-width: 380px; break-inside: avoid; page-break-inside: avoid; }
    .dimbar, .bordkort-field { break-inside: avoid; page-break-inside: avoid; }
    /* Tekstbokser klipper innholdet i utskrift. Speilteksten trer inn i stedet. */
    .bordkort-input, .bordkort-actions, .bordkort-lead { display: none !important; }
    .bordkort-print { display: block !important; }
    .quadrant-chart { max-width: 100%; break-inside: avoid; page-break-inside: avoid; }
    .q-svg { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .q-item-legend { break-inside: avoid; page-break-inside: avoid; }
    .q-item-num { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .ownership-row, .ownership-cell__pill, .shift-item {
        -webkit-print-color-adjust: exact; print-color-adjust: exact;
        break-inside: avoid;
    }
}

/* --- Mobile --- */
@media (max-width: 600px) {
    .topbar-inner { padding: 12px 16px; }
    .topbar-title { font-size: 0.88rem; }
    .container { padding: 16px 12px 40px; }
    .welcome-card h1 { font-size: 1.6rem; }
    .welcome-hero { margin: -28px -20px 20px; padding: 28px 20px 20px; border-radius: var(--radius-md) var(--radius-md) 0 0; }
    .reflection-header { padding: 24px 20px 20px; }
    .reflection-section { padding: 20px; }
    .reflection-title { font-size: 1.3rem; }
    .chat-bubble { max-width: 92%; }
    .quadrant-chart { max-width: 100%; overflow-x: auto; }
    .rm-svg { min-width: 520px; }
    .btn-send { padding: 10px 20px; }
}

@media (max-width: 380px) {
    .chat-bubble { max-width: 96%; padding: 12px 14px; }
    .btn-send { width: 100%; text-align: center; }
    .init-actions { flex-direction: column; }
    .sm-options { grid-template-columns: 1fr; }
}

/* ============================================================
   Module menu (kursinnhold) + ghost button
   ============================================================ */
.btn-ghost {
    background: transparent;
    color: var(--vv-green);
    border: none;
    font-weight: 600;
    padding: 10px 8px;
    margin-top: 14px;
    width: 100%;
    text-align: center;
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.92rem;
}
.btn-ghost:hover { text-decoration: underline; }

.modules-header { margin-bottom: 18px; }
.modules-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--vv-navy);
    margin-bottom: 8px;
}
.modules-intro {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.55;
}
.module-groups { margin-bottom: 20px; }
.module-group { margin-bottom: 26px; }
.module-group:last-child { margin-bottom: 0; }
.module-group-head {
    border-left: 4px solid var(--vv-red);
    padding-left: 10px;
    margin-bottom: 12px;
}
.module-group:last-child .module-group-head { border-left-color: #ccc; }
.module-group-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--vv-navy);
}
.module-group-sub {
    font-size: 0.82rem;
    color: #777;
    margin-top: 2px;
}
.module-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 620px) { .module-list { grid-template-columns: 1fr; } }
.module-item {
    position: relative;
    border: 1.5px solid #dee2e6;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    background: #fff;
}
.module-item--rec {
    border-color: var(--vv-green);
    background: rgba(20, 115, 86, 0.05);
    box-shadow: 0 2px 10px rgba(20, 115, 86, 0.08);
}
.module-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--vv-white);
    background: var(--vv-green);
    border-radius: 999px;
    padding: 3px 9px;
    margin: 0 6px 8px 0;
}
.module-badge--slot { background: var(--vv-orange); }
.module-item--slotted {
    border-color: var(--vv-orange);
    box-shadow: 0 2px 10px rgba(255, 144, 8, 0.15);
}
.module-item--slotted.module-item--rec {
    border-color: var(--vv-orange);
    background: rgba(255, 144, 8, 0.06);
}
.module-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--vv-navy);
    margin-bottom: 5px;
}
.module-item--rec .module-name { color: var(--vv-green); }
.module-desc {
    font-size: 0.84rem;
    color: #555;
    line-height: 1.5;
}

.module-itype {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 3px 9px;
}
.module-itype--veiviser { color: var(--vv-white); background: var(--vv-red); }
.module-itype--rundbord { color: var(--vv-white); background: var(--vv-orange); }
.module-itype--demo { color: var(--vv-white); background: var(--vv-navy); }
.module-itype--none { color: #999; background: #e9ecef; }
.module-interactive {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--vv-navy);
    line-height: 1.45;
    font-style: italic;
}

.module-start-btn {
    display: block;
    margin-top: 10px;
    width: 100%;
    text-align: center;
}

/* --- Ledermodus: velg inn/ut av programmet (visningsfronten, ikke redigering) --- */
.module-slot-control {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #dee2e6;
}
.module-slot-select {
    font-family: var(--font);
    border: 1.5px solid #dee2e6;
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    font-size: 0.78rem;
    color: var(--vv-navy);
    background: #fff;
    cursor: pointer;
    width: 100%;
}

/* --- Programstatus, alltid synlig øverst i modulmenyen --- */
.modules-agenda-status {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}
.mas-item {
    flex: 1 1 220px;
    background: var(--vv-off-white);
    border: 1.5px solid #dee2e6;
    border-radius: var(--radius-md);
    padding: 9px 12px;
}
.mas-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 3px;
}
.mas-value {
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--vv-green);
}
.mas-value--unset {
    font-weight: 400;
    font-style: italic;
    color: #999;
}

/* --- Ledermodus: rediger modulmeny --- */
.module-item--edit { display: flex; flex-direction: column; gap: 6px; }
.module-edit-title, .module-edit-desc, .module-edit-itype, .module-edit-interactive {
    font-family: var(--font);
    border: 1.5px solid #dee2e6;
    border-radius: var(--radius-sm);
    padding: 7px 9px;
    font-size: 0.88rem;
    color: var(--vv-navy);
    width: 100%;
}
.module-edit-desc { resize: vertical; min-height: 52px; line-height: 1.4; }
.module-edit-interactive { resize: vertical; min-height: 40px; line-height: 1.4; }
.module-edit-itype { cursor: pointer; background: #fff; }
.module-edit-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.module-edit-rec { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: #555; }
.module-edit-remove {
    background: none; border: none; color: #b33; cursor: pointer;
    font-size: 0.78rem; font-weight: 600; padding: 2px 4px;
}
.module-edit-remove:hover { text-decoration: underline; }

.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.module-edit-actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    margin-bottom: 16px;
}
.module-save-msg { font-size: 0.8rem; color: var(--vv-green); font-weight: 600; }

.module-leader-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.btn-link {
    background: none; border: none; cursor: pointer;
    font-family: var(--font); font-size: 0.78rem; color: #999;
    text-decoration: underline; padding: 4px 0;
}
.btn-link:hover { color: #555; }
.leader-login { display: flex; align-items: center; gap: 8px; }
.leader-login input[type="password"] {
    font-family: var(--font); border: 1.5px solid #dee2e6; border-radius: var(--radius-sm);
    padding: 7px 10px; font-size: 0.85rem; width: 140px;
}
.leader-login-err { font-size: 0.78rem; color: #b33; }

.model-switcher { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.model-switcher label { font-size: 0.78rem; color: #999; }
.model-switcher select {
    font-family: var(--font); border: 1.5px solid #dee2e6; border-radius: var(--radius-sm);
    padding: 6px 8px; font-size: 0.82rem; background: #fff;
}
.model-select-msg { font-size: 0.78rem; color: var(--vv-green); font-weight: 600; }

/* --- Modul-slideshow (ledermodus) --- */
.module-slides-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: var(--vv-navy);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 32px; padding: 40px 24px;
}
.module-slides-close {
    position: absolute; top: 20px; right: 24px;
    background: none; border: none; color: var(--vv-white);
    font-size: 1.4rem; line-height: 1; cursor: pointer; opacity: 0.7;
}
.module-slides-close:hover { opacity: 1; }
.module-slides-count {
    position: absolute; top: 24px; left: 28px;
    color: rgba(255,255,255,0.6); font-size: 0.85rem; letter-spacing: 0.03em;
}
.module-slides-card {
    max-width: 760px; width: 100%; text-align: center;
}
.module-slides-badge {
    display: inline-block;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--vv-navy); background: var(--vv-mint);
    border-radius: 999px; padding: 5px 14px; margin-bottom: 20px;
}
.module-slides-title {
    font-size: 2.4rem; font-weight: 900; color: var(--vv-white);
    margin-bottom: 20px; line-height: 1.15;
}
.module-slides-desc {
    font-size: 1.2rem; color: rgba(255,255,255,0.88); line-height: 1.6;
}
.module-slides-itype {
    display: inline-block;
    margin-top: 20px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    border-radius: 999px; padding: 5px 14px;
}
.module-slides-itype--veiviser { color: var(--vv-white); background: var(--vv-red); }
.module-slides-itype--rundbord { color: var(--vv-white); background: var(--vv-orange); }
.module-slides-itype--demo { color: var(--vv-navy); background: var(--vv-mint); }
.module-slides-itype--none { color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.1); }
.module-slides-interactive {
    margin-top: 18px;
    font-size: 1.02rem; color: var(--vv-white);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    line-height: 1.5;
}
.module-slides-nav { display: flex; gap: 16px; }
.module-slides-nav .btn { color: var(--vv-white); border-color: rgba(255,255,255,0.3); }
.module-slides-nav .btn:hover { background: rgba(255,255,255,0.1); }
.module-slides-nav .btn:disabled { opacity: 0.35; cursor: default; }

/* ============================================================
   Timeplan on welcome + returning-participant box
   ============================================================ */
.timeplan {
    text-align: left;
    background: rgba(16, 58, 97, 0.03);
    border: 1px solid #e9ecef;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin: 18px 0 4px;
}
.timeplan-row {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: baseline;
    gap: 10px;
    padding: 6px 0;
}
.timeplan-row + .timeplan-row { border-top: 1px solid #e9ecef; }
.timeplan-day {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 3px 10px;
    white-space: nowrap;
}
.timeplan-day--teal { background: rgba(20, 115, 86, 0.12); color: var(--vv-green); }
.timeplan-day--coral { background: rgba(248, 74, 74, 0.12); color: var(--vv-red); }
.timeplan-when {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--vv-navy);
    white-space: nowrap;
}
.timeplan-theme {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.4;
}
.timeplan-note {
    font-size: 0.76rem;
    color: #6c757d;
    margin: 8px 2px 0;
    font-style: italic;
}
@media (max-width: 480px) {
    .timeplan-row { grid-template-columns: auto 1fr; }
    .timeplan-theme { grid-column: 1 / -1; }
}

.returning {
    margin: 6px 0 16px;
}
.returning-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    background: rgba(20, 115, 86, 0.07);
    border: 1px solid rgba(20, 115, 86, 0.25);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    text-align: left;
}
.returning-name { font-weight: 700; color: var(--vv-navy); }
.returning-id { font-size: 0.85rem; color: #555; }
.returning-id strong { color: var(--vv-green); letter-spacing: 0.03em; }
.returning-reset {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--vv-red);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: var(--font);
    padding: 2px 4px;
}
.returning-reset:hover { text-decoration: underline; }

/* ============================================================
   Detailed program + consent + id-restore
   ============================================================ */
.timeplan-heading {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--vv-navy);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.timeplan-day-block + .timeplan-day-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid #e9ecef; }
.timeplan-day-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.timeplan-date { font-size: 0.85rem; font-weight: 700; color: var(--vv-navy); }
.timeplan-day-theme { font-size: 0.82rem; color: #666; font-style: italic; margin: 0 0 8px 0; }
.timeplan-list { list-style: none; margin: 0; padding: 0; }
.timeplan-list li {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 10px;
    padding: 4px 0;
    align-items: baseline;
}
.timeplan-list li + li { border-top: 1px dashed #e9ecef; }
.tl-time { font-size: 0.78rem; font-weight: 700; color: var(--vv-green); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tl-act { font-size: 0.84rem; color: #444; line-height: 1.4; }
.tl-act--hl { font-weight: 700; color: var(--vv-navy); }
.tl-act--pause { color: #6c757d; font-style: italic; }
.tl-luke { cursor: pointer; border-radius: 4px; transition: background 0.15s; }
.tl-luke:hover { background: rgba(20, 115, 86, 0.08); }
.tl-luke:hover .tl-act { color: var(--vv-green); }
.tl-luke--set .tl-act { color: var(--vv-green); font-weight: 700; }

.consent {
    text-align: left;
    background: rgba(255, 144, 8, 0.06);
    border: 1px solid rgba(255, 144, 8, 0.35);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin: 4px 0 16px;
}
.consent-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.consent-check input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--vv-red); }
.consent-check span { font-size: 0.84rem; color: #444; line-height: 1.5; }

/* Uten personlig lenke: én tydelig beskjed, ikke et kodefelt. Tilgangs-
   koden ligger bak en diskré lenke, siden bare kursleder og arrangør
   har en. */
.need-link { text-align: left; margin: 0 0 4px; }
.need-link-lead { font-size: 0.95rem; color: var(--vv-navy); line-height: 1.55; margin: 0 0 8px; }
.need-link-help { font-size: 0.85rem; color: #555; line-height: 1.5; margin: 0; }
.auth-code-toggle {
    display: inline-block;
    margin-top: 16px;
    font-size: 0.82rem;
    color: #6c757d;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    font-family: var(--font);
}
.auth-code-toggle:hover { color: var(--vv-navy); }
.auth-code-entry { text-align: left; margin-top: 16px; }
.auth-code-entry .btn { margin-top: 12px; }

/* Leader summary (deltakeroversikt) */
.leader-summary-loading { color: #999; font-size: 0.9rem; }
.ls-count { font-size: 0.85rem; color: #555; margin-bottom: 18px; }
.ls-block { margin-bottom: 24px; }
.ls-block-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--vv-navy);
    margin-bottom: 10px;
}
/* Utsagnet under overskriften i fordelingsvisningen. Kursleder trenger
   å se hva folk faktisk tok stilling til, ikke bare tittelen. */
.ls-block-lead {
    margin: -4px 0 10px; padding-left: 10px;
    border-left: 2px solid #e4e0ea;
    font-size: 0.88rem; line-height: 1.45; color: #5d6b73;
}
.ls-empty { font-size: 0.85rem; color: #999; }
.ls-actions-block {
    padding: 14px 16px;
    border: 1px solid #e9ecef;
    border-radius: var(--radius-md);
    background: #fafafa;
}
.ls-actions-block .ls-block-title { margin-bottom: 10px; }
.ls-actions-row {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 8px;
}
.ls-actions-msg { font-size: 0.82rem; font-weight: 600; color: #6c757d; }
.ls-actions-msg--ok { color: var(--vv-green); }
.ls-actions-msg--err { color: var(--vv-red, #f84a4a); }
.ls-actions-msg--info { color: var(--vv-mint, #147356); }
.ls-actions-hint {
    margin: 0; font-size: 0.78rem; color: #6c757d; line-height: 1.4;
}
.ls-bar-row {
    display: grid;
    grid-template-columns: 150px 1fr 28px;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 0.82rem;
}
.ls-bar-label { color: #444; }
.ls-bar-track {
    background: #e9ecef;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}
.ls-bar-fill {
    background: var(--vv-green);
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s;
}
.ls-bar-count { text-align: right; color: #888; font-variant-numeric: tabular-nums; }
.ls-quote-list { list-style: none; padding: 0; margin: 0; }
.ls-quote-list li {
    border-left: 3px solid var(--vv-orange);
    padding: 6px 0 6px 12px;
    margin-bottom: 10px;
}
.ls-quote-role { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--vv-orange); margin-bottom: 2px; }
.ls-quote-text { font-size: 0.88rem; color: #333; }

/* Foreslåtte tiltak */
.ls-block--muted { opacity: 0.85; }
.ls-hint { font-size: 0.85rem; color: #6c757d; margin: 4px 0 8px; line-height: 1.5; }
.ls-tiltak-summary { font-size: 0.9rem; color: var(--vv-navy); margin: 0; }
.ls-tiltak-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ls-tiltak-item {
    padding: 10px 14px;
    border: 1px solid #e9ecef; border-radius: 6px;
    background: #fff;
}
.ls-tiltak-list--std .ls-tiltak-item { background: #f4f0f8; }
.ls-tiltak-head { display: flex; align-items: baseline; gap: 8px; }
.ls-tiltak-name { font-size: 0.95rem; font-weight: 600; color: var(--vv-navy); flex: 1; }
.ls-tiltak-count {
    font-size: 0.78rem; font-weight: 700; color: var(--vv-white);
    background: var(--vv-navy-deep); padding: 2px 8px; border-radius: 999px;
}
.ls-tiltak-desc { margin: 4px 0 0; font-size: 0.85rem; color: #555; line-height: 1.5; }

/* Felles veikart-blokk i Foreslåtte tiltak-fanen */
.ls-shared-rm-plenum-wrap, .ls-shared-rm-group-wrap { margin-top: 10px; }
.ls-shared-rm-group-name {
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--vv-navy); margin: 12px 0 4px; font-weight: 700;
}
.ls-shared-rm-per-group { margin-top: 18px; }
.ls-shared-rm-per-group-title {
    font-size: 0.9rem; color: var(--vv-navy); font-weight: 600;
    margin: 20px 0 6px; padding-top: 12px; border-top: 1px solid #e9ecef;
}

.input-field .optional { font-weight: 400; color: #6c757d; font-size: 0.85em; }

/* ============================================================
   TOPBAR NAV, PROGRAM-OVERLAY, WIZARD-MODULER, ADMIN
   ============================================================ */


@media (max-width: 600px) {
    .topbar-title { display: none; }
}

.program-overlay {
    position: fixed; inset: 0;
    background: rgba(16,58,97,0.65);
    z-index: 900;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
}
.program-modal {
    position: relative;
    background: var(--vv-white);
    border-radius: var(--radius-lg);
    padding: 32px 32px 28px;
    max-width: 720px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(16,58,97,0.4);
}
@media (max-width: 600px) {
    .program-modal { padding: 24px 20px; border-radius: var(--radius-md); }
}
.program-close {
    position: absolute; top: 12px; right: 14px;
    background: none; border: none; font-size: 1.4rem;
    color: #999; cursor: pointer; line-height: 1;
}
.program-close:hover { color: var(--vv-navy); }
.program-title {
    color: var(--vv-navy);
    font-size: 1.4rem; font-weight: 700;
    margin: 0 0 4px;
}
.program-sub {
    color: #666; font-size: 0.9rem;
    margin: 0 0 20px;
}

/* Wizard-header og modul-kort */
.wizard-header {
    display: flex; align-items: flex-start; gap: 14px;
    margin-bottom: 22px;
}
.wizard-header-text { flex: 1; }
.wizard-title {
    color: var(--vv-navy);
    font-size: 1.35rem; font-weight: 700;
    margin: 0 0 4px;
}
.wizard-sub { color: #555; font-size: 0.92rem; margin: 0; }

.wizard-modules {
    display: flex; flex-direction: column; gap: 14px;
}
.wizard-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}
.wm-card {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid #e4e0ea;
    border-radius: var(--radius-md);
    background: var(--vv-white);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.wm--open { border-color: var(--vv-green); }
.wm--open:hover { box-shadow: 0 4px 16px rgba(0,151,169,0.13); }
.wm--done { background: #fafbfc; }
.wm--locked { background: #fafafa; opacity: 0.62; }

.wm-num {
    flex-shrink: 0;
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.88rem;
    background: #eeebf2; color: var(--vv-navy);
}
.wm--open .wm-num { background: var(--vv-green); color: var(--vv-white); }
.wm--done .wm-num { background: var(--vv-navy); color: var(--vv-white); }

.wm-main {
    display: flex; flex-direction: column; gap: 3px;
    min-width: 0;
}
.wm-title {
    color: var(--vv-navy);
    font-size: 1.02rem; font-weight: 700;
    min-width: 0;
}
/* Forarbeidet er ikke et eget punkt i lista, det er merkelappen på modulen */
.wm-tag {
    align-self: flex-start;
    background: var(--vv-green); color: var(--vv-white);
    font-size: 0.66rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 3px 9px; border-radius: 999px;
    white-space: nowrap;
}
.wm--locked .wm-tag { background: #b5b0bd; }
.wm-meta { font-size: 0.84rem; color: #5d6b73; }
.wizard-note {
    margin: 16px 2px 0;
    font-size: 0.85rem; color: #6d7780;
}
.wm-actions { display: flex; align-items: center; gap: 8px; }
.wm-badge {
    font-size: 0.7rem; font-weight: 700;
    padding: 3px 9px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 0.03em;
    white-space: nowrap;
}
.wm-badge--open { background: rgba(0,151,169,0.14); color: var(--vv-green); }
.wm-badge--done { background: #eceaf0; color: #5d5768; }
.wm-badge--locked { background: #efeef1; color: #8b8595; }

/* Sekundære valg bak «Mer», så kortet bare viser én handling */
.ovf-menu { position: relative; }
.ovf-menu-btn {
    width: 32px; height: 32px;
    border: 1px solid #ddd8e4; border-radius: 50%;
    background: var(--vv-white); color: var(--vv-navy);
    font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.ovf-menu-btn:hover { background: #f6f4fa; }
.ovf-menu-list {
    position: absolute; right: 0; top: 38px; z-index: 40;
    min-width: 232px;
    background: var(--vv-white);
    border: 1px solid #e2dde9; border-radius: var(--radius-sm);
    box-shadow: 0 10px 28px rgba(16,58,97,0.16);
    padding: 6px;
}
.ovf-menu-item {
    display: block; width: 100%;
    text-align: left;
    padding: 9px 11px;
    border: none; background: none;
    font-family: var(--font); font-size: 0.88rem; color: var(--vv-navy);
    border-radius: 6px; cursor: pointer;
}
.ovf-menu-item:hover { background: #f4f1f9; }
.wm-locknote { font-size: 0.84rem; color: #8b8595; white-space: nowrap; }
.ovf-menu-item--danger { color: var(--vv-red); }
.ovf-menu-sep {
    height: 1px; margin: 5px 8px;
    background: #eae6f0;
}

.my-insight-overlay {
    position: fixed; inset: 0; background: rgba(16,58,97,0.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 900; padding: 24px;
}
.my-insight-card {
    background: #fff; border-radius: 12px; max-width: 720px; width: 100%;
    max-height: 88vh; padding: 28px 32px 32px;
    box-shadow: 0 24px 60px rgba(16,58,97,0.35); position: relative;
    display: flex; flex-direction: column; overflow: hidden;
}
.my-insight-close {
    position: absolute; top: 10px; right: 10px;
    width: 34px; height: 34px; border-radius: 50%;
    background: #fff; border: 1px solid #dee2e6;
    font-size: 1.1rem; cursor: pointer; color: #103a61;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(16,58,97,0.12);
    z-index: 10;
}
.my-insight-close:hover { background: #f2f5fa; }
.my-insight-badge {
    display: inline-block; font-size: 0.72rem; font-weight: 700;
    padding: 3px 9px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.04em;
    background: rgba(248,74,74,0.16); color: var(--vv-red); margin-bottom: 12px;
}
.my-insight-title { margin: 0 0 4px; color: var(--vv-navy); font-size: 1.3rem; }
.my-insight-meta { margin: 0 0 18px; color: #6c757d; font-size: 0.85rem; }
.my-insight-body { color: #333; line-height: 1.65; font-size: 0.98rem; overflow-y: auto; flex: 1 1 auto; padding-right: 4px; }
.my-insight-body :first-child { margin-top: 0; }
.my-insight-body h2, .my-insight-body h3 {
    color: var(--vv-navy);
    margin: 22px 0 8px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.my-insight-body p { margin: 0 0 10px; }
.my-insight-body ul { margin: 4px 0 12px; padding-left: 22px; }
.my-insight-body li { margin: 2px 0; }

.wm-start {
    padding: 8px 16px !important;
    font-size: 0.88rem !important;
    white-space: nowrap;
}

.btn-refresh {
    background: rgba(20,115,86,0.08) !important;
    border-color: rgba(20,115,86,0.35) !important;
    color: var(--vv-green, #147356) !important;
}
.btn-refresh:hover:not(:disabled) {
    background: rgba(20,115,86,0.18) !important;
}
.btn--busy { opacity: 0.75; cursor: wait; }
.btn--flash-ok {
    background: rgba(20,115,86,0.2) !important;
    color: #0d4f3a !important;
    border-color: rgba(20,115,86,0.5) !important;
    transition: background 0.25s ease, color 0.25s ease;
}

@media (max-width: 600px) {
    .wm-card {
        grid-template-columns: auto 1fr auto;
        row-gap: 10px;
        padding: 14px;
    }
    .wm-badge { grid-column: 3; }
    .wm-actions { grid-column: 1 / -1; justify-content: flex-end; }
    .wm-num { width: 28px; height: 28px; font-size: 0.85rem; }
}

/* Admin arbeidsflate */
.admin-wizard-list {
    display: flex; flex-direction: column; gap: 12px;
    margin-bottom: 20px;
}
.admin-wm-row {
    display: flex; flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e9ecef;
    border-radius: var(--radius-md);
    background: #fafafa;
}
.admin-wm-main {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px;
}
.admin-wm-info { display: flex; gap: 12px; align-items: flex-start; flex: 1; min-width: 0; }
.admin-wm-perid {
    border-top: 1px dashed #dee2e6;
    padding-top: 12px;
    display: flex; flex-direction: column; gap: 6px;
}
.admin-wm-perid-label {
    font-size: 0.78rem; font-weight: 700; color: #495057;
    letter-spacing: 0.01em;
}
.admin-wm-perid-input {
    width: 100%;
    font-family: inherit; font-size: 0.85rem;
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: var(--radius-sm);
    background: var(--vv-white);
    resize: vertical;
    min-height: 44px;
}
.admin-wm-perid-input:focus {
    outline: none;
    border-color: var(--vv-green);
    box-shadow: 0 0 0 2px rgba(20,115,86,0.15);
}
.admin-wm-perid-foot {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.admin-wm-perid-msg {
    font-size: 0.78rem; color: var(--vv-green); font-weight: 600;
}
.admin-wm-perid-count {
    font-size: 0.78rem; color: #6c757d;
}
.admin-wm-perid-hint {
    margin: 0;
    font-size: 0.75rem; color: #6c757d; font-style: italic;
}
.admin-wm-num {
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem;
    background: var(--vv-navy); color: var(--vv-white);
}
.admin-wm-title { color: var(--vv-navy); font-size: 0.98rem; font-weight: 700; margin: 0 0 2px; }
.admin-wm-desc { color: #666; font-size: 0.82rem; margin: 0; line-height: 1.4; }
.admin-wm-toggle {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 0.82rem; font-weight: 700;
    color: #6c757d;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
}
.admin-wm-toggle input[type="checkbox"] {
    position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0;
}
.admin-wm-toggle-slot {
    display: inline-block;
    width: 40px; height: 22px;
    background: #ced4da;
    border-radius: 22px;
    position: relative;
    transition: background 0.15s;
}
.admin-wm-toggle-dot {
    position: absolute;
    top: 2px; left: 2px;
    width: 18px; height: 18px;
    background: var(--vv-white);
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transition: left 0.15s;
}
.admin-wm-toggle--on .admin-wm-toggle-slot { background: var(--vv-green); }
.admin-wm-toggle--on .admin-wm-toggle-dot { left: 20px; }
.admin-wm-toggle--on .admin-wm-toggle-text { color: var(--vv-green); }
.admin-wm-toggle-text { min-width: 42px; }

.admin-wm-state--forced {
    font-size: 0.78rem; font-weight: 700;
    color: var(--vv-mint);
    background: rgba(39,222,166,0.12);
    padding: 6px 12px;
    border-radius: 999px;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.admin-wm-row--locked { opacity: 0.85; }

.admin-wm-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.admin-wm-preview {
    text-decoration: none;
    white-space: nowrap;
}

.reflection-usage {
    font-size: 0.88rem;
    color: var(--vv-green);
    background: rgba(20,115,86,0.08);
    border-left: 3px solid var(--vv-green);
    padding: 10px 14px;
    border-radius: 6px;
    margin: 0 0 20px;
    line-height: 1.45;
}

.ls-select-block {
    border: 1px solid #e9ecef;
    padding: 4px 18px;
    border-radius: var(--radius-md);
    background: #f6f9fc;
}
.ls-select-block[open] { padding: 16px 18px; }
.ls-select-summary {
    cursor: pointer;
    padding: 12px 0;
    display: flex; align-items: center; gap: 10px;
    list-style: none;
}
.ls-select-summary::-webkit-details-marker { display: none; }
.ls-select-summary::before {
    content: "▸ ";
    color: var(--vv-green);
    font-size: 0.85em;
}
.ls-select-block[open] .ls-select-summary::before,
.ls-groups-block[open] .ls-select-summary::before,
.pp-block[open] .ls-select-summary::before { content: "▾ "; }

.ls-groups-body { padding: 12px 0 4px; display: flex; flex-direction: column; gap: 16px; }
.ls-group-new { display: flex; gap: 8px; align-items: center; }
.ls-group-new-name { flex: 1; padding: 8px 12px; border: 1px solid #ced4da; border-radius: 6px; font: inherit; }
.ls-group-card { border: 1px solid #dee2e6; border-radius: 8px; background: #f9fbfd; }
.ls-group-summary {
    padding: 12px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer;
    list-style: none;
}
.ls-group-summary::-webkit-details-marker { display: none; }
.ls-group-summary::before { content: "▸"; color: var(--vv-green); font-size: 0.85em; }
.ls-group-card[open] .ls-group-summary::before { content: "▾"; }
.ls-group-name { font-weight: 600; color: var(--vv-navy); flex: 1; }
.ls-group-count { font-size: 0.85em; color: #6c757d; }
.ls-group-body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 16px; }
.ls-group-head-actions { display: flex; gap: 12px; align-items: center; }
.ls-group-rename { flex: 1; padding: 6px 10px; border: 1px solid #ced4da; border-radius: 6px; font: inherit; }
.ls-group-delete { color: var(--vv-red); }
.ls-group-subhead { margin: 0 0 8px; font-size: 0.9rem; color: var(--vv-navy); font-weight: 600; }
.ls-group-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ls-group-chip {
    display: inline-block; padding: 4px 10px; border-radius: 999px;
    border: 1px solid #dee2e6; background: #fff; font-size: 0.85em;
    color: var(--vv-navy);
}
.ls-group-chip-empty {
    margin: 0; font-size: 0.88em; font-style: italic; color: #6c757d;
    padding: 8px 10px; border: 1px dashed #dee2e6; border-radius: 6px; background: #f6f9fc;
}

.ls-group-mod-status { display: inline-flex; gap: 4px; margin-left: 8px; }
.ls-mod-pill {
    font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase;
    padding: 3px 8px; border-radius: 999px; font-weight: 600;
    background: #e9ecef; color: #495057;
}
.ls-mod-pill--published { background: rgba(20,115,86,0.18); color: #0d4f3a; }
.ls-mod-pill--draft { background: rgba(255,144,8,0.18); color: #a45c11; }
.ls-mod-pill--ready { background: #e6f4ec; color: #0f5d45; }
.ls-mod-pill--wait { background: #eef1f6; color: #6c757d; opacity: 0.7; }

.ls-groups-assign {
    border: 1px solid #dee2e6; border-radius: 8px; background: #f9fbfd;
}
.ls-groups-assign-summary {
    list-style: none; cursor: pointer;
    padding: 10px 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.ls-groups-assign-summary::-webkit-details-marker { display: none; }
.ls-groups-assign-summary::before { content: "▸"; color: var(--vv-green); font-size: 0.85em; }
.ls-groups-assign[open] .ls-groups-assign-summary::before { content: "▾"; }
.ls-groups-assign-title { font-weight: 600; color: var(--vv-navy); }
.ls-assign-counter { color: #6c757d; font-size: 0.88em; margin-left: auto; }
.ls-assign-counter-remain { color: #b3522e; }
.ls-assign-counter-remain--zero { color: #0f5d45; }
.ls-groups-assign-body {
    padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 10px;
    border-top: 1px dashed #e9ecef;
}
.ls-assign-hint { margin: 6px 0 0; font-size: 0.86em; color: #6c757d; }
.ls-assign-hint--warn { color: #b3522e; }
.ls-assign-empty {
    padding: 12px 14px; font-style: italic; color: #6c757d;
    border: 1px dashed #dee2e6; border-radius: 6px; background: #f6f9fc;
}
.ls-assign-list { display: flex; flex-direction: column; gap: 6px; }
.ls-assign-row {
    display: grid;
    grid-template-columns: 1fr auto minmax(180px, 220px);
    align-items: center; gap: 12px;
    padding: 8px 12px; border-radius: 6px; background: #fff;
    border: 1px solid #e9ecef;
}
.ls-assign-row--ungrouped { background: #fffaf3; border-color: #f6dfc4; }
.ls-assign-role { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ls-assign-role strong { color: var(--vv-navy); }
.ls-assign-area {
    color: #6c757d; font-style: italic; font-size: 0.88em;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.ls-assign-status {
    font-size: 0.78em; padding: 3px 8px; border-radius: 999px; font-weight: 600;
    letter-spacing: 0.02em; white-space: nowrap;
}
.ls-assign-status--in { background: rgba(20,115,86,0.15); color: #0d4f3a; }
.ls-assign-status--out { background: rgba(255,144,8,0.15); color: #a45c11; }
.ls-assign-select {
    padding: 6px 8px; border: 1px solid #ced4da; border-radius: 6px;
    background: #fff; font: inherit; font-size: 0.9em; color: var(--vv-navy);
}
.ls-assign-select:focus { outline: none; border-color: var(--vv-green); }
.ls-groups-list { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 640px) {
    .ls-assign-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .ls-assign-select { width: 100%; }
}

.ls-group-insights { display: flex; flex-direction: column; gap: 12px; }
.ls-insight-card {
    border: 1px solid #dee2e6; border-radius: 8px; padding: 12px 14px;
    background: #fff;
}
.ls-insight-card--loading { opacity: 0.6; pointer-events: none; }
.ls-insight-card-body { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.ls-insight-card:not([open]) .ls-insight-card-body { display: none; }
.ls-insight-head {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    cursor: pointer; list-style: none;
}
.ls-insight-head::-webkit-details-marker { display: none; }
.ls-insight-head::before {
    content: "▸"; color: var(--vv-navy); font-size: 0.85em;
    transition: transform 0.15s ease; display: inline-block;
}
.ls-insight-card[open] > .ls-insight-head::before { transform: rotate(90deg); }
.ls-insight-title { margin: 0; font-size: 0.98rem; color: var(--vv-navy); flex: 1; }
.ls-insight-status { font-size: 0.78em; padding: 3px 8px; border-radius: 999px; background: #e9ecef; color: #495057; text-transform: uppercase; letter-spacing: 0.04em; }
.ls-insight-status--draft { background: rgba(255,144,8,0.18); color: #a45c11; }
.ls-insight-status--published { background: rgba(20,115,86,0.18); color: #0d4f3a; }
.ls-insight-updated { font-size: 0.78em; color: #6c757d; }
.ls-insight-note { margin: 0; font-size: 0.85em; color: #6c757d; }

/* Felles veikart per gruppe */
.ls-group-shared-rm {
    margin-top: 18px;
    border: 1px solid #e9ecef; border-radius: 8px; background: #fafbfd;
}
.ls-group-shared-rm[open] { padding-bottom: 4px; }
.ls-group-shared-rm.ls-group-shared-rm--loading { opacity: 0.6; pointer-events: none; }
.ls-shared-rm-summary {
    padding: 12px 16px; cursor: pointer; list-style: none;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    font-weight: 600; color: var(--vv-navy);
}
.ls-shared-rm-summary::-webkit-details-marker { display: none; }
.ls-shared-rm-summary::marker { content: ""; }
.ls-shared-rm-summary::before {
    content: "▸"; color: #999; font-size: 0.9em;
    transition: transform 0.15s ease; display: inline-block;
}
.ls-group-shared-rm[open] > .ls-shared-rm-summary::before { transform: rotate(90deg); }
.ls-shared-rm-title { flex: 1; font-size: 0.98rem; }
.ls-shared-rm-summary-count { font-size: 0.82em; color: #6c757d; font-weight: 400; }
.ls-shared-rm-body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.ls-plenum-block { margin: 12px 0 6px; padding: 0; }
.ls-plenum-block .ls-group-shared-rm { background: #f4f0f8; border-color: #d9cee4; }
.ls-block-title--sub {
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em;
    color: #6c757d; margin: 4px 0 6px; font-weight: 600;
}
.ls-shared-rm-toggle {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.9rem; color: var(--vv-navy); font-weight: 500;
    cursor: pointer;
}
.ls-shared-rm-toggle input { margin: 0; }
.ls-shared-rm-hint { margin: 0; font-size: 0.82rem; color: #6c757d; line-height: 1.45; }
.ls-shared-rm-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ls-shared-rm-preview:empty { display: none; }
.ls-shared-rm-empty { margin: 0; font-size: 0.9rem; color: #888; font-style: italic; }
.ls-shared-rm-vision {
    padding: 12px 14px; margin-bottom: 12px;
    background: #fff; border: 1px solid #e9ecef; border-radius: 6px;
    font-size: 0.95rem; color: var(--vv-navy);
}
.ls-shared-rm-vision strong { color: var(--vv-red); margin-right: 6px; }
.ls-shared-rm-chart { margin-bottom: 10px; }
.ls-shared-rm-obs {
    padding: 10px 12px; margin: 10px 0;
    background: rgba(2,142,167,0.06); border-left: 3px solid var(--vv-green);
    border-radius: 4px;
}
.ls-shared-rm-obs-text { margin: 0 0 6px; font-size: 0.9rem; color: #212529; }
.ls-shared-rm-obs-q { margin: 0; font-size: 0.9rem; color: var(--vv-navy); font-style: italic; }
.ls-shared-rm-disclaimer { margin: 8px 0 0; font-size: 0.8rem; color: #888; }
.ls-insight-body {
    padding: 12px 14px;
    border: 1px solid #e9ecef;
    background: #f6f9fc;
    border-radius: 6px;
    font-size: 0.94rem;
    line-height: 1.55;
    color: #212529;
}
.ls-insight-body :first-child { margin-top: 0; }
.ls-insight-body :last-child { margin-bottom: 0; }
.ls-insight-body h2, .ls-insight-body h3 {
    font-size: 0.9rem;
    color: var(--vv-navy);
    margin: 14px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.ls-insight-body p { margin: 0 0 8px; }
.ls-insight-body ul { margin: 4px 0 10px; padding-left: 22px; }
.ls-insight-body li { margin: 2px 0; }
.ls-insight-published-body p { margin: 0 0 8px; }
.ls-insight-published-body h2, .ls-insight-published-body h3 {
    font-size: 0.85rem;
    color: var(--vv-navy);
    margin: 10px 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.ls-insight-published-body ul { margin: 4px 0 8px; padding-left: 22px; }
.ls-insight-empty {
    margin: 0; padding: 14px 16px;
    border: 1px dashed #ced4da; border-radius: 6px;
    background: #f6f9fc; color: #6c757d;
    font-size: 0.9rem; font-style: italic;
}
.ls-insight-revise {
    display: flex; gap: 8px; align-items: stretch;
    padding: 10px 12px;
    background: #eef1f6;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}
.ls-insight-revise-input {
    flex: 1; padding: 8px 10px;
    border: 1px solid #ced4da; border-radius: 6px;
    font: inherit; background: #fff;
}
.ls-insight-revise-input:focus { outline: none; border-color: var(--vv-green); }
.ls-insight-revise-input:disabled { background: #e9ecef; color: #adb5bd; }
.ls-insight-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ls-insight-actions--primary { align-items: center; }
.ls-insight-actions--publish { border-top: 1px dashed #e9ecef; padding-top: 10px; }
.ls-insight-versionnav {
    display: inline-flex; align-items: center; gap: 4px;
    margin-left: auto;
    padding: 2px 6px;
    background: #e9ecef;
    border-radius: 999px;
    font-size: 0.82rem;
    color: #495057;
}
.ls-insight-versionnav-btn {
    padding: 2px 8px;
    font-size: 1rem; line-height: 1;
    background: transparent; border: none;
    color: var(--vv-navy);
    cursor: pointer;
}
.ls-insight-versionnav-btn:disabled { color: #adb5bd; cursor: default; }
.ls-insight-versionnav-num { font-variant-numeric: tabular-nums; }
.ls-insight-structured { display: flex; flex-direction: column; gap: 12px; }
.ls-insight-intro {
    padding: 8px 12px; background: #f6f9fc;
    border: 1px solid #e9ecef; border-radius: 6px;
    font-size: 0.9rem; color: #495057;
}
.ls-insight-grid {
    display: grid; gap: 12px;
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 720px) {
    .ls-insight-grid { grid-template-columns: 1fr; }
}
.ls-insight-box {
    padding: 12px 14px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    display: flex; flex-direction: column; gap: 8px;
}
.ls-insight-box--felles { border-left: 4px solid var(--vv-green, #147356); background: rgba(20,115,86,0.04); }
.ls-insight-box--ulik { border-left: 4px solid #ff9008; background: rgba(255,144,8,0.05); }
.ls-insight-box--disk {
    border-left: 4px solid var(--vv-navy, #103a61);
    background: rgba(16,58,97,0.03);
}
.ls-insight-box--disk .ls-insight-box-body ol,
.ls-insight-box--disk .ls-insight-box-body ul {
    padding-left: 22px;
    margin: 4px 0;
}
.ls-insight-box--disk .ls-insight-box-body li {
    margin: 6px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}
.ls-insight-box-title {
    margin: 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--vv-navy, #103a61);
    font-weight: 700;
}
.ls-insight-box-body { font-size: 0.92rem; line-height: 1.5; color: #212529; }
.ls-insight-box-body :first-child { margin-top: 0; }
.ls-insight-box-body :last-child { margin-bottom: 0; }
.ls-insight-box-body ul, .ls-insight-box-body ol { padding-left: 20px; margin: 4px 0 6px; }
.ls-insight-box-body li { margin: 3px 0; }
.ls-insight-box-body p { margin: 0 0 6px; }
.ls-insight-box--empty { opacity: 0.7; font-style: italic; }
.ls-insight-box-empty { margin: 0; font-size: 0.9rem; color: #6c757d; }

.ls-disk-list { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 8px; }
.ls-disk-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: var(--vv-white);
    border: 1px solid rgba(16,58,97,0.08);
    border-radius: 6px;
}
.ls-disk-letter {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--vv-navy);
    color: var(--vv-white);
    font-weight: 700;
    border-radius: 6px;
    font-size: 0.92rem;
    line-height: 1;
}
.ls-disk-text { flex: 1; min-width: 0; font-size: 0.94rem; line-height: 1.45; }
.ls-disk-tally {
    flex-shrink: 0;
    font-size: 0.82rem;
    color: #343a40;
    padding: 4px 10px;
    background: rgba(20,115,86,0.1);
    border-radius: 999px;
    white-space: nowrap;
}
.ls-disk-tally strong { color: var(--vv-green); font-variant-numeric: tabular-nums; }
.ls-disk-vote-controls {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px;
    border: 1px solid var(--vv-green);
    border-radius: 999px;
    background: var(--vv-white);
}
.ls-disk-vote-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--vv-green);
    font-size: 1.2rem;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 120ms;
}
.ls-disk-vote-btn:hover:not([disabled]) { background: rgba(20,115,86,0.12); }
.ls-disk-vote-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.ls-disk-mine {
    min-width: 24px;
    text-align: center;
    font-weight: 700;
    color: var(--vv-navy);
    font-variant-numeric: tabular-nums;
    font-size: 0.95rem;
}
.ls-disk-hint {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: #495057;
}
.ls-disk-hint--closed { color: #6c757d; font-style: italic; }
.ls-disk-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.ls-disk-status--open { background: rgba(20,115,86,0.15); color: var(--vv-green); }
.ls-disk-status--closed { background: #eef1f6; color: #6c757d; }
.ls-disk-status--locked { background: rgba(255,144,8,0.15); color: #b3672d; }
.ls-disk-rank {
    flex-shrink: 0;
    width: 24px;
    text-align: center;
    color: #6c757d;
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.ls-disk-hint--preview { color: #6c757d; font-style: italic; }
.ls-disk-vote-controls--preview { opacity: 0.75; }
.ls-disk-preview {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(20,115,86,0.05);
    border: 1px dashed rgba(20,115,86,0.3);
    border-radius: 6px;
}
.ls-disk-preview summary { cursor: pointer; color: var(--vv-green); font-size: 0.9rem; font-weight: 600; }
.ls-disk-preview-body { margin-top: 8px; }

.ls-vote-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 12px;
    background: rgba(20,115,86,0.05);
    border-radius: 6px;
    margin-top: 8px;
}
.ls-vote-reset { color: var(--vv-red, #f84a4a); }

.ls-insight-published { padding-top: 6px; }
.ls-insight-published summary { cursor: pointer; font-size: 0.88em; color: #6c757d; }
.ls-insight-published-body { padding: 10px 12px; border-left: 3px solid var(--vv-green); background: rgba(20,115,86,0.05); border-radius: 4px; margin-top: 8px; }
.ls-select-summary .ls-block-title { margin: 0; display: inline; }

.pp-block {
    border: 1px solid #e9ecef;
    padding: 4px 18px;
    border-radius: var(--radius-md);
    background: #f6f9fc;
    margin-bottom: 24px;
}
.pp-block[open] { padding: 16px 18px; }
.pp-list-wrap { display: flex; flex-direction: column; gap: 10px; }
.pp-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 58, 97, 0.04);
}
.pp-summary {
    cursor: pointer;
    padding: 12px 16px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.pp-summary::-webkit-details-marker { display: none; }
.pp-summary::before {
    content: "▸";
    color: var(--vv-green);
    font-size: 0.8em;
    flex-shrink: 0;
}
.pp-item[open] .pp-summary::before { content: "▾"; }
.pp-item[open] .pp-summary { border-bottom: 1px dashed #e9ecef; }
.pp-summary-main {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.pp-role {
    font-weight: 700;
    color: var(--vv-navy);
    flex-shrink: 0;
}
.pp-role-area {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.pp-summary-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}
.pp-role-id {
    font-size: 0.78em;
    color: #adb5bd;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}
.pp-group-badge-slot { display: inline-flex; }
.pp-group-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.78rem; padding: 3px 9px; border-radius: 999px;
    background: rgba(20,115,86,0.14); color: #0d4f3a; font-weight: 600;
    letter-spacing: 0.02em; max-width: 180px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pp-group-badge-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--vv-green, #147356);
    flex-shrink: 0;
}
.pp-group-badge--none {
    background: transparent; color: #adb5bd; font-weight: 500; font-style: italic;
    padding: 3px 6px; border: 1px dashed #dee2e6;
}
.pp-group-badge--none .pp-group-badge-dot { display: none; }
.pp-body-wrap { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; }

.pp-card {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #f9fbfd;
}
.pp-card-summary {
    cursor: pointer;
    list-style: none;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--vv-navy);
}
.pp-card-summary::-webkit-details-marker { display: none; }
.pp-card-summary::before { content: "▸"; color: var(--vv-green); font-size: 0.8em; }
.pp-card[open] .pp-card-summary::before { content: "▾"; }
.pp-card-badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.pp-card-badge--ai { background: #e6f4ec; color: #0f5d45; }
.pp-card-badge--fb { background: #fff3e0; color: #b3522e; }
.pp-card-meta { font-size: 0.78rem; color: #adb5bd; margin-left: auto; }
.pp-card-body { padding: 4px 14px 14px; border-top: 1px dashed #e9ecef; }
.pp-card-sub {
    margin: 12px 0 5px;
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: #8b8595;
}
.pp-obs-tag {
    display: inline-block; margin-bottom: 6px;
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--vv-green);
}
.pp-obs-text { margin: 0 0 6px; }

.pp-card-p { margin: 8px 0; line-height: 1.5; }
.pp-card-p em, .pp-card-obs em { font-style: normal; font-weight: 600; color: var(--vv-green); margin-right: 4px; }
.pp-card-obs {
    margin: 10px 0 4px;
    padding: 8px 10px;
    background: #f6f9fc;
    border-left: 3px solid var(--vv-green);
    border-radius: 4px;
    font-size: 0.92rem;
}
.pp-card-list { margin: 8px 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.pp-card-list li { line-height: 1.45; }
.pp-card-note { color: #495057; font-size: 0.9rem; margin-top: 4px; }
.pp-card-note em { font-style: normal; font-weight: 600; color: #343a40; margin-right: 4px; }
.pp-card-fase { margin: 8px 0; }
.pp-card-fase > strong {
    display: inline-block;
    margin-bottom: 4px;
    color: var(--vv-green);
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
}
.pp-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef1f6;
    color: #495057;
    margin-right: 4px;
}
.pp-num {
    display: inline-block;
    font-size: 0.78rem;
    color: #495057;
    font-variant-numeric: tabular-nums;
    margin-right: 4px;
}
.pp-card-disclaimer {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}
.pp-card-raw {
    margin: 8px 0;
    padding: 10px;
    background: #eef1f6;
    border-radius: 4px;
    font-size: 0.82rem;
    max-height: 300px;
    overflow: auto;
    white-space: pre-wrap;
}
.pp-answers { border-top: 1px dashed #e9ecef; padding-top: 10px; }
.pp-answers-summary {
    cursor: pointer;
    list-style: none;
    padding: 6px 0;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}
.pp-answers-summary::-webkit-details-marker { display: none; }
.pp-answers-summary::before { content: "▸ "; color: var(--vv-green); }
.pp-answers[open] .pp-answers-summary::before { content: "▾ "; }
.pp-head {
    display: flex; flex-wrap: wrap; gap: 12px;
    padding: 6px 10px; margin-bottom: 10px;
    border-radius: 4px;
    background: #eef1f6;
    font-size: 0.88rem;
}
.pp-kv em { font-style: normal; color: #495057; margin-right: 4px; }

/* Role display — used in Analysegrunnlag, per-participant summary, and group members */
.role-line {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}
.role-name {
    font-weight: 700;
    color: var(--vv-navy);
    flex-shrink: 0;
}
.role-desc {
    display: inline-block;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #6c757d;
    font-style: italic;
    font-size: 0.9em;
    cursor: pointer;
    border-bottom: 1px dotted transparent;
    transition: border-color 120ms ease;
}
.role-desc:hover { border-bottom-color: #adb5bd; }
.role-desc.expanded {
    max-width: none;
    white-space: normal;
    overflow: visible;
}
.role-id {
    font-size: 0.78em;
    color: #adb5bd;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    margin-left: auto;
    padding-left: 8px;
    flex-shrink: 0;
}

/* Verktøyraden over innsikten. Holder utvalg-knappen. */
.admin-insight-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 22px;
    position: relative;
    flex-wrap: wrap;
}
.admin-filter-wrap {
    position: relative;
    flex-shrink: 0;
}

.admin-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--vv-white);
    border: 1.5px solid #ced4da;
    color: var(--vv-navy);
    padding: 8px 14px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(16, 58, 97, 0.08);
    transition: border-color 120ms, background 120ms;
    flex-shrink: 0;
}
.admin-filter-btn:hover { border-color: var(--vv-green); }
.admin-filter-btn[aria-expanded="true"] {
    background: var(--vv-green);
    border-color: var(--vv-green);
    color: var(--vv-white);
}
.admin-filter-icon { font-size: 1rem; }
.admin-filter-count {
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef1f6;
    color: #495057;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}
.admin-filter-btn[aria-expanded="true"] .admin-filter-count {
    background: rgba(255,255,255,0.2);
    color: var(--vv-white);
}

.admin-filter-popover {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 50;
    width: min(440px, 92vw);
    max-height: 70vh;
    overflow-y: auto;
    background: var(--vv-white);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(16, 58, 97, 0.22);
    padding: 14px 16px;
}
.admin-filter-popover[hidden] { display: none; }
.ls-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.ls-popover-close {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}
.ls-popover-close:hover { background: #eef1f6; color: var(--vv-navy); }

/* Kortpaneler i admin: statusstripe, slots og fremdrift */
.pp-pane-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px 20px; flex-wrap: wrap;
    padding: 12px 16px; margin-bottom: 14px;
    background: #fff; border: 1px solid #e9ecef; border-radius: 8px;
}
.pp-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.88rem; color: #495057; }
.pp-stat { display: inline-flex; align-items: baseline; gap: 5px; }
.pp-stat strong { font-size: 1.05rem; color: var(--vv-navy); font-variant-numeric: tabular-nums; }
.pp-stat--saved strong { color: #0f5d45; }
.pp-stat--missing strong { color: #a45c11; }
.pp-stat--nodata strong { color: #8b8595; }
.pp-pane-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.pp-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.pp-chip {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.74rem; font-weight: 600; padding: 2px 8px; border-radius: 999px;
    letter-spacing: 0.01em; white-space: nowrap;
}
.pp-chip-mark { font-size: 0.8em; }
.pp-chip--saved { background: #e6f4ec; color: #0f5d45; }
.pp-chip--missing { background: #fff3e0; color: #a45c11; }
.pp-chip--nodata { background: #f1f0f4; color: #8b8595; font-weight: 500; }

.pp-slots { display: flex; flex-direction: column; gap: 10px; }
.pp-card-title { color: var(--vv-navy); }
.pp-card-action.btn-ghost, .pp-card-action.btn-secondary {
    width: auto; margin: 0 0 0 auto; padding: 5px 10px; font-size: 0.8rem; flex-shrink: 0;
}
.pp-card-summary .pp-card-meta { margin-left: 0; }
.pp-card-summary .pp-card-action { margin-left: auto; }
.pp-card--busy { opacity: 0.65; }
.pp-slot {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 12px; border-radius: 6px; font-size: 0.9rem;
}
.pp-slot--missing { border: 1px dashed #f0c48a; background: #fffaf3; }
.pp-slot--nodata { border: 1px dashed #e3e0e8; background: #faf9fb; color: #8b8595; }
.pp-slot--nodata .pp-card-title { color: #8b8595; font-weight: 600; }
.pp-slot-note { color: #6c757d; font-size: 0.86rem; }
.pp-slot-live { font-size: 0.78rem; font-weight: 600; color: #6c757d; }
.pp-slot-live--busy { color: var(--vv-green); }
.pp-body-actions { display: flex; justify-content: flex-end; }
.pp-body-actions .btn-link { font-size: 0.85rem; }
.pp-card-note--sharp { color: var(--vv-navy); font-weight: 600; }

.pp-nodata-group {
    border: 1px dashed #e3e0e8; border-radius: 8px; background: #faf9fb;
    padding: 4px 16px; color: #6c757d;
}
.pp-nodata-group[open] { padding: 10px 16px 14px; }
.pp-nodata-summary { cursor: pointer; font-size: 0.9rem; font-weight: 600; padding: 8px 0; list-style: none; }
.pp-nodata-summary::-webkit-details-marker { display: none; }
.pp-nodata-summary::before { content: "▸ "; color: #8b8595; }
.pp-nodata-group[open] .pp-nodata-summary::before { content: "▾ "; }
.pp-nodata-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
.pp-nodata-list li { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.pp-nodata-list strong { color: var(--vv-navy); flex-shrink: 0; }
.pp-nodata-list .pp-role-id { margin-left: auto; }
.pp-nodata-why { margin: 10px 0 0; font-size: 0.82rem; color: #8b8595; }

.pp-run {
    margin-bottom: 14px; padding: 12px 16px; border-radius: 8px;
    border: 1px solid #cfe9ee; background: #f2fbfc;
}
.pp-run--done { border-color: #bfe3cf; background: #f1faf4; }
.pp-run--warn { border-color: #f0c48a; background: #fffaf3; }
.pp-run-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 0.9rem; color: var(--vv-navy); }
.pp-run-title { font-size: 0.95rem; }
.pp-run-count { font-variant-numeric: tabular-nums; font-weight: 600; }
.pp-run-now, .pp-run-summary { color: #495057; }
.pp-run-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.pp-run-bar { height: 6px; border-radius: 999px; background: rgba(39,0,61,0.08); margin-top: 10px; overflow: hidden; }
.pp-run-fill { height: 100%; background: var(--vv-green); transition: width 200ms ease; }
.pp-run--done .pp-run-fill { background: #147356; }
.pp-run--warn .pp-run-fill { background: var(--vv-orange); }
.pp-run-log { margin-top: 8px; font-size: 0.84rem; }
.pp-run-log summary { cursor: pointer; color: #6c757d; }
.pp-run-log ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.pp-run-log-item { display: flex; gap: 10px; justify-content: space-between; }
.pp-run-log-res { color: #6c757d; }
.pp-run-log-item--ok .pp-run-log-res { color: #0f5d45; }
.pp-run-log-item--failed .pp-run-log-res { color: #b30f2b; }
.pp-run-log-item--cancelled .pp-run-log-res { color: #8b8595; }

.ls-subpane { animation: adminFade 160ms ease; }
.ls-subpane[hidden] { display: none; }
.ls-ask-host[hidden] { display: none; }
.ls-ask-host { margin-bottom: 16px; }

.ls-select-block--flat { padding: 16px 18px; }
.ls-select-block--flat > .ls-block-title { margin: 0 0 6px; }
.pp-section { margin: 10px 0 14px; }
.pp-section--meta {
    font-size: 0.82rem;
    color: #495057;
    border-top: 1px dashed #e9ecef;
    padding-top: 8px;
}
.pp-section-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--vv-green);
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pp-list { list-style: none; padding: 0; margin: 0; }
.pp-list li { padding: 4px 0; line-height: 1.45; }
.pp-list em { font-style: normal; color: #495057; margin-right: 4px; }
.pp-list--inner { padding-left: 12px; margin-top: 4px; }
.pp-body { margin: 0; line-height: 1.5; }
.pp-sub { color: #495057; font-size: 0.88rem; }
.pp-empty { color: #999; font-style: italic; }
.ls-select-hint-inline { color: #666; font-size: 0.82rem; margin-left: 8px; }
.ls-select-head {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 12px; flex-wrap: wrap;
    margin: 0 0 12px;
}
.ls-select-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ls-select-hint { color: #666; font-size: 0.85rem; margin: 0 0 12px; }
.ls-select-list { list-style: none; margin: 0; padding: 0; }
.ls-select-list li { padding: 8px 0; border-top: 1px dashed #e9ecef; }
.ls-select-list li:first-child { border-top: none; }
.ls-select-item {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; font-size: 0.9rem;
}
.ls-select-item input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.ls-select-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ls-select-list li .ls-select-item { flex: 1; }
.ls-delete-btn {
    background: none;
    border: 1px solid #fecdd2;
    color: var(--vv-red);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 600;
}
.ls-delete-btn:hover { background: rgba(248,74,74,0.08); }
.ls-delete-all {
    color: var(--vv-red) !important;
    margin-left: auto;
}
.ls-done-badges { margin-left: 28px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.ls-done-badge {
    display: inline-block;
    font-size: 0.7rem; font-weight: 700;
    color: var(--vv-mint);
    background: rgba(39,222,166,0.14);
    padding: 2px 7px;
    border-radius: 999px;
}

.strategy-hint {
    background: rgba(255,144,8,0.08);
    border-left: 3px solid var(--vv-orange);
    border-radius: 6px;
    padding: 8px 14px;
    margin: 0 0 12px;
}
.strategy-hint summary {
    cursor: pointer;
    font-size: 0.88rem; font-weight: 700;
    color: var(--vv-orange);
    list-style: none;
    padding: 4px 0;
}
.strategy-hint summary::-webkit-details-marker { display: none; }
.strategy-hint summary::before {
    content: "▸ ";
    display: inline-block;
    transition: transform 0.15s;
    font-size: 0.75em;
}
.strategy-hint[open] summary::before { content: "▾ "; }
.strategy-hint-body { padding: 6px 0 4px; }
.strategy-hint-lead { font-size: 0.85rem; color: #555; margin: 0 0 8px; }
.strategy-hint-body ul { margin: 0 0 8px; padding-left: 22px; }
.strategy-hint-body li { font-size: 0.88rem; color: #333; margin-bottom: 8px; line-height: 1.45; }
.strategy-hint-tail { font-size: 0.8rem; color: #666; margin: 0; }
.strategy-hint-tail a { color: var(--vv-green); }

.strategy-hint-slot { margin-top: 10px; }
.strategy-hint--reveal {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.strategy-hint--reveal.strategy-hint--shown {
    opacity: 1;
    transform: translateY(0);
}

.ls-block-sub {
    color: #666; font-size: 0.85rem;
    margin: -4px 0 12px;
}
.ls-scatter { background: #f6f9fc; border: 1px solid #e9ecef; padding: 16px 18px; border-radius: var(--radius-md); }
.ls-scatter-svg {
    width: 100%; height: auto;
    max-width: 640px;
    display: block; margin: 8px auto 0;
}
.ls-scatter-pt circle { cursor: default; transition: fill-opacity 0.15s; }
.ls-scatter-pt:hover circle,
.ls-scatter-pt:focus circle { fill-opacity: 1; }
.ls-scatter-svg:has(.ls-scatter-pt:hover) .ls-scatter-pt circle,
.ls-scatter-svg:has(.ls-scatter-pt:focus) .ls-scatter-pt circle { fill-opacity: 0.22; }
.ls-scatter-svg:has(.ls-scatter-pt:hover) .ls-scatter-pt:hover circle,
.ls-scatter-svg:has(.ls-scatter-pt:focus) .ls-scatter-pt:focus circle { fill-opacity: 1; }
.ls-scatter-pt { outline: none; }
.ls-scatter-lbl {
    opacity: 0;
    pointer-events: none;
    paint-order: stroke fill;
    stroke: #ffffff;
    stroke-width: 3px;
    stroke-linejoin: round;
    transition: opacity 0.1s;
}
.ls-scatter.show-role .ls-scatter-lbl { opacity: 1; }
.ls-scatter-pt:hover .ls-scatter-lbl,
.ls-scatter-pt:focus .ls-scatter-lbl { opacity: 1; }

.ls-scatter-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
}
.ls-scatter-head .ls-block-title { margin: 0; }
.ls-scatter-controls {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.ls-scatter-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.85rem; color: #444; cursor: pointer;
}
.ls-scatter-fs,
.ls-scatter-refresh {
    font-size: 0.85rem;
    padding: 4px 8px;
}
.ls-scatter:fullscreen,
.ls-scatter:-webkit-full-screen {
    background: #f6f9fc;
    padding: 24px;
    display: flex; flex-direction: column;
    justify-content: center;
    overflow: auto;
}
.ls-scatter:fullscreen .ls-scatter-svg,
.ls-scatter:-webkit-full-screen .ls-scatter-svg {
    max-width: min(90vw, 140vh);
    max-height: 85vh;
}

.ls-ask-block {
    background: rgba(20,115,86,0.05);
    border: 1px solid rgba(20,115,86,0.2);
    padding: 16px 18px;
    border-radius: var(--radius-md);
}
.ls-ask-input {
    width: 100%;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.92rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    resize: vertical;
    box-sizing: border-box;
}
.ls-ask-input:focus { outline: none; border-color: var(--vv-green); }
.ls-ask-actions {
    display: flex; align-items: center; gap: 12px;
    margin-top: 10px; flex-wrap: wrap;
}
.ls-ask-note { color: #666; font-size: 0.78rem; }
.ls-ask-model-label { color: #444; font-size: 0.8rem; }
.ls-ask-model-select {
    font-size: 0.85rem; padding: 4px 8px;
    border: 1px solid #d0d4d8; border-radius: 6px; background: #fff;
}
.ls-ask-answer { margin-top: 14px; }
.ls-ask-loading {
    color: #666; font-style: italic;
    transition: opacity 200ms ease;
    min-height: 1.4em;
}
.ls-insight-phrase {
    margin-top: 10px; padding: 10px 12px;
    background: #f7f6f2; border-left: 3px solid #dee2e6;
    border-radius: 4px;
}
.ls-insight-phrase-text {
    margin: 0; color: #495057; font-style: italic; font-size: 0.9rem;
    transition: opacity 200ms ease;
    min-height: 1.4em;
}
.ls-ask-error { color: var(--vv-red); }
.ls-ask-response {
    padding: 14px 16px;
    background: var(--vv-white);
    border-left: 3px solid var(--vv-green);
    border-radius: 6px;
    font-size: 0.92rem;
    line-height: 1.55;
}

.admin-actions {
    display: flex; gap: 10px; flex-wrap: wrap;
}

.proxy-override-input {
    width: 100%; padding: 8px 10px;
    border: 1px solid #d0d4d8; border-radius: 6px;
    font-family: ui-monospace, monospace; font-size: 0.85rem;
}
.admin-setting-row--btns {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px;
}
.proxy-override-status {
    margin-top: 10px; padding: 6px 10px; border-radius: 4px;
    font-size: 0.85rem; display: inline-block;
}
.proxy-override-status--on { background: #d4edda; color: #155724; font-weight: 600; }
.proxy-override-status--off { background: #eee; color: #666; }


.llmdiag-actions {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 16px;
}
.llmdiag-hint { font-size: 0.85rem; color: #495057; }
.llmdiag-list { display: flex; flex-direction: column; gap: 6px; }
.llmdiag-row {
    border: 1px solid #e5e2d9; border-radius: 6px;
    background: #fbfaf5;
}
.llmdiag-row-head {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center; gap: 10px;
    padding: 8px 12px;
}
.llmdiag-row-title { font-size: 0.9rem; }
.llmdiag-row-status {
    font-size: 0.82rem; padding: 3px 8px; border-radius: 4px;
    background: #eee; color: #333; min-width: 130px; text-align: center;
    font-family: ui-monospace, monospace;
}
.llmdiag-row-status--neutral { background: #eee; color: #666; }
.llmdiag-row-status--pending { background: #fff3cd; color: #856404; }
.llmdiag-row-status--ok { background: #d4edda; color: #155724; }
.llmdiag-row-status--err { background: #f8d7da; color: #721c24; }
.llmdiag-row-details {
    margin: 0; padding: 10px 12px;
    background: #1e1e1e; color: #d4d4d4;
    font-size: 0.75rem; line-height: 1.4;
    max-height: 320px; overflow: auto;
    white-space: pre-wrap; word-break: break-word;
    border-radius: 0 0 6px 6px;
}

.llmdiag-env {
    margin-top: 24px; padding: 14px 16px;
    background: #f5f2e8; border-radius: 6px;
}
.llmdiag-env:empty { display: none; }
.llmdiag-env-title { margin: 0 0 10px 0; font-size: 1rem; }
.llmdiag-env-table { width: 100%; border-collapse: collapse; }
.llmdiag-env-table th, .llmdiag-env-table td {
    text-align: left; padding: 4px 8px; font-size: 0.85rem;
    border-bottom: 1px solid #e5e2d9; vertical-align: top;
}
.llmdiag-env-table th { width: 200px; color: #495057; font-weight: 600; }
.llmdiag-env-table code {
    font-family: ui-monospace, monospace; font-size: 0.78rem;
    background: #fff; padding: 1px 4px; border-radius: 3px;
    word-break: break-all;
}
.llmdiag-env-hint { font-size: 0.8rem; color: #495057; margin-top: 10px; }

.admin-wm-url {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-top: 6px;
    font-size: 0.78rem;
}
.admin-wm-url code {
    background: #eef1f6;
    color: var(--vv-navy);
    padding: 3px 7px;
    border-radius: 4px;
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
}
.admin-wm-copy {
    background: none; border: none; color: var(--vv-green);
    cursor: pointer; padding: 0; font-size: 0.78rem; font-weight: 600;
}
.admin-wm-copy:hover { text-decoration: underline; }
.admin-wm-copy-msg { font-size: 0.75rem; color: var(--vv-mint); }

@media (max-width: 600px) {
    .admin-wm-main { flex-direction: column; align-items: flex-start; }
    .admin-wm-toggle { align-self: flex-end; }
}

/* ============================================================
   ADMIN-MODUS (/admin)
   ============================================================ */

body.admin-mode { background: var(--vv-off-white); }
body.admin-mode .topbar,
body.admin-mode .container { display: none !important; }

.admin-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--vv-off-white);
    color: var(--vv-navy);
    font-family: var(--font);
}

.admin-topbar {
    background: var(--vv-navy);
    color: var(--vv-white);
    padding: 14px 24px;
    box-shadow: 0 2px 12px rgba(16, 58, 97, 0.18);
}
.admin-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.admin-topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.admin-brand-badge {
    background: var(--vv-red);
    color: var(--vv-white);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}
.admin-brand-title {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-logout {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: var(--vv-white);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
}
.admin-logout:hover { background: rgba(255, 255, 255, 0.22); }

/* Login */
.admin-login {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
}
.admin-login-card {
    background: var(--vv-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 40px 36px;
    max-width: 420px;
    width: 100%;
}
.admin-login-title { margin: 0 0 8px; font-size: 1.6rem; color: var(--vv-navy); }
.admin-login-sub { margin: 0 0 24px; color: #495057; font-size: 0.95rem; line-height: 1.5; }
.admin-login-form { display: flex; flex-direction: column; gap: 12px; }
.admin-login-label { font-weight: 600; font-size: 0.85rem; color: var(--vv-navy-deep); }
.admin-login-form input {
    padding: 12px 14px;
    border: 1.5px solid #ced4da;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}
.admin-login-form input:focus {
    outline: none;
    border-color: var(--vv-green);
    box-shadow: 0 0 0 3px rgba(20, 115, 86, 0.15);
}
.admin-login-err {
    margin: 0;
    color: var(--vv-red);
    font-size: 0.88rem;
    font-weight: 600;
}
.admin-login-form .btn { margin-top: 6px; }

/* Dashboard */
/* Sidemeny med seksjoner. Ett nivå, ingen faner i faner. */
.admin-dashboard {
    flex: 1;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 24px 60px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}
.admin-nav {
    position: sticky; top: 22px;
    display: flex; flex-direction: column; gap: 2px;
}
.admin-nav-plenum { margin-bottom: 18px; }
.admin-nav-group {
    margin: 18px 0 6px;
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: #8b8595;
}
.admin-nav-group:first-of-type { margin-top: 0; }
.admin-nav-item {
    text-align: left;
    background: none; border: none;
    padding: 8px 12px;
    border-radius: 7px;
    font-family: inherit; font-size: 0.9rem; font-weight: 500;
    color: #3f3a4a; cursor: pointer;
    border-left: 3px solid transparent;
    transition: background 120ms, color 120ms, border-color 120ms;
}
.admin-nav-item:hover { background: #f2eff7; color: var(--vv-navy); }
.admin-nav-item.is-active {
    background: #ece7f5;
    color: var(--vv-navy);
    font-weight: 700;
    border-left-color: var(--vv-green);
}
.admin-views { min-width: 0; }

@media (max-width: 1000px) {
    .admin-dashboard { grid-template-columns: 1fr; gap: 20px; }
    .admin-nav {
        position: static;
        flex-direction: row; flex-wrap: wrap; gap: 6px;
        padding-bottom: 14px; border-bottom: 1px solid #e6e1ec;
    }
    .admin-nav-group { width: 100%; margin: 10px 0 2px; }
    .admin-nav-item { border-left: none; border-bottom: 2px solid transparent; }
    .admin-nav-item.is-active { border-bottom-color: var(--vv-green); }
    .admin-nav-plenum { width: 100%; margin-bottom: 8px; }
}

.admin-pane { animation: adminFade 160ms ease; }
@keyframes adminFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.admin-pane-head { margin-bottom: 22px; }
.admin-pane-title {
    margin: 0 0 6px;
    font-size: 1.5rem;
    color: var(--vv-navy);
    font-weight: 700;
}
.admin-pane-sub {
    margin: 0;
    color: #495057;
    font-size: 0.95rem;
    max-width: 720px;
    line-height: 1.5;
}

/* Modulmeny — slot-oversikt */
.admin-slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    background: var(--vv-white);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.admin-slot { display: flex; flex-direction: column; gap: 4px; }
.admin-slot-label {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--vv-green);
    font-weight: 700;
}
.admin-slot-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--vv-navy);
}
.admin-slot-value.mas-value--unset { color: #adb5bd; font-weight: 500; font-style: italic; }

.admin-module-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

/* Program-tab */
.admin-program {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.admin-program .timeplan-day-block {
    background: var(--vv-white);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow);
    margin: 0;
}
.admin-program .tl-luke--set .tl-act { color: var(--vv-green); font-weight: 700; }

/* Innstillinger */
.admin-setting {
    background: var(--vv-white);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    max-width: 560px;
}
.admin-setting-label {
    display: block;
    font-weight: 700;
    color: var(--vv-navy-deep);
    margin-bottom: 4px;
}
.admin-setting-sub { margin: 0 0 12px; color: #495057; font-size: 0.9rem; }
.admin-setting-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-setting-row select {
    padding: 8px 12px;
    border: 1.5px solid #ced4da;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--vv-white);
}
.admin-setting-row .model-select-msg { font-size: 0.85rem; color: var(--vv-green); }

/* Justering av gjenbrukte komponenter i admin-panene */
.admin-pane .admin-wizard-list {
    background: var(--vv-white);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}
.admin-pane #leaderSummaryContent {
    background: var(--vv-white);
    border-radius: var(--radius-md);
    padding: 24px 26px;
    box-shadow: var(--shadow);
}
.admin-pane .module-groups {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.admin-pane .module-edit-actions {
    background: var(--vv-white);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    box-shadow: var(--shadow);
    margin-top: 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 720px) {
    .admin-slots { grid-template-columns: 1fr; }
    .admin-program { grid-template-columns: 1fr; }
    .admin-dashboard { padding: 20px 14px 60px; }
    .admin-brand-title { display: none; }
}

/* --- Deltaker-prioritering (pp-*) --- */
.pp-vision {
    margin: 6px 0 12px;
    padding: 10px 14px;
    background: linear-gradient(180deg, rgba(248,74,74,0.06), rgba(20,115,86,0.04));
    border-left: 3px solid var(--vv-red, #f84a4a);
    border-radius: 4px;
}
.pp-vision-eyebrow {
    display: block;
    font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--vv-red, #f84a4a); font-weight: 700; margin-bottom: 4px;
}
.pp-vision-text {
    margin: 0; font-size: 0.98rem; line-height: 1.45;
    color: var(--vv-navy, #103a61); font-weight: 600; font-style: italic;
}
.pp-sub-block { margin: 6px 0 10px; color: #333; font-size: 0.88rem; }
.pp-sub-block em { font-style: normal; color: #495057; margin-right: 4px; }
.pp-subhead {
    font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--vv-green, #147356); font-weight: 700;
    margin: 12px 0 6px;
}
.pp-wt-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.pp-wt-row { display: grid; grid-template-columns: 42% 1fr 48px; align-items: center; gap: 8px; font-size: 0.85rem; }
.pp-wt-label { color: #103a61; font-weight: 600; }
.pp-wt-track { position: relative; height: 8px; background: #e9ecef; border-radius: 4px; overflow: hidden; display: block; }
.pp-wt-fill {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: linear-gradient(90deg, #147356, #f84a4a); border-radius: 4px; display: block;
}
.pp-wt-num { text-align: right; color: #103a61; font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-init-grid { display: flex; flex-direction: column; gap: 10px; }
.pp-init-card {
    padding: 10px 12px; background: #f6f9fc;
    border: 1px solid #e9ecef; border-radius: 6px;
}
.pp-init-head {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 6px;
}
.pp-init-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    color: #fff; font-weight: 700; font-size: 0.8rem; flex-shrink: 0;
}
.pp-init-name { flex: 1; font-weight: 700; color: #103a61; }
.pp-init-quad {
    font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700;
}
.pp-init-desc { margin: 0 0 6px; color: #495057; font-size: 0.87rem; }
.pp-init-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.pp-init-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 999px;
    font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase;
    color: #495057; background: #fff; border: 1px solid #e9ecef;
}
.pp-init-badge strong { color: #103a61; font-size: 0.85rem; font-weight: 700; }
.pp-init-badge--v { border-color: rgba(20,115,86,0.35); }
.pp-init-badge--f { border-color: rgba(248,74,74,0.35); }
.pp-sc-list { display: flex; flex-direction: column; gap: 3px; }
.pp-sc-row { display: grid; grid-template-columns: 42% 1fr 28px; align-items: center; gap: 8px; font-size: 0.78rem; }
.pp-sc-label { color: #495057; }
.pp-sc-track { position: relative; height: 5px; background: #e9ecef; border-radius: 3px; display: block; overflow: hidden; }
.pp-sc-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--vv-green, #147356); border-radius: 3px; display: block; }
.pp-sc-num { text-align: right; color: #103a61; font-weight: 600; font-variant-numeric: tabular-nums; }

/* --- Leder-prioritering aggregert (lp-*) --- */
.lp-block { background: #f6f9fc; border: 1px solid #e9ecef; padding: 16px 18px; border-radius: var(--radius-md, 8px); }
.lp-stats {
    display: flex; flex-wrap: wrap; gap: 18px;
    margin: 8px 0 14px;
}
.lp-stat { display: flex; flex-direction: column; }
.lp-stat-num {
    font-size: 1.6rem; font-weight: 700; color: var(--vv-navy, #103a61);
    line-height: 1.1;
}
.lp-stat-lbl {
    font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
    color: #495057; font-weight: 600;
}
.lp-sub { margin-top: 14px; }
.lp-sub-title {
    font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--vv-green, #147356); font-weight: 700; margin: 0 0 8px;
}
.lp-wt-list { display: flex; flex-direction: column; gap: 5px; }
.lp-wt-row { display: grid; grid-template-columns: 36% 1fr 44px; align-items: center; gap: 10px; font-size: 0.85rem; }
.lp-wt-label { color: #103a61; font-weight: 600; }
.lp-wt-track { position: relative; height: 10px; background: #e9ecef; border-radius: 5px; overflow: hidden; display: block; }
.lp-wt-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #147356, #f84a4a); border-radius: 5px; display: block; }
.lp-wt-num { text-align: right; color: #103a61; font-weight: 700; font-variant-numeric: tabular-nums; }
.lp-matrix-wrap { max-width: 560px; margin: 0; }
.lp-matrix-svg { display: block; width: 100%; height: auto; }
.lp-pt circle { cursor: default; transition: opacity 0.1s; }
.lp-pt:hover circle { opacity: 1; }
.lp-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 0.78rem; color: #495057; }
.lp-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.lp-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.lp-title-list { list-style: none; margin: 0; padding: 0; }
.lp-title-list li {
    display: flex; align-items: baseline; gap: 8px;
    padding: 5px 0; border-bottom: 1px dashed #e9ecef;
    font-size: 0.88rem;
}
.lp-title-list li:last-child { border-bottom: none; }
.lp-title-count {
    display: inline-block; min-width: 28px;
    color: var(--vv-red, #f84a4a); font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.lp-title-label { flex: 1; color: #103a61; }
.lp-title-roles { color: #6c757d; font-size: 0.78rem; }
.lp-pp-table {
    width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.lp-pp-table thead th {
    font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
    color: #495057; font-weight: 700;
    text-align: left; padding: 6px 8px;
    border-bottom: 1px solid #ced4da;
}
.lp-pp-table tbody td {
    padding: 6px 8px; border-bottom: 1px dashed #e9ecef;
    color: #333; vertical-align: middle;
}
.lp-pp-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: #103a61; }
.lp-pp-area { color: #6c757d; font-weight: 400; }

/* ==========================================================================
   Diskret footer med lenker til slide-dekk (dag 1 og dag 2).
   Skjules av .dag-links-hidden på <body> (styrt av admin i config-endepunkt).
   ========================================================================== */
.deck-links {
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.72rem;
    color: #adb5bd;
    pointer-events: auto;
    z-index: 10;
}
.deck-links__a {
    color: inherit;
    text-decoration: none;
    opacity: 0.6;
    padding: 2px 6px;
    transition: opacity 0.2s;
}
.deck-links__a:hover,
.deck-links__a:focus-visible {
    opacity: 1;
    text-decoration: underline;
}
.deck-links__sep {
    opacity: 0.5;
    margin: 0 2px;
}
body.dag-links-hidden .deck-links { display: none; }

/* Admin: inline toggle for slide-lenke-synlighet */
.admin-inline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #103a61;
}
.admin-inline-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Overordnet rapport-blokk */
.ls-report-block {
    border: 1px solid #e9ecef;
    padding: 4px 18px;
    border-radius: var(--radius-md);
    background: #f6f9fc;
    margin-top: 32px;
    margin-bottom: 24px;
}
.ls-report-block[open] { padding: 16px 18px; }
.ls-report-body { padding: 8px 0; display: flex; flex-direction: column; gap: 12px; }
.ls-report-meta { font-size: 0.82rem; color: #6c757d; }
.ls-report-content {
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #212529;
}

/* Kvantitativ blokk øverst i rapporten */
.ls-report-quant {
    padding: 16px 18px; margin: 12px 0;
    background: #f6f9fc; border: 1px solid #dee2e6; border-radius: 8px;
}
.ls-report-quant-heading {
    font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--vv-navy); margin: 0 0 4px;
}
.ls-report-quant-sub { margin: 0 0 12px; font-size: 0.85rem; color: #6c757d; }
.qb-block { margin: 12px 0; }
.qb-title {
    font-size: 0.85rem; font-weight: 700; color: var(--vv-navy);
    margin: 0 0 6px; text-transform: uppercase; letter-spacing: 0.04em;
}
.qb-subtitle { font-size: 0.85rem; font-weight: 600; color: #495057; margin: 10px 0 4px; }
.qb-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.qb-list li {
    display: grid; grid-template-columns: minmax(140px, 30%) 1fr auto; gap: 10px;
    align-items: center; font-size: 0.85rem;
}
.qb-label { color: #212529; }
.qb-count { color: #6c757d; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.qb-bar-wrap {
    background: #e9ecef; border-radius: 999px; height: 8px; overflow: hidden;
}
.qb-bar { display: block; height: 100%; background: var(--vv-orange, #ff9008); border-radius: 999px; }
.qb-weight-line { margin: 4px 0; font-size: 0.88rem; color: #212529; }
.qb-tiltak-summary { margin: 0 0 8px; font-size: 0.88rem; color: var(--vv-navy); font-weight: 600; }
.qb-tiltak-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.qb-tiltak-list li { font-size: 0.85rem; color: #333; }
.qb-tiltak-count {
    display: inline-block; min-width: 32px; text-align: center;
    background: var(--vv-navy-deep); color: var(--vv-white);
    font-size: 0.75rem; font-weight: 700; padding: 2px 6px; border-radius: 4px;
    margin-right: 6px;
}
.qb-tiltak-name { font-weight: 500; color: var(--vv-navy); }
.qb-tiltak-desc { color: #6c757d; font-size: 0.82rem; }

/* Kort sammendrag */
.ls-report-short {
    margin: 14px 0; padding: 12px 16px;
    background: #fff8e6; border: 1px solid #f0d38a; border-radius: 8px;
}
.ls-report-short-summary {
    cursor: pointer; font-weight: 700; color: var(--vv-navy);
    font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em;
    list-style: none;
}
.ls-report-short-summary::-webkit-details-marker { display: none; }
.ls-report-short-summary::before {
    content: "▸"; color: #a45c11; font-size: 0.85em;
    margin-right: 8px; display: inline-block;
    transition: transform 0.15s ease;
}
.ls-report-short[open] > .ls-report-short-summary::before { transform: rotate(90deg); }
.ls-report-short-body {
    margin-top: 10px; font-size: 0.95rem; line-height: 1.6; color: #212529;
}
.ls-report-short-body p { margin: 6px 0; }
.ls-report-content :first-child { margin-top: 0; }
.ls-report-content :last-child { margin-bottom: 0; }
.ls-report-content h2 {
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--vv-navy, #103a61);
    margin: 18px 0 6px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 3px;
}
.ls-report-content h3 { font-size: 0.95rem; margin: 12px 0 4px; }
.ls-report-content ul, .ls-report-content ol { padding-left: 22px; margin: 4px 0 8px; }
.ls-report-content li { margin: 3px 0; }
.ls-report-content p { margin: 0 0 8px; }
.ls-report-actions {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    padding-top: 6px;
}
.ls-report-delete { color: var(--vv-red, #f84a4a); }
.ls-report-msg { font-size: 0.85rem; font-weight: 600; color: #6c757d; }
.ls-report-msg--ok { color: var(--vv-green, #147356); }
.ls-report-msg--err { color: var(--vv-red, #f84a4a); }
.ls-report-msg--info { color: var(--vv-mint, #147356); }

.ls-report-adjust {
    padding: 12px 14px;
    background: #f6f9fc;
    border: 1px dashed #dee2e6;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ls-report-adjust-label {
    font-weight: 700;
    color: var(--vv-navy);
    font-size: 0.92rem;
}
.ls-report-adjust-hint { margin: 0; color: #495057; font-size: 0.85rem; }
.ls-report-adjust-input {
    padding: 8px 10px;
    border: 1.5px solid #ced4da;
    border-radius: 6px;
    font: inherit;
    font-size: 0.92rem;
    resize: vertical;
    min-height: 44px;
}
.ls-report-adjust-input:focus {
    outline: none;
    border-color: var(--vv-green);
}
.ls-report-adjust-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ls-report-addendum {
    padding: 12px 14px;
    background: #eef5fb;
    border: 1px dashed #b6cde0;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.ls-report-addendum-label {
    font-weight: 700;
    color: var(--vv-navy);
    font-size: 0.92rem;
}
.ls-report-addendum-hint { margin: 0; color: #495057; font-size: 0.85rem; }
.ls-report-addendum-input {
    padding: 8px 10px;
    border: 1.5px solid #b6cde0;
    border-radius: 6px;
    font: inherit;
    font-size: 0.92rem;
    resize: vertical;
    min-height: 60px;
    background: #fff;
}
.ls-report-addendum-input:focus {
    outline: none;
    border-color: var(--vv-green);
}

.ls-report-content-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ls-report-content-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ls-report-content-hint {
    color: #6c757d;
    font-size: 0.82rem;
}
.ls-report-edit-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #ced4da;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 320px;
    background: #fff;
}
.ls-report-edit-input:focus {
    outline: none;
    border-color: var(--vv-green);
}

/* ============================================================
   Custom modal (SK.ui.confirm / SK.ui.alert)
   ============================================================ */
.uimodal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 58, 97, 0.42);
    backdrop-filter: blur(2px);
    padding: 24px;
    animation: uimodal-fade 140ms ease;
}
@keyframes uimodal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
.uimodal-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px -12px rgba(16, 58, 97, 0.35), 0 0 0 1px rgba(16, 58, 97, 0.08);
    max-width: 460px;
    width: 100%;
    padding: 24px 26px 20px;
    animation: uimodal-pop 160ms cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes uimodal-pop {
    from { transform: translateY(6px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.uimodal-card--danger { border-top: 4px solid var(--vv-red, #f84a4a); }
.uimodal-card--info { border-top: 4px solid var(--vv-green, #147356); }
.uimodal-title {
    margin: 0 0 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--vv-navy, #103a61);
}
.uimodal-body {
    margin: 0 0 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #212529;
}
.uimodal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.uimodal-actions .btn { min-width: 96px; }
.btn-danger {
    background: var(--vv-red, #f84a4a);
    color: #fff;
    border: none;
}
.btn-danger:hover { background: #e63838; }

/* --- Veileder-chat (flytende hjelpe-boble) --- */
.veileder-fab {
    position: fixed; right: 20px; bottom: 20px; z-index: 950;
    display: none; align-items: center; gap: 10px;
    padding: 12px 18px 12px 14px;
    background: var(--vv-navy); color: var(--vv-white);
    border: none; border-radius: 999px; cursor: pointer;
    font-family: var(--font); font-weight: 600; font-size: 0.95rem;
    box-shadow: 0 12px 28px rgba(16,58,97,0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
body.is-authed .veileder-fab { display: inline-flex; }
body:has(#screen-welcome.active) .veileder-fab,
body:has(#screen-welcome.active) .veileder-panel,
body.admin-mode .veileder-fab,
body.admin-mode .veileder-panel { display: none !important; }
.veileder-fab:hover { background: #081e32; transform: translateY(-1px); box-shadow: 0 14px 32px rgba(16,58,97,0.36); }
.veileder-fab:focus-visible { outline: 3px solid var(--vv-mint); outline-offset: 2px; }
.veileder-fab__label { white-space: nowrap; }

.veileder-panel {
    position: fixed; right: 20px; bottom: 84px; z-index: 951;
    width: 380px; max-width: calc(100vw - 40px);
    height: 560px; max-height: calc(100vh - 120px);
    background: #fff; border-radius: 14px;
    box-shadow: 0 20px 50px rgba(16,58,97,0.28);
    display: none; flex-direction: column; overflow: hidden;
    border: 1px solid #e9ecef;
}
.veileder-panel[data-open="true"] { display: flex; }

.veileder-head {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px 16px 12px;
    background: linear-gradient(135deg, var(--vv-navy), var(--vv-navy-deep));
    color: var(--vv-white);
}
.veileder-head-text { flex: 1 1 auto; min-width: 0; }
.veileder-head-badge {
    display: inline-block; font-size: 0.68rem; font-weight: 700;
    padding: 2px 8px; border-radius: 20px;
    background: rgba(39,222,166,0.24); color: var(--vv-mint);
    text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: 6px;
}
.veileder-head-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 4px; color: var(--vv-white); }
.veileder-head-sub { font-size: 0.82rem; opacity: 0.9; margin: 0; line-height: 1.4; color: var(--vv-white); }
.veileder-head-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.veileder-close, .veileder-clear {
    background: rgba(255,255,255,0.14); border: none; color: var(--vv-white);
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem; flex: 0 0 auto;
}
.veileder-close:hover, .veileder-clear:hover { background: rgba(255,255,255,0.24); }

.veileder-messages {
    flex: 1 1 auto; overflow-y: auto; padding: 16px;
    background: var(--vv-off-white);
    display: flex; flex-direction: column; gap: 10px;
    font-size: 0.92rem; line-height: 1.55;
}
.veileder-msg { display: flex; }
.veileder-msg--agent { justify-content: flex-start; }
.veileder-msg--user { justify-content: flex-end; }
.veileder-bubble {
    max-width: 82%;
    padding: 10px 13px; border-radius: 12px;
    background: #fff; color: var(--vv-navy-deep);
    border: 1px solid #e9ecef;
}
.veileder-msg--user .veileder-bubble {
    background: var(--vv-navy); color: var(--vv-white); border-color: var(--vv-navy);
}
.veileder-bubble p { margin: 0 0 6px; }
.veileder-bubble p:last-child { margin-bottom: 0; }
.veileder-bubble ul { margin: 4px 0 6px; padding-left: 20px; }
.veileder-bubble li { margin: 2px 0; }
.veileder-bubble h4, .veileder-bubble h5, .veileder-bubble h6 {
    font-size: 0.9rem; color: var(--vv-navy);
    margin: 6px 0 4px; text-transform: uppercase; letter-spacing: 0.03em;
}
.veileder-msg--user .veileder-bubble h4,
.veileder-msg--user .veileder-bubble h5,
.veileder-msg--user .veileder-bubble h6 { color: var(--vv-mint); }
.veileder-bubble a { color: var(--vv-green); }
.veileder-typing .veileder-bubble { color: #6c757d; font-style: italic; }

.veileder-suggestions {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 0 12px 8px;
    background: #fff;
}
.veileder-chip {
    font-size: 0.78rem; color: var(--vv-green);
    background: rgba(20,115,86,0.08);
    border: 1px solid rgba(20,115,86,0.28);
    border-radius: 999px;
    padding: 5px 10px; cursor: pointer;
    font-family: inherit;
}
.veileder-chip:hover { background: rgba(20,115,86,0.16); }

.veileder-form {
    display: flex; gap: 8px; padding: 10px 12px 12px;
    border-top: 1px solid #e9ecef; background: #fff;
    align-items: flex-end;
}
.veileder-form textarea {
    flex: 1 1 auto; min-height: 44px; max-height: 140px;
    padding: 10px 12px; border-radius: 10px;
    border: 1px solid #dee2e6; font-family: inherit; font-size: 0.9rem;
    resize: vertical; color: var(--vv-navy-deep); background: #fff;
    line-height: 1.4;
}
.veileder-form textarea:focus { outline: none; border-color: var(--vv-green); }
.veileder-send { flex: 0 0 auto; }
.veileder-send[disabled] { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 480px) {
    .veileder-fab { right: 12px; bottom: 12px; padding: 10px 14px 10px 12px; }
    .veileder-fab__label { display: none; }
    .veileder-panel { right: 12px; left: 12px; bottom: 74px; width: auto; }
}


.feedback-card {
    max-width: 780px;
    margin: 0 auto;
    padding: 32px 36px;
}
.feedback-header { margin-bottom: 22px; }
.feedback-badge {
    display: inline-block;
    background: rgba(125,92,195,0.14);
    color: #5a3b9d;
    font-size: 0.72rem; font-weight: 700;
    padding: 4px 10px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 0.04em;
    margin-bottom: 12px;
}
.feedback-title {
    color: var(--vv-navy);
    margin: 0 0 12px;
    font-size: 1.6rem;
}
.feedback-lead {
    color: #333;
    font-size: 0.98rem;
    line-height: 1.6;
    margin: 0 0 10px;
}
.feedback-lead--sub {
    color: #555;
    font-style: italic;
}
.feedback-fields {
    display: flex; flex-direction: column; gap: 18px;
    margin-bottom: 18px;
}
.feedback-fields .field-hint {
    color: #6c757d; font-size: 0.85rem; margin: 0;
}
.feedback-fields textarea {
    font-family: var(--font); font-size: 0.98rem;
    padding: 12px 14px;
    border: 1.5px solid #ced4da; border-radius: var(--radius-sm);
    background: var(--vv-white);
    resize: vertical;
    min-height: 72px;
}
.feedback-fields textarea:focus {
    outline: none;
    border-color: #7d5cc3;
    box-shadow: 0 0 0 3px rgba(125,92,195,0.14);
}
.feedback-msg {
    margin: 0 0 12px;
    min-height: 1.2em;
    font-size: 0.9rem;
}
.feedback-msg--ok { color: var(--vv-green); font-weight: 600; }
.feedback-msg--err { color: var(--vv-red); font-weight: 600; }
.feedback-actions {
    display: flex; gap: 10px; flex-wrap: wrap;
}

/* --- Admin — anonym tilbakemelding --- */
.ls-feedback-head { margin-bottom: 12px; }
.fb-entries {
    display: flex; flex-direction: column; gap: 14px;
    margin-top: 10px;
}
.fb-entry {
    border: 1px solid #e9ecef;
    border-radius: var(--radius-md);
    background: #fafafa;
    padding: 14px 16px;
}
.fb-entry-head {
    display: flex; justify-content: flex-end;
    margin-bottom: 8px;
}
.fb-entry-date {
    font-size: 0.78rem; color: #6c757d;
    font-variant-numeric: tabular-nums;
}
.fb-field { margin-bottom: 10px; }
.fb-field:last-child { margin-bottom: 0; }
.fb-field-label {
    font-size: 0.78rem; font-weight: 700; color: #5a3b9d;
    text-transform: uppercase; letter-spacing: 0.03em;
    margin-bottom: 4px;
}
.fb-field-body {
    color: #333; line-height: 1.55; font-size: 0.95rem;
    white-space: pre-wrap;
}

/* ---- Admin debug panel ---- */
.admin-debug-toggle {
    position: fixed; bottom: 14px; right: 14px; z-index: 9000;
    padding: 5px 11px; background: var(--vv-navy); color: #fff;
    border: none; border-radius: 6px; font-size: 0.78rem;
    font-weight: 700; cursor: pointer; opacity: 0.7;
}
.admin-debug-toggle:hover { opacity: 1; }
.admin-debug-panel {
    position: fixed; bottom: 50px; right: 14px; z-index: 9001;
    width: 560px; max-width: calc(100vw - 28px);
    background: #1b1b1f; color: #d4d0db; border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.45); font-family: monospace;
    font-size: 0.76rem; overflow: hidden;
}
.admin-debug-head {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; background: var(--vv-navy);
}
.admin-debug-title { flex: 1; font-weight: 700; font-size: 0.78rem; color: #c8bdd0; }
.admin-debug-clear, .admin-debug-close {
    background: none; border: 1px solid rgba(200,189,208,0.4);
    color: #c8bdd0; border-radius: 4px; padding: 2px 7px;
    font-size: 0.72rem; cursor: pointer;
}
.admin-debug-clear:hover, .admin-debug-close:hover { background: rgba(255,255,255,0.08); }
.admin-debug-log {
    max-height: 320px; overflow-y: auto; padding: 6px 0;
}
.dbg-entry {
    display: flex; gap: 8px; padding: 2px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    line-height: 1.45; white-space: pre-wrap; word-break: break-all;
}
.dbg-entry--warn { color: #f5c842; }
.dbg-entry--err  { color: #ff6b6b; }
.dbg-ts { flex-shrink: 0; color: #6c7b8b; min-width: 60px; }
.dbg-text { flex: 1; }
