:root {
    --brand: #013827;
    --brand-hover: #025236;
    --brand-light: #f2f8f5;
    --brand-mid: #d0e8db;
}

html, body {
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
}

button, a[href], [role="button"], label { cursor: pointer; }

#blazor-error-ui[data-nosnippet] { display: none; }

.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; }

/* Kart: tegnemodus-cursor + sørg for at Leaflet ligger under Blazor-overlays */
.kart-tegnemodus { cursor: crosshair !important; }
.leaflet-container { font: inherit; }

/* Kompetanse: rik-tekst (markdown) artikkel-rendering */
.kmd { color: #374151; line-height: 1.7; font-size: 0.925rem; }
.kmd > :first-child { margin-top: 0; }
.kmd h1 { font-size: 1.4rem; font-weight: 700; color: #111827; margin: 1.3em 0 0.5em; line-height: 1.25; }
.kmd h2 { font-size: 1.18rem; font-weight: 700; color: #111827; margin: 1.2em 0 0.45em; line-height: 1.3; }
.kmd h3 { font-size: 1.02rem; font-weight: 600; color: #1f2937; margin: 1.1em 0 0.35em; }
.kmd p { margin: 0.6em 0; }
.kmd ul { list-style: disc; padding-left: 1.4em; margin: 0.6em 0; }
.kmd ol { list-style: decimal; padding-left: 1.5em; margin: 0.6em 0; }
.kmd li { margin: 0.2em 0; }
.kmd strong { font-weight: 700; color: #111827; }
.kmd em { font-style: italic; }
.kmd a { color: var(--brand); text-decoration: underline; }
.kmd blockquote { border-left: 3px solid var(--brand-mid); padding: 0.2em 0 0.2em 1em; margin: 0.8em 0; color: #4b5563; background: var(--brand-light); border-radius: 0 6px 6px 0; }
.kmd code { background: #f3f4f6; padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.85em; font-family: ui-monospace, monospace; }
.kmd pre { background: #1f2937; color: #f9fafb; padding: 0.8em 1em; border-radius: 8px; overflow-x: auto; margin: 0.8em 0; }
.kmd pre code { background: none; padding: 0; color: inherit; }
.kmd hr { border: 0; border-top: 1px solid var(--brand-mid); margin: 1.2em 0; }
.kmd img { max-width: 100%; border-radius: 8px; margin: 0.6em 0; }
.kmd table { border-collapse: collapse; margin: 0.8em 0; font-size: 0.85rem; }
.kmd th, .kmd td { border: 1px solid #e5e7eb; padding: 0.4em 0.7em; text-align: left; }
.kmd th { background: var(--brand-light); font-weight: 600; }

/* Kompetanse: formaterings-verktøylinje */
.md-btn { padding: 0.2rem 0.55rem; border-radius: 5px; font-size: 12px; line-height: 1.4; color: #4b5563; cursor: pointer; border: 1px solid transparent; background: transparent; }
.md-btn:hover { background: #fff; color: #111827; border-color: #e5e7eb; }
.md-div { width: 1px; align-self: stretch; background: #e5e7eb; margin: 2px 3px; }
/* WYSIWYG: placeholder når editoren er tom */
#kompetanse-wys:empty:before { content: "Skriv en fengende artikkel… marker tekst og bruk knappene over."; color: #9ca3af; pointer-events: none; }

/* Analyse: live transkripsjon + logg (JS-rendret innhold) */
.analyse-transkript p { margin-bottom: 4px; }
.analyse-transkript .live { color: #94a3b8; font-style: italic; }
.analyse-log .entry { margin-bottom: 1px; }
.analyse-log .entry.selger { color: #2563eb; }
.analyse-log .entry.kunde  { color: #059669; }
.analyse-log .entry.system { color: #d97706; }
